diff --git a/CHANGELOG.md b/CHANGELOG.md index a01cb86..11af210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Refactoring - Tests +## [0.2.1] - 2021-03-14 +### Added +- Code language support. + +### Changed +- Language link style +- Stripe HTML from index field + ## [0.2.0] - 2021-03-14 ### Added - Code field support. diff --git a/dist/js/field.js b/dist/js/field.js index 8bb5355..b87ef43 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[r].concat(i).concat([o]).join("\n")}var a;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;or.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o2),g=/Android/.test(e),b=h||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=h||/Mac/.test(t),y=/\bCrOS\b/.test(e),k=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,c=!0);var w=v&&(l||d&&(null==x||x<12.11)),C=r||a&&s>=9;function M(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,S=function(e,t){var r=e.className,n=M(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function z(e,t){return T(e).appendChild(t)}function L(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=s-i,a+=r-a%r,i=s+1}}h?q=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(q=function(e){try{e.select()}catch(e){}});var D=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(e,t){for(var r=0;r=t)return n+Math.min(a,t-o);if(o+=i-n,n=i+1,(o+=r-o%r)>=t)return n}}var V=[""];function Q(e){for(;V.length<=e;)V.push(G(V)+" ");return V[e]}function G(e){return e[e.length-1]}function Z(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||$.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var o=(t+r)/2,i=n<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}var se=null;function ce(e,t,r){var n;se=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==r?n=o:se=o),i.from==t&&(i.from!=i.to&&"before"!=r?n=o:se=o)}return null!=n?n:se}var le=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,i=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(c,l){var u="ltr"==l?"L":"R";if(0==c.length||"ltr"==l&&!r.test(c))return!1;for(var d,m=c.length,f=[],p=0;p-1&&(n[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function he(e,t){var r=fe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o0}function ye(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){ke(e),xe(e)}function Me(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var Se,Te,ze=function(){if(a&&s<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Le(e){if(null==Se){var t=L("span","​");z(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var r=Se?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ee(e){if(null!=Te)return Te;var t=z(e,document.createTextNode("AخA")),r=_(t,0,1).getBoundingClientRect(),n=_(t,1,2).getBoundingClientRect();return T(e),!(!r||r.left==r.right)&&(Te=n.right-r.right<3)}var Oe,Ae=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(r.push(i.slice(0,a)),t+=a+1):(r.push(i),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne="oncopy"in(Oe=L("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),qe=null;var je={},Fe={};function Ie(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ie("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ie("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function De(e,t){t=Ie(t);var r=je[t.name];if(!r)return De(e,"text/plain");var n=r(e,t);if(We.hasOwnProperty(t.name)){var o=We[t.name];for(var i in o)o.hasOwnProperty(i)&&(n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=o[i])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var We={};function Pe(e,t){F(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Be(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function Ke(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ue(e,t,r){return!e.startState||e.startState(t,r)}var He=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Je(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],i=o.chunkSize();if(t=e.first&&tr?et(r,Je(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?et(e.line,t):r<0?et(e.line,0):e}(t,Je(e,t.line).text.length)}function ct(e,t){for(var r=[],n=0;n=this.string.length},He.prototype.sol=function(){return this.pos==this.lineStart},He.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},He.prototype.next=function(){if(this.post},He.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},He.prototype.skipToEnd=function(){this.pos=this.string.length},He.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},He.prototype.backUp=function(e){this.pos-=e},He.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},He.prototype.current=function(){return this.string.slice(this.start,this.pos)},He.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},He.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},He.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var lt=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,r,n){var o=[e.state.modeGen],i={};kt(e,t.text,e.doc.mode,r,function(e,t){return o.push(e,t)},i,n);for(var a=r.state,s=function(n){r.baseTokens=o;var s=e.state.overlays[n],c=1,l=0;r.state=!0,kt(e,t.text,s.mode,r,function(e,t){for(var r=c;le&&o.splice(c,1,e,o[c+1],n),c+=2,l=Math.min(e,n)}if(t)if(s.opaque)o.splice(r,c-r,e,"overlay "+t),c=r+2;else for(;re.options.maxHighlightLength&&Be(e.doc.mode,n.state),i=dt(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new ut(n,!0,t);var i=function(e,t,r){for(var n,o,i=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var c=Je(i,s-1),l=c.stateAfter;if(l&&(!r||s+(l instanceof lt?l.lookAhead:0)<=i.modeFrontier))return s;var u=I(c.text,null,e.options.tabSize);(null==o||n>u)&&(o=s-1,n=u)}return o}(e,t,r),a=i>n.first&&Je(n,i-1).stateAfter,s=a?ut.fromSaved(n,a,i):new ut(n,Ue(n.mode),i);return n.iter(i,t,function(r){pt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=o.viewFrom&&nt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,r){return t instanceof lt?new ut(e,Be(e.mode,t.state),r,t.lookAhead):new ut(e,Be(e.mode,t),r)},ut.prototype.save=function(e){var t=!1!==e?Be(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new lt(t,this.maxLookAhead):t};var bt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function vt(e,t,r,n){var o,i,a=e.doc,s=a.mode,c=Je(a,(t=st(a,t)).line),l=ft(e,t.line,r),u=new He(c.text,e.options.tabSize,l);for(n&&(i=[]);(n||u.pose.options.maxHighlightLength?(s=!1,a&&pt(e,t,n,d.pos),d.pos=t.length,c=null):c=yt(gt(r,d,n.state,m),i),m){var f=m[0].name;f&&(c="m-"+(c?f+" "+c:f))}if(!s||u!=c){for(;l=t:i.to>t);(n||(n=[])).push(new Ct(a,i.from,s?null:i.to))}}return n}(r,o,a),c=function(e,t,r){var n;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!r||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&s)for(var y=0;yt)&&(!r||At(r,i.marker)<0)&&(r=i.marker)}return r}function Ft(e,t,r,n,o){var i=Je(e,t),a=wt&&i.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&o.inclusiveLeft?tt(l.to,r)>=0:tt(l.to,r)>0)||u>=0&&(c.marker.inclusiveRight&&o.inclusiveLeft?tt(l.from,n)<=0:tt(l.from,n)<0)))return!0}}}function It(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Dt(e,t){var r=Je(e,t),n=It(r);return r==n?t:Ze(n)}function Wt(e,t){if(t>e.lastLine())return t;var r,n=Je(e,t);if(!Pt(e,n))return t;for(;r=qt(n);)n=r.find(1,!0).line;return Ze(n)+1}function Pt(e,t){var r=wt&&t.markedSpans;if(r)for(var n=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var Jt=function(e,t,r){this.text=e,Lt(this,t),this.height=r?r(this):1};function Vt(e){e.parent=null,zt(e)}Jt.prototype.lineNo=function(){return Ze(this)},ye(Jt);var Qt={},Gt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Gt:Qt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var r=E("span",null,null,c?"padding-right: .1px":null),n={pre:E("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;n.pos=0,n.addToken=$t,Ee(e.display.measure)&&(a=ue(i,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(i,n,mt(e,i,t!=e.display.externalMeasured&&Ze(i))),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=N(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=N(i.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Le(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=N(n.pre.className,n.textClass||"")),n}function Xt(e){var t=L("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function $t(e,t,r,n,o,i,c){if(t){var l,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",o=0;ol&&d.from<=l);m++);if(d.to>=u)return e(r,n,o,i,a,s,c);e(r,n.slice(0,d.to-l),o,i,null,s,c),i=null,n=n.slice(d.to-l),l=d.to}}}function tr(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,o=e.text,i=0;if(n)for(var a,s,c,l,u,d,m,f=o.length,p=0,h=1,g="",b=0;;){if(b==p){c=l=u=s="",m=null,d=null,b=1/0;for(var v=[],y=void 0,k=0;kp||w.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&b>x.to&&(b=x.to,l=""),w.className&&(c+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==p&&(u+=" "+w.startStyle),w.endStyle&&x.to==b&&(y||(y=[])).push(w.endStyle,x.to),w.title&&((m||(m={})).title=w.title),w.attributes)for(var C in w.attributes)(m||(m={}))[C]=w.attributes[C];w.collapsed&&(!d||At(d.marker,w)<0)&&(d=x)}else x.from>p&&b>x.from&&(b=x.from)}if(y)for(var M=0;M=f)break;for(var S=Math.min(f,b);;){if(g){var T=p+g.length;if(!d){var z=T>S?g.slice(0,S-p):g;t.addToken(t,z,a?a+c:c,u,p+z.length==b?l:"",s,m)}if(T>=S){g=g.slice(S-p),p=S;break}p=T,u=""}g=o.slice(i,i=r[h++]),a=Zt(r[h++],t.cm.options)}}else for(var L=1;Lr)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Lr(e,t,r,n){return Ar(e,Or(e,t),r,n)}function Er(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&i.push((c.bottom+l.top)/2-r.top)}}i.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,r,n){var o,i=qr(t.map,r,n),c=i.node,l=i.start,u=i.end,d=i.collapse;if(3==c.nodeType){for(var m=0;m<4;m++){for(;l&&oe(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+u1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,o))}else{var f;l>0&&(d=n="right"),o=e.options.lineWrapping&&(f=c.getClientRects()).length>1?f["right"==n?f.length-1:0]:c.getBoundingClientRect()}if(a&&s<9&&!l&&(!o||!o.left&&!o.right)){var p=c.parentNode.getClientRects()[0];o=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Nr}for(var h=o.top-t.rect.top,g=o.bottom-t.rect.top,b=(h+g)/2,v=t.view.measure.heights,y=0;yt)&&(o=(i=c-s)-1,t>=c&&(a="right")),null!=o){if(n=e[l+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==o)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)n=e[2+(l-=3)],a="left";if("right"==r&&o==c-s)for(;l=0&&(r=e[o]).left==r.right;o--);return r}function Fr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(c=n.text.length,l="before"):c<=0&&(c=0,l="after"),!s)return a("before"==l?c-1:c,"before"==l);function u(e,t,r){var n=1==s[t].level;return a(r?e-1:e,n!=r)}var d=ce(s,c,l),m=se,f=u(c,d,"before"==l);return null!=m&&(f.other=u(c,m,"before"!=l)),f}function Vr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=Je(e.doc,t.line),o=Kt(n)+wr(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function Qr(e,t,r,n,o){var i=et(e,t,r);return i.xRel=o,n&&(i.outside=n),i}function Gr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Qr(n.first,0,null,-1,-1);var o=Ye(n,r),i=n.first+n.size-1;if(o>i)return Qr(n.first+n.size-1,Je(n,i).text.length,null,1,1);t<0&&(t=0);for(var a=Je(n,o);;){var s=$r(e,a,o,t,r),c=jt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==o)return l;a=Je(n,o=l.line)}}function Zr(e,t,r,n){n-=Br(t);var o=t.text.length,i=ae(function(t){return Ar(e,r,t-1).bottom<=n},o,0);return{begin:i,end:o=ae(function(t){return Ar(e,r,t).top>n},i,o)}}function Yr(e,t,r,n){return r||(r=Or(e,t)),Zr(e,t,r,Kr(e,t,Ar(e,r,n),"line").top)}function Xr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function $r(e,t,r,n,o){o-=Kt(t);var i=Or(e,t),a=Br(t),s=0,c=t.text.length,l=!0,u=ue(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,r,n,o,i,a){var s=Zr(e,t,n,a),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,d=null,m=0;m=l||f.to<=c)){var p=1!=f.level,h=Ar(e,n,p?Math.min(l,f.to)-1:Math.max(c,f.from)).right,g=hg)&&(u=f,d=g)}}u||(u=o[o.length-1]);u.froml&&(u={from:u.from,to:l,level:u.level});return u}:function(e,t,r,n,o,i,a){var s=ae(function(s){var c=o[s],l=1!=c.level;return Xr(Jr(e,et(r,l?c.to:c.from,l?"before":"after"),"line",t,n),i,a,!0)},0,o.length-1),c=o[s];if(s>0){var l=1!=c.level,u=Jr(e,et(r,l?c.from:c.to,l?"after":"before"),"line",t,n);Xr(u,i,a,!0)&&u.top>a&&(c=o[s-1])}return c})(e,t,r,i,u,n,o);s=(l=1!=d.level)?d.from:d.to-1,c=l?d.to:d.from-1}var m,f,p=null,h=null,g=ae(function(t){var r=Ar(e,i,t);return r.top+=a,r.bottom+=a,!!Xr(r,n,o,!1)&&(r.top<=o&&r.left<=n&&(p=t,h=r),!0)},s,c),b=!1;if(h){var v=n-h.left=k.bottom?1:0}return Qr(r,g=ie(t.text,g,1),f,b,n-m)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rr){Rr=L("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Rr.appendChild(document.createTextNode("x")),Rr.appendChild(L("br"));Rr.appendChild(document.createTextNode("x"))}z(e.measure,Rr);var r=Rr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),T(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),r=L("pre",[t],"CodeMirror-line-like");z(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function rn(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=i.offsetLeft+i.clientLeft+o,n[s]=i.clientWidth}return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(o){if(Pt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(c=Je(e.doc,l.line).text).length==l.ch){var u=I(c,c.length,e.options.tabSize)-c.length;l=et(l.line,Math.max(0,Math.round((i-Mr(e.display).left)/tn(e.display))-u))}return l}function cn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)wt&&Dt(e.doc,t)o.viewFrom?dn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)dn(e);else if(t<=o.viewFrom){var i=mn(e,r,r+n,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=n):dn(e)}else if(r>=o.viewTo){var a=mn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):dn(e)}else{var s=mn(e,t,t,-1),c=mn(e,r,r+n,1);s&&c?(o.view=o.view.slice(0,s.index).concat(or(e,s.lineN,c.lineN)).concat(o.view.slice(c.index)),o.viewTo+=n):dn(e)}var l=o.externalMeasured;l&&(r=o.lineN&&t=n.viewTo)){var i=n.view[cn(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==W(a,r)&&a.push(r)}}}function dn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mn(e,t,r,n){var o,i=cn(e,t),a=e.display.view;if(!wt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,c=0;c0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,r+=o}for(;Dt(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function fn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().linet||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",i),o=!0)}o||n(t,r,"ltr")}(h,r||0,null==n?m:n,function(e,t,o,d){var g="ltr"==o,b=f(e,g?"left":"right"),v=f(t-1,g?"right":"left"),y=null==r&&0==e,k=null==n&&t==m,x=0==d,w=!h||d==h.length-1;if(v.top-b.top<=3){var C=(l?k:y)&&w,M=(l?y:k)&&x?s:(g?b:v).left,_=C?c:(g?v:b).right;u(M,b.top,_-M,b.bottom)}else{var S,T,z,L;g?(S=l&&y&&x?s:b.left,T=l?c:p(e,o,"before"),z=l?s:p(t,o,"after"),L=l&&k&&w?c:v.right):(S=l?p(e,o,"before"):s,T=!l&&y&&x?c:b.right,z=!l&&k&&w?s:v.left,L=l?p(t,o,"after"):c),u(S,b.top,T-S,b.bottom),b.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Cn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function kn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||wn(e))}function xn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Cn(e))},100)}function wn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),yn(e))}function Cn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Mn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||m<-.005)&&(Ge(o.line,c),_n(o.line),o.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(l/tn(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function _n(e){if(e.widgets)for(var t=0;t=a&&(i=Ye(t,Kt(Je(t,c))-e.wrapper.clientHeight),a=c)}return{from:i,to:Math.max(a,i+1)}}function Tn(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,i=Tr(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Cr(r),c=t.tops-n;if(t.topo+i){var u=Math.min(t.top,(l?s:t.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,m=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,f=Sr(e)-r.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+m-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function zn(e,t){null!=t&&(On(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ln(e){On(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function En(e,t,r){null==t&&null==r||On(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function On(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,An(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function An(e,t,r,n){var o=Tn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});En(e,o.scrollLeft,o.scrollTop)}function Rn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||io(e,{top:t}),Nn(e,t,!0),r&&io(e),eo(e,100))}function Nn(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function qn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,co(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function jn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Cr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+_r(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fn=function(e,t,r){this.cm=r;var n=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),me(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),me(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Fn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fn.prototype.zeroWidthHack=function(){var e=v&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new D,this.disableVert=new D},Fn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var o=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Fn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var In=function(){};function Dn(e,t){t||(t=jn(e));var r=e.display.barWidth,n=e.display.barHeight;Wn(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&Mn(e),Wn(e,jn(e)),r=e.display.barWidth,n=e.display.barHeight}function Wn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}In.prototype.update=function(){return{bottom:0,right:0}},In.prototype.setScrollLeft=function(){},In.prototype.setScrollTop=function(){},In.prototype.clear=function(){};var Pn={native:Fn,null:In};function Bn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Pn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?qn(e,t):Rn(e,t)},e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Kn=0;function Un(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kn},t=e.curOp,ir?ir.ops.push(t):t.ownsGroup=ir={ops:[t],delayedCallbacks:[]}}function Hn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ro(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Vn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Mn(t),e.barMeasure=jn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Lr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+_r(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Sr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Qn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!p){var i=L("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-wr(e.display))+"px;\n height: "+(t.bottom-t.top+_r(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,r,n){var o;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,s=Jr(e,t),c=r&&r!=t?Jr(e,r):s,l=Tn(e,o={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-n,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=l.scrollTop&&(Rn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=l.scrollLeft&&(qn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ft(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(n.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Be(t.mode,n.state):null,c=dt(e,i,n,!0);s&&(n.state=s),i.styles=c.styles;var l=i.styleClasses,u=c.classes;u?i.styleClasses=u:l&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),m=0;!d&&mr)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Zn(e,function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==fn(e))return!1;lo(e)&&(dn(e),t.dims=rn(e));var o=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),wt&&(i=Dt(e.doc,i),a=Wt(e.doc,a));var s=i!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=or(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=or(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,cn(e,r)))),n.viewTo=r}(e,i,a),r.viewOffset=Kt(Je(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=fn(e);if(!s&&0==l&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=A();if(!t||!O(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&O(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return l>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,o=e.options.lineNumbers,i=n.lineDiv,a=i.firstChild;function s(t){var r=t.nextSibling;return c&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var l=n.view,u=n.viewFrom,d=0;d-1&&(f=!1),lr(e,m,u,r)),f&&(T(m.lineNumber),m.lineNumber.appendChild(document.createTextNode($e(e.options,u)))),a=m.node.nextSibling}else{var p=gr(e,m,u,r);i.insertBefore(p,a)}u+=m.size}for(;a;)a=s(a)}(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=A()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&O(document.body,e.anchorNode)&&O(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),T(r.cursorDiv),T(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function oo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Sr(e))n&&(t.visible=Sn(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Cr(e.display)-Tr(e),r.top)}),t.visible=Sn(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!no(e,t))break;Mn(e);var o=jn(e);pn(e),Dn(e,o),so(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function io(e,t){var r=new ro(e,t);if(no(e,r)){Mn(e),oo(e,r);var n=jn(e);pn(e),Dn(e,n),so(e,n),r.finish()}}function ao(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function so(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+_r(e)+"px"}function co(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=n+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(o&&l||i&&u){if(i&&v&&c)e:for(var m=t.target,f=a.view;m!=s;m=m.parentNode)for(var p=0;p=0&&tt(e,n.to())<=0)return r}return-1};var ko=function(e,t){this.anchor=e,this.head=t};function xo(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort(function(e,t){return tt(e.from(),t.from())}),r=W(t,o);for(var i=1;i0:c>=0){var l=it(s.from(),a.from()),u=ot(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=r&&--r,t.splice(--i,2,new ko(d?u:l,d?l:u))}}return new yo(t,r)}function wo(e,t){return new yo([new ko(e,t||e)],0)}function Co(e){return e.text?et(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Mo(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Co(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Co(t).ch-t.to.ch),et(r,n)}function _o(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,b)}sr(e,"change",e,t)}function Oo(e,t,r){!function e(n,o,i){if(n.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(jo(e.done),G(e.done)):e.done.length&&!G(e.done).ranges?G(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}(o,o.lastOp==n)))a=G(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Co(t):i.changes.push(qo(e,t));else{var c=G(o.done);for(c&&c.ranges||Do(e.sel,o.done),i={changes:[qo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Io(e,t,r,n){var o=e.history,i=n&&n.origin;r==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,G(o.done),t))?o.done[o.done.length-1]=t:Do(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=r,n&&!1!==n.clearRedo&&jo(o.undone)}function Do(e,t){var r=G(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wo(e,t,r,n){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=r.markedSpans),++i})}function Po(e){if(!e)return null;for(var t,r=0;r-1&&(G(s)[d]=l[d],delete l[d])}}}return n}function Uo(e,t,r,n){if(n){var o=e.anchor;if(r){var i=tt(t,o)<0;i!=tt(r,o)<0?(o=t,t=r):i!=tt(t,r)<0&&(t=r)}return new ko(o,t)}return new ko(r||t,t)}function Ho(e,t,r,n,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Zo(e,new yo([Uo(e.sel.primary(),t,r,o)],0),n)}function Jo(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:s.to>t.ch))){if(o&&(he(c,"beforeCursorEnter"),c.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!c.atomic)continue;if(r){var d=c.find(n<0?1:-1),m=void 0;if((n<0?u:l)&&(d=ni(e,d,-n,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(m=tt(d,r))&&(n<0?m<0:m>0))return ti(e,d,t,n,o)}var f=c.find(n<0?-1:1);return(n<0?l:u)&&(f=ni(e,f,n,f.line==t.line?i:null)),f?ti(e,f,t,n,o):null}}return t}function ri(e,t,r,n,o){var i=n||1,a=ti(e,t,r,i,o)||!o&&ti(e,t,r,i,!0)||ti(e,t,r,-i,o)||!o&&ti(e,t,r,-i,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ni(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:r>0&&t.ch==(n||Je(e,t.line)).text.length?t.line0)){var u=[c,1],d=tt(l.from,s.from),m=tt(l.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:l.from,to:s.from}),(m>0||!a.inclusiveRight&&!m)&&u.push({from:s.to,to:l.to}),o.splice.apply(o,u),c+=u.length-3}}return o}(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)si(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else si(e,t)}}function si(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var r=_o(e,t);Fo(e,t,r,e.cm?e.cm.curOp.id:NaN),ui(e,t,r,St(e,t));var n=[];Oo(e,function(e,r){r||-1!=W(n,e.history)||(pi(e.history,t),n.push(e.history)),ui(e,t,null,St(e,t))})}}function ci(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,c="undo"==t?i.undone:i.done,l=0;l=0;--f){var p=m(f);if(p)return p.v}}}}function li(e,t){if(0!=t&&(e.first+=t,e.sel=new yo(Z(e.sel.ranges,function(e){return new ko(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){ln(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.linei&&(t={from:t.from,to:et(i,Je(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ve(e,t.from,t.to),r||(r=_o(e,t)),e.cm?function(e,t,r){var n=e.doc,o=e.display,i=t.from,a=t.to,s=!1,c=i.line;e.options.lineWrapping||(c=Ze(It(Je(n,i.line))),n.iter(c,a.line+1,function(e){if(e==o.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&be(e);Eo(n,t,r,on(e)),e.options.lineWrapping||(n.iter(c,i.line+t.text.length,function(e){var t=Ut(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var o=Je(e,n).stateAfter;if(o&&(!(o instanceof lt)||n+o.lookAhead1||!(this.children[0]instanceof gi))){var s=[];this.collapse(s),this.children=[new gi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=E("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ft(e,t.line,t,r,i)||t.line!=r.line&&Ft(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt=!0}i.addToHistory&&Fo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,l=e.cm;if(e.iter(c,r.line+1,function(e){l&&i.collapsed&&!l.options.lineWrapping&&It(e)==l.display.maxLine&&(s=!0),i.collapsed&&c!=t.line&&Ge(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(i,c==t.line?t.ch:null,c==r.line?r.ch:null)),++c}),i.collapsed&&e.iter(t.line,r.line+1,function(t){Pt(e,t)&&Ge(t,0)}),i.clearOnEnter&&me(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ki,i.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),i.collapsed)ln(l,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=r.line;u++)un(l,u,"text");i.atomic&&$o(l.doc),sr(l,"markerAdded",l,i)}return i}xi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Un(e),ve(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&ln(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&sr(e,"markerCleared",e,this,n,o),t&&Hn(e),this.parent&&this.parent.clear()}},xi.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;c--)ai(this,n[c]);s?Go(this,s):this.cm&&Ln(this.cm)}),undo:$n(function(){ci(this,"undo")}),redo:$n(function(){ci(this,"redo")}),undoSelection:$n(function(){ci(this,"undo",!0)}),redoSelection:$n(function(){ci(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s=c.to||null==c.from&&o!=e.line||null!=c.from&&o==t.line&&c.from>=t.ch||r&&!r(c.marker)||n.push(c.marker.parent||c.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=i,++r}),st(this,et(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var d=e.dataTransfer.getData("Text");if(d){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),Yo(t.doc,wo(r,r)),m)for(var f=0;f=0;t--)di(e.doc,"",n[t].from,n[t].to,"+delete");Ln(e)})}function Qi(e,t,r){var n=ie(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Gi(e,t,r){var n=Qi(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function Zi(e,t,r,n,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ue(r,t.doc.direction);if(i){var a,s=o<0?G(i):i[0],c=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var l=Or(t,r);a=o<0?r.text.length-1:0;var u=Ar(t,l,a).top;a=ae(function(e){return Ar(t,l,e).top==u},o<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Qi(r,a,1))}else a=o<0?s.to:s.from;return new et(n,a,c)}}return new et(n,o<0?r.text.length:0,o<0?"before":"after")}Di.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Di.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Di.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Di.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Di.default=v?Di.macDefault:Di.pcDefault;var Yi={selectAll:oi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),K)},killLine:function(e){return Vi(e,function(t){if(t.empty()){var r=Je(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Je(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}r.push(new ko(o,o))}e.setSelections(r)})},newlineAndIndent:function(e){return Zn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(tt((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,r,n){var o=e.display,i=!1,l=Yn(e,function(t){c&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:xn(e)),pe(o.wrapper.ownerDocument,"mouseup",l),pe(o.wrapper.ownerDocument,"mousemove",u),pe(o.scroller,"dragstart",d),pe(o.scroller,"drop",l),i||(ke(t),n.addNew||Ho(e.doc,r,null,null,n.extend),c&&!m||a&&9==s?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};c&&(o.scroller.draggable=!0);e.state.draggingText=l,l.copy=!n.moveOnDrag,me(o.wrapper.ownerDocument,"mouseup",l),me(o.wrapper.ownerDocument,"mousemove",u),me(o.scroller,"dragstart",d),me(o.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,n,t,i):function(e,t,r,n){a&&xn(e);var o=e.display,i=e.doc;ke(t);var s,c,l=i.sel,u=l.ranges;n.addNew&&!n.extend?(c=i.sel.contains(r),s=c>-1?u[c]:new ko(r,r)):(s=i.sel.primary(),c=i.sel.primIndex);if("rectangle"==n.unit)n.addNew||(s=new ko(r,r)),r=sn(e,t,!0,!0),c=-1;else{var d=fa(e,r,n.unit);s=n.extend?Uo(s,d.anchor,d.head,n.extend):d}n.addNew?-1==c?(c=u.length,Zo(i,xo(e,u.concat([s]),c),{scroll:!1,origin:"*mouse"})):u.length>1&&u[c].empty()&&"char"==n.unit&&!n.extend?(Zo(i,xo(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):Vo(i,c,s,U):(c=0,Zo(i,new yo([s],0),U),l=i.sel);var m=r;function f(t){if(0!=tt(m,t))if(m=t,"rectangle"==n.unit){for(var o=[],a=e.options.tabSize,u=I(Je(i,r.line).text,r.ch,a),d=I(Je(i,t.line).text,t.ch,a),f=Math.min(u,d),p=Math.max(u,d),h=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));h<=g;h++){var b=Je(i,h).text,v=J(b,f,a);f==p?o.push(new ko(et(h,v),et(h,v))):b.length>v&&o.push(new ko(et(h,v),et(h,J(b,p,a))))}o.length||o.push(new ko(r,r)),Zo(i,xo(e,l.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,k=s,x=fa(e,t,n.unit),w=k.anchor;tt(x.anchor,w)>0?(y=x.head,w=it(k.from(),x.anchor)):(y=x.anchor,w=ot(k.to(),x.head));var C=l.ranges.slice(0);C[c]=function(e,t){var r=t.anchor,n=t.head,o=Je(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var i=ue(o);if(!i)return t;var a=ce(i,r.ch,r.sticky),s=i[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var c,l=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==l||l==i.length)return t;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ce(i,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==s.level?-1:1);c=u==l-1||u==l?d<0:d>0}var m=i[l+(c?-1:0)],f=c==(1==m.level),p=f?m.from:m.to,h=f?"after":"before";return r.ch==p&&r.sticky==h?t:new ko(new et(r.line,p,h),n)}(e,new ko(st(i,w),y)),Zo(i,xo(e,C,c),U)}}var p=o.wrapper.getBoundingClientRect(),h=0;function g(t){e.state.selectingText=!1,h=1/0,t&&(ke(t),o.input.focus()),pe(o.wrapper.ownerDocument,"mousemove",b),pe(o.wrapper.ownerDocument,"mouseup",v),i.history.lastSelOrigin=null}var b=Yn(e,function(t){0!==t.buttons&&_e(t)?function t(r){var a=++h;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=tt(s,m)){e.curOp.focus=A(),f(s);var c=Sn(o,i);(s.line>=c.to||s.linep.bottom?20:0;l&&setTimeout(Yn(e,function(){h==a&&(o.scroller.scrollTop+=l,t(r))}),50)}}(t):g(t)}),v=Yn(e,g);e.state.selectingText=v,me(o.wrapper.ownerDocument,"mousemove",b),me(o.wrapper.ownerDocument,"mouseup",v)}(e,n,t,i)}(t,n,i,e):Me(e)==r.scroller&&ke(e):2==o?(n&&Ho(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==o&&(C?t.display.input.onContextMenu(e):xn(t)))}}function fa(e,t,r){if("char"==r)return new ko(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new ko(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new ko(n.from,n.to)}function pa(e,t,r,n){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ke(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!ve(e,r))return we(t);i-=s.top-a.viewOffset;for(var c=0;c=o)return he(e,r,e,Ye(e.doc,i),e.display.gutterSpecs[c].className,t),we(t)}}function ha(e,t){return pa(e,t,"gutterClick",!0)}function ga(e,t){xr(e.display,t)||function(e,t){if(!ve(e,"gutterContextMenu"))return!1;return pa(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function ba(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Dr(e)}da.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var va={toString:function(){return"CodeMirror.Init"}},ya={},ka={};function xa(e,t,r){if(!t!=!(r&&r!=va)){var n=e.display.dragFunctions,o=t?me:pe;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function wa(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Ht(e)),an(e),ln(e),Dr(e),setTimeout(function(){return Dn(e)},100)}function Ca(e,t){var n=this;if(!(this instanceof Ca))return new Ca(e,t);this.options=t=t?F(t):{},F(ya,t,!1);var o=t.value;"string"==typeof o?o=new Ti(o,t.mode,null,t.lineSeparator,t.direction):t.mode&&(o.modeOption=t.mode),this.doc=o;var i=new Ca.inputStyles[t.inputStyle](this),l=this.display=new function(e,t,n,o){var i=this;this.input=n,i.scrollbarFiller=L("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=L("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=E("div",null,"CodeMirror-code"),i.selectionDiv=L("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=L("div",null,"CodeMirror-cursors"),i.measure=L("div",null,"CodeMirror-measure"),i.lineMeasure=L("div",null,"CodeMirror-measure"),i.lineSpace=E("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var l=E("div",[i.lineSpace],"CodeMirror-lines");i.mover=L("div",[l],null,"position: relative"),i.sizer=L("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=L("div",null,null,"position: absolute; height: "+P+"px; width: 1px;"),i.gutters=L("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=L("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=L("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),c||r&&b||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=uo(o.gutters,o.lineNumbers),mo(i),n.init(i)}(e,o,i,t);for(var u in l.wrapper.CodeMirror=this,ba(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new D,keySeq:null,specialChars:null},t.autofocus&&!b&&l.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;me(t.scroller,"mousedown",Yn(e,ma)),me(t.scroller,"dblclick",a&&s<11?Yn(e,function(t){if(!ge(e,t)){var r=sn(e,t);if(r&&!ha(e,t)&&!xr(e.display,t)){ke(t);var n=e.findWordAt(r);Ho(e.doc,n.anchor,n.head)}}}):function(t){return ge(e,t)||ke(t)});me(t.scroller,"contextmenu",function(t){return ga(e,t)}),me(t.input.getField(),"contextmenu",function(r){t.scroller.contains(r.target)||ga(e,r)});var r,n={end:0};function o(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}me(t.scroller,"touchstart",function(o){if(!ge(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!ha(e,o)){t.input.ensurePolled(),clearTimeout(r);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-n.end<=300?n:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}}),me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),me(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!n.prev||i(n,n.prev)?new ko(s,s):!n.prev.prev||i(n,n.prev.prev)?e.findWordAt(s):new ko(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ke(r)}o()}),me(t.scroller,"touchcancel",o),me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Rn(e,t.scroller.scrollTop),qn(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))}),me(t.scroller,"mousewheel",function(t){return vo(e,t)}),me(t.scroller,"DOMMouseScroll",function(t){return vo(e,t)}),me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ge(e,t)||Ce(t)},over:function(t){ge(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();gn(e,r,n),e.display.dragCursor||(e.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),z(e.display.dragCursor,n)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-zi<100))Ce(t);else if(!ge(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!m)){var r=L("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}(e,t)},drop:Yn(e,Li),leave:function(t){ge(e,t)||Ei(e)}};var c=t.input.getField();me(c,"keyup",function(t){return sa.call(e,t)}),me(c,"keydown",Yn(e,aa)),me(c,"keypress",Yn(e,ca)),me(c,"focus",function(t){return wn(e,t)}),me(c,"blur",function(t){return Cn(e,t)})}(this),Ri(),Un(this),this.curOp.forceUpdate=!0,Ao(this,o),t.autofocus&&!b||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&wn(n)},20):Cn(this),ka)ka.hasOwnProperty(u)&&ka[u](this,t[u],va);lo(this),t.finishInit&&t.finishInit(this);for(var f=0;f150)){if(!n)return;r="prev"}}else l=0,r="not";"prev"==r?l=t>i.first?I(Je(i,t-1).text,null,a):0:"add"==r?l=c+e.options.indentUnit:"subtract"==r?l=c-e.options.indentUnit:"number"==typeof r&&(l=c+r),l=Math.max(0,l);var d="",m=0;if(e.options.indentWithTabs)for(var f=Math.floor(l/a);f;--f)m+=a,d+="\t";if(ma,c=Ae(t),l=null;if(s&&n.ranges.length>1)if(Sa&&Sa.text.join("\n")==t){if(n.ranges.length%Sa.text.length==0){l=[];for(var u=0;u=0;m--){var f=n.ranges[m],p=f.from(),h=f.to();f.empty()&&(r&&r>0?p=et(p.line,p.ch-r):e.state.overwrite&&!s?h=et(h.line,Math.min(Je(i,h.line).text.length,h.ch+G(c).length)):s&&Sa&&Sa.lineWise&&Sa.text.join("\n")==c.join("\n")&&(p=h=et(p.line,0)));var g={from:p,to:h,text:l?l[m%l.length]:c,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ai(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Ea(e,t),Ln(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function La(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zn(t,function(){return za(t,r,0,null,"paste")}),!0}function Ea(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=_a(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Je(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=_a(e,o.head.line,"smart"));a&&sr(e,"electricInput",e,o.head.line)}}}function Oa(e){for(var t=[],r=[],n=0;n0?0:-1));if(isNaN(u))a=null;else{var d=r>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(d?2:1))),-r)}}else a=o?function(e,t,r,n){var o=ue(t,e.doc.direction);if(!o)return Gi(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var i=ce(o,r.ch,r.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from=a.from&&m>=u.begin)){var f=d?"before":"after";return new et(r.line,m,f)}}var p=function(e,t,n){for(var i=function(e,t){return t?new et(r.line,c(e,1),"before"):new et(r.line,e,"after")};e>=0&&e0==(1!=a.level),l=s?n.begin:c(n.end,-1);if(a.from<=l&&l0?u.end:c(u.begin,-1);return null==g||n>0&&g==t.text.length||!(h=p(n>0?0:o.length-1,n,l(g)))?null:h}(e.cm,s,t,r):Gi(s,t,r);if(null==a){if(i||(l=t.line+c)=e.first+e.size||(t=new et(l,t.ch,t.sticky),!(s=Je(e,l))))return!1;t=Zi(o,e.cm,s,t.line,c)}else t=a;return!0}if("char"==n||"codepoint"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,m=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||l(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",h=te(p,m)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||h||(h="s"),u&&u!=h){r<0&&(r=1,l(),t.sticky="after");break}if(h&&(u=h),r>0&&!l(!f))break}var g=ri(e,t,i,a,!0);return rt(i,g)&&(g.hitSide=!0),g}function qa(e,t,r,n){var o,i,a=e.doc,s=t.left;if("page"==n){var c=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(c-.5*en(e.display),3);o=(r>0?t.bottom:t.top)+r*l}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(i=Gr(e,s,o)).outside;){if(r<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*r}return i}var ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new D,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Fa(e,t){var r=Er(e,t.line);if(!r||r.hidden)return null;var n=Je(e.doc,t.line),o=zr(r,n,t.line),i=ue(n,e.doc.direction),a="left";i&&(a=ce(i,t.ch)%2?"right":"left");var s=qr(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ia(e,t){return t&&(e.bad=!0),e}function Da(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Ia(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Fa(t,o)||{node:c[0].measure.map[2],offset:0},u=i.linen.firstLine()&&(a=et(a.line-1,Je(n.doc,a.line-1).length)),s.ch==Je(n.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=cn(n,a.line))?(t=Ze(o.view[0].line),r=o.view[0].node):(t=Ze(o.view[e].line),r=o.view[e-1].node.nextSibling);var c,l,u=cn(n,s.line);if(u==o.view.length-1?(c=o.viewTo-1,l=o.lineDiv.lastChild):(c=Ze(o.view[u+1].line)-1,l=o.view[u+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(function(e,t,r,n,o){var i="",a=!1,s=e.doc.lineSeparator(),c=!1;function l(){a&&(i+=s,c&&(i+=s),a=c=!1)}function u(e){e&&(l(),i+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void u(r);var i,m=t.getAttribute("cm-marker");if(m){var f=e.findMarks(et(n,0),et(o+1,0),(g=+m,function(e){return e.id==g}));return void(f.length&&(i=f[0].find(0))&&u(Ve(e.doc,i.from,i.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&l();for(var h=0;h1&&m.length>1;)if(G(d)==G(m))d.pop(),m.pop(),c--;else{if(d[0]!=m[0])break;d.shift(),m.shift(),t++}for(var f=0,p=0,h=d[0],g=m[0],b=Math.min(h.length,g.length);fa.ch&&v.charCodeAt(v.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=v.slice(0,v.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=et(t,f),w=et(c,m.length?G(m).length-p:0);return d.length>1||d[0]||tt(x,w)?(di(n.doc,d,x,w,"+input"),!0):void 0},ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},ja.prototype.reset=function(){this.forceCompositionEnd()},ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zn(this.cm,function(){return ln(e.cm)})},ja.prototype.setUneditable=function(e){e.contentEditable="false"},ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Yn(this.cm,za)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ja.prototype.onContextMenu=function(){},ja.prototype.resetPosition=function(){},ja.prototype.needsContentAttribute=!0;var Pa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new D,this.hasSelection=!1,this.composing=null};Pa.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ge(n,e)){if(n.somethingSelected())Ta({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Oa(n);Ta({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,K):(r.prevInput="",o.value=t.text.join("\n"),q(o))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(o.style.width="0px"),me(o,"input",function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),me(o,"paste",function(e){ge(n,e)||La(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())}),me(o,"cut",i),me(o,"copy",i),me(e.scroller,"paste",function(t){if(!xr(e,t)&&!ge(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}}),me(e.lineSpace,"selectstart",function(t){xr(e,t)||ke(t)}),me(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),me(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Pa.prototype.createField=function(e){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Pa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Pa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=hn(e);if(e.options.moveInputWithCursor){var o=Jr(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return n},Pa.prototype.showSelection=function(e){var t=this.cm.display;z(t.cursorDiv,e.cursors),z(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&q(this.textarea),a&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Pa.prototype.getField=function(){return this.textarea},Pa.prototype.supportsTouch=function(){return!1},Pa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!b||A()!=this.textarea))try{this.textarea.focus()}catch(e){}},Pa.prototype.blur=function(){this.textarea.blur()},Pa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Pa.prototype.receivedFocus=function(){this.slowPoll()},Pa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Pa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Pa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||v&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var c=0,l=Math.min(n.length,o.length);c1e3||o.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Pa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Pa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Pa.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=sn(r,e),l=n.scroller.scrollTop;if(i&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(i)&&Yn(r,Zo)(r.doc,wo(i),K);var u,m=o.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(u=window.scrollY),n.input.focus(),c&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=b,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&g(),C){Ce(e);var h=function(){pe(window,"mouseup",h),setTimeout(b,20)};me(window,"mouseup",h)}else setTimeout(b,50)}function g(){if(null!=o.selectionStart){var e=r.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,n.selForContextMenu=r.doc.sel}}function b(){if(t.contextMenuPending==b&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,o.style.cssText=m,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){n.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?Yn(r,oi)(r):e++<10?n.detectingSelectAll=setTimeout(i,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(i,200)}}},Pa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Pa.prototype.setUneditable=function(){},Pa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,o,i){e.defaults[r]=n,o&&(t[r]=i?function(e,t,r){r!=va&&o(e,t,r)}:o)}e.defineOption=r,e.Init=va,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,To(e)},!0),r("indentUnit",2,To,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){zo(e),Dr(e),ln(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,r.push(et(n,i))}n++});for(var o=r.length-1;o>=0;o--)di(e.doc,t,r[o],et(r[o].line,r[o].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=va&&e.refresh()}),r("specialCharPlaceholder",Xt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",b?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),r("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),r("rtlMoveVisually",!k),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){ba(e),fo(e)},!0),r("keyMap","default",function(e,t,r){var n=Ji(t),o=r!=va&&Ji(r);o&&o.detach&&o.detach(e,n),n.attach&&n.attach(e,o||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,wa,!0),r("gutters",[],function(e,t){e.display.gutterSpecs=uo(t,e.options.lineNumbers),fo(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return Dn(e)},!0),r("scrollbarStyle","native",function(e){Bn(e),Dn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e,t){e.display.gutterSpecs=uo(e.options.gutters,t),fo(e)},!0),r("firstLineNumber",1,fo,!0),r("lineNumberFormatter",function(e){return e},fo,!0),r("showCursorWhenSelecting",!1,pn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(e,t){"nocursor"==t&&(Cn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xa),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,pn,!0),r("singleCursorHeightPerLine",!0,pn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,zo,!0),r("addModeClass",!1,zo,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,zo,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),r("phrases",null)}(Ca),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,o=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Yn(this,t[e])(this,r,o),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ji(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(_a(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&Ln(this));else{var i=o.from(),a=o.to(),s=Math.max(r,i.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var c=s;c0&&Vo(this.doc,n,new ko(i,l[n].to()),K)}}}),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=mt(this,Je(this.doc,e.line)),n=0,o=(r.length-1)/2,i=e.ch;if(0==i)t=r[2];else for(;;){var a=n+o>>1;if((a?r[2*a-1]:0)>=i)o=a;else{if(!(r[2*a+1]i&&(e=i,o=!0),n=Je(this.doc,e)}else n=e;return Kr(this,n,{top:0,left:0},t||"page",r||o).top+(o?this.doc.height-Kt(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var i,a,s,c=this.display,l=(e=Jr(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),c.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var d=Math.max(c.wrapper.clientHeight,this.doc.height),m=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(l=e.bottom),u+t.offsetWidth>m&&(u=m-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==o?(u=c.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(c.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(i=this,a={left:u,top:l,right:u+t.offsetWidth,bottom:l+t.offsetHeight},null!=(s=Tn(i,a)).scrollTop&&Rn(i,s.scrollTop),null!=s.scrollLeft&&qn(i,s.scrollLeft))},triggerOnKeyDown:Xn(aa),triggerOnKeyPress:Xn(ca),triggerOnKeyUp:sa,triggerOnMouseDown:Xn(ma),execCommand:function(e){if(Yi.hasOwnProperty(e))return Yi[e].call(null,this)},triggerElectric:Xn(function(e){Ea(this,e)}),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var i=st(this.doc,e),a=0;a0&&a(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&an(this),he(this,"refresh",this)}),swapDoc:Xn(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ao(this,e),Dr(this),this.display.input.reset(),En(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,i){e.registerHelper(t,n,i),r[t]._global.push({pred:o,val:i})}}(Ca);var Ba="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Ti.prototype)Ti.prototype.hasOwnProperty(Ka)&&W(Ba,Ka)<0&&(Ca.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ti.prototype[Ka]));return ye(Ti),Ca.inputStyles={textarea:Pa,contenteditable:ja},Ca.defineMode=function(e){Ca.defaults.mode||"null"==e||(Ca.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}.apply(this,arguments)},Ca.defineMIME=function(e,t){Fe[e]=t},Ca.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ca.defineMIME("text/plain","null"),Ca.defineExtension=function(e,t){Ca.prototype[e]=t},Ca.defineDocExtension=function(e,t){Ti.prototype[e]=t},Ca.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=A();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var o;if(e.form&&(me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Ca(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=pe,e.on=me,e.wheelEventPixels=bo,e.Doc=Ti,e.splitLines=Ae,e.countColumn=I,e.findColumn=J,e.isWordChar=ee,e.Pass=B,e.signal=he,e.Line=Jt,e.changeEnd=Co,e.scrollbarModel=Pn,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Fe,e.resolveMode=Ie,e.getMode=De,e.modeExtensions=We,e.extendMode=Pe,e.copyState=Be,e.startState=Ue,e.innerMode=Ke,e.commands=Yi,e.keyMap=Di,e.keyName=Hi,e.isModifierKey=Ki,e.lookupKey=Bi,e.normalizeKeyMap=Pi,e.StringStream=He,e.SharedTextMarker=Ci,e.TextMarker=xi,e.LineWidget=vi,e.e_preventDefault=ke,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=R,e.contains=O,e.rmClass=S,e.keyNames=qi}(Ca),Ca.version="5.59.4",Ca},e.exports=n()},function(e,t){e.exports=function(e,t,r,n,o,i){var a,s=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(a=e,s=e.default);var l,u="function"==typeof s?s.options:s;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId=o),i?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=l):n&&(l=n),l){var d=u.functional,m=d?u.render:u.beforeCreate;d?(u._injectStyles=l,u.render=function(e,t){return l.call(t),m(e,t)}):u.beforeCreate=m?[].concat(m,l):[l]}return{esModule:a,exports:s,options:u}}},function(e,t,r){(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,o){var i,a,s=n.indentUnit,c={},l=o.htmlMode?t:r;for(var u in l)c[u]=l[u];for(var u in o)c[u]=o[u];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(f("atom","]]>")):null:e.match("--")?r(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(function e(t){return function(r,n){for(var o;null!=(o=r.next());){if("<"==o)return n.tokenize=e(t+1),n.tokenize(r,n);if(">"==o){if(1==t){n.tokenize=d;break}return n.tokenize=e(t-1),n.tokenize(r,n)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=m,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function m(e,t){var r,n,o=e.next();if(">"==o||"/"==o&&e.eat(">"))return t.tokenize=d,i=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return i="equals",null;if("<"==o){t.tokenize=d,t.state=g,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(o)?(t.tokenize=(r=o,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=m;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function p(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!c.contextGrabbers.hasOwnProperty(r)||!c.contextGrabbers[r].hasOwnProperty(t))return;p(e)}}function g(e,t,r){return"openTag"==e?(r.tagStart=t.column(),b):"closeTag"==e?v:g}function b(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",x):c.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,t,r)):(a="error",b)}function v(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&c.implicitlyClosed.hasOwnProperty(r.context.tagName)&&p(r),r.context&&r.context.tagName==n||!1===c.matchClosing?(a="tag",y):(a="tag error",k)}return c.allowMissingTagName&&"endTag"==e?(a="tag bracket",y(e,t,r)):(a="error",k)}function y(e,t,r){return"endTag"!=e?(a="error",y):(p(r),g)}function k(e,t,r){return a="error",y(e,0,r)}function x(e,t,r){if("word"==e)return a="attribute",w;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||c.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new function(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(c.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(r,n,o==r.indented)),g}return a="error",x}function w(e,t,r){return"equals"==e?C:(c.allowMissing||(a="error"),x(e,0,r))}function C(e,t,r){return"string"==e?M:"word"==e&&c.allowUnquoted?(a="string",x):(a="error",x(e,0,r))}function M(e,t,r){return"string"==e?M:x(e,0,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var r=t.tokenize(e,t);return(r||i)&&"comment"!=r&&(a=null,t.state=t.state(i||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=m&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==c.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(c.multilineTagIndentFactor||1);if(c.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=x)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})(r(2))},function(e,t,r){(function(e){"use strict";e.defineMode("javascript",function(t,r){var n,o,i=t.indentUnit,a=r.statementIndent,s=r.jsonld,c=r.json||s,l=r.typescript,u=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),m=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e,t,r){return n=e,o=r,t}function h(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,o=!1;if(s&&"@"==e.peek()&&e.match(f))return t.tokenize=h,p("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||o);)o=!o&&"\\"==n;return o||(t.tokenize=h),p("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==n&&e.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&e.eat(">"))return p("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==n)return e.eat("*")?(t.tokenize=g,g(e,t)):e.eat("/")?(e.skipToEnd(),p("comment","comment")):Ge(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(e.eat("="),p("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),p("meta","meta");if("#"==n&&e.eatWhile(u))return p("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),p("comment","comment");if(m.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?p("."):p("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var o=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(o)){var i=d[o];return p(i.type,i.style,o)}if("async"==o&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",o)}return p("variable","variable",o)}}function g(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=h;break}n="*"==r}return p("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=h;break}n=!n&&"\\"==r}return p("quasi","string-2",e.current())}var v="([{}])";function y(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(l){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var s=e.string.charAt(a),c=v.indexOf(s);if(c>=0&&c<3){if(!o){++a;break}if(0==--o){"("==s&&(i=!0);break}}else if(c>=3&&c<6)++o;else if(u.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(t.fatArrowAt=a)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var C={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function _(){return M.apply(null,arguments),!0}function S(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function T(e){var t=C.state;if(C.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new L(n,r.vars,!0):null}return S(t,r.vars)?r:new L(r.prev,new E(t,r.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!S(e,t.localVars))return void(t.localVars=new E(e,t.localVars));r.globalVars&&!S(e,t.globalVars)&&(t.globalVars=new E(e,t.globalVars))}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,r){this.prev=e,this.vars=t,this.block=r}function E(e,t){this.name=e,this.next=t}var O=new E("this",new E("arguments",null));function A(){C.state.context=new L(C.state.context,C.state.localVars,!1),C.state.localVars=O}function R(){C.state.context=new L(C.state.context,C.state.localVars,!0),C.state.localVars=null}function N(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function q(e,t){var r=function(){var r=C.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new x(n,C.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(r){return r==e?_():";"==e||"}"==r||")"==r||"]"==r?M():_(t)}}function I(e,t){return"var"==e?_(q("vardef",t),ke,F(";"),j):"keyword a"==e?_(q("form"),B,I,j):"keyword b"==e?_(q("form"),I,j):"keyword d"==e?C.stream.match(/^\s*$/,!1)?_():_(q("stat"),U,F(";"),j):"debugger"==e?_(F(";")):"{"==e?_(q("}"),R,ae,j,N):";"==e?_():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==j&&C.state.cc.pop()(),_(q("form"),B,I,j,Se)):"function"==e?_(Ee):"for"==e?_(q("form"),Te,I,j):"class"==e||l&&"interface"==t?(C.marked="keyword",_(q("form","class"==e?e:t),qe,j)):"variable"==e?l&&"declare"==t?(C.marked="keyword",_(I)):l&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?_(Ve):"type"==t?_(Ae,F("operator"),de,F(";")):_(q("form"),xe,F("{"),q("}"),ae,j,j)):l&&"namespace"==t?(C.marked="keyword",_(q("form"),W,I,j)):l&&"abstract"==t?(C.marked="keyword",_(I)):_(q("stat"),$):"switch"==e?_(q("form"),B,F("{"),q("}","switch"),R,ae,j,j,N):"case"==e?_(W,F(":")):"default"==e?_(F(":")):"catch"==e?_(q("form"),A,D,I,j,N):"export"==e?_(q("stat"),De,j):"import"==e?_(q("stat"),Pe,j):"async"==e?_(I):"@"==t?_(W,I):M(q("stat"),W,F(";"),j)}function D(e){if("("==e)return _(Re,F(")"))}function W(e,t){return K(e,t,!1)}function P(e,t){return K(e,t,!0)}function B(e){return"("!=e?M():_(q(")"),U,F(")"),j)}function K(e,t,r){if(C.state.fatArrowAt==C.stream.start){var n=r?Z:G;if("("==e)return _(A,q(")"),oe(Re,")"),j,F("=>"),n,N);if("variable"==e)return M(A,xe,F("=>"),n,N)}var o=r?J:H;return k.hasOwnProperty(e)?_(o):"function"==e?_(Ee,o):"class"==e||l&&"interface"==t?(C.marked="keyword",_(q("form"),Ne,j)):"keyword c"==e||"async"==e?_(r?P:W):"("==e?_(q(")"),U,F(")"),j,o):"operator"==e||"spread"==e?_(r?P:W):"["==e?_(q("]"),Je,j,o):"{"==e?ie(te,"}",null,o):"quasi"==e?M(V,o):"new"==e?_(function(e){return function(t){return"."==t?_(e?X:Y):"variable"==t&&l?_(be,e?J:H):M(e?P:W)}}(r)):"import"==e?_(W):_()}function U(e){return e.match(/[;\}\)\],]/)?M():M(W)}function H(e,t){return","==e?_(U):J(e,t,!1)}function J(e,t,r){var n=0==r?H:J,o=0==r?W:P;return"=>"==e?_(A,r?Z:G,N):"operator"==e?/\+\+|--/.test(t)||l&&"!"==t?_(n):l&&"<"==t&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(q(">"),oe(de,">"),j,n):"?"==t?_(W,F(":"),o):_(o):"quasi"==e?M(V,n):";"!=e?"("==e?ie(P,")","call",n):"."==e?_(ee,n):"["==e?_(q("]"),U,F("]"),j,n):l&&"as"==t?(C.marked="keyword",_(de,n)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),_(o)):void 0:void 0}function V(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?_(V):_(W,Q)}function Q(e){if("}"==e)return C.marked="string-2",C.state.tokenize=b,_(V)}function G(e){return y(C.stream,C.state),M("{"==e?I:W)}function Z(e){return y(C.stream,C.state),M("{"==e?I:P)}function Y(e,t){if("target"==t)return C.marked="keyword",_(H)}function X(e,t){if("target"==t)return C.marked="keyword",_(J)}function $(e){return":"==e?_(j,I):M(H,F(";"),j)}function ee(e){if("variable"==e)return C.marked="property",_()}function te(e,t){if("async"==e)return C.marked="property",_(te);if("variable"==e||"keyword"==C.style){return C.marked="property","get"==t||"set"==t?_(re):(l&&C.state.fatArrowAt==C.stream.start&&(r=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+r[0].length),_(ne));var r}else{if("number"==e||"string"==e)return C.marked=s?"property":C.style+" property",_(ne);if("jsonld-keyword"==e)return _(ne);if(l&&z(t))return C.marked="keyword",_(te);if("["==e)return _(W,se,F("]"),ne);if("spread"==e)return _(P,ne);if("*"==t)return C.marked="keyword",_(te);if(":"==e)return M(ne)}}function re(e){return"variable"!=e?M(ne):(C.marked="property",_(Ee))}function ne(e){return":"==e?_(P):"("==e?M(Ee):void 0}function oe(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),_(function(r,n){return r==t||n==t?M():M(e)},n)}return o==t||i==t?_():r&&r.indexOf(";")>-1?M(e):_(F(t))}return function(r,o){return r==t||o==t?_():M(e,n)}}function ie(e,t,r){for(var n=3;n"),de):void 0}function me(e){if("=>"==e)return _(de)}function fe(e){return e.match(/[\}\)\]]/)?_():","==e||";"==e?_(fe):M(pe,fe)}function pe(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",_(pe)):"?"==t||"number"==e||"string"==e?_(pe):":"==e?_(de):"["==e?_(F("variable"),ce,F("]"),pe):"("==e?M(Oe,pe):e.match(/[;\}\)\],]/)?void 0:_()}function he(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?_(he):":"==e?_(de):"spread"==e?_(he):M(de)}function ge(e,t){return"<"==t?_(q(">"),oe(de,">"),j,ge):"|"==t||"."==e||"&"==t?_(de):"["==e?_(de,F("]"),ge):"extends"==t||"implements"==t?(C.marked="keyword",_(de)):"?"==t?_(de,F(":"),de):void 0}function be(e,t){if("<"==t)return _(q(">"),oe(de,">"),j,ge)}function ve(){return M(de,ye)}function ye(e,t){if("="==t)return _(de)}function ke(e,t){return"enum"==t?(C.marked="keyword",_(Ve)):M(xe,se,Me,_e)}function xe(e,t){return l&&z(t)?(C.marked="keyword",_(xe)):"variable"==e?(T(t),_()):"spread"==e?_(xe):"["==e?ie(Ce,"]"):"{"==e?ie(we,"}"):void 0}function we(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?_(xe):"}"==e?M():"["==e?_(W,F("]"),F(":"),we):_(F(":"),xe,Me)):(T(t),_(Me))}function Ce(){return M(xe,Me)}function Me(e,t){if("="==t)return _(P)}function _e(e){if(","==e)return _(ke)}function Se(e,t){if("keyword b"==e&&"else"==t)return _(q("form","else"),I,j)}function Te(e,t){return"await"==t?_(Te):"("==e?_(q(")"),ze,j):void 0}function ze(e){return"var"==e?_(ke,Le):"variable"==e?_(Le):M(Le)}function Le(e,t){return")"==e?_():";"==e?_(Le):"in"==t||"of"==t?(C.marked="keyword",_(W,Le)):M(W,Le)}function Ee(e,t){return"*"==t?(C.marked="keyword",_(Ee)):"variable"==e?(T(t),_(Ee)):"("==e?_(A,q(")"),oe(Re,")"),j,le,I,N):l&&"<"==t?_(q(">"),oe(ve,">"),j,Ee):void 0}function Oe(e,t){return"*"==t?(C.marked="keyword",_(Oe)):"variable"==e?(T(t),_(Oe)):"("==e?_(A,q(")"),oe(Re,")"),j,le,N):l&&"<"==t?_(q(">"),oe(ve,">"),j,Oe):void 0}function Ae(e,t){return"keyword"==e||"variable"==e?(C.marked="type",_(Ae)):"<"==t?_(q(">"),oe(ve,">"),j):void 0}function Re(e,t){return"@"==t&&_(W,Re),"spread"==e?_(Re):l&&z(t)?(C.marked="keyword",_(Re)):l&&"this"==e?_(se,Me):M(xe,se,Me)}function Ne(e,t){return"variable"==e?qe(e,t):je(e,t)}function qe(e,t){if("variable"==e)return T(t),_(je)}function je(e,t){return"<"==t?_(q(">"),oe(ve,">"),j,je):"extends"==t||"implements"==t||l&&","==e?("implements"==t&&(C.marked="keyword"),_(l?de:W,je)):"{"==e?_(q("}"),Fe,j):void 0}function Fe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||l&&z(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",_(Fe)):"variable"==e||"keyword"==C.style?(C.marked="property",_(Ie,Fe)):"number"==e||"string"==e?_(Ie,Fe):"["==e?_(W,se,F("]"),Ie,Fe):"*"==t?(C.marked="keyword",_(Fe)):l&&"("==e?M(Oe,Fe):";"==e||","==e?_(Fe):"}"==e?_():"@"==t?_(W,Fe):void 0}function Ie(e,t){if("?"==t)return _(Ie);if(":"==e)return _(de,Me);if("="==t)return _(P);var r=C.state.lexical.prev;return M(r&&"interface"==r.info?Oe:Ee)}function De(e,t){return"*"==t?(C.marked="keyword",_(He,F(";"))):"default"==t?(C.marked="keyword",_(W,F(";"))):"{"==e?_(oe(We,"}"),He,F(";")):M(I)}function We(e,t){return"as"==t?(C.marked="keyword",_(F("variable"))):"variable"==e?M(P,We):void 0}function Pe(e){return"string"==e?_():"("==e?M(W):M(Be,Ke,He)}function Be(e,t){return"{"==e?ie(Be,"}"):("variable"==e&&T(t),"*"==t&&(C.marked="keyword"),_(Ue))}function Ke(e){if(","==e)return _(Be,Ke)}function Ue(e,t){if("as"==t)return C.marked="keyword",_(Be)}function He(e,t){if("from"==t)return C.marked="keyword",_(W)}function Je(e){return"]"==e?_():M(oe(P,"]"))}function Ve(){return M(q("form"),xe,F("{"),q("}"),oe(Qe,"}"),j,j)}function Qe(){return M(xe,Me)}function Ge(e,t,r){return t.tokenize==h&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return N.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:h,lastType:"sof",cc:[],lexical:new x((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new L(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),y(e,t)),t.tokenize!=g&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",function(e,t,r,n,o){var i=e.cc;for(C.state=e,C.stream=o,C.marked=null,C.cc=i,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():c?W:I)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return C.marked?C.marked:"variable"==r&&w(e,n)?"variable-2":t}}(t,r,n,o,e))},indent:function(t,n){if(t.tokenize==g||t.tokenize==b)return e.Pass;if(t.tokenize!=h)return 0;var o,s=n&&n.charAt(0),c=t.lexical;if(!/^\s*else\b/.test(n))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==j)c=c.prev;else if(u!=Se)break}for(;("stat"==c.type||"form"==c.type)&&("}"==s||(o=t.cc[t.cc.length-1])&&(o==H||o==J)&&!/^[,\.=+\-*:?[\(]/.test(n));)c=c.prev;a&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var d=c.type,f=s==d;return"vardef"==d?c.indented+("operator"==t.lastType||","==t.lastType?c.info.length+1:0):"form"==d&&"{"==s?c.indented:"form"==d?c.indented+i:"stat"==d?c.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||m.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?a||i:0):"switch"!=c.info||f||0==r.doubleIndentSwitch?c.align?c.column+(f?0:1):c.indented+(f?0:i):c.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",blockCommentContinue:c?null:" * ",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:s,jsonMode:c,expressionAllowed:Ge,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=W&&t!=P||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})(r(2))},function(e,t,r){(function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var r={};function n(e,t){var n=e.match(function(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],i=o.length-1;i>=0;i--)n.unshift(o[i])}e.defineMode("htmlmixed",function(r,a){var s=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),c={},l=a&&a.tags,u=a&&a.scriptTypes;if(i(t,c),l&&i(l,c),u)for(var d=u.length-1;d>=0;d--)c.script.unshift(["type",u[d].matches,u[d].mode]);function m(t,i){var a,l=s.token(t,i.htmlState),u=/\btag\b/.test(l);if(u&&!/[<>\s\/]/.test(t.current())&&(a=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))i.inTag=a+" ";else if(i.inTag&&u&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==t.current()&&function(e,t){for(var r=0;r-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}(e,g,t.localMode.token(e,t.localState))},i.localMode=p,i.localState=e.startState(p,s.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return l}return{startState:function(){return{token:m,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?s.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})(r(2),r(4),r(5),r(7))},function(e,t,r){(function(e){"use strict";function t(e){for(var t={},r=0;r0;o--)r.context=r.context.prev;return z(e,t,r)}function E(e){var t=e.current().toLowerCase();i=b.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return S(r,t,"block");if("}"==e&&r.context.prev)return T(r);if(k&&/@component/i.test(e))return S(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return S(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return S(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return S(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return S(r,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return S(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return m.hasOwnProperty(n)?(i="property","maybeprop"):f.hasOwnProperty(n)?(i=x?"string-2":"property","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(i="error","block")},maybeprop:function(e,t,r){return":"==e?S(r,t,"prop"):z(e,t,r)},prop:function(e,t,r){if(";"==e)return T(r);if("{"==e&&v)return S(r,t,"propBlock");if("}"==e||"{"==e)return L(e,t,r);if("("==e)return S(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)E(t);else if("interpolation"==e)return S(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?T(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?L(e,t,r):")"==e?T(r):"("==e?S(r,t,"parens"):"interpolation"==e?S(r,t,"interpolation"):("word"==e&&E(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):z(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&c.hasOwnProperty(t.current())?(i="tag",r.context.type):O.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return S(r,t,"atBlock_parens");if("}"==e||";"==e)return L(e,t,r);if("{"==e)return T(r)&&S(r,t,v?"block":"top");if("interpolation"==e)return S(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":l.hasOwnProperty(n)?"attribute":u.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"keyword":m.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?x?"string-2":"property":b.hasOwnProperty(n)?"atom":g.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?L(e,t,r):"{"==e?T(r)&&S(r,t,v?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?T(r):"{"==e||"}"==e?L(e,t,r,2):O.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?S(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):z(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,T(r)):"word"==e?(i="@font-face"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?S(r,t,"top"):z(e,t,r)},at:function(e,t,r){return";"==e?T(r):"{"==e||"}"==e?L(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?T(r):"{"==e||";"==e?L(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new _(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(s[r]){var n=s[r](e,t);if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?w(null,"compare"):'"'==r||"'"==r?(t.tokenize=C(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==r?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?w(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?w(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=M),w("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(o=r[1],r=r[0]),i=r,"comment"!=o&&(t.state=O[t.state](o,e,t)),i},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-a)):o=(r=r.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],n=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=t(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],l=t(c),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),m=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=t(m),p=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),h=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],b=t(g),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=t(v),k=r.concat(o).concat(a).concat(c).concat(u).concat(m).concat(g).concat(v);function x(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",k),e.defineMIME("text/css",{documentTypes:n,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:h,colorKeywords:b,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:b,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:b,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:i,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:h,colorKeywords:b,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css",helperType:"gss"})})(r(2))},function(e,t,r){(function(e){"use strict";e.defineMode("sass",function(t){var r=e.mimeModes["text/css"],n=r.propertyKeywords||{},o=r.colorKeywords||{},i=r.valueKeywords||{},a=r.fontProperties||{};var s,c=new RegExp("^"+["true","false","null","auto"].join("|")),l=new RegExp("^"+["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"].join("|")),u=/^::?[a-zA-Z_][\w\-]*/;function d(e){return!e.peek()||e.match(/\s+$/,!1)}function m(e,t){var r=e.peek();return")"===r?(e.next(),t.tokenizer=v,"operator"):"("===r?(e.next(),e.eatSpace(),"operator"):"'"===r||'"'===r?(t.tokenizer=p(e.next()),"string"):(t.tokenizer=p(")",!1),"string")}function f(e,t){return function(r,n){return r.sol()&&r.indentation()<=e?(n.tokenizer=v,v(r,n)):(t&&r.skipTo("*/")?(r.next(),r.next(),n.tokenizer=v):r.skipToEnd(),"comment")}}function p(e,t){return null==t&&(t=!0),function r(n,o){var i=n.next(),a=n.peek(),s=n.string.charAt(n.pos-2);return"\\"!==i&&a===e||i===e&&"\\"!==s?(i!==e&&t&&n.next(),d(n)&&(o.cursorHalf=0),o.tokenizer=v,"string"):"#"===i&&"{"===a?(o.tokenizer=h(r),n.next(),"operator"):"string"}}function h(e){return function(t,r){return"}"===t.peek()?(t.next(),r.tokenizer=e,"operator"):v(t,r)}}function g(e){if(0==e.indentCount){e.indentCount++;var r=e.scopes[0].offset+t.indentUnit;e.scopes.unshift({offset:r})}}function b(e){1!=e.scopes.length&&e.scopes.shift()}function v(e,t){var r=e.peek();if(e.match("/*"))return t.tokenizer=f(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=f(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=h(v),"operator";if('"'===r||"'"===r)return e.next(),t.tokenizer=p(r),"string";if(t.cursorHalf){if("#"===r&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return d(e)&&(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return d(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return d(e)&&(t.cursorHalf=0),"unit";if(e.match(c))return d(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=m,d(e)&&(t.cursorHalf=0),"atom";if("$"===r)return e.next(),e.eatWhile(/[\w-]/),d(e)&&(t.cursorHalf=0),"variable-2";if("!"===r)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(l))return d(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return d(e)&&(t.cursorHalf=0),s=e.current().toLowerCase(),i.hasOwnProperty(s)?"atom":o.hasOwnProperty(s)?"keyword":n.hasOwnProperty(s)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(d(e))return t.cursorHalf=0,null}else{if("-"===r&&e.match(/^-\w+-/))return"meta";if("."===r){if(e.next(),e.match(/^[\w-]+/))return g(t),"qualifier";if("#"===e.peek())return g(t),"tag"}if("#"===r){if(e.next(),e.match(/^[\w-]+/))return g(t),"builtin";if("#"===e.peek())return g(t),"tag"}if("$"===r)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(c))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=m,"atom";if("="===r&&e.match(/^=[\w-]+/))return g(t),"meta";if("+"===r&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===r&&e.match("@extend")&&(e.match(/\s*[\w]/)||b(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return g(t),"def";if("@"===r)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){s=e.current().toLowerCase();var y=t.prevProp+"-"+s;return n.hasOwnProperty(y)?"property":n.hasOwnProperty(s)?(t.prevProp=s,"property"):a.hasOwnProperty(s)?"property":"tag"}return e.match(/ *:/,!1)?(g(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(g(t),"tag")}if(":"===r)return e.match(u)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(l)?"operator":(e.next(),null)}return{startState:function(){return{tokenizer:v,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,r){var n=function(e,r){e.sol()&&(r.indentCount=0);var n=r.tokenizer(e,r),o=e.current();if("@return"!==o&&"}"!==o||b(r),null!==n){for(var i=e.pos-o.length+t.indentUnit*r.indentCount,a=[],s=0;sr.keyCol)return t.skipToEnd(),"string";if(r.literal&&(r.literal=!1),t.sol()){if(r.keyCol=0,r.pair=!1,r.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==n?r.inlinePairs++:"}"==n?r.inlinePairs--:"["==n?r.inlineList++:r.inlineList--,"meta";if(r.inlineList>0&&!o&&","==n)return t.next(),"meta";if(r.inlinePairs>0&&!o&&","==n)return r.keyCol=0,r.pair=!1,r.pairStart=!1,t.next(),"meta";if(r.pairStart){if(t.match(/^\s*(\||\>)\s*/))return r.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==r.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(r.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!r.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(r.pair=!0,r.keyCol=t.indentation(),"atom"):r.pair&&t.match(/^:\s*/)?(r.pairStart=!0,"meta"):(r.pairStart=!1,r.escaped="\\"==n,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")})(r(2))},function(e,t,r){var n;n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=40)}([function(e,t,r){"use strict";var n=r(39),o=r(152),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){c.headers[e]={}}),n.forEach(["post","put","patch"],function(e){c.headers[e]=n.merge(i)}),e.exports=c}).call(t,r(70))},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(109),i=(n=o)&&n.__esModule?n:{default:n};t.default=function(e,t,r){return t in e?(0,i.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),o=r(1).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=!0},function(e,t,r){"use strict";var n=r(12);e.exports.f=function(e){return new function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}(e)}},function(e,t,r){var n=r(11).f,o=r(15),i=r(2)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(53)("keys"),o=r(58);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(47),o=r(21);e.exports=function(e){return n(o(e))}},function(e,t,r){var n=r(17).Symbol;e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapProps=void 0;var n,o=r(193),i=(n=o)&&n.__esModule?n:{default:n};var a={showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},shouldOverrideMeta:{type:Boolean,default:!1}};t.mapProps=function(e){return i.default.pick(a,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["1/2","1/3","2/3","1/4","3/4","1/5","2/5","3/5","4/5","1/6","5/6"]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(150);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i(n).default}}),Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return i(n).default}});var o=r(59);function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Errors",{enumerable:!0,get:function(){return i(o).default}})},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(97),i=r(100),a=r(106),s=r(104),c=r(38),l="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(99);e.exports=function(e){return new Promise(function(u,d){var m=e.data,f=e.headers;n.isFormData(m)&&delete f["Content-Type"];var p=new XMLHttpRequest,h="onreadystatechange",g=!1;if("test"===t.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||s(e.url)||(p=new window.XDomainRequest,h="onload",g=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var b=e.auth.username||"",v=e.auth.password||"";f.Authorization="Basic "+l(b+":"+v)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[h]=function(){if(p&&(4===p.readyState||g)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:t,config:e,request:p};o(u,d,r),p=null}},p.onerror=function(){d(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){d(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var y=r(102),k=(e.withCredentials||s(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;k&&(f[e.xsrfHeaderName]=k)}if("setRequestHeader"in p&&n.forEach(f,function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),d(e),p=null)}),void 0===m&&(m=null),p.send(m)})}}).call(t,r(70))},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(96);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;nr;)t.push(arguments[r++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},n(g),g},f=function(e){delete b[e]},"process"==r(13)(d)?n=function(e){d.nextTick(a(v,e,1))}:h&&h.now?n=function(e){h.now(a(v,e,1))}:p?(i=(o=new p).port2,o.port1.onmessage=y,n=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):n="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:m,clear:f}},function(e,t,r){var n=r(28),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(21);e.exports=function(e){return Object(n(e))}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.record(t)}return n(e,[{key:"all",value:function(){return this.errors}},{key:"has",value:function(e){var t=this.errors.hasOwnProperty(e);t||(t=Object.keys(this.errors).filter(function(t){return t.startsWith(e+".")||t.startsWith(e+"[")}).length>0);return t}},{key:"first",value:function(e){return this.get(e)[0]}},{key:"get",value:function(e){return this.errors[e]||[]}},{key:"any",value:function(){return Object.keys(this.errors).length>0}},{key:"record",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=e}},{key:"clear",value:function(e){if(e){var t=Object.assign({},this.errors);Object.keys(t).filter(function(t){return t===e||t.startsWith(e+".")||t.startsWith(e+"[")}).forEach(function(e){return delete t[e]}),this.errors=t}else this.errors={}}}]),e}();t.default=o},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,r(71))},function(e,t){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return r.test(e)}},function(e,t){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?r:t)&&("number"==o||"symbol"!=o&&n.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}},function(e,t,r){var n=r(16),o=r(18),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&n(e)==i}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function m(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(m);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d1)for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:null;return this.viaManyToMany?this.detachResources(e):Nova.request({url:"/nova-api/"+this.resourceName,method:"delete",params:(0,i.default)({},this.queryString,{resources:a(e)})}).then(r||function(){t.deleteModalOpen=!1,t.getResources()})},deleteSelectedResources:function(){this.deleteResources(this.selectedResources)},deleteAllMatchingResources:function(){var e=this;return this.viaManyToMany?this.detachAllMatchingResources():Nova.request({url:this.deleteAllMatchingResourcesEndpoint,method:"delete",params:(0,i.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},detachResources:function(e){var t=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,i.default)({},this.queryString,{resources:a(e)})}).then(function(){t.deleteModalOpen=!1,t.getResources()})},detachAllMatchingResources:function(){var e=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,i.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},forceDeleteResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/force",method:"delete",params:(0,i.default)({},this.queryString,{resources:a(e)})}).then(r||function(){t.deleteModalOpen=!1,t.getResources()})},forceDeleteSelectedResources:function(){this.forceDeleteResources(this.selectedResources)},forceDeleteAllMatchingResources:function(){var e=this;return Nova.request({url:this.forceDeleteSelectedResourcesEndpoint,method:"delete",params:(0,i.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},restoreResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/restore",method:"put",params:(0,i.default)({},this.queryString,{resources:a(e)})}).then(r||function(){t.restoreModalOpen=!1,t.getResources()})},restoreSelectedResources:function(){this.restoreResources(this.selectedResources)},restoreAllMatchingResources:function(){var e=this;return Nova.request({url:this.restoreAllMatchingResourcesEndpoint,method:"put",params:(0,i.default)({},this.queryString,{resources:"all"})}).then(function(){e.restoreModalOpen=!1,e.getResources()})}},computed:{deleteAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens:"/nova-api/"+this.resourceName},forceDeleteSelectedResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/force":"/nova-api/"+this.resourceName+"/force"},restoreAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/restore":"/nova-api/"+this.resourceName+"/restore"},queryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,trashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(43)),o=a(r(20)),i=a(r(42));function a(e){return e&&e.__esModule?e:{default:e}}t.default={methods:{clearSelectedFilters:function(){var e=(0,i.default)(n.default.mark(function e(t){var r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName,lens:t});case 3:e.next=7;break;case 5:return e.next=7,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName});case 7:this.updateQueryString((r={},(0,o.default)(r,this.pageParameter,1),(0,o.default)(r,this.filterParameter,""),r));case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),filterChanged:function(){var e;this.updateQueryString((e={},(0,o.default)(e,this.pageParameter,1),(0,o.default)(e,this.filterParameter,this.$store.getters[this.resourceName+"/currentEncodedFilters"]),e))},initializeFilters:function(){var e=(0,i.default)(n.default.mark(function e(t){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit(this.resourceName+"/clearFilters"),e.next=3,this.$store.dispatch(this.resourceName+"/fetchFilters",{resourceName:this.resourceName,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,lens:t});case 3:return e.next=5,this.initializeState(t);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),initializeState:function(){var e=(0,i.default)(n.default.mark(function e(t){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.initialEncodedFilters){e.next=5;break}return e.next=3,this.$store.dispatch(this.resourceName+"/initializeCurrentFilterValuesFromQueryString",this.initialEncodedFilters);case 3:e.next=7;break;case 5:return e.next=7,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName,lens:t});case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},computed:{filterParameter:function(){return this.resourceName+"_filter"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32);t.default={props:(0,n.mapProps)(["shownViaNewRelationModal","field","viaResource","viaResourceId","viaRelationship","resourceName","showHelpText"]),data:function(){return{value:""}},mounted:function(){var e=this;this.setInitialValue(),this.field.fill=this.fill,Nova.$on(this.field.attribute+"-value",function(t){e.value=t})},destroyed:function(){Nova.$off(this.field.attribute+"-value")},methods:{setInitialValue:function(){this.value=void 0!==this.field.value&&null!==this.field.value?this.field.value:""},fill:function(e){e.append(this.field.attribute,String(this.value))},handleChange:function(e){this.value=e.target.value,this.field&&Nova.$emit(this.field.attribute+"-change",this.value)}},computed:{isReadonly:function(){return this.field.readonly||_.get(this.field,"extraAttributes.readonly")}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34);t.default={props:{errors:{default:function(){return new n.Errors}}},data:function(){return{errorClass:"border-danger"}},computed:{errorClasses:function(){return this.hasError?[this.errorClass]:[]},fieldAttribute:function(){return this.field.attribute},validationKey:function(){return this.field.validationKey},hasError:function(){return this.errors.has(this.validationKey)},firstError:function(){if(this.hasError)return this.errors.first(this.validationKey)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(43)),o=a(r(42)),i=a(r(33));function a(e){return e&&e.__esModule?e:{default:e}}t.default={props:{loadCards:{type:Boolean,default:!0}},data:function(){return{cards:[]}},created:function(){this.fetchCards()},watch:{cardsEndpoint:function(){this.fetchCards()}},methods:{fetchCards:function(){var e=(0,o.default)(n.default.mark(function e(){var t,r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loadCards){e.next=6;break}return e.next=3,Nova.request().get(this.cardsEndpoint,{params:this.extraCardParams});case 3:t=e.sent,r=t.data,this.cards=r;case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},computed:{shouldShowCards:function(){return this.cards.length>0},smallCards:function(){return _.filter(this.cards,function(e){return-1!==i.default.indexOf(e.width)})},largeCards:function(){return _.filter(this.cards,function(e){return"full"==e.width})},extraCardParams:function(){return null}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{toAppTimezone:function(e){return e?moment.tz(e,this.userTimezone).clone().tz(Nova.config.timezone).format("YYYY-MM-DD HH:mm:ss"):e},fromAppTimezone:function(e){return e?moment.tz(e,Nova.config.timezone).clone().tz(this.userTimezone).format("YYYY-MM-DD HH:mm:ss"):e},localizeDateTimeField:function(e){if(!e.value)return e.value;var t=moment.tz(e.value,Nova.config.timezone).clone().tz(this.userTimezone);return e.format?t.format(e.format):this.usesTwelveHourTime?t.format("YYYY-MM-DD h:mm:ss A"):t.format("YYYY-MM-DD HH:mm:ss")},localizeDateField:function(e){if(!e.value)return e.value;var t=moment.tz(e.value,Nova.config.timezone).clone().tz(this.userTimezone);return e.format?t.format(e.format):t.format("YYYY-MM-DD")}},computed:{userTimezone:function(){return Nova.config.userTimezone?Nova.config.userTimezone:moment.tz.guess()},usesTwelveHourTime:function(){return _.endsWith((new Date).toLocaleString(),"AM")||_.endsWith((new Date).toLocaleString(),"PM")}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(188),i=(n=o)&&n.__esModule?n:{default:n};t.default={methods:{updateQueryString:function(e){this.$router.push({query:(0,i.default)(e,this.$route.query)}).catch(function(e){if("NavigationDuplicated"!=e.name)throw e})}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={computed:{resourceInformation:function(){var e=this;return _.find(Nova.config.resources,function(t){return t.uriKey==e.resourceName})},viaResourceInformation:function(){var e=this;if(this.viaResource)return _.find(Nova.config.resources,function(t){return t.uriKey==e.viaResource})},authorizedToCreate:function(){return this.resourceInformation.authorizedToCreate}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(20),i=(n=o)&&n.__esModule?n:{default:n};t.default={methods:{selectPreviousPage:function(){this.updateQueryString((0,i.default)({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.updateQueryString((0,i.default)({},this.pageParameter,this.currentPage+1))}},computed:{currentPage:function(){return parseInt(this.$route.query[this.pageParameter]||1)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(20),i=(n=o)&&n.__esModule?n:{default:n};t.default={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.updateQueryString((0,i.default)({},this.perPageParameter,this.perPage))}},computed:{currentPerPage:function(){return this.$route.query[this.perPageParameter]||25}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(187),i=(n=o)&&n.__esModule?n:{default:n};t.default={data:function(){return{search:"",selectedResource:"",availableResources:[]}},methods:{selectResource:function(e){this.selectedResource=e,this.field&&Nova.$emit(this.field.attribute+"-change",this.selectedResource.value)},handleSearchCleared:function(){this.availableResources=[]},clearSelection:function(){this.selectedResource="",this.availableResources=[],this.field&&Nova.$emit(this.field.attribute+"-change",null)},performSearch:function(e){var t=this;this.search=e;var r=e.trim();""!=r&&this.debouncer(function(){t.getAvailableResources(r)},500)},debouncer:(0,i.default)(function(e){return e()},500)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={beforeRouteLeave:function(e,t,r){this.canLeave?r():window.confirm(this.__("Do you really want to leave? You have unsaved changes."))?r():r(!1)},data:function(){return{canLeave:!0}},methods:{updateFormStatus:function(){this.canLeave=!1}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{withTrashed:!1}},methods:{toggleWithTrashed:function(){this.withTrashed=!this.withTrashed},enableWithTrashed:function(){this.withTrashed=!0},disableWithTrashed:function(){this.withTrashed=!1}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e)};var n,o=r(198),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(41),i=(n=o)&&n.__esModule?n:{default:n};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return i.default.all([e,new i.default(function(e){setTimeout(function(){return e()},t)})]).then(function(e){return e[0]})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e.match(/^(.*)[A-Za-zÀ-ÖØ-öø-ÿ]$/))return e;if(e>1||0==e)return n.Inflector.pluralize(t);return n.Inflector.singularize(t)};var n=r(40)},function(e,t,r){"use strict";var n={uncountableWords:["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],pluralRules:[[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],singularRules:[[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("s$","gi"),""]],nonTitlecasedWords:["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],idSuffix:new RegExp("(_ids|_id)$","g"),underbar:new RegExp("_","g"),spaceOrUnderbar:new RegExp("[ _]","g"),uppercase:new RegExp("([A-Z])","g"),underbarPrefix:new RegExp("^_"),applyRules:function(e,t,r,n){if(n)e=n;else if(!(r.indexOf(e.toLowerCase())>-1))for(var o=0;o>8-s%1*8)){if((r=i.charCodeAt(s+=.75))>255)throw new o;t=t<<8|r}return a}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}}),a):a}},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){e.exports={default:r(111),__esModule:!0}},function(e,t,r){e.exports={default:r(112),__esModule:!0}},function(e,t,r){"use strict";t.__esModule=!0;var n,o=r(108),i=(n=o)&&n.__esModule?n:{default:n};t.default=i.default||function(e){for(var t=1;tu;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}}},function(e,t,r){var n=r(14),o=r(121),i=r(120),a=r(4),s=r(56),c=r(140),l={},u={};(t=e.exports=function(e,t,r,d,m){var f,p,h,g,b=m?function(){return e}:c(e),v=n(r,d,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(i(b)){for(f=s(e.length);f>y;y++)if((g=t?v(a(p=e[y])[0],p[1]):v(e[y]))===l||g===u)return g}else for(h=b.call(e);!(p=h.next()).done;)if((g=o(h,v,p.value,t))===l||g===u)return g}).BREAK=l,t.RETURN=u},function(e,t,r){e.exports=!r(5)&&!r(23)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(10),o=r(2)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(4);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){"use strict";var n=r(127),o=r(52),i=r(26),a={};r(7)(a,r(2)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(2)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(1),o=r(55).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,c="process"==r(13)(a);e.exports=function(){var e,t,r,l=function(){var n,o;for(c&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(c)r=function(){a.nextTick(l)};else if(!i||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);r=function(){u.then(l)}}else r=function(){o.call(n,l)};else{var d=!0,m=document.createTextNode("");new i(l).observe(m,{characterData:!0}),r=function(){m.data=d=!d}}return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){"use strict";var n=r(49),o=r(129),i=r(132),a=r(57),s=r(47),c=Object.assign;e.exports=!c||r(23)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=c({},e)[r]||Object.keys(c({},t)).join("")!=n})?function(e,t){for(var r=a(e),c=arguments.length,l=1,u=o.f,d=i.f;c>l;)for(var m,f=s(arguments[l++]),p=u?n(f).concat(u(f)):n(f),h=p.length,g=0;h>g;)d.call(f,m=p[g++])&&(r[m]=f[m]);return r}:c},function(e,t,r){var n=r(4),o=r(128),i=r(45),a=r(27)("IE_PROTO"),s=function(){},c=function(){var e,t=r(22)("iframe"),n=i.length;for(t.style.display="none",r(46).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("