1 line
672 KiB
JavaScript
1 line
672 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SPECTOR",[],t):"object"==typeof exports?exports.SPECTOR=t():e.SPECTOR=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(i),o=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(o).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<e.length;r++){var s=e[r];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){var i={},r=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),o=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var i=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),s=null,a=0,l=[],c=n(6);function u(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=i[r.id];if(o){o.refs++;for(var s=0;s<o.parts.length;s++)o.parts[s](r.parts[s]);for(;s<r.parts.length;s++)o.parts.push(g(r.parts[s],t))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(g(r.parts[s],t));i[r.id]={id:r.id,refs:1,parts:a}}}}function h(e,t){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],s=t.base?o[0]+t.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}function d(e,t){var n=o(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=l[l.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=o(e.insertAt.before,n);n.insertBefore(t,r)}}function m(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=l.indexOf(e);t>=0&&l.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=function(){0;return n.nc}();i&&(e.attrs.nonce=i)}return f(t,e.attrs),d(e,t),t}function f(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,i,r,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var l=a++;n=s||(s=p(t)),i=E.bind(null,n,l,!1),r=E.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",f(t,e.attrs),d(e,t),t}(t),i=function(e,t,n){var i=n.css,r=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||o)&&(i=c(i));r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([i],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,t),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=p(t),i=function(e,t){var n=t.css,i=t.media;i&&e.setAttribute("media",i);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return u(n,t),function(e){for(var r=[],o=0;o<n.length;o++){var s=n[o];(a=i[s.id]).refs--,r.push(a)}e&&u(h(e,t),t);for(o=0;o<r.length;o++){var a;if(0===(a=r[o]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete i[a.id]}}}};var C=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function E(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=C(t,r);else{var o=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){n(4),n(7),n(9),n(11),e.exports=n(12)},function(e,t,n){var i=n(5);"string"==typeof i&&(i=[[e.i,i,""]]);var r={insertInto:"html",hmr:!0,transform:void 0,insertInto:"html"};n(1)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(t=e.exports=n(0)(!1)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat:300,400);",""]),t.push([e.i,"/* The main window */\n.resultViewComponent {\n position: absolute;\n z-index: 99999;\n border: 1px solid black;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: #222;\n opacity: 1;\n visibility: hidden;\n display: none;\n color: #f9f9f9;\n font-family: Consolas, monaco, monospace;\n font-size: 14px;\n font-weight: 500; }\n .resultViewComponent.active {\n visibility: visible;\n display: block; }\n .resultViewComponent, .resultViewComponent:after, .resultViewComponent:before {\n box-sizing: content-box; }\n\n.resultViewMenuComponent {\n font-family: 'Montserrat', sans-serif;\n font-size: 13px;\n font-weight: 300;\n line-height: 40px;\n flex: 1 100%;\n display: flex;\n flex-flow: row wrap;\n height: 42px;\n outline: 0 none;\n border-bottom: 2px solid #222;\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n background: #2c2c2c;\n display: -webkit-box;\n display: -moz-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-flow: row wrap;\n flex-flow: row wrap;\n justify-content: flex-end; }\n .resultViewMenuComponent .resultViewMenuOpen {\n display: none;\n visibility: hidden; }\n .resultViewMenuComponent a {\n outline: 0 none;\n text-decoration: none;\n display: block;\n padding: 0 20px 0 20px;\n color: #cccccc;\n background: #2c2c2c;\n box-sizing: border-box;\n height: 100%; }\n .resultViewMenuComponent a.active {\n background: #222;\n color: white;\n font-weight: 400;\n border-bottom: 2px solid #F0640D; }\n .resultViewMenuComponent a:hover {\n background: #222;\n color: #c9c9c9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n .resultViewMenuComponent a:hover.active {\n color: #F0640D;\n transition: color 0;\n -webkit-transition: color 0;\n -moz-transition: color 0; }\n .resultViewMenuComponent a.clearSearch {\n display: inline-block;\n padding: 0px;\n margin-left: -30px;\n margin-right: 20px;\n z-index: 9000;\n color: #f9f9f9; }\n .resultViewMenuComponent a.clearSearch:hover {\n background: #2c2c2c;\n color: #F0640D; }\n @media all and (max-width: 1024px) {\n .resultViewMenuComponent {\n padding: 0px;\n position: absolute;\n overflow-y: visible;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 999999;\n display: block; }\n .resultViewMenuComponent .resultViewMenuOpen {\n display: block;\n visibility: visible; }\n .resultViewMenuComponent li:not(.resultViewMenuSmall) {\n display: none;\n visibility: hidden; }\n .resultViewMenuComponent li {\n background: #2c2c2c; }\n .resultViewMenuComponent li.searchContainer {\n background: #464646; }\n .resultViewMenuComponent a.active {\n background: #2c2c2c; } }\n .resultViewMenuComponent input {\n border: 0;\n font-family: 'Montserrat', sans-serif;\n font-weight: 300;\n padding: 0 20px 0 20px;\n background: #464646;\n color: #f9f9f9;\n height: 100%;\n position: relative;\n top: -1px;\n box-sizing: border-box; }\n .resultViewMenuComponent input:focus {\n border: 0;\n outline: 0 none; }\n .resultViewMenuComponent .clearSearch {\n position: relative;\n background: transparent;\n display: inline;\n padding: 0px;\n margin-left: -30px;\n z-index: 9000;\n color: #F0640D; }\n .resultViewMenuComponent .clearSearch:hover {\n background: transparent !important; }\n .resultViewMenuComponent ::-webkit-input-placeholder {\n /* WebKit, Blink, Edge */\n color: #cccccc; }\n .resultViewMenuComponent :-moz-placeholder {\n /* Mozilla Firefox 4 to 18 */\n color: #cccccc; }\n .resultViewMenuComponent ::-moz-placeholder {\n /* Mozilla Firefox 19+ */\n color: #cccccc; }\n .resultViewMenuComponent :-ms-input-placeholder {\n /* Internet Explorer 10-11 */\n color: #cccccc; }\n\n.resultViewContentComponent {\n position: absolute;\n top: 40px;\n left: 0;\n bottom: 0;\n right: 0; }\n\n.informationColumnLeftComponent {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 50%;\n overflow: auto;\n overflow-x: hidden;\n overflow-y: visible; }\n\n.informationColumnRightComponent {\n position: absolute;\n top: 0;\n left: 50%;\n bottom: 0;\n right: 0;\n overflow: auto;\n overflow-x: hidden;\n overflow-y: visible; }\n\n.captureListComponent {\n position: absolute;\n top: 40px;\n left: 0;\n bottom: 0;\n right: 0;\n background: #222;\n z-index: 9000;\n display: none;\n visibility: hidden;\n overflow-y: visible;\n overflow-x: hidden; }\n .captureListComponent.active {\n display: block;\n visibility: visible; }\n .captureListComponent .openCaptureFile {\n border: 1px dashed #f9f9f9;\n display: block;\n margin: 5px;\n padding: 5px;\n text-align: center;\n font-style: italic; }\n .captureListComponent .openCaptureFile span {\n line-height: 100%;\n vertical-align: middle; }\n .captureListComponent ul {\n margin: 0px;\n padding: 0px;\n list-style: none;\n display: -webkit-box;\n display: -moz-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-flow: row wrap;\n flex-flow: row wrap;\n justify-content: flex-start; }\n .captureListComponent ul li {\n margin: 5px;\n border: 1px solid #606060; }\n .captureListComponent ul li img {\n width: 295px;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));\n background-image: -moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%), -moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);\n -webkit-background-size: 50px 51px;\n -moz-background-size: 50px 50px;\n background-size: 50px 50px;\n background-position: 0 0, 25px 0, 25px -25px, 0px 25px;\n display: block; }\n .captureListComponent ul li span {\n display: block;\n text-align: center;\n border: 5px solid #222; }\n .captureListComponent ul li span .captureListItemSave {\n color: #f9f9f9;\n font-size: 16px;\n margin-left: 10px;\n position: relative;\n padding: 3px 8px 3px 32px; }\n .captureListComponent ul li span .captureListItemSave:before, .captureListComponent ul li span .captureListItemSave:after {\n box-sizing: border-box;\n content: \"\";\n position: absolute; }\n .captureListComponent ul li span .captureListItemSave:before {\n background: #d9d9d9;\n border-color: #f9f9f9;\n border-style: solid;\n border-width: 7px 2px 1px;\n border-radius: 1px;\n height: 16px;\n left: 8px;\n top: 5px;\n width: 16px; }\n .captureListComponent ul li span .captureListItemSave:after {\n background: #f9f9f9;\n border-color: #d9d9d9;\n border-style: solid;\n border-width: 1px 1px 1px 4px;\n height: 5px;\n left: 13px;\n top: 5px;\n width: 7px; }\n .captureListComponent ul li:hover {\n cursor: pointer; }\n .captureListComponent ul li.active span {\n background: #F0640D;\n border: 5px solid #F0640D; }\n .captureListComponent ul li.active span .captureListItemSave:before {\n background: #F0640D; }\n .captureListComponent ul li.active span .captureListItemSave:after {\n border-color: #F0640D; }\n\n.visualStateListComponent {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n padding: 5px;\n right: 80%;\n overflow-y: visible;\n overflow-x: hidden; }\n .visualStateListComponent ul {\n margin: 0px;\n padding: 0px;\n list-style: none; }\n .visualStateListComponent ul li {\n margin: 20px 15px 0px 15px;\n border: 1px solid #606060; }\n .visualStateListComponent ul li img {\n display: block;\n width: 100%;\n margin: 0px;\n padding: 0px;\n box-sizing: border-box;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));\n background-image: -moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%), -moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);\n -webkit-background-size: 50px 51px;\n -moz-background-size: 50px 50px;\n background-size: 50px 50px;\n background-position: 0 0, 25px 0, 25px -25px, 0px 25px; }\n .visualStateListComponent ul li:hover {\n cursor: pointer; }\n .visualStateListComponent ul li span {\n border: 5px solid #222;\n background: #222;\n box-sizing: border-box;\n display: inline-block;\n width: 100%;\n margin: 0px;\n padding: 5px;\n word-wrap: break-word; }\n .visualStateListComponent ul li.active {\n border: 2px solid #F0640D; }\n\n.commandListComponent {\n position: absolute;\n top: 0;\n left: 20%;\n right: 40%;\n bottom: 0;\n color: lightgray; }\n .commandListComponent ul {\n margin: 0px;\n padding: 0px;\n list-style: none;\n overflow-y: visible;\n overflow-x: hidden;\n height: 100%; }\n .commandListComponent ul li {\n padding: 8px; }\n .commandListComponent ul li span {\n word-wrap: break-word;\n line-height: 22px; }\n .commandListComponent ul li:hover {\n color: #f9f9f9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n .commandListComponent ul li:nth-child(even) {\n background: #2c2c2c; }\n .commandListComponent ul li:nth-child(odd) {\n background: #222; }\n .commandListComponent ul li .important {\n font-weight: 800; }\n .commandListComponent ul li .important.deprecated {\n color: red; }\n .commandListComponent ul li .important.unused {\n color: yellow; }\n .commandListComponent ul li .important.disabled {\n color: gray; }\n .commandListComponent ul li .important.redundant {\n color: orange; }\n .commandListComponent ul li .important.valid {\n color: greenyellow; }\n .commandListComponent ul li .marker {\n font-size: 16px;\n font-weight: 900;\n color: greenyellow; }\n .commandListComponent ul li.active {\n background: #f37628;\n color: #222; }\n .commandListComponent ul li.drawCall {\n background: #5db0d7;\n color: #222; }\n .commandListComponent ul li a {\n margin-left: 5px;\n margin-right: 5px;\n color: #5db0d7;\n background: #222;\n padding: 5px;\n font-weight: 900;\n display: inline-block; }\n\n.commandDetailComponent {\n position: absolute;\n top: 0;\n left: 60%;\n right: 0;\n bottom: 0;\n overflow-y: visible;\n overflow-x: hidden; }\n\n.jsonGroupComponent {\n display: block;\n margin: 10px;\n padding: 10px;\n padding-bottom: 5px; }\n .jsonGroupComponent .jsonGroupComponentTitle {\n display: block;\n font-size: 16px;\n color: #5db0d7;\n border-bottom: 1px solid #5db0d7;\n padding-bottom: 5px;\n margin-bottom: 5px;\n text-transform: capitalize; }\n .jsonGroupComponent ul {\n margin: 0px;\n padding: 0px;\n list-style: none; }\n .jsonGroupComponent ul li:nth-child(even) {\n background: #222; }\n .jsonGroupComponent ul li:nth-child(odd) {\n background: #222; }\n\n.jsonItemComponentKey {\n color: #F0640D; }\n\n.jsonItemComponentValue {\n white-space: pre-wrap; }\n\n.jsonItemImageHolder {\n width: 50%;\n margin: auto; }\n .jsonItemImageHolder .jsonItemImage {\n margin: 5px;\n display: block;\n border: 1px solid #606060;\n width: 100%; }\n .jsonItemImageHolder .jsonItemImage img {\n width: 100%;\n display: block;\n margin: auto;\n max-width: 256px;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));\n background-image: -moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%), -moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);\n -webkit-background-size: 50px 51px;\n -moz-background-size: 50px 50px;\n background-size: 50px 50px;\n background-position: 0 0, 25px 0, 25px -25px, 0px 25px; }\n .jsonItemImageHolder .jsonItemImage span {\n margin: 0px;\n padding: 5px;\n word-wrap: break-word;\n display: inline-block;\n width: 100%;\n box-sizing: border-box; }\n\n[commandName=onOpenSourceClicked]:hover {\n color: #f9f9f9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n\n.jsonVisualStateItemComponent {\n text-align: center;\n padding: 10px; }\n .jsonVisualStateItemComponent img {\n border: 1px solid #606060;\n margin: 5px;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)), -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));\n background-image: -moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), -moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%), -moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);\n -webkit-background-size: 50px 51px;\n -moz-background-size: 50px 50px;\n background-size: 50px 50px;\n background-position: 0 0, 25px 0, 25px -25px, 0px 25px;\n width: 100%;\n max-width: 512px; }\n .jsonVisualStateItemComponent span {\n display: block; }\n\n.jsonContentComponent {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n padding: 10px;\n overflow-y: visible;\n overflow-x: hidden; }\n\n.jsonItemComponentValue {\n word-break: break-all;\n white-space: normal; }\n\n.jsonSourceItemComponentOpen {\n font-weight: bold;\n color: #5db0d7;\n text-decoration: underline; }\n\n.sourceCodeMenuComponentContainer {\n position: absolute;\n left: 0;\n top: 0;\n right: 40%; }\n\n.sourceCodeMenuComponent {\n font-family: 'Montserrat', sans-serif;\n font-size: 13px;\n font-weight: 300;\n line-height: 40px;\n flex: 1 100%;\n display: flex;\n flex-flow: row wrap;\n height: 42px;\n outline: 0 none;\n border-bottom: 2px solid #222;\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n background: #2c2c2c;\n display: -webkit-box;\n display: -moz-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-flow: row wrap;\n flex-flow: row wrap;\n justify-content: flex-end; }\n .sourceCodeMenuComponent .resultViewMenuOpen {\n display: none;\n visibility: hidden; }\n .sourceCodeMenuComponent a {\n outline: 0 none;\n text-decoration: none;\n display: block;\n padding: 0 20px 0 20px;\n color: #cccccc;\n background: #2c2c2c;\n box-sizing: border-box;\n height: 100%; }\n .sourceCodeMenuComponent a.active {\n background: #222;\n color: white;\n font-weight: 400;\n border-bottom: 2px solid #F0640D; }\n .sourceCodeMenuComponent a:hover {\n background: #222;\n color: #c9c9c9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n .sourceCodeMenuComponent a:hover.active {\n color: #F0640D;\n transition: color 0;\n -webkit-transition: color 0;\n -moz-transition: color 0; }\n .sourceCodeMenuComponent a.clearSearch {\n display: inline-block;\n padding: 0px;\n margin-left: -30px;\n margin-right: 20px;\n z-index: 9000;\n color: #f9f9f9; }\n .sourceCodeMenuComponent a.clearSearch:hover {\n background: #2c2c2c;\n color: #F0640D; }\n .sourceCodeMenuComponent input {\n border: 0;\n font-family: 'Montserrat', sans-serif;\n font-weight: 300;\n padding: 0 20px 0 20px;\n background: #464646;\n color: #f9f9f9;\n height: 100%;\n position: relative;\n top: -1px;\n box-sizing: border-box; }\n .sourceCodeMenuComponent input:focus {\n border: 0;\n outline: 0 none; }\n .sourceCodeMenuComponent .clearSearch {\n position: relative;\n background: transparent;\n display: inline;\n padding: 0px;\n margin-left: -30px;\n z-index: 9000;\n color: #F0640D; }\n .sourceCodeMenuComponent .clearSearch:hover {\n background: transparent !important; }\n .sourceCodeMenuComponent ::-webkit-input-placeholder {\n /* WebKit, Blink, Edge */\n color: #cccccc; }\n .sourceCodeMenuComponent :-moz-placeholder {\n /* Mozilla Firefox 4 to 18 */\n color: #cccccc; }\n .sourceCodeMenuComponent ::-moz-placeholder {\n /* Mozilla Firefox 19+ */\n color: #cccccc; }\n .sourceCodeMenuComponent :-ms-input-placeholder {\n /* Internet Explorer 10-11 */\n color: #cccccc; }\n\n.sourceCodeComponentEditable, .sourceCodeComponent {\n position: absolute;\n top: 42px;\n left: 0;\n bottom: 0;\n right: 40%;\n background: #222;\n z-index: 9000;\n overflow-x: visible;\n overflow: auto; }\n .sourceCodeComponentEditable .sourceCodeComponentTitle, .sourceCodeComponent .sourceCodeComponentTitle {\n font-size: 16px;\n font-weight: 800;\n line-height: 50px;\n color: #F0640D;\n padding: 1em;\n margin: .5em 0; }\n\n.captureMenuComponent {\n position: absolute;\n padding: 7px;\n z-index: 99999;\n top: 10px;\n left: 50%;\n margin-left: -209px;\n height: 40px;\n width: 400px;\n border: 2px solid #222;\n background-color: #2c2c2c;\n visibility: hidden;\n display: none;\n color: #f9f9f9;\n font-family: Consolas, monaco, monospace;\n font-size: 14px;\n font-weight: 500; }\n .captureMenuComponent.active {\n visibility: visible;\n display: block; }\n .captureMenuComponent, .captureMenuComponent:after, .captureMenuComponent:before {\n box-sizing: content-box; }\n\n.captureMenuLogComponent {\n position: absolute;\n padding: 7px;\n z-index: 80000;\n top: 66px;\n left: 50%;\n margin-left: -209px;\n height: 40px;\n width: 400px;\n border: 2px solid #222;\n background-color: #2c2c2c;\n visibility: hidden;\n display: none;\n color: #f9f9f9;\n font-family: Consolas, monaco, monospace;\n font-size: 14px;\n font-weight: 500; }\n .captureMenuLogComponent.active {\n visibility: visible;\n display: block; }\n .captureMenuLogComponent, .captureMenuLogComponent:after, .captureMenuLogComponent:before {\n box-sizing: content-box; }\n .captureMenuLogComponent span.error {\n color: red; }\n\n.canvasListComponent {\n float: left;\n width: 50%;\n height: 100%; }\n .canvasListComponent [commandName=onCanvasSelection] {\n vertical-align: center;\n line-height: 40px;\n white-space: nowrap;\n text-overflow: ellipsis;\n width: 190px;\n display: inline-block;\n overflow: hidden;\n margin: 0px 5px; }\n .canvasListComponent [commandName=onCanvasSelection]:hover {\n color: #c9c9c9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n .canvasListComponent ul {\n margin: 0px;\n padding: 7px;\n list-style: none;\n position: absolute;\n top: 54px;\n left: -2px;\n width: 400px;\n border: 2px solid #222;\n background-color: #2c2c2c; }\n .canvasListComponent ul li {\n margin: 5px; }\n .canvasListComponent ul li:hover {\n color: #c9c9c9;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-transition: color 0.3s;\n -moz-transition: color 0.3s; }\n\n.captureMenuActionsComponent {\n float: left;\n width: 30%;\n height: 100%;\n margin-top: 7.5px; }\n .captureMenuActionsComponent div {\n float: left; }\n .captureMenuActionsComponent [commandName=onCaptureRequested] {\n border-radius: 50%;\n background: #2c2c2c;\n border: 2px solid red;\n width: 21px;\n height: 21px; }\n .captureMenuActionsComponent [commandName=onCaptureRequested]:hover {\n background: red;\n cursor: pointer;\n transition: background 0.3s;\n -webkit-transition: background 0.3s;\n -moz-transition: background 0.3s; }\n .captureMenuActionsComponent [commandName=onPlayRequested], .captureMenuActionsComponent [commandName=onPlayNextFrameRequested] {\n width: 21px;\n height: 21px;\n border: 2px solid #f9f9f9;\n border-radius: 50%;\n margin-left: 9px; }\n .captureMenuActionsComponent [commandName=onPlayRequested]:before, .captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:before {\n content: '';\n position: absolute;\n display: inline-block;\n margin-top: 6px;\n margin-left: 4px;\n width: 7px;\n height: 7px;\n border-top: 2px solid #f9f9f9;\n border-right: 2px solid #f9f9f9;\n background-color: #f9f9f9;\n -moz-transform: rotate(45deg);\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n z-index: -20; }\n .captureMenuActionsComponent [commandName=onPlayRequested]:after, .captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:after {\n content: '';\n position: absolute;\n display: inline-block;\n width: 8px;\n height: 20px;\n background-color: #2c2c2c;\n z-index: -10; }\n .captureMenuActionsComponent [commandName=onPlayRequested]:hover, .captureMenuActionsComponent :hover[commandName=onPlayNextFrameRequested] {\n cursor: pointer;\n border: 2px solid #c9c9c9;\n transition: border 0.3s;\n -webkit-transition: border 0.3s;\n -moz-transition: border 0.3s; }\n .captureMenuActionsComponent [commandName=onPauseRequested] {\n width: 21px;\n height: 21px;\n border: 2px solid #f9f9f9;\n border-radius: 50%;\n margin-left: 9px; }\n .captureMenuActionsComponent [commandName=onPauseRequested]:before {\n content: '';\n position: absolute;\n display: inline-block;\n width: 2px;\n height: 13px;\n margin-left: 12px;\n margin-top: 4px;\n background-color: #f9f9f9; }\n .captureMenuActionsComponent [commandName=onPauseRequested]:after {\n content: '';\n position: absolute;\n display: inline-block;\n width: 2px;\n height: 13px;\n margin-left: 7px;\n margin-top: 4px;\n background-color: #f9f9f9; }\n .captureMenuActionsComponent [commandName=onPauseRequested]:hover {\n cursor: pointer;\n border: 2px solid #c9c9c9;\n transition: border 0.3s;\n -webkit-transition: border 0.3s;\n -moz-transition: border 0.3s; }\n .captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:before {\n background-color: #2c2c2c; }\n\n.fpsCounterComponent {\n float: left;\n width: 20%;\n vertical-align: center;\n line-height: 40px;\n white-space: nowrap; }\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){var i=n(8);"string"==typeof i&&(i=[[e.i,i,""]]);var r={insertInto:"html",hmr:!0,transform:void 0,insertInto:"html"};n(1)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(0)(!1)).push([e.i,'/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+glsl */\r\n/**\r\n * okaidia theme for JavaScript, CSS and HTML\r\n * Loosely based on Monokai textmate theme by http://www.monokai.nl/\r\n * @author ocodia\r\n */\r\n\r\ncode[class*="language-"],\r\npre[class*="language-"] {\r\n\tcolor: #f8f8f2;\r\n\tbackground: none;\r\n\ttext-shadow: 0 1px rgba(0, 0, 0, 0.3);\r\n\tfont-family: Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace;\r\n\ttext-align: left;\r\n\twhite-space: pre;\r\n\tword-spacing: normal;\r\n\tword-break: normal;\r\n\tword-wrap: normal;\r\n\tline-height: 1.5;\r\n\r\n\t-moz-tab-size: 4;\r\n\t-o-tab-size: 4;\r\n\ttab-size: 4;\r\n\r\n\t-webkit-hyphens: none;\r\n\t-moz-hyphens: none;\r\n\t-ms-hyphens: none;\r\n\thyphens: none;\r\n}\r\n\r\n/* Code blocks */\r\npre[class*="language-"] {\r\n\tpadding: 1em;\r\n\tmargin: .5em 0;\r\n\toverflow: auto;\r\n\tborder-radius: 0.3em;\r\n}\r\n\r\n/*:not(pre) > code[class*="language-"],\r\npre[class*="language-"] {\r\n\tbackground: #272822;\r\n}*/\r\n\r\n/* Inline code */\r\n:not(pre) > code[class*="language-"] {\r\n\tpadding: .1em;\r\n\tborder-radius: .3em;\r\n\twhite-space: normal;\r\n}\r\n\r\n.token.comment,\r\n.token.prolog,\r\n.token.doctype,\r\n.token.cdata {\r\n\tcolor: slategray;\r\n}\r\n\r\n.token.punctuation {\r\n\tcolor: #f8f8f2;\r\n}\r\n\r\n.namespace {\r\n\topacity: .7;\r\n}\r\n\r\n.token.property,\r\n.token.tag,\r\n.token.constant,\r\n.token.symbol,\r\n.token.deleted {\r\n\tcolor: #f92672;\r\n}\r\n\r\n.token.boolean,\r\n.token.number {\r\n\tcolor: #ae81ff;\r\n}\r\n\r\n.token.selector,\r\n.token.attr-name,\r\n.token.string,\r\n.token.char,\r\n.token.builtin,\r\n.token.inserted {\r\n\tcolor: #a6e22e;\r\n}\r\n\r\n.token.operator,\r\n.token.entity,\r\n.token.url,\r\n.language-css .token.string,\r\n.style .token.string,\r\n.token.variable {\r\n\tcolor: #f8f8f2;\r\n}\r\n\r\n.token.atrule,\r\n.token.attr-value,\r\n.token.function {\r\n\tcolor: #e6db74;\r\n}\r\n\r\n.token.keyword {\r\n\tcolor: #66d9ef;\r\n}\r\n\r\n.token.regex,\r\n.token.important {\r\n\tcolor: #fd971f;\r\n}\r\n\r\n.token.important,\r\n.token.bold {\r\n\tfont-weight: bold;\r\n}\r\n.token.italic {\r\n\tfont-style: italic;\r\n}\r\n\r\n.token.entity {\r\n\tcursor: help;\r\n}\r\n\r\n',""])},function(e,t,n){(function(t){var n="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},i=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,i=n.Prism={manual:n.Prism&&n.Prism.manual,util:{encode:function(e){return e instanceof r?new r(e.type,i.util.encode(e.content),e.alias):"Array"===i.util.type(e)?e.map(i.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){switch(i.util.type(e)){case"Object":var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=i.util.clone(e[n]));return t;case"Array":return e.map&&e.map(function(e){return i.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||i.languages)[e];if(2==arguments.length){for(var s in n=arguments[1])n.hasOwnProperty(s)&&(o[s]=n[s]);return o}var a={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);a[l]=o[l]}return i.languages.DFS(i.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=a)}),r[e]=a},DFS:function(e,t,n,r){for(var o in r=r||{},e)e.hasOwnProperty(o)&&(t.call(e,o,e[o],n||o),"Object"!==i.util.type(e[o])||r[i.util.objId(e[o])]?"Array"!==i.util.type(e[o])||r[i.util.objId(e[o])]||(r[i.util.objId(e[o])]=!0,i.languages.DFS(e[o],t,o,r)):(r[i.util.objId(e[o])]=!0,i.languages.DFS(e[o],t,null,r)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",n);for(var r,o=n.elements||document.querySelectorAll(n.selector),s=0;r=o[s++];)i.highlightElement(r,!0===e,n.callback)},highlightElement:function(t,r,o){for(var s,a,l=t;l&&!e.test(l.className);)l=l.parentNode;l&&(s=(l.className.match(e)||[,""])[1].toLowerCase(),a=i.languages[s]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+s,l=t.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+s);var c={element:t,language:s,grammar:a,code:t.textContent};if(i.hooks.run("before-sanity-check",c),!c.code||!c.grammar)return c.code&&(c.element.textContent=c.code),void i.hooks.run("complete",c);if(i.hooks.run("before-highlight",c),r&&n.Worker){var u=new Worker(i.filename);u.onmessage=function(e){c.highlightedCode=e.data,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,o&&o.call(c.element),i.hooks.run("after-highlight",c),i.hooks.run("complete",c)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else c.highlightedCode=i.highlight(c.code,c.grammar,c.language),i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,o&&o.call(t),i.hooks.run("after-highlight",c),i.hooks.run("complete",c)},highlight:function(e,t,n){var o=i.tokenize(e,t);return r.stringify(i.util.encode(o),n)},tokenize:function(e,t){var n=i.Token,r=[e],o=t.rest;if(o){for(var s in o)t[s]=o[s];delete t.rest}e:for(var s in t)if(t.hasOwnProperty(s)&&t[s]){var a=t[s];a="Array"===i.util.type(a)?a:[a];for(var l=0;l<a.length;++l){var c=a[l],u=c.inside,h=!!c.lookbehind,d=!!c.greedy,m=0,p=c.alias;if(d&&!c.pattern.global){var f=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,f+"g")}c=c.pattern||c;for(var g=0,C=0;g<r.length;C+=r[g].length,++g){var E=r[g];if(r.length>e.length)break e;if(!(E instanceof n)){c.lastIndex=0;var A=1;if(!(R=c.exec(E))&&d&&g!=r.length-1){if(c.lastIndex=C,!(R=c.exec(e)))break;for(var v=R.index+(h?R[1].length:0),_=R.index+R[0].length,F=g,b=C,S=r.length;S>F&&_>b;++F)v>=(b+=r[F].length)&&(++g,C=b);if(r[g]instanceof n||r[F-1].greedy)continue;A=F-g,E=e.slice(C,b),R.index-=C}if(R){h&&(m=R[1].length);_=(v=R.index+m)+(R=R[0].slice(m)).length;var R,T=E.slice(0,v),y=E.slice(_),w=[g,A];T&&w.push(T);var B=new n(s,u?i.tokenize(R,u):R,p,R,d);w.push(B),y&&w.push(y),Array.prototype.splice.apply(r,w)}}}}}return r},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}}},r=i.Token=function(e,t,n,i,r){this.type=e,this.content=t,this.alias=n,this.length=0|(i||"").length,this.greedy=!!r};if(r.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===i.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var o={type:e.type,content:r.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==o.type&&(o.attributes.spellcheck="true"),e.alias){var s="Array"===i.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,s)}i.hooks.run("wrap",o);var a=Object.keys(o.attributes).map(function(e){return e+'="'+(o.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(a?" "+a:"")+">"+o.content+"</"+o.tag+">"},!n.document)return n.addEventListener?(n.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,o=t.code,s=t.immediateClose;n.postMessage(i.highlight(o,i.languages[r],r)),s&&n.close()},!1),n.Prism):n.Prism;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(i.filename=o.src,!document.addEventListener||i.manual||o.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(i.highlightAll):window.setTimeout(i.highlightAll,16):document.addEventListener("DOMContentLoaded",i.highlightAll))),n.Prism}();e.exports&&(e.exports=i),void 0!==t&&(t.Prism=i),i.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/i,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),i.languages.xml=i.languages.markup,i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},i.languages.css.atrule.inside.rest=i.util.clone(i.languages.css),i.languages.markup&&(i.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:i.languages.css,alias:"language-css"}}),i.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:i.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:i.languages.css}},alias:"language-css"}},i.languages.markup.tag)),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),i.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:i.languages.javascript,alias:"language-javascript"}}),i.languages.js=i.languages.javascript,i.languages.glsl=i.languages.extend("clike",{comment:[/\/\*[\w\W]*?\*\//,/\/\/(?:\\(?:\r\n|[\s\S])|.)*/],number:/\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}),i.languages.insertBefore("glsl","comment",{preprocessor:{pattern:/(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,lookbehind:!0,alias:"builtin"}}),e.exports=i}).call(this,n(10))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"==typeof t){var r=o(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=o(e,t[a]);if(void 0==c&&i.original)return;s.push(c)}return n&&n.apply(null,s)||!0}},i=function(e,t){var r=n("",e,t);return void 0==r&&i.original?i.original.apply(this,arguments):r},r=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return r(e,n[0])+"!"+r(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=function(e,i){i=r(e,i);var o=t.modules[i];if(!o){if("function"==typeof(o=t.payloads[i])){var s={},a={id:i,uri:"",exports:s,packaged:!0};s=o(function(e,t){return n(i,e,t)},s,a)||a.exports,t.modules[i]=s,delete t.payloads[i]}o=t.modules[i]=s||o}return o};!function(n){var r=e;n&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.require&&r.require.packaged||(i.original=r.require,r.require=i,r.require.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===i.exec.call(/()??/,"")[1],o=function(){var e=/^/g;return i.test.call(e,""),!e.lastIndex}();o&&r||(RegExp.prototype.exec=function(e){var t,n,s=i.exec.apply(this,arguments);if("string"==typeof e&&s){if(!r&&s.length>1&&function(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}(s,"")>-1&&(n=RegExp(this.source,i.replace.call(function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}(this),"g","")),i.replace.call(e.slice(s.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(s[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var a=1;a<s.length;a++)(t=this._xregexp.captureNames[a-1])&&(s[t]=s[a]);!o&&this.global&&!s[0].length&&this.lastIndex>s.index&&this.lastIndex--}return s},o||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=d.call(arguments,1),r=function(){if(this instanceof r){var i=t.apply(this,n.concat(d.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(d.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var r,o,s,a,l,c=Function.prototype.call,u=Array.prototype,h=Object.prototype,d=u.slice,m=c.bind(h.toString),p=c.bind(h.hasOwnProperty);if((l=p(h,"__defineGetter__"))&&(r=c.bind(h.__defineGetter__),o=c.bind(h.__defineSetter__),s=c.bind(h.__lookupGetter__),a=c.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var f=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?f.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var i=this.slice(e,e+t),r=d.call(arguments,2),o=r.length;if(e===n)o&&this.push.apply(this,r);else{var s=Math.min(t,n-e),a=e+s,l=a+o-s,c=n-a,u=n-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=r[h]}return i};Array.isArray||(Array.isArray=function(e){return"[object Array]"==m(e)});var g,C=Object("a"),E="a"!=C[0]||!(0 in C);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var s=0;s<i;s++)s in n&&(r[s]=e.call(o,n[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=D(this),i=E&&"[object String]"==m(this)?this.split(""):n,r=i.length>>>0,o=[],s=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in i&&(t=i[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&!e.call(r,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&e.call(r,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;o<i;o++)o in n&&(r=e.call(void 0,r,n[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=D(this),n=E&&"[object String]"==m(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,n[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=E&&"[object String]"==m(this)?this.split(""):D(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=x(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=E&&"[object String]"==m(this)?this.split(""):D(this),n=t.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,x(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:h)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(p(e,t)){var n;if(n={enumerable:!0,configurable:!0},l){var i=e.__proto__;e.__proto__=h;var r=s(e,t),o=a(e,t);if(e.__proto__=i,r||o)return r&&(n.get=r),o&&(n.set=o),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(g=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=g();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function A(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var v=A({}),_="undefined"==typeof document||A(document.createElement("div"));if(!v||!_)var F=Object.defineProperty}if(!Object.defineProperty||F){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(F)try{return F.call(Object,e,t,n)}catch(e){}if(p(n,"value"))if(l&&(s(e,t)||a(e,t))){var i=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");p(n,"get")&&r(e,t,n.get),p(n,"set")&&o(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n}),!Object.keys){var b=!0,S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],R=S.length;for(var T in{toString:null})b=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)p(e,n)&&t.push(n);if(b)for(var i=0,r=R;i<r;i++){var o=S[i];p(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var y="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim||y.trim()){y="["+y+"]";var w=new RegExp("^"+y+y+"*"),B=new RegExp(y+y+"*$");String.prototype.trim=function(){return String(this).replace(w,"").replace(B,"")}}function x(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var D=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if((t=t||document).createStyleSheet&&(n=t.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===e)return!0;return!1},t.importCssString=function(e,n,i){if(i=i||document,n&&t.hasCssString(n,i))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?((r=i.createStyleSheet()).cssText=e,n&&(r.owningElement.id=n)):((r=t.createElement("style")).appendChild(i.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(i).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var i=t.createElement("link");i.rel="stylesheet",i.href=e,t.getDocumentHead(n).appendChild(i)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e.documentElement;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),o.removeChild(i),s-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("./keys"),r=e("./useragent"),o=null,s=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,n){var i,r;"ontouchmove"in e&&(t.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];i=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.changedTouches[0];e.wheelX=-(t.clientX-i)/1,e.wheelY=-(t.clientY-r)/1,i=t.clientX,r=t.clientY,n(e)}))},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,o){var s,a,l,c=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,r.isIE){var h=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;l&&!h||(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)}if(e._clicks=c,i[o]("mousedown",e),c>4)c=0;else if(c>1)return i[o](u[c],e)}function d(e){c=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},n[c-1]||600),i[o]("mousedown",e),i[o](u[c],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",h),r.isOldIE&&t.addListener(e,"dblclick",d)})};var a=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};function l(e,t,n){var l=a(t);if(!r.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==o[n]&&(s=t.timeStamp);else if(18===n&&3===l&&2===c){t.timeStamp-s<50&&(o.altGr=!0)}}}if((n in i.MODIFIER_KEYS&&(n=-1),8&l&&n>=91&&n<=93&&(n=-1),!l&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,l,-n),t.defaultPrevented)))return;if(r.isChromeOS&&8&l){if(e(t,l,n),t.defaultPrevented)return;l&=-9}return!!(l||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,l,n)}function c(){o=Object.create(null)}if(t.getModifierString=function(e){return i.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,n){var i=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;i(e,"keydown",function(e){s=e.keyCode}),i(e,"keypress",function(e){return l(n,e,s)})}else{var a=null;i(e,"keydown",function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(n,e,e.keyCode);return a=e.defaultPrevented,t}),i(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i(e,"keyup",function(e){o[e.keyCode]=null}),o||(c(),i(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){t.nextTick=function(e,n){n=n||window;t.addListener(n,"message",function i(r){"zero-timeout-message-1"==r.data&&(t.stopPropagation(r),t.removeListener(n,"message",i),e())}),n.postMessage("zero-timeout-message-1","*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/keys"),l=a.KEY_MODS,c=r.isChrome<18,u=r.isIE;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var h="\n aaaa a\n",d=!1,m=!1,p=!1,f=!1,g="",C=!0;try{var E=document.activeElement===n}catch(e){}i.addListener(n,"blur",function(e){t.onBlur(e),E=!1}),i.addListener(n,"focus",function(e){E=!0,t.onFocus(e),_()}),this.focus=function(){if(g)return n.focus();n.style.position="fixed",n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return E};var A=s.delayedCall(function(){E&&_(C)}),v=s.delayedCall(function(){f||(n.value=h,E&&_())});function _(e){if(!f){if(f=!0,b)t=0,i=e?0:n.value.length-1;else var t=4,i=5;try{n.setSelectionRange(t,i)}catch(e){}f=!1}}function F(){f||(n.value=h,r.isWebKit&&v.schedule())}r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=C&&(C=!C,A.schedule())}),F(),E&&t.onFocus();var b=null;this.setInputHandler=function(e){b=e},this.getInputHandler=function(){return b};var S=!1,R=function(e){4===n.selectionStart&&5===n.selectionEnd||(b&&(e=b(e),b=null),p?(_(),e&&t.onPaste(e),p=!1):e==h.substr(0)&&4===n.selectionStart?S?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):d||(e.substring(0,9)==h&&e.length>h.length?e=e.substr(9):e.substr(0,4)==h.substr(0,4)?e=e.substr(4,e.length-h.length+1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e==h.charAt(0)||e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),d&&(d=!1),S&&(S=!1))},T=function(e){if(!f){var t=n.value;R(t),F()}},y=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!c){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return y(e,t,!0)}}},w=function(e,o){var s=t.getCopyText();if(!s)return i.preventDefault(e);y(e,s)?(r.isIOS&&(m=o,n.value="\n aa"+s+"a a\n",n.setSelectionRange(4,4+s.length),d={value:s}),o?t.onCut():t.onCopy(),r.isIOS||i.preventDefault(e)):(d=!0,n.value=s,n.select(),setTimeout(function(){d=!1,F(),_(),o?t.onCut():t.onCopy()}))};i.addCommandKeyListener(n,t.onCommandKey.bind(t)),i.addListener(n,"select",function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(n)?b&&_(t.selection.isEmpty()):(t.selectAll(),_())}),i.addListener(n,"input",T),i.addListener(n,"cut",function(e){w(e,!0)}),i.addListener(n,"copy",function(e){w(e,!1)}),i.addListener(n,"paste",function(e){var o=y(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(_),i.preventDefault(e)):(n.value="",p=!0)});var B,x=function(){if(f&&t.onCompositionUpdate&&!t.$readOnly){var e=n.value.replace(/\x01/g,"");if(f.lastValue!==e&&(t.onCompositionUpdate(e),f.lastValue&&t.undo(),f.canUndo&&(f.lastValue=e),f.lastValue)){var i=t.selection.getRange();t.insert(f.lastValue),t.session.markUndoGroup(),f.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},D=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=f;f=!1;var o=setTimeout(function(){o=null;var e=n.value.replace(/\x01/g,"");f||(e==i.lastValue?F():!i.lastValue&&e&&(F(),R(e)))});b=function(e){return o&&clearTimeout(o),(e=e.replace(/\x01/g,""))==i.lastValue?"":(i.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",D),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&T()}},L=s.delayedCall(x,50);function I(){clearTimeout(B),B=setTimeout(function(){g&&(n.style.cssText=g,g=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}i.addListener(n,"compositionstart",function(e){f||!t.onCompositionStart||t.$readOnly||((f={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(x,0),t.on("mousedown",D),f.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(n,"text",function(){L.schedule()}):(i.addListener(n,"keyup",function(){L.schedule()}),i.addListener(n,"keydown",function(){L.schedule()})),i.addListener(n,"compositionend",D),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){S=!0,_(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){g||(g=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+"height:"+n.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,d=function(e){n.style.left=e.clientX-u-2+"px",n.style.top=Math.min(e.clientY-c-2,h)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(B),r.isWin&&i.capture(t.container,d,I))},this.onContextMenuClose=I;var M=function(e){t.textInput.onContextMenu(e),I()};if(i.addListener(n,"mouseup",M),i.addListener(n,"mousedown",function(e){e.preventDefault(),I()}),i.addListener(t.renderer.scroller,"contextmenu",M),i.addListener(n,"contextmenu",M),r.isIOS){var N=null,O=!1;e.addEventListener("keydown",function(e){N&&clearTimeout(N),O=!0}),e.addEventListener("keyup",function(e){N=setTimeout(function(){O=!1},100)});var k=function(e){if(document.activeElement===n&&!O){if(m)return setTimeout(function(){m=!1},100);var i=n.selectionStart,r=n.selectionEnd;if(n.setSelectionRange(4,5),i==r)switch(i){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(r){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down)}switch(i){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",k),t.on("destroy",function(){document.removeEventListener("selectionchange",k)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=r.isChrome<18,l=r.isIE,c=e("./textinput_ios").TextInput;t.TextInput=function(e,t){if(r.isIOS)return c.call(this,e,t);var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var u="\u2028\u2028",h=!1,d=!1,m=!1,p="",f=!0;try{var g=document.activeElement===n}catch(e){}i.addListener(n,"blur",function(e){t.onBlur(e),g=!1}),i.addListener(n,"focus",function(e){g=!0,t.onFocus(e),A()}),this.focus=function(){if(p)return n.focus();var e=n.style.top;n.style.position="fixed",n.style.top="0px",n.focus(),setTimeout(function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return g};var C=s.delayedCall(function(){g&&A(f)}),E=s.delayedCall(function(){m||(n.value=u,g&&A())});function A(e){if(!m){if(m=!0,_)t=0,i=e?0:n.value.length-1;else var t=e?2:1,i=2;try{n.setSelectionRange(t,i)}catch(e){}m=!1}}function v(){m||(n.value=u,r.isWebKit&&E.schedule())}r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=f&&(f=!f,C.schedule())}),v(),g&&t.onFocus();var _=null;this.setInputHandler=function(e){_=e},this.getInputHandler=function(){return _};var F=!1,b=function(e){_&&(e=_(e),_=null),d?(A(),e&&t.onPaste(e),d=!1):e==u.charAt(0)?F?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==u?e=e.substr(2):e.charAt(0)==u.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),F&&(F=!1)},S=function(e){if(!m){var t=n.value;b(t),v()}},R=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!a){var r=l||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return R(e,t,!0)}}},T=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);R(e,o)?(r?t.onCut():t.onCopy(),i.preventDefault(e)):(h=!0,n.value=o,n.select(),setTimeout(function(){h=!1,v(),A(),r?t.onCut():t.onCopy()}))},y=function(e){T(e,!0)},w=function(e){T(e,!1)},B=function(e){var o=R(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(A),i.preventDefault(e)):(n.value="",d=!0)};i.addCommandKeyListener(n,t.onCommandKey.bind(t)),i.addListener(n,"select",function(e){h?h=!1:function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(n)?(t.selectAll(),A()):_&&A(t.selection.isEmpty())}),i.addListener(n,"input",S),i.addListener(n,"cut",y),i.addListener(n,"copy",w),i.addListener(n,"paste",B),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:w(e);break;case 86:B(e);break;case 88:y(e)}});var x,D=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=n.value.replace(/\u2028/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e),m.lastValue)){var i=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},L=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=m;m=!1;var o=setTimeout(function(){o=null;var e=n.value.replace(/\u2028/g,"");m||(e==i.lastValue?v():!i.lastValue&&e&&(v(),b(e)))});_=function(e){return o&&clearTimeout(o),(e=e.replace(/\u2028/g,""))==i.lastValue?"":(i.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",L),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&S()}},I=s.delayedCall(D,50);function M(){clearTimeout(x),x=setTimeout(function(){p&&(n.style.cssText=p,p=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}i.addListener(n,"compositionstart",function(e){m||!t.onCompositionStart||t.$readOnly||((m={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(D,0),t.on("mousedown",L),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(n,"text",function(){I.schedule()}):(i.addListener(n,"keyup",function(){I.schedule()}),i.addListener(n,"keydown",function(){I.schedule()})),i.addListener(n,"compositionend",L),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){F=!0,A(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){p||(p=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+"height:"+n.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,d=function(e){n.style.left=e.clientX-u-2+"px",n.style.top=Math.min(e.clientY-c-2,h)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(x),r.isWin&&i.capture(t.container,d,M))},this.onContextMenuClose=M;var N=function(e){t.textInput.onContextMenu(e),M()};i.addListener(n,"mouseup",N),i.addListener(n,"mousedown",function(e){e.preventDefault(),M()}),i.addListener(t.renderer.scroller,"contextmenu",N),i.addListener(n,"contextmenu",N)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";e("../lib/dom"),e("../lib/event");var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();if(0!==o){var s=r.getSelectionRange().isEmpty();return r.$blockScrolling++,(s||1==o)&&r.selection.moveToPosition(n),r.$blockScrolling--,void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(n.$blockScrolling++,this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=function(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),i=this.editor;return i.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200?(this.$lastScrollTime=t,i.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),i=this.editor;if(i.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200)return this.$lastScrollTime=t,i.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(r.prototype),t.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,(e+=15)+r>n&&(e-=e+r-n),t+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.removeEventListener("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i)if(r=i.text.join("<br/>"),c.setHtml(r),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),m=c.getElement().style;m.left=d.right+"px",m.top=d.bottom+"px"}}():u()},50))}),o.addListener(s.renderer.$gutter,"mouseout",function(e){n=null,r&&!t&&(t=setTimeout(function(){t=null,u()},50))}),s.on("changeSession",u)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent"),s=200,a=200,l=5;function c(e){var t=e.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c,h,d,m,p,f,g,C,E,A,v,_=t.container,F=0;function b(){var e=f;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!A||r||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,A=i,v={x:h,y:d}):u(v.x,v.y,h,d)>l?A=null:i-A>=a&&(t.renderer.scrollCursorIntoView(),A=null)})(f=t.renderer.screenToTextCoordinates(h,d),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:h-a.left,right:a.right-h},y:{top:d-a.top,bottom:a.bottom-d}},c=Math.min(l.x.left,l.x.right),u=Math.min(l.y.top,l.y.bottom),m={row:e.row,column:e.column};c/o<=2&&(m.column+=l.x.left<l.x.right?-3:2),u/r<=1&&(m.row+=l.y.top<l.y.bottom?-1:1);var p=e.row!=m.row,f=e.column!=m.column,g=!n||e.row!=n.row;p||f&&!g?E?i-E>=s&&t.renderer.scrollCursorIntoView(m):E=i:E=null}(f,e)}function S(){p=t.selection.toOrientedRange(),c=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(m),b(),m=setInterval(b,20),F=0,r.addListener(document,"mousemove",y)}function R(){clearInterval(m),t.session.removeMarker(c),c=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(p),t.$blockScrolling-=1,t.isFocused()&&!C&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),p=null,f=null,F=0,E=null,A=null,r.removeListener(document,"mousemove",y)}this.onDragStart=function(e){if(this.cancelDrag||!_.draggable){var i=this;return setTimeout(function(){i.startSelect(),i.captureMouse(e)},0),e.preventDefault()}p=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),r.setDragImage&&r.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),r.clearData(),r.setData("Text",t.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(e){if(_.draggable=!1,C=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;g||"move"!=n||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&w(e.dataTransfer))return h=e.clientX,d=e.clientY,c||S(),F++,e.dataTransfer.dropEffect=g=B(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&w(e.dataTransfer))return h=e.clientX,d=e.clientY,c||(S(),F++),null!==T&&(T=null),e.dataTransfer.dropEffect=g=B(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--F<=0&&c)return R(),g=null,r.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(C)switch(g){case"move":p=p.contains(f.row,f.column)?{start:f,end:f}:t.moveText(p,f);break;case"copy":p=t.moveText(p,f,!0)}else{var i=n.getData("Text");p={start:f,end:t.session.insert(f,i)},t.focus(),g=null}return R(),r.preventDefault(e)}},r.addListener(_,"dragstart",this.onDragStart.bind(e)),r.addListener(_,"dragend",this.onDragEnd.bind(e)),r.addListener(_,"dragenter",this.onDragEnter.bind(e)),r.addListener(_,"dragover",this.onDragOver.bind(e)),r.addListener(_,"dragleave",this.onDragLeave.bind(e)),r.addListener(_,"drop",this.onDrop.bind(e));var T=null;function y(){null==T&&(T=setTimeout(function(){null!=T&&c&&R()},20))}function w(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function B(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function u(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(c.prototype),t.DragdropHandler=c}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;t&&this.addEventListener(e,function i(){n.removeEventListener(e,i),t.apply(null,arguments)})},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(i);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t){n[e];i&&this.setDefaultHandler(e,i.pop())}else if(i){var r=i.indexOf(t);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=i}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";var i=e("./oop"),r=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return s('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:s('misspelled option "'+e+'"')}};function s(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var l=function(){this.$defaultOptions={}};(function(){i.implement(this,r),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)}),i.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=s,this.reportError=a}).call(l.prototype),t.AppConfig=l}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,i){"no use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;i.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};function c(r){if(a&&a.document){l.packaged=r||e.packaged||i.packaged||a.define&&n(2).packaged;for(var o={},s="",c=document.currentScript||document._currentScript,h=(c&&c.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var m=h[d],p=m.src||m.getAttribute("src");if(p){for(var f=m.attributes,g=0,C=f.length;g<C;g++){var E=f[g];0===E.name.indexOf("data-ace-")&&(o[u(E.name.replace(/^data-ace-/,""))]=E.value)}var A=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);A&&(s=A[1])}}for(var v in s&&(o.base=o.base||s,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base,o)void 0!==o[v]&&t.set(v,o[v])}}function u(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);l[e]=t},t.all=function(){return r.copyObject(l)},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==i){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{r=e(n)}catch(e){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(n,s),a)}},c(!0),t.init=c}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),u=function(e){var t=this;this.editor=e,new o(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click")),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),i.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;i.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(a,"mousedown",n),i.addListener(c,"mousedown",n),r.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n),i.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new a(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(u),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=s,o.releaseMouse=i.capture(this.editor.container,s,l);var u=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),c.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";t.FoldHandler=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,r=i.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?i.removeFold(r):i.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,r=i.getParentFoldRangeData(n,!0),o=r.range||r.firstRange;if(o){n=o.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),n=this.getSelectionLead(),i=this.isBackwards();i&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(i||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=r[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var i=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&(i.row>0||e>0)&&i.row++,this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;r<o;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t)"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift());else var n=[];var i=t||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var m=s.defaultToken,p=null,f=l[0],g=a.lastIndex;if(g-f.length>u){var C=e.substring(u,g-f.length);d.type==m?d.value+=C:(d.type&&c.push(d),d={type:m,value:C})}for(var E=0;E<l.length-2;E++)if(void 0!==l[E+1]){m=(p=o[s[E]]).onMatch?p.onMatch(f,i,n,e):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),(o=this.states[i])||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=g,(a=this.regExps[i]).lastIndex=g),p.consumeLineEnd&&(u=g);break}if(f)if("string"==typeof m)p&&!1===p.merge||d.type!==m?(d.type&&c.push(d),d={type:m,value:f}):d.value+=f;else if(m){d.type&&c.push(d),d={type:null,value:""};for(E=0;E<m.length;E++)c.push(m[E])}if(u==e.length)break;if(u=g,h++>r){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=2e3),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else for(var l in r=[],s)r.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach(function r(o){var s=i[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,r(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var m="string"==typeof l?l:l.include;if(m&&(c=Array.isArray(m)?m.map(function(e){return i[e]}):i[m]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter(function(e){return!e.next})),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];n&&(o=o.toLowerCase());for(var s=o.split(i||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(i.prototype),t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function(e){this.add("braces","insertion",function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var u=r.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return m(u,h,"{","}");if(p.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(p.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&p.isAutoInsertedClosing(l,c,s))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var f="";if(p.isMaybeInsertedClosing(l,c)&&(f=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var g=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var C=this.$getIndent(o.getLine(g.row))}else{if(!f)return void p.clearMaybeInsertedClosing();C=this.$getIndent(c)}var E=C+o.getTabString();return{text:"\n"+E+"\n"+C+f,selection:[1,E.length,1,E.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return m(o,s,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return m(o,s,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,n,i,r){var o=i.$mode.$quotes||h;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return m(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),f=u.substring(c.column,c.column+1),g=i.getTokenAt(c.row,c.column),C=i.getTokenAt(c.row,c.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var E,A=g&&/string|escape/.test(g.type),v=!C||/string|escape/.test(C.type);if(f==s)(E=A!==v)&&/string\.end/.test(C.type)&&(E=!1);else{if(A&&!v)return null;if(A&&v)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var F=_.test(p);_.lastIndex=0;var b=_.test(p);if(F||b)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;E=!0}return{text:E?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),t.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var i in e)t.packages[i]=e[i].replace(n,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,u=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var r=t.doc,o=!0,s=!0,l=1/0,c=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))f=this.lineCommentStart.map(a.escapeRegExp).join("|"),m=this.lineCommentStart[0];else f=a.escapeRegExp(this.lineCommentStart),m=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),u=t.getUseSoftTabs();E=function(e,t){var n=e.match(f);if(n){var i=n[1].length,o=n[0].length;d(e,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(t,i,o)}};var h=m+" ",d=(C=function(e,t){o&&!/\S/.test(e)||(d(e,l,l)?r.insertInLine({row:t,column:l},h):r.insertInLine({row:t,column:l},m))},A=function(e,t){return f.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%c!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return c>2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var m=this.blockComment.start,p=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+a.escapeRegExp(m)+")"),g=new RegExp("(?:"+a.escapeRegExp(p)+")\\s*$"),C=function(e,t){A(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:l},m))},E=function(e,t){var n;(n=e.match(g))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&r.removeInLine(t,n[1].length,n[0].length)},A=function(e,n){if(f.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function v(e){for(var t=n;t<=i;t++)e(r.getLine(t),t)}var _=1/0;v(function(e,t){var n=e.search(/\S/);-1!==n?(n<l&&(l=n),s&&!A(e,t)&&(s=!1)):_>e.length&&(_=e.length)}),l==1/0&&(l=_,o=!1,s=!1),u&&l%c!=0&&(l=Math.floor(l/c)*c),v(s?E:C)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(f=new l(t,i.row,i.column)).getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(r.start))){var m=f.getCurrentTokenRow(),p=f.getCurrentTokenColumn()+g;h=new c(m,p,m,p+r.start.length);break}a=f.stepBackward()}var f;for(a=(f=new l(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(r.end))){m=f.getCurrentTokenRow(),p=f.getCurrentTokenColumn()+g;d=new c(m,p,m,p+r.end.length);break}a=f.stepForward()}d&&t.remove(d),h&&(t.remove(h),o=h.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);u.start.row==o&&(u.start.column+=s),u.end.row==o&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<n.length;t++)!function(e){var i=n[t],r=e[i];e[n[t]]=function(){return this.$delegator(i,arguments,r)}}(this)},this.$delegator=function(e,t,n){var i=t[0];"string"!=typeof i&&(i=i[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=i.split(this.$embeds[r]);if(!o[0]&&o[1]){t[0]=o[1];var s=this.$modes[this.$embeds[r]];return s[e].apply(s,t)}}var a=n.apply(this,t);return n?a:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var r=t[i],o=0,s=r.length;o<s;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"==typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(u.prototype),t.Mode=u}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var a=t.end.column,l=t.end.row;i===l?e[i]=o.substring(0,r)+o.substring(a):e.splice(i,l-i+1,o.substring(0,r)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+o,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,r=n?e-1:e,o=n?this.getLine(r).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length,r=e.start.row,o=e.start.column,s=0,a=0;;){s=a,a+=t-1;var l=n.slice(s,a);if(a>i){e.lines=l,e.start.row=r+s,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;r<o;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)r+=n[s].length+i;return r+e.column}}).call(l.prototype),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(r=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,i.start.row,i.start.column,o,a)&&e(i.placeholder,i.start.row,i.start.column,o)||0===r)return;a=!i.sameRow,o=i.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(-1==(i=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(r=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<r.length;s++){if((i=r[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(i),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new r(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=i(e,s.end);if(!(a>0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort(function(e,t){return i(e.start,t.start)}))[0],o=1;o<n.length;o++){e=r,r=n[o];var s=i(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(i(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),n.splice(o,1),t.push(r),r=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:t,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,n=e.end;else n=e.start,t=e.end;for(var i=t.row,r=n.row-i,o=-t.column+n.column,s=this.ranges,a=0,l=s.length;a<l;a++){if(!((c=s[a]).end.row<i)){if(c.start.row>i)break;if(c.start.row==i&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=o,c.start.row+=r)),c.end.row==i&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&o>0&&a<l-1&&c.end.column>c.start.column&&c.end.column==s[a+1].start.column&&(c.end.column-=o),c.end.column+=o,c.end.row+=r}}}if(0!=r&&a<l)for(;a<l;a++){var c;(c=s[a]).start.row+=r,c.end.row+=r}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";e("../range").Range;var i=e("../range_list").RangeList,r=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}r.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);!function(e,t){s(e.start,t),s(e.end,t)}(e,this.start);for(var t=e.start.row,n=e.start.column,i=0,r=-1;i<this.subFolds.length&&1==(r=this.subFolds[i].range.compare(t,n));i++);var o=this.subFolds[i];if(0==r)return o.addSubFold(e);t=e.range.end.row,n=e.range.end.column;var a=i;for(r=-1;a<this.subFolds.length&&1==(r=this.subFolds[a].range.compare(t,n));a++);this.subFolds[a];if(0==r)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(i,a-i,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(e,t)){if(1==n&&s.range.isEnd(e,t))continue;if(-1==n&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){var l=(o=i.folds[a]).range.compareEnd(e,t);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column;if(!(a<c||a==c&&l<=u-2))throw new Error("The range has to be at least 2 characters width");var h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var m=this.getFoldsInRange(n.range);m.length>0&&(this.removeFolds(m),m.forEach(function(e){n.addSubFold(e)}));for(var p=0;p<i.length;p++){var f=i[p];if(c==f.start.row){f.addFold(n),s=!0;break}if(a==f.end.row){if(f.addFold(n),s=!0,!n.sameRow){var g=i[p+1];if(g&&g.start.row==c){f.merge(g);break}}break}if(c<=f.start.row)break}return s||(f=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,r;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk(function(e,t,n,a){if(!(t<i)){if(t==i){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}},t,n),s},this.getDisplayLine=function(e,t,n,i){var r,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,i):(r=this.doc.getLine(e)).substring(i||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new r(e,n)})},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var r=i.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(n=this.findMatchingBracket(r))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(r.row,r.column)||i}else{var o=this.getFoldsInRange(i);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type));r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==i[r]&&(i[r]=this.getFoldWidget(r)),"start"==i[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,r=e-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./config"),s=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,u=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,m=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++m.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new u(e)),this.setDocument(e),this.selection=new a(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};m.$uid=0,function(){i.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t<o))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),r=0;if(null==t)o=i.length-1,r=this.getLine(e).length;else for(var o=0;o<i.length&&!((r+=i[o].value.length)>=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new c(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;s<n.length&&n.charAt(s).match(r);)s++;return new c(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,o.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(void 0!==n.addEventListener){var i=this.onReloadTokenizer.bind(this);n.addEventListener("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new h(n);var r=this;this.bgTokenizer.addEventListener("update",function(e){r._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=e.length-1;-1!=i;i--){var r=e[i];"doc"==r.group?(this.doc.revertDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!0,n)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=0;i<e.length;i++){var r=e[i];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function i(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,s=e[0];i(s)?r=c.fromPoints(s.start,s.end):r=c.fromPoints(s.start,s.start);for(var a=1;a<e.length;a++)i(s=e[a])?(o=s.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=s.end,1==r.compare(o.row,o.column)&&r.setEnd(o),!0):(o=s.start,-1==r.compare(o.row,o.column)&&(r=c.fromPoints(s.start,s.start)),!1);if(null!=n){0===c.comparePoints(n.start,r.start)&&(n.start.column+=r.end.column-r.start.column,n.end.column+=r.end.column-r.start.column);var l=n.compareRange(r);1==l?r.setStart(n.start):-1==l&&r.setEnd(n.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),r=this.getFoldsInRange(e),o=c.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(u=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=u),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=u)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,u=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=s,e.end.row+=s,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new c(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i&&" "==o.charAt(s);++s);s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(n>0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(f=this.getFoldLine(r.row)){f.addRemoveChars(r.row,r.column,i.column-r.column),f.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==f&&(h.merge(f),f=h),u=c.indexOf(f)+1}for(;u<c.length;u++){(f=c[u]).start.row>=r.row&&f.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var m=t?this.$wrapData:this.$rowLengthCache;m.splice.apply(m,d);c=this.$foldData,u=0;if(f=this.getFoldLine(o)){var p=f.range.compareInside(i.row,i.column);0==p?(f=f.split(i.row,i.column))&&(f.shiftRow(a),f.addRemoveChars(s,0,r.column-i.column)):-1==p&&(f.addRemoveChars(o,0,r.column-i.column),f.shiftRow(a)),u=c.indexOf(f)+1}for(;u<c.length;u++){var f;(f=c[u]).start.row>=o&&f.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(f=this.getFoldLine(o))&&f.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c<l.length;c++)l[c]=t}else l=this.$getDisplayTokens(s[i].substring(a,o),r.length);r=r.concat(l)}.bind(this),o.end.row,s[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(r,c,a),u=o.end.row+1):(r=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(r,c,a),u++)};var e=3,t=4,n=10,a=11,u=12;function m(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(i,r,o){if(0==i.length)return[];var s=[],l=i.length,c=0,h=0,d=this.$wrapAsCode,m=this.$indentedSoftWrap,p=r<=Math.max(2*o,8)||!1===m?0:Math.floor(r/2);function f(e){var t=i.slice(c,e),r=t.length;t.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),s.length||(g=function(){var e=0;if(0===p)return e;if(m)for(var t=0;t<i.length;t++){var r=i[t];if(r==n)e+=1;else{if(r!=a){if(r==u)continue;break}e+=o}}return d&&!1!==m&&(e+=o),Math.min(e,p)}(),s.indent=g),h+=r,s.push(h),c=e}for(var g=0;l-c>r-g;){var C=c+r-g;if(i[C-1]>=n&&i[C]>=n)f(C);else if(i[C]!=e&&i[C]!=t){for(var E=Math.max(C-(r-(r>>2)),c-1);C>E&&i[C]<e;)C--;if(d){for(;C>E&&i[C]<e;)C--;for(;C>E&&9==i[C];)C--}else for(;C>E&&i[C]<n;)C--;C>E?f(++C):(2==i[C=c+r]&&C--,f(C-g))}else{for(;C!=c-1&&i[C]!=e;C--);if(C>c){f(C);continue}for(C=c+r;C<i.length&&i[C]==t;C++);if(C==i.length)break;f(C)}}return s},this.$getDisplayTokens=function(e,t){var i,r=[];t=t||0;for(var o=0;o<e.length;o++){var s=e.charCodeAt(o);if(9==s){i=this.getScreenTabSize(r.length+t),r.push(a);for(var l=1;l<i;l++)r.push(u)}else 32==s?r.push(n):s>39&&s<48||s>57&&s<64?r.push(9):s>=4352&&m(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,r;for(null==t&&(t=1/0),n=n||0,r=0;r<e.length&&(9==(i=e.charCodeAt(r))?n+=this.getScreenTabSize(n):i>=4352&&m(i)?n+=2:n+=1,!(n>t));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,i,r=0,o=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){s=l[c],r=this.$docRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getLength()-1,m=this.getNextFoldLine(r),p=m?m.start.row:1/0;s<=e&&!(s+(a=this.getRowLength(r))>e||r>=d);)s+=a,++r>p&&(r=m.end.row+1,p=(m=this.getNextFoldLine(r,m))?m.start.row:1/0),h&&(this.$docRowCache.push(r),this.$screenRowCache.push(s));if(m&&m.start.row<=r)n=this.getFoldDisplayLine(m),r=m.start.row;else{if(s+a<=e||r>d)return{row:d,column:this.getLine(d).length};n=this.getLine(r),m=null}var f=0;if(this.$useWrapMode){var g=this.$wrapData[r];if(g){var C=Math.floor(e-s);i=g[C],C>0&&g.length&&(f=g.indent,o=g[C-1]||g[g.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-f)[1],this.$useWrapMode&&o>=i&&(o=i-1),m?m.idxToPosition(o):{row:r,column:o}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),m=d?d.start.row:1/0;a<e;){if(a>=m){if((s=d.end.row+1)>e)break;m=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=m?(p=this.getFoldDisplayLine(d,e,t),o=d.start.row):(p=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var C=0;p.length>=g[C];)r++,C++;p=p.substring(g[C-1]||0,p.length),f=C>0?g.indent:0}}return{row:r,column:f+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var o=this.$wrapData[i];e+=o?o.length+1:1,++i>r&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<t.length&&!((i+="\t"===(r=t.charAt(o))?this.getScreenTabSize(i):e.getCharacterWidth(r))>n);o++);return[i,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}.call(m.prototype),e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),o.defineOptions(m.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach(function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue e;var m=r[h],p=r[h+c-1],f=m.length-m.match(a[0])[0].length,g=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>f||(s.push(l=new o(h,f,h+c-1,g)),c>2&&(h=h+c-2))}}else for(var C=0;C<r.length;C++){var E=i.getMatchOffsets(r[C],a);for(d=0;d<E.length;d++){var A=E[d];s.push(new o(C,A.offset,C,A.offset+A.length))}}if(n){var v=n.start.column,_=n.start.column;for(C=0,d=s.length-1;C<d&&s[C].start.column<v&&s[C].start.row==n.start.row;)C++;for(;C<d&&s[d].end.column>_&&s[d].end.row==n.end.row;)d--;for(s=s.slice(C,d+1),C=0,d=s.length;C<d;C++)s[C].start.row+=n.start.row,s[C].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,r=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=i?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(i)var c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,r,o){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&l<r||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>r))return!!o(s,l,s+u-1,h)||void 0}}};else if(i)h=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(r(t,h,t,h+(c=a[u])))return!0}};else h=function(t,i,r){var o,s=e.getLine(t),a=i;for(n.lastIndex=i;o=n.exec(s);){var l=o[0].length;if(r(t,a=o.index,t,a+l))return!0;if(!l&&(n.lastIndex=a+=1,a>=s.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)},this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;r<s.length;r++){if(e(s[r])>i)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:s("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:s("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:s("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:s("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,r.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,m=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,f=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,C=e("./config"),E=e("./token_iterator").TokenIterator,A=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++A.$uid,this.commands=new f(s.isMac?"mac":"win",g),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new u(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new h("")),C.resetOptions(this),C._signal("editor",this)};A.$uid=0,function(){i.implement(this,p),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;C.loadModule(["keybinding",e],function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new m(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new E(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=i.stepForward())){var o=r.value,s=0,a=i.stepBackward();if("<"==a.value)do{a=r,(r=i.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(r&&s>=0);else{do{r=a,a=i.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);i.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=i.getCurrentTokenRow(),c=i.getCurrentTokenColumn(),u=new m(l,c,l,c+r.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&void 0!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),u&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(C.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new m(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,i=t.end.column+1,r=e.getLine(t.start.row),o=r.length,s=r.substring(Math.max(n,0),Math.min(i,o));if(!(n>=0&&/^[\w\d]/.test(s)||i<=o&&/[\w\d]$/.test(s)))if(s=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges;if(n.length>i.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var r=i.length;r--;){var o=i[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=i.transformAction(n.getState(r.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new m.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,e));n.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new m(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new m(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),i=new m(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),i=new m(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var i=e.getLine(t.start.row),r=t.start,s=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=s-a%s,c=o.stringRepeat(" ",l);else{for(l=a%s;" "==i[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var i=new m(0,0,0,0),r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new m(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new m(t,o.start,t,o.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,m=n.last;++u<c;){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(t&&p.first!=m)break;if(!t&&p.first>m+1)break;m=p.last}for(u--,a=this.session.$moveLines(d,m,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new E(this.session,n.row,n.column),r=i.getCurrentToken(),o=r||i.stepForward();if(o){var s,a,l=!1,c={},u=n.column-o.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!l;u++)if(h[o.value[u]])switch(a=h[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===r.value?c[o.value]++:"</"===r.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(r=o,o=i.stepForward(),u=0)}while(o&&!l);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(n))||(p=(d=new m(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1)).start,(t||p.row===n.row&&Math.abs(p.column-n.column)<2)&&(d=this.session.getBracketRange(p)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var f=o.value;if(0===(d=new m(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)){l=!1;do{o=r,(r=i.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),o.value===f&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?c[f]++:"</"===r.value&&c[f]--,0===c[f]&&(l=!0)))}while(r&&!l)}o&&o.type.indexOf("tag-name")&&(p=d.start).row==n.row&&Math.abs(p.column-n.column)<2&&(p=d.end)}(p=d&&d.cursor||p)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",function(){i=!0}),s=this.renderer.on("beforeRender",function(){i&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(A.prototype),C.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=A}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++){for(var r=e[i],o={group:r.group,deltas:new Array(r.length)},s=0;s<r.deltas.length;s++){var a=r.deltas[s];o.deltas[s]=t(a)}n[i]=o}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(i.prototype),t.UndoManager=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,s),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=n.type;"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){for(var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(n),s=o?o.start.row:1/0,a=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,c=t.$decorations,u=t.$firstLineNumber,h=0,d=t.gutterRenderer||this.$renderer,m=null,p=-1,f=n;;){if(f>s&&(f=o.end.row+1,s=(o=t.getNextFoldLine(f,o))?o.start.row:1/0),f>r){for(;this.$cells.length>p+1;)m=this.$cells.pop(),this.element.removeChild(m.element);break}(m=this.$cells[++p])||((m={element:null,textNode:null,foldWidget:null}).element=i.createElement("div"),m.textNode=document.createTextNode(""),m.element.appendChild(m.textNode),this.element.appendChild(m.element),this.$cells[p]=m);var g="ace_gutter-cell ";if(l[f]&&(g+=l[f]),c[f]&&(g+=c[f]),this.$annotations[f]&&(g+=this.$annotations[f].className),m.element.className!=g&&(m.element.className=g),(E=t.getRowLength(f)*e.lineHeight+"px")!=m.element.style.height&&(m.element.style.height=E),a){var C=a[f];null==C&&(C=a[f]=t.getFoldWidget(f))}if(C){m.foldWidget||(m.foldWidget=i.createElement("span"),m.element.appendChild(m.foldWidget));g="ace_fold-widget ace_"+C;"start"==C&&f==s&&f<o.end.row?g+=" ace_closed":g+=" ace_open",m.foldWidget.className!=g&&(m.foldWidget.className=g);var E=e.lineHeight+"px";m.foldWidget.style.height!=E&&(m.foldWidget.style.height=E)}else m.foldWidget&&(m.element.removeChild(m.foldWidget),m.foldWidget=null);var A=h=d?d.getText(t,f):f+u;A!==m.textNode.data&&(m.textNode.data=A),f++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(h=t.getLength()+u);var v=d?d.getWidth(t,h,e):h.toString().length*e.characterWidth,_=this.$padding||this.$computePadding();(v+=_.left+_.right)===this.gutterWidth||isNaN(v)||(this.gutterWidth=v,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",v))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var n in this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,r,o,s){for(var a=this.session,l=n.start.row,c=n.end.row,u=l,h=0,d=0,m=a.getScreenLastRowColumn(u),p=new i(u,n.start.column,u,d);u<=c;u++)p.start.row=p.end.row=u,p.start.column=u==l?n.start.column:a.getRowWrapIndent(u),p.end.column=m,h=d,d=m,m=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:n.end.column,this.drawSingleLineMarker(t,p,r+(u==l?" ace_start":"")+" ace_br"+e(u==l||u==l+1&&n.start.column,h<d,d>m,u==c),o,u==c?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;r=r||"",e.push("<div class='",n," ace_br1 ace_start' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",l,"px;",r,"'></div>"),a=this.$getTop(t.end.row,i);var c=t.end.column*i.characterWidth;if(e.push("<div class='",n," ace_br12' style='","height:",s,"px;","width:",c,"px;","top:",a,"px;","left:",o,"px;",r,"'></div>"),!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,u?" ace_br"+u:"","' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",o,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;e.push("<div class='",n,"' style='","height:",s,"px;","width:",a,"px;","top:",l,"px;","left:",c,"px;",o||"","'></div>")},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide",r="",s="";if(this.showInvisibles){i+=" ace_invisible",r=" ace_invisible_space",s=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=a=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+i+r+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+i+s+"'>"+l+"</span>"}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}a=i;for(var l,c=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;a>c&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var u=o[s++];if(u){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==c&&l),u.style.height=e.lineHeight*this.session.getRowLength(a)+"px",u.innerHTML=h.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}if(e.lastRow>t.lastRow){r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(r)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=r.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&s),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)i.appendChild(l.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,i=e.lastRow,r=n,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>i);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==s&&o),this.$useLineGroups()&&t.push("</div>"),r++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){var r=this,s=i.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,function(e,n,i,s,a){if(n)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=r.session.getScreenTabSize(t+s);return t+=l-1,r.$tabStrings[l]}if(" "==e){var c=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+c+"' style='width:"+2*r.config.characterWidth+"px'>"+u+"</span>"}return i?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")});if(this.$textToken[n.type])e.push(s);else{var a="ace_"+n.type.replace(/\./g," ace_"),l="";"fold"==n.type&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",l,">",s,"</span>")}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);return i<=0||i>=n?t:" "==t[0]?(i-=i%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),t.substr(i)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],i)),t.substr(i)):t},this.$renderWrappedLine=function(e,t,n,i){for(var r=0,s=0,a=n[0],l=0,c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(r=h.length,!(h=this.renderIndentGuide(e,h,a)))continue;r-=h.length}if(r+h.length<a)l=this.$renderToken(e,l,u,h),r+=h.length;else{for(;r+h.length>=a;)l=this.$renderToken(e,l,u,h.substring(0,a-r)),h=h.substring(a-r),r=a,i||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",n.indent)),l=0,a=n[++s]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,l=this.$renderToken(e,l,u,h))}}},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var o=1;o<t.length;o++)r=(i=t[o]).value,n=this.$renderToken(e,n,i,r)},this.$renderLine=function(e,t,n,i){if(i||0==i||(i=this.session.getFoldLine(t)),i)var r=this.$getFoldLineTokens(t,i);else r=this.session.getTokens(t);if(n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,n):this.$renderSimpleLine(e,r)}this.showInvisibles&&(i&&(t=i.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk(function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;for(o!=t&&((s=e[r].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);o<n&&r<e.length;){var s;(s=e[r].value).length+o>n?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===i&&(i=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(i?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||i||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+n.column*this.config.characterWidth,top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var r=t.length;n<r;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;this.drawCursor?this.drawCursor(s,o,e,t[n],this.session):(s.left=o.left+"px",s.top=o.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px")}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;i.nextFrame(function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),t.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,m=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var g=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return i&&(e||o.height!=i)&&(o.height=i,r|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(r|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!n||!i,r&&this._signal("resize",s),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var i=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)i.top=i.left="0";else{var o=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(s)[0]+2,r+=2}(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,i.height=r+"px",i.width=o+"px",i.left=Math.min(n,this.$size.scrollerWidth-o)+"px",i.top=Math.min(t,this.$size.height-r)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+u<0||this.scrollTop>h.top),m=a!==d;m&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,f,g=Math.ceil(c/this.lineHeight)-1,C=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),E=C+g,A=this.lineHeight;C=e.screenToDocumentRow(C,0);var v=e.getFoldLine(C);v&&(C=v.start.row),p=e.documentToScreenRow(C,0),f=e.getRowLength(C)*A,E=Math.min(e.screenToDocumentRow(E,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(E)*A+f,l=this.scrollTop-p*A;var _=0;return this.layerConfig.width!=r&&(_=this.CHANGE_H_SCROLL),(s||m)&&(_=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),m&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:C,firstRowScreen:p,lastRow:E,lineHeight:A,characterWidth:this.characterWidth,minHeight:c,maxHeight:i,offset:l,gutterOffset:A?Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/A)):0,height:this.$size.scrollerHeight},_},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var c=this.scrollLeft;c>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,i=this.STEPS,r=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<i;++n)r.push(o(n/this.STEPS,e,t-e));return r},this.scrollToLine=function(e,t,n,i){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(o,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval(function(){o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,r=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(i);return{row:r,column:o,side:i-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),r=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(i,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+Math.round(i.column*this.characterWidth),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var i=e||this.$options.theme.initialValue;o.loadModule(["theme",i],s)}function s(i){if(n.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.importCssString(i.cssText,i.cssClass,n.container.ownerDocument),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),o.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}var l=function(t,n,i,r,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=a(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);var c=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var i=null,r=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),i&&(r?setTimeout(c):c())},this.setEmitSync=function(e){r=e};var c=function(){var e=l.messageBuffer.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],function(e){for(i=new e[n](a);l.messageBuffer.length;)c()})};c.prototype=l.prototype,t.UIWorkerClient=c,t.WorkerClient=l,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&r.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h=e.editor,d=h.selection,m=h.inMultiSelectMode,p=e.getDocumentPosition(),f=d.getCursor(),g=e.inSelection()||d.isEmpty()&&o(p,f),C=e.x,E=e.y,A=h.session,v=h.renderer.pixelToScreenCoordinates(C,E),_=v;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!m&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!m&&g)return;if(!m){var F=d.toOrientedRange();h.addSelectionMarker(F)}var b=d.rangeList.rangeAtPoint(p);h.$blockScrolling++,h.inVirtualSelectionMode=!0,s&&(b=null,F=d.ranges[0]||F,h.removeSelectionMarker(F)),h.once("mouseup",function(){var e=d.toOrientedRange();b&&e.isEmpty()&&o(b.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(F.cursor):F&&(h.removeSelectionMarker(F),d.addRange(F)),d.addRange(e)),h.$blockScrolling--,h.inVirtualSelectionMode=!1})}else if("block"==u){var S;e.stop(),h.inVirtualSelectionMode=!0;var R=[];h.$blockScrolling++,m&&!l?d.toSingleRange():!m&&l&&(S=d.toOrientedRange(),h.addSelectionMarker(S)),s?v=A.documentToScreenPosition(d.lead):d.moveToPosition(p),h.$blockScrolling--,_={row:-1,column:-1};var T=function(){var e=h.renderer.pixelToScreenCoordinates(C,E),t=A.screenToDocumentPosition(e.row,e.column);o(_,e)&&o(t,d.lead)||(_=e,h.$blockScrolling++,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(R),R=d.rectangularRangeBlock(_,v),h.$mouseHandler.$clickSelection&&1==R.length&&R[0].isEmpty()&&(R[0]=h.$mouseHandler.$clickSelection.clone()),R.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers(),h.$blockScrolling--)};i.capture(h.container,function(e){C=e.clientX,E=e.clientY},function(e){clearInterval(y),h.removeSelectionMarkers(R),R.length||(R=[d.toOrientedRange()]),h.$blockScrolling++,S&&(h.removeSelectionMarker(S),d.toSingleRange(S));for(var t=0;t<R.length;t++)d.addRange(R[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null,h.$blockScrolling--});var y=setInterval(function(){T()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{n=this.getRange();var i=this.isBackwards(),o=n.start.row,s=n.end.row;if(o==s){if(i)var a=n.end,l=n.start;else a=n.start,l=n.end;return this.addRange(r.fromPoints(l,l)),void this.addRange(r.fromPoints(a,a))}var c=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,c.push(u);for(var h=o+1;h<s;h++)c.push(this.getLineRange(h,!0));(u=this.getLineRange(s,!0)).end.column=n.end.column,c.push(u),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column<t.column;if(o)var s=e.column,a=t.column;else s=t.column,a=e.column;var l=e.row<t.row;if(l)var c=e.row,u=t.row;else c=t.row,u=e.row;s<0&&(s=0),c<0&&(c=0),c==u&&(n=!0);for(var h=c;h<=u;h++){var d=r.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,a));if(d.isEmpty()){if(p&&m(d.end,p))break;var p=d.end}d.cursor=o?d.start:d.end,i.push(d)}if(l&&i.reverse(),!n){for(var f=i.length-1;i[f].isEmpty()&&f>0;)f--;if(f>0)for(var g=0;i[g].isEmpty();)g++;for(var C=f;C>=g;C--)i[C].isEmpty()&&i.splice(C,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function m(e,t){return e.row==t.row&&e.column==t.column}function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),a.addListener(t,"keyup",i),a.addListener(t,"blur",i)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var m=u.length;m--;){if(s)for(;m>0&&u[m].start.row==u[m-1].end.row;)m--;d.fromOrientedRange(u[m]),d.index=m,this.selection=a.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===p||(i=p),d.toOrientedRange(u[m])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges();var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row==t.row&&this.session.$clipPositionToDocument(i.row,i.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,void 0==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(i?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);i?(s=r.fromPoints(a,c)).cursor=s.start:(s=r.fromPoints(c,a)).cursor=s.end;if(s.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;){if((a=i[r]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();var s=[];for(r=i.length;r--;){var a=i[r];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=i.length;r--;){o=(a=i[r]).clone();t.replace(a,s[r]),a.start.row=o.start.row,a.start.column=o.start.column}},this.selectMore=function(e,t,n){var i=this.session,r=i.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=i.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var o=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(i,i.getTextRange(r),e);o&&(o.cursor=-1==e?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,o=n.filter(function(e){if(e.cursor.row==i)return!0;i=e.cursor.row});if(n.length&&o.length!=n.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,c=n.map(function(t){var n=t.cursor,i=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==i&&(i=0),n.column>s&&(s=n.column),i<a&&(a=i),i});n.forEach(function(t,n){var i=t.cursor,o=s-i.column,u=c[n]-a;o>u?e.insert(i,l.stringRepeat(" ",o-u)):e.remove(new r(i.row,i.column,i.row,i.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,m=h==d;if(m){var p,f=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<f);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),d>=f&&(d=f-1)}var g=this.session.removeFullLines(h,d);g=this.$reAlignText(g,m),this.session.insert({row:h,column:0},g.join("\n")+"\n"),m||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]}).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++t<l;){var h=e.getLine(t).search(r);if(-1!=h){if(h<=s)break;u=t}}if(u>c){var d=e.getLine(u).length;return new i(c,a,u,d)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");e("./range").Range;function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){t.splice(n+1,i).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var r=new Array(i);r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var n=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,n.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/n.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);if(e.$fold=r,r){var o=this.session.lineWidgets;e.row!=r.end.row||o[r.start.row]?e.hidden=!0:o[r.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},m=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=f+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",m.className="error_widget "+c.className,m.innerHTML=c.text.join("<br>"),m.appendChild(r.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),o=e("./lib/event"),s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(2),t.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;i=a.value,e=r.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(i=r.getInnerText(e),e.innerHTML="");var l=t.createEditSession(i),u=new s(new c(e));u.setSession(l);var h={document:l,editor:u,onResize:u.resize.bind(u,null)};return a&&(h.textarea=a),o.addListener(window,"resize",h.onResize),u.on("destroy",function(){o.removeListener(window,"resize",h.onResize),h.editor.container.env=null}),u.container.env=u.env=h,u},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.EditSession=a,t.UndoManager=l,t.version="1.2.8"}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter { background: #222; color: #8F908A } .ace-monokai .ace_print-margin { width: 1px; background: #555651 } .ace-monokai { background-color: #222; color: #f9f9f9; font-size: 14px; } .ace-monokai .ace_cursor { color: #F8F8F0 } .ace-monokai .ace_marker-layer .ace_selection { background: #a6e22e } .ace-monokai.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #272822; } .ace-monokai .ace_marker-layer .ace_step { background: rgb(102, 82, 0) } .ace-monokai .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #a6e22e } .ace-monokai .ace_marker-layer .ace_active-line { background: #2c2c2c } .ace-monokai .ace_gutter-active-line { background-color: #2c2c2c } .ace-monokai .ace_marker-layer .ace_selected-word { border: 1px solid #a6e22e } .ace-monokai .ace_invisible { color: #52524d } .ace-monokai .ace_entity.ace_name.ace_tag, .ace-monokai .ace_keyword, .ace-monokai .ace_meta.ace_tag, .ace-monokai .ace_storage { color: #F0640D } .ace-monokai .ace_punctuation, .ace-monokai .ace_punctuation.ace_tag { color: #fff } .ace-monokai .ace_constant.ace_character, .ace-monokai .ace_constant.ace_other { color: #5db0d7 } .ace-monokai .ace_constant.ace_language { color: #e6db74 } .ace-monokai .ace_constant.ace_numeric { color: #ae81ff } .ace-monokai .ace_invalid { color: #F8F8F0; background-color: #F0640D } .ace-monokai .ace_invalid.ace_deprecated { color: #F8F8F0; background-color: #5db0d7 } .ace-monokai .ace_support.ace_constant, .ace-monokai .ace_support.ace_function { color: #5db0d7 } .ace-monokai .ace_fold { background-color: #A6E22E; border-color: #F8F8F2 } .ace-monokai .ace_storage.ace_type, .ace-monokai .ace_support.ace_class, .ace-monokai .ace_support.ace_type { font-style: italic; color: #5db0d7 } .ace-monokai .ace_entity.ace_name.ace_function, .ace-monokai .ace_entity.ace_other, .ace-monokai .ace_entity.ace_other.ace_attribute-name, .ace-monokai .ace_variable { color: #A6E22E } .ace-monokai .ace_variable.ace_parameter { font-style: italic; color: #FD971F } .ace-monokai .ace_string { color: #E6DB74 } .ace-monokai .ace_comment { color: #75715E } .ace-monokai .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y }",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/lang"),o=e("../lib/event"),s=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");i.importCssString(' .ace_search { background-color: #ddd; color: #666; border: 1px solid #cbcbcb; border-top: 0 none; overflow: hidden; margin: 0; padding: 4px 6px 0 4px; position: absolute; top: 0; z-index: 99; white-space: normal; } .ace_search.left { border-left: 0 none; border-radius: 0px 0px 5px 0px; left: 0; } .ace_search.right { border-radius: 0px 0px 0px 5px; border-right: 0 none; right: 0; } .ace_search_form, .ace_replace_form { margin: 0 20px 4px 0; overflow: hidden; line-height: 1.9; } .ace_replace_form { margin-right: 0; } .ace_search_form.ace_nomatch { outline: 1px solid red; } .ace_search_field { border-radius: 3px 0 0 3px; background-color: white; color: black; border: 1px solid #cbcbcb; border-right: 0 none; box-sizing: border-box!important; outline: 0; padding: 0; font-size: inherit; margin: 0; line-height: inherit; padding: 0 6px; min-width: 17em; vertical-align: top; } .ace_searchbtn { border: 1px solid #cbcbcb; line-height: inherit; display: inline-block; padding: 0 6px; background: #fff; border-right: 0 none; border-left: 1px solid #dcdcdc; cursor: pointer; margin: 0; position: relative; box-sizing: content-box!important; color: #666; } .ace_searchbtn:last-child { border-radius: 0 3px 3px 0; border-right: 1px solid #cbcbcb; } .ace_searchbtn:disabled { background: none; cursor: default; } .ace_searchbtn:hover { background-color: #eef1f6; } .ace_searchbtn.prev, .ace_searchbtn.next { padding: 0px 0.7em } .ace_searchbtn.prev:after, .ace_searchbtn.next:after { content: ""; border: solid 2px #888; width: 0.5em; height: 0.5em; border-width: 2px 0 0 2px; display:inline-block; transform: rotate(-45deg); } .ace_searchbtn.next:after { border-width: 0 2px 2px 0 ; } .ace_searchbtn_close { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0; border-radius: 50%; border: 0 none; color: #656565; cursor: pointer; font: 16px/16px Arial; padding: 0; height: 14px; width: 14px; top: 9px; right: 7px; position: absolute; } .ace_searchbtn_close:hover { background-color: #656565; background-position: 50% 100%; color: white; } .ace_button { margin-left: 2px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; opacity: 0.7; border: 1px solid rgba(100,100,100,0.23); padding: 1px; box-sizing: border-box!important; color: black; } .ace_button:hover { background-color: #eee; opacity:1; } .ace_button:active { background-color: #ddd; } .ace_button.checked { border-color: #3399ff; opacity:1; } .ace_search_options{ margin-bottom: 3px; text-align: right; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; clear: both; } .ace_search_counter { float: left; font-family: arial; padding: 0 8px; }',"ace_searchbox");var l='<div class="ace_search right"> <span action="hide" class="ace_searchbtn_close"></span> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <span action="findPrev" class="ace_searchbtn prev"></span> <span action="findNext" class="ace_searchbtn next"></span> <span action="findAll" class="ace_searchbtn" title="Alt-Enter">All</span> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <span action="replaceAndFindNext" class="ace_searchbtn">Replace</span> <span action="replaceAll" class="ace_searchbtn">All</span> </div> <div class="ace_search_options"> <span action="toggleReplace" class="ace_button" title="Toggel Replace mode" style="float:left;margin-top:-2px;padding:0 5px;">+</span> <span class="ace_search_counter"></span> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> <span action="searchInSelection" class="ace_button" title="Search In Selection">S</span> </div> </div>'.replace(/> +/g,">"),c=function(e,t,n){var r=i.createElement("div");r.innerHTML=l,this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;o.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),o.stopPropagation(e)}),o.addListener(e,"click",function(e){var n=(e.target||e.srcElement).getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),o.stopPropagation(e)}),o.addCommandKeyListener(e,function(e,n,i){var r=a.keyCodeToString(i),s=t.$searchBarKb.findKeyCommand(n,r);s&&s.exec&&(s.exec(t),o.stopEvent(e))}),this.$onChange=r.delayedCall(function(){t.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),o.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new s,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){i.setCssClass(this.replaceOption,"checked",this.searchRange),i.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.replaceBox.style.display=this.replaceOption.checked?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,n){var r=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=0,i=0;if(t){var r=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),o=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(o-=e.session.doc.positionToIndex(this.searchRange.start));for(var s,a=t.lastIndex=0;(s=t.exec(r))&&(n++,(a=s.index)<=o&&i++,!(n>999))&&(s[0]||(t.lastIndex=a+=1,!(a>=r.length))););}this.searchCounter.textContent=i+" of "+(n>999?"999+":n)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){(e.searchBox||new c(e)).show(e.session.getTextRange(),t)}}),ace.require(["ace/ext/searchbox"],function(){}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,s=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var e=this.$keywords=this.createKeywordMapper({"keyword.control":"break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using","storage.type":"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template|char16_t|char32_t","storage.modifier":"const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local","keyword.operator":"and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace","variable.language":"this","constant.language":"NULL|true|false|TRUE|FALSE|nullptr"},"identifier"),t=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+t+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:t},{token:"constant.language.escape",regex:/%[^'"\\]/},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|version)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:"support.function.C99.c",regex:s},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.normalizeRules()};i.inherits(a,o),t.c_cppHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(i>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new r(s,i,n,t.length)}}.call(s.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),o=r.tokens,s=r.state;if(o.length&&"comment"==o[o.length-1].type)return i;if("start"==e)(a=t.match(/^.*[\{\(\[]\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"layout|attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct","constant.language":"radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData"},"identifier");this.$rules=(new r).$rules,this.$rules.start.forEach(function(t){"function"==typeof t.token&&(t.token=e)})};i.inherits(o,r),t.glslHighlightRules=o}),ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./c_cpp").Mode,o=e("./glsl_highlight_rules").glslHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(c,r),function(){this.$id="ace/mode/glsl"}.call(c.prototype),t.Mode=c}),e.exports=ace},function(e,t){!function(e){!function(e){var t=function(){function e(){this.callbacks=[],this.counter=-1}return e.prototype.add=function(e,t){return this.counter++,t&&(e=e.bind(t)),this.callbacks[this.counter]=e,this.counter},e.prototype.remove=function(e){delete this.callbacks[e]},e.prototype.clear=function(){this.callbacks={}},e.prototype.trigger=function(e){for(var t in this.callbacks)this.callbacks.hasOwnProperty(t)&&this.callbacks[t](e)},e}();e.Event=t}(e.Utils||(e.Utils={}))}(r||(r={})),function(e){!function(e){e[e.noLog=0]="noLog",e[e.error=1]="error",e[e.warning=2]="warning",e[e.info=3]="info"}(e.LogLevel||(e.LogLevel={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(t){void 0===t&&(t=e.LogLevel.warning),this.level=t}return t.prototype.setLevel=function(e){this.level=e},t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.level>0&&console.error(e,t)},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.level>1&&console.warn(e,t)},t.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.level>2&&console.log(e,t)},t}();t.ConsoleLogger=n}(e.Utils||(e.Utils={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(){}return e.prototype.getStackTrace=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var n=[];try{throw new Error("Errorator.")}catch(e){if(e.stack)for(var i=0,r=(o=e.stack.split("\n")).length;i<r;i++)o[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)?n.push(o[i]):0===o[i].indexOf(" at ")?(o[i]=o[i].replace(" at ",""),n.push(o[i])):-1!==o[i].indexOf("/<@http")?(o[i]=o[i].substring(o[i].indexOf("/<@http")+3),n.push(o[i])):-1!==o[i].indexOf("@http")&&(o[i]=o[i].replace("@http"," (http"),o[i]=o[i]+")",n.push(o[i]));else if(e.message){var o;for(i=0,r=(o=e.message.split("\n")).length;i<r;i++)if(o[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var s=o[i];o[i+1]&&(s+=" at "+o[i+1],i++),n.push(s)}}}if(!n)for(var a=arguments.callee.caller;a;){var l=a.toString(),c=l.substring(l.indexOf("function")+8,l.indexOf(""))||"anonymous";n.push(c),a=a.caller}if(n){n.shift();for(i=0;i<e&&n.length>0;i++)n.shift();for(i=0;i<t&&n.length>0;i++)n.pop()}return n},e}();e.StackTrace=t}(e.Utils||(e.Utils={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(){if(window.performance&&window.performance.now)this.nowFunction=this.dateBasedPerformanceNow.bind(this);else{var e=new Date;this.nowFunction=e.getTime.bind(e)}}return e.prototype.dateBasedPerformanceNow=function(){return performance.timing.navigationStart+performance.now()},Object.defineProperty(e.prototype,"now",{get:function(){return this.nowFunction()},enumerable:!0,configurable:!0}),e}();e.Time=t}(e.Utils||(e.Utils={}))}(r||(r={})),function(e){e.merge=function(e,t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);for(var i in t)n.hasOwnProperty(i)||(n[i]=t[i]);return n}}(r||(r={})),function(e){!function(e){e[e.Equal=0]="Equal",e[e.Different=1]="Different",e[e.OnlyInA=2]="OnlyInA",e[e.OnlyInB=3]="OnlyInB"}(e.CaptureComparisonStatus||(e.CaptureComparisonStatus={}))}(r||(r={})),function(e){var t=function(){function t(){}return t.isWebGlConstant=function(t){return null!==e.WebGlConstantsByValue[t]&&void 0!==e.WebGlConstantsByValue[t]},t.stringifyWebGlConstant=function(t,n){if(0===t)return this.zeroMeaningByCommand[n]||"0";if(1===t)return this.oneMeaningByCommand[n]||"1";var i=e.WebGlConstantsByValue[t];return i?i.name:t+""},t.DEPTH_BUFFER_BIT={name:"DEPTH_BUFFER_BIT",value:256,description:"Passed to clear to clear the current depth buffer."},t.STENCIL_BUFFER_BIT={name:"STENCIL_BUFFER_BIT",value:1024,description:"Passed to clear to clear the current stencil buffer."},t.COLOR_BUFFER_BIT={name:"COLOR_BUFFER_BIT",value:16384,description:"Passed to clear to clear the current color buffer."},t.POINTS={name:"POINTS",value:0,description:"Passed to drawElements or drawArrays to draw single points."},t.LINES={name:"LINES",value:1,description:"Passed to drawElements or drawArrays to draw lines. Each vertex connects to the one after it."},t.LINE_LOOP={name:"LINE_LOOP",value:2,description:"Passed to drawElements or drawArrays to draw lines. Each set of two vertices is treated as a separate line segment."},t.LINE_STRIP={name:"LINE_STRIP",value:3,description:"Passed to drawElements or drawArrays to draw a connected group of line segments from the first vertex to the last."},t.TRIANGLES={name:"TRIANGLES",value:4,description:"Passed to drawElements or drawArrays to draw triangles. Each set of three vertices creates a separate triangle."},t.TRIANGLE_STRIP={name:"TRIANGLE_STRIP",value:5,description:"Passed to drawElements or drawArrays to draw a connected group of triangles."},t.TRIANGLE_FAN={name:"TRIANGLE_FAN",value:6,description:"Passed to drawElements or drawArrays to draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan."},t.ZERO={name:"ZERO",value:0,description:"Passed to blendFunc or blendFuncSeparate to turn off a component."},t.ONE={name:"ONE",value:1,description:"Passed to blendFunc or blendFuncSeparate to turn on a component."},t.SRC_COLOR={name:"SRC_COLOR",value:768,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the source elements color."},t.ONE_MINUS_SRC_COLOR={name:"ONE_MINUS_SRC_COLOR",value:769,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source elements color."},t.SRC_ALPHA={name:"SRC_ALPHA",value:770,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the source's alpha."},t.ONE_MINUS_SRC_ALPHA={name:"ONE_MINUS_SRC_ALPHA",value:771,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source's alpha."},t.DST_ALPHA={name:"DST_ALPHA",value:772,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's alpha."},t.ONE_MINUS_DST_ALPHA={name:"ONE_MINUS_DST_ALPHA",value:773,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's alpha."},t.DST_COLOR={name:"DST_COLOR",value:774,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's color."},t.ONE_MINUS_DST_COLOR={name:"ONE_MINUS_DST_COLOR",value:775,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's color."},t.SRC_ALPHA_SATURATE={name:"SRC_ALPHA_SATURATE",value:776,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the minimum of source's alpha or one minus the destination's alpha."},t.CONSTANT_COLOR={name:"CONSTANT_COLOR",value:32769,description:"Passed to blendFunc or blendFuncSeparate to specify a constant color blend function."},t.ONE_MINUS_CONSTANT_COLOR={name:"ONE_MINUS_CONSTANT_COLOR",value:32770,description:"Passed to blendFunc or blendFuncSeparate to specify one minus a constant color blend function."},t.CONSTANT_ALPHA={name:"CONSTANT_ALPHA",value:32771,description:"Passed to blendFunc or blendFuncSeparate to specify a constant alpha blend function."},t.ONE_MINUS_CONSTANT_ALPHA={name:"ONE_MINUS_CONSTANT_ALPHA",value:32772,description:"Passed to blendFunc or blendFuncSeparate to specify one minus a constant alpha blend function."},t.FUNC_ADD={name:"FUNC_ADD",value:32774,description:"Passed to blendEquation or blendEquationSeparate to set an addition blend function."},t.FUNC_SUBSTRACT={name:"FUNC_SUBSTRACT",value:32778,description:"Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination)."},t.FUNC_REVERSE_SUBTRACT={name:"FUNC_REVERSE_SUBTRACT",value:32779,description:"Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source)."},t.BLEND_EQUATION={name:"BLEND_EQUATION",value:32777,description:"Passed to getParameter to get the current RGB blend function."},t.BLEND_EQUATION_RGB={name:"BLEND_EQUATION_RGB",value:32777,description:"Passed to getParameter to get the current RGB blend function. Same as BLEND_EQUATION"},t.BLEND_EQUATION_ALPHA={name:"BLEND_EQUATION_ALPHA",value:34877,description:"Passed to getParameter to get the current alpha blend function. Same as BLEND_EQUATION"},t.BLEND_DST_RGB={name:"BLEND_DST_RGB",value:32968,description:"Passed to getParameter to get the current destination RGB blend function."},t.BLEND_SRC_RGB={name:"BLEND_SRC_RGB",value:32969,description:"Passed to getParameter to get the current destination RGB blend function."},t.BLEND_DST_ALPHA={name:"BLEND_DST_ALPHA",value:32970,description:"Passed to getParameter to get the current destination alpha blend function."},t.BLEND_SRC_ALPHA={name:"BLEND_SRC_ALPHA",value:32971,description:"Passed to getParameter to get the current source alpha blend function."},t.BLEND_COLOR={name:"BLEND_COLOR",value:32773,description:"Passed to getParameter to return a the current blend color."},t.ARRAY_BUFFER_BINDING={name:"ARRAY_BUFFER_BINDING",value:34964,description:"Passed to getParameter to get the array buffer binding."},t.ELEMENT_ARRAY_BUFFER_BINDING={name:"ELEMENT_ARRAY_BUFFER_BINDING",value:34965,description:"Passed to getParameter to get the current element array buffer."},t.LINE_WIDTH={name:"LINE_WIDTH",value:2849,description:"Passed to getParameter to get the current lineWidth (set by the lineWidth method)."},t.ALIASED_POINT_SIZE_RANGE={name:"ALIASED_POINT_SIZE_RANGE",value:33901,description:"Passed to getParameter to get the current size of a point drawn with gl.POINTS"},t.ALIASED_LINE_WIDTH_RANGE={name:"ALIASED_LINE_WIDTH_RANGE",value:33902,description:"Passed to getParameter to get the range of available widths for a line. Returns a length-2 array with the lo value at 0, and hight at 1."},t.CULL_FACE_MODE={name:"CULL_FACE_MODE",value:2885,description:"Passed to getParameter to get the current value of cullFace. Should return FRONT, BACK, or FRONT_AND_BACK"},t.FRONT_FACE={name:"FRONT_FACE",value:2886,description:"Passed to getParameter to determine the current value of frontFace. Should return CW or CCW."},t.DEPTH_RANGE={name:"DEPTH_RANGE",value:2928,description:"Passed to getParameter to return a length-2 array of floats giving the current depth range."},t.DEPTH_WRITEMASK={name:"DEPTH_WRITEMASK",value:2930,description:"Passed to getParameter to determine if the depth write mask is enabled."},t.DEPTH_CLEAR_VALUE={name:"DEPTH_CLEAR_VALUE",value:2931,description:"Passed to getParameter to determine the current depth clear value."},t.DEPTH_FUNC={name:"DEPTH_FUNC",value:2932,description:"Passed to getParameter to get the current depth function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL."},t.STENCIL_CLEAR_VALUE={name:"STENCIL_CLEAR_VALUE",value:2961,description:"Passed to getParameter to get the value the stencil will be cleared to."},t.STENCIL_FUNC={name:"STENCIL_FUNC",value:2962,description:"Passed to getParameter to get the current stencil function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL."},t.STENCIL_FAIL={name:"STENCIL_FAIL",value:2964,description:"Passed to getParameter to get the current stencil fail function. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_PASS_DEPTH_FAIL={name:"STENCIL_PASS_DEPTH_FAIL",value:2965,description:"Passed to getParameter to get the current stencil fail function should the depth buffer test fail. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_PASS_DEPTH_PASS={name:"STENCIL_PASS_DEPTH_PASS",value:2966,description:"Passed to getParameter to get the current stencil fail function should the depth buffer test pass. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_REF={name:"STENCIL_REF",value:2967,description:"Passed to getParameter to get the reference value used for stencil tests."},t.STENCIL_VALUE_MASK={name:"STENCIL_VALUE_MASK",value:2963,description:" "},t.STENCIL_WRITEMASK={name:"STENCIL_WRITEMASK",value:2968,description:" "},t.STENCIL_BACK_FUNC={name:"STENCIL_BACK_FUNC",value:34816,description:" "},t.STENCIL_BACK_FAIL={name:"STENCIL_BACK_FAIL",value:34817,description:" "},t.STENCIL_BACK_PASS_DEPTH_FAIL={name:"STENCIL_BACK_PASS_DEPTH_FAIL",value:34818,description:" "},t.STENCIL_BACK_PASS_DEPTH_PASS={name:"STENCIL_BACK_PASS_DEPTH_PASS",value:34819,description:" "},t.STENCIL_BACK_REF={name:"STENCIL_BACK_REF",value:36003,description:" "},t.STENCIL_BACK_VALUE_MASK={name:"STENCIL_BACK_VALUE_MASK",value:36004,description:" "},t.STENCIL_BACK_WRITEMASK={name:"STENCIL_BACK_WRITEMASK",value:36005,description:" "},t.VIEWPORT={name:"VIEWPORT",value:2978,description:"Returns an Int32Array with four elements for the current viewport dimensions."},t.SCISSOR_BOX={name:"SCISSOR_BOX",value:3088,description:"Returns an Int32Array with four elements for the current scissor box dimensions."},t.COLOR_CLEAR_VALUE={name:"COLOR_CLEAR_VALUE",value:3106,description:" "},t.COLOR_WRITEMASK={name:"COLOR_WRITEMASK",value:3107,description:" "},t.UNPACK_ALIGNMENT={name:"UNPACK_ALIGNMENT",value:3317,description:" "},t.PACK_ALIGNMENT={name:"PACK_ALIGNMENT",value:3333,description:" "},t.MAX_TEXTURE_SIZE={name:"MAX_TEXTURE_SIZE",value:3379,description:" "},t.MAX_VIEWPORT_DIMS={name:"MAX_VIEWPORT_DIMS",value:3386,description:" "},t.SUBPIXEL_BITS={name:"SUBPIXEL_BITS",value:3408,description:" "},t.RED_BITS={name:"RED_BITS",value:3410,description:" "},t.GREEN_BITS={name:"GREEN_BITS",value:3411,description:" "},t.BLUE_BITS={name:"BLUE_BITS",value:3412,description:" "},t.ALPHA_BITS={name:"ALPHA_BITS",value:3413,description:" "},t.DEPTH_BITS={name:"DEPTH_BITS",value:3414,description:" "},t.STENCIL_BITS={name:"STENCIL_BITS",value:3415,description:" "},t.POLYGON_OFFSET_UNITS={name:"POLYGON_OFFSET_UNITS",value:10752,description:" "},t.POLYGON_OFFSET_FACTOR={name:"POLYGON_OFFSET_FACTOR",value:32824,description:" "},t.TEXTURE_BINDING_2D={name:"TEXTURE_BINDING_2D",value:32873,description:" "},t.SAMPLE_BUFFERS={name:"SAMPLE_BUFFERS",value:32936,description:" "},t.SAMPLES={name:"SAMPLES",value:32937,description:" "},t.SAMPLE_COVERAGE_VALUE={name:"SAMPLE_COVERAGE_VALUE",value:32938,description:" "},t.SAMPLE_COVERAGE_INVERT={name:"SAMPLE_COVERAGE_INVERT",value:32939,description:" "},t.COMPRESSED_TEXTURE_FORMATS={name:"COMPRESSED_TEXTURE_FORMATS",value:34467,description:" "},t.VENDOR={name:"VENDOR",value:7936,description:" "},t.RENDERER={name:"RENDERER",value:7937,description:" "},t.VERSION={name:"VERSION",value:7938,description:" "},t.IMPLEMENTATION_COLOR_READ_TYPE={name:"IMPLEMENTATION_COLOR_READ_TYPE",value:35738,description:" "},t.IMPLEMENTATION_COLOR_READ_FORMAT={name:"IMPLEMENTATION_COLOR_READ_FORMAT",value:35739,description:" "},t.BROWSER_DEFAULT_WEBGL={name:"BROWSER_DEFAULT_WEBGL",value:37444,description:" "},t.STATIC_DRAW={name:"STATIC_DRAW",value:35044,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and not change often."},t.STREAM_DRAW={name:"STREAM_DRAW",value:35040,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to not be used often."},t.DYNAMIC_DRAW={name:"DYNAMIC_DRAW",value:35048,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and change often."},t.ARRAY_BUFFER={name:"ARRAY_BUFFER",value:34962,description:"Passed to bindBuffer or bufferData to specify the type of buffer being used."},t.ELEMENT_ARRAY_BUFFER={name:"ELEMENT_ARRAY_BUFFER",value:34963,description:"Passed to bindBuffer or bufferData to specify the type of buffer being used."},t.BUFFER_SIZE={name:"BUFFER_SIZE",value:34660,description:"Passed to getBufferParameter to get a buffer's size."},t.BUFFER_USAGE={name:"BUFFER_USAGE",value:34661,description:"Passed to getBufferParameter to get the hint for the buffer passed in when it was created."},t.CURRENT_VERTEX_ATTRIB={name:"CURRENT_VERTEX_ATTRIB",value:34342,description:"Passed to getVertexAttrib to read back the current vertex attribute."},t.VERTEX_ATTRIB_ARRAY_ENABLED={name:"VERTEX_ATTRIB_ARRAY_ENABLED",value:34338,description:" "},t.VERTEX_ATTRIB_ARRAY_SIZE={name:"VERTEX_ATTRIB_ARRAY_SIZE",value:34339,description:" "},t.VERTEX_ATTRIB_ARRAY_STRIDE={name:"VERTEX_ATTRIB_ARRAY_STRIDE",value:34340,description:" "},t.VERTEX_ATTRIB_ARRAY_TYPE={name:"VERTEX_ATTRIB_ARRAY_TYPE",value:34341,description:" "},t.VERTEX_ATTRIB_ARRAY_NORMALIZED={name:"VERTEX_ATTRIB_ARRAY_NORMALIZED",value:34922,description:" "},t.VERTEX_ATTRIB_ARRAY_POINTER={name:"VERTEX_ATTRIB_ARRAY_POINTER",value:34373,description:" "},t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING={name:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",value:34975,description:" "},t.CULL_FACE={name:"CULL_FACE",value:2884,description:"Passed to enable/disable to turn on/off culling. Can also be used with getParameter to find the current culling method."},t.FRONT={name:"FRONT",value:1028,description:"Passed to cullFace to specify that only front faces should be drawn."},t.BACK={name:"BACK",value:1029,description:"Passed to cullFace to specify that only back faces should be drawn."},t.FRONT_AND_BACK={name:"FRONT_AND_BACK",value:1032,description:"Passed to cullFace to specify that front and back faces should be drawn."},t.BLEND={name:"BLEND",value:3042,description:"Passed to enable/disable to turn on/off blending. Can also be used with getParameter to find the current blending method."},t.DEPTH_TEST={name:"DEPTH_TEST",value:2929,description:"Passed to enable/disable to turn on/off the depth test. Can also be used with getParameter to query the depth test."},t.DITHER={name:"DITHER",value:3024,description:"Passed to enable/disable to turn on/off dithering. Can also be used with getParameter to find the current dithering method."},t.POLYGON_OFFSET_FILL={name:"POLYGON_OFFSET_FILL",value:32823,description:"Passed to enable/disable to turn on/off the polygon offset. Useful for rendering hidden-line images, decals, and or solids with highlighted edges. Can also be used with getParameter to query the scissor test."},t.SAMPLE_ALPHA_TO_COVERAGE={name:"SAMPLE_ALPHA_TO_COVERAGE",value:32926,description:"Passed to enable/disable to turn on/off the alpha to coverage. Used in multi-sampling alpha channels."},t.SAMPLE_COVERAGE={name:"SAMPLE_COVERAGE",value:32928,description:"Passed to enable/disable to turn on/off the sample coverage. Used in multi-sampling."},t.SCISSOR_TEST={name:"SCISSOR_TEST",value:3089,description:"Passed to enable/disable to turn on/off the scissor test. Can also be used with getParameter to query the scissor test."},t.STENCIL_TEST={name:"STENCIL_TEST",value:2960,description:"Passed to enable/disable to turn on/off the stencil test. Can also be used with getParameter to query the stencil test."},t.NO_ERROR={name:"NO_ERROR",value:0,description:"Returned from getError."},t.INVALID_ENUM={name:"INVALID_ENUM",value:1280,description:"Returned from getError."},t.INVALID_VALUE={name:"INVALID_VALUE",value:1281,description:"Returned from getError."},t.INVALID_OPERATION={name:"INVALID_OPERATION",value:1282,description:"Returned from getError."},t.OUT_OF_MEMORY={name:"OUT_OF_MEMORY",value:1285,description:"Returned from getError."},t.CONTEXT_LOST_WEBGL={name:"CONTEXT_LOST_WEBGL",value:37442,description:"Returned from getError."},t.CW={name:"CW",value:2304,description:"Passed to frontFace to specify the front face of a polygon is drawn in the clockwise direction"},t.CCW={name:"CCW",value:2305,description:"Passed to frontFace to specify the front face of a polygon is drawn in the counter clockwise direction"},t.DONT_CARE={name:"DONT_CARE",value:4352,description:"There is no preference for this behavior."},t.FASTEST={name:"FASTEST",value:4353,description:"The most efficient behavior should be used."},t.NICEST={name:"NICEST",value:4354,description:"The most correct or the highest quality option should be used."},t.GENERATE_MIPMAP_HINT={name:"GENERATE_MIPMAP_HINT",value:33170,description:"Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap()."},t.BYTE={name:"BYTE",value:5120,description:" "},t.UNSIGNED_BYTE={name:"UNSIGNED_BYTE",value:5121,description:" "},t.SHORT={name:"SHORT",value:5122,description:" "},t.UNSIGNED_SHORT={name:"UNSIGNED_SHORT",value:5123,description:" "},t.INT={name:"INT",value:5124,description:" "},t.UNSIGNED_INT={name:"UNSIGNED_INT",value:5125,description:" "},t.FLOAT={name:"FLOAT",value:5126,description:" "},t.DEPTH_COMPONENT={name:"DEPTH_COMPONENT",value:6402,description:" "},t.ALPHA={name:"ALPHA",value:6406,description:" "},t.RGB={name:"RGB",value:6407,description:" "},t.RGBA={name:"RGBA",value:6408,description:" "},t.LUMINANCE={name:"LUMINANCE",value:6409,description:" "},t.LUMINANCE_ALPHA={name:"LUMINANCE_ALPHA",value:6410,description:" "},t.UNSIGNED_SHORT_4_4_4_4={name:"UNSIGNED_SHORT_4_4_4_4",value:32819,description:" "},t.UNSIGNED_SHORT_5_5_5_1={name:"UNSIGNED_SHORT_5_5_5_1",value:32820,description:" "},t.UNSIGNED_SHORT_5_6_5={name:"UNSIGNED_SHORT_5_6_5",value:33635,description:" "},t.FRAGMENT_SHADER={name:"FRAGMENT_SHADER",value:35632,description:"Passed to createShader to define a fragment shader."},t.VERTEX_SHADER={name:"VERTEX_SHADER",value:35633,description:"Passed to createShader to define a vertex shader"},t.COMPILE_STATUS={name:"COMPILE_STATUS",value:35713,description:"Passed to getShaderParamter to get the status of the compilation. Returns false if the shader was not compiled. You can then query getShaderInfoLog to find the exact error"},t.DELETE_STATUS={name:"DELETE_STATUS",value:35712,description:"Passed to getShaderParamter to determine if a shader was deleted via deleteShader. Returns true if it was, false otherwise."},t.LINK_STATUS={name:"LINK_STATUS",value:35714,description:"Passed to getProgramParameter after calling linkProgram to determine if a program was linked correctly. Returns false if there were errors. Use getProgramInfoLog to find the exact error."},t.VALIDATE_STATUS={name:"VALIDATE_STATUS",value:35715,description:"Passed to getProgramParameter after calling validateProgram to determine if it is valid. Returns false if errors were found."},t.ATTACHED_SHADERS={name:"ATTACHED_SHADERS",value:35717,description:"Passed to getProgramParameter after calling attachShader to determine if the shader was attached correctly. Returns false if errors occurred."},t.ACTIVE_ATTRIBUTES={name:"ACTIVE_ATTRIBUTES",value:35721,description:"Passed to getProgramParameter to get the number of attributes active in a program."},t.ACTIVE_UNIFORMS={name:"ACTIVE_UNIFORMS",value:35718,description:"Passed to getProgramParamter to get the number of uniforms active in a program."},t.MAX_VERTEX_ATTRIBS={name:"MAX_VERTEX_ATTRIBS",value:34921,description:" "},t.MAX_VERTEX_UNIFORM_VECTORS={name:"MAX_VERTEX_UNIFORM_VECTORS",value:36347,description:" "},t.MAX_VARYING_VECTORS={name:"MAX_VARYING_VECTORS",value:36348,description:" "},t.MAX_COMBINED_TEXTURE_IMAGE_UNITS={name:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",value:35661,description:" "},t.MAX_VERTEX_TEXTURE_IMAGE_UNITS={name:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",value:35660,description:" "},t.MAX_TEXTURE_IMAGE_UNITS={name:"MAX_TEXTURE_IMAGE_UNITS",value:34930,description:"Implementation dependent number of maximum texture units. At least 8."},t.MAX_FRAGMENT_UNIFORM_VECTORS={name:"MAX_FRAGMENT_UNIFORM_VECTORS",value:36349,description:" "},t.SHADER_TYPE={name:"SHADER_TYPE",value:35663,description:" "},t.SHADING_LANGUAGE_VERSION={name:"SHADING_LANGUAGE_VERSION",value:35724,description:" "},t.CURRENT_PROGRAM={name:"CURRENT_PROGRAM",value:35725,description:" "},t.NEVER={name:"NEVER",value:512,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn."},t.ALWAYS={name:"ALWAYS",value:519,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn."},t.LESS={name:"LESS",value:513,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value."},t.EQUAL={name:"EQUAL",value:514,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value."},t.LEQUAL={name:"LEQUAL",value:515,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value."},t.GREATER={name:"GREATER",value:516,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value."},t.GEQUAL={name:"GEQUAL",value:518,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value."},t.NOTEQUAL={name:"NOTEQUAL",value:517,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value."},t.KEEP={name:"KEEP",value:7680,description:" "},t.REPLACE={name:"REPLACE",value:7681,description:" "},t.INCR={name:"INCR",value:7682,description:" "},t.DECR={name:"DECR",value:7683,description:" "},t.INVERT={name:"INVERT",value:5386,description:" "},t.INCR_WRAP={name:"INCR_WRAP",value:34055,description:" "},t.DECR_WRAP={name:"DECR_WRAP",value:34056,description:" "},t.NEAREST={name:"NEAREST",value:9728,description:" "},t.LINEAR={name:"LINEAR",value:9729,description:" "},t.NEAREST_MIPMAP_NEAREST={name:"NEAREST_MIPMAP_NEAREST",value:9984,description:" "},t.LINEAR_MIPMAP_NEAREST={name:"LINEAR_MIPMAP_NEAREST",value:9985,description:" "},t.NEAREST_MIPMAP_LINEAR={name:"NEAREST_MIPMAP_LINEAR",value:9986,description:" "},t.LINEAR_MIPMAP_LINEAR={name:"LINEAR_MIPMAP_LINEAR",value:9987,description:" "},t.TEXTURE_MAG_FILTER={name:"TEXTURE_MAG_FILTER",value:10240,description:" "},t.TEXTURE_MIN_FILTER={name:"TEXTURE_MIN_FILTER",value:10241,description:" "},t.TEXTURE_WRAP_S={name:"TEXTURE_WRAP_S",value:10242,description:" "},t.TEXTURE_WRAP_T={name:"TEXTURE_WRAP_T",value:10243,description:" "},t.TEXTURE_2D={name:"TEXTURE_2D",value:3553,description:" "},t.TEXTURE={name:"TEXTURE",value:5890,description:" "},t.TEXTURE_CUBE_MAP={name:"TEXTURE_CUBE_MAP",value:34067,description:" "},t.TEXTURE_BINDING_CUBE_MAP={name:"TEXTURE_BINDING_CUBE_MAP",value:34068,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_X={name:"TEXTURE_CUBE_MAP_POSITIVE_X",value:34069,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_X={name:"TEXTURE_CUBE_MAP_NEGATIVE_X",value:34070,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_Y={name:"TEXTURE_CUBE_MAP_POSITIVE_Y",value:34071,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_Y={name:"TEXTURE_CUBE_MAP_NEGATIVE_Y",value:34072,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_Z={name:"TEXTURE_CUBE_MAP_POSITIVE_Z",value:34073,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_Z={name:"TEXTURE_CUBE_MAP_NEGATIVE_Z",value:34074,description:" "},t.MAX_CUBE_MAP_TEXTURE_SIZE={name:"MAX_CUBE_MAP_TEXTURE_SIZE",value:34076,description:" "},t.TEXTURE0={name:"TEXTURE0",value:33984,description:"A texture unit."},t.TEXTURE1={name:"TEXTURE1",value:33985,description:"A texture unit."},t.TEXTURE2={name:"TEXTURE2",value:33986,description:"A texture unit."},t.TEXTURE3={name:"TEXTURE3",value:33987,description:"A texture unit."},t.TEXTURE4={name:"TEXTURE4",value:33988,description:"A texture unit."},t.TEXTURE5={name:"TEXTURE5",value:33989,description:"A texture unit."},t.TEXTURE6={name:"TEXTURE6",value:33990,description:"A texture unit."},t.TEXTURE7={name:"TEXTURE7",value:33991,description:"A texture unit."},t.TEXTURE8={name:"TEXTURE8",value:33992,description:"A texture unit."},t.TEXTURE9={name:"TEXTURE9",value:33993,description:"A texture unit."},t.TEXTURE10={name:"TEXTURE10",value:33994,description:"A texture unit."},t.TEXTURE11={name:"TEXTURE11",value:33995,description:"A texture unit."},t.TEXTURE12={name:"TEXTURE12",value:33996,description:"A texture unit."},t.TEXTURE13={name:"TEXTURE13",value:33997,description:"A texture unit."},t.TEXTURE14={name:"TEXTURE14",value:33998,description:"A texture unit."},t.TEXTURE15={name:"TEXTURE15",value:33999,description:"A texture unit."},t.TEXTURE16={name:"TEXTURE16",value:34e3,description:"A texture unit."},t.TEXTURE17={name:"TEXTURE17",value:34001,description:"A texture unit."},t.TEXTURE18={name:"TEXTURE18",value:34002,description:"A texture unit."},t.TEXTURE19={name:"TEXTURE19",value:34003,description:"A texture unit."},t.TEXTURE20={name:"TEXTURE20",value:34004,description:"A texture unit."},t.TEXTURE21={name:"TEXTURE21",value:34005,description:"A texture unit."},t.TEXTURE22={name:"TEXTURE22",value:34006,description:"A texture unit."},t.TEXTURE23={name:"TEXTURE23",value:34007,description:"A texture unit."},t.TEXTURE24={name:"TEXTURE24",value:34008,description:"A texture unit."},t.TEXTURE25={name:"TEXTURE25",value:34009,description:"A texture unit."},t.TEXTURE26={name:"TEXTURE26",value:34010,description:"A texture unit."},t.TEXTURE27={name:"TEXTURE27",value:34011,description:"A texture unit."},t.TEXTURE28={name:"TEXTURE28",value:34012,description:"A texture unit."},t.TEXTURE29={name:"TEXTURE29",value:34013,description:"A texture unit."},t.TEXTURE30={name:"TEXTURE30",value:34014,description:"A texture unit."},t.TEXTURE31={name:"TEXTURE31",value:34015,description:"A texture unit."},t.ACTIVE_TEXTURE={name:"ACTIVE_TEXTURE",value:34016,description:"The current active texture unit."},t.REPEAT={name:"REPEAT",value:10497,description:" "},t.CLAMP_TO_EDGE={name:"CLAMP_TO_EDGE",value:33071,description:" "},t.MIRRORED_REPEAT={name:"MIRRORED_REPEAT",value:33648,description:" "},t.FLOAT_VEC2={name:"FLOAT_VEC2",value:35664,description:" "},t.FLOAT_VEC3={name:"FLOAT_VEC3",value:35665,description:" "},t.FLOAT_VEC4={name:"FLOAT_VEC4",value:35666,description:" "},t.INT_VEC2={name:"INT_VEC2",value:35667,description:" "},t.INT_VEC3={name:"INT_VEC3",value:35668,description:" "},t.INT_VEC4={name:"INT_VEC4",value:35669,description:" "},t.BOOL={name:"BOOL",value:35670,description:" "},t.BOOL_VEC2={name:"BOOL_VEC2",value:35671,description:" "},t.BOOL_VEC3={name:"BOOL_VEC3",value:35672,description:" "},t.BOOL_VEC4={name:"BOOL_VEC4",value:35673,description:" "},t.FLOAT_MAT2={name:"FLOAT_MAT2",value:35674,description:" "},t.FLOAT_MAT3={name:"FLOAT_MAT3",value:35675,description:" "},t.FLOAT_MAT4={name:"FLOAT_MAT4",value:35676,description:" "},t.SAMPLER_2D={name:"SAMPLER_2D",value:35678,description:" "},t.SAMPLER_CUBE={name:"SAMPLER_CUBE",value:35680,description:" "},t.LOW_FLOAT={name:"LOW_FLOAT",value:36336,description:" "},t.MEDIUM_FLOAT={name:"MEDIUM_FLOAT",value:36337,description:" "},t.HIGH_FLOAT={name:"HIGH_FLOAT",value:36338,description:" "},t.LOW_INT={name:"LOW_INT",value:36339,description:" "},t.MEDIUM_INT={name:"MEDIUM_INT",value:36340,description:" "},t.HIGH_INT={name:"HIGH_INT",value:36341,description:" "},t.FRAMEBUFFER={name:"FRAMEBUFFER",value:36160,description:" "},t.RENDERBUFFER={name:"RENDERBUFFER",value:36161,description:" "},t.RGBA4={name:"RGBA4",value:32854,description:" "},t.RGB5_A1={name:"RGB5_A1",value:32855,description:" "},t.RGB565={name:"RGB565",value:36194,description:" "},t.DEPTH_COMPONENT16={name:"DEPTH_COMPONENT16",value:33189,description:" "},t.STENCIL_INDEX={name:"STENCIL_INDEX",value:6401,description:" "},t.STENCIL_INDEX8={name:"STENCIL_INDEX8",value:36168,description:" "},t.DEPTH_STENCIL={name:"DEPTH_STENCIL",value:34041,description:" "},t.RENDERBUFFER_WIDTH={name:"RENDERBUFFER_WIDTH",value:36162,description:" "},t.RENDERBUFFER_HEIGHT={name:"RENDERBUFFER_HEIGHT",value:36163,description:" "},t.RENDERBUFFER_INTERNAL_FORMAT={name:"RENDERBUFFER_INTERNAL_FORMAT",value:36164,description:" "},t.RENDERBUFFER_RED_SIZE={name:"RENDERBUFFER_RED_SIZE",value:36176,description:" "},t.RENDERBUFFER_GREEN_SIZE={name:"RENDERBUFFER_GREEN_SIZE",value:36177,description:" "},t.RENDERBUFFER_BLUE_SIZE={name:"RENDERBUFFER_BLUE_SIZE",value:36178,description:" "},t.RENDERBUFFER_ALPHA_SIZE={name:"RENDERBUFFER_ALPHA_SIZE",value:36179,description:" "},t.RENDERBUFFER_DEPTH_SIZE={name:"RENDERBUFFER_DEPTH_SIZE",value:36180,description:" "},t.RENDERBUFFER_STENCIL_SIZE={name:"RENDERBUFFER_STENCIL_SIZE",value:36181,description:" "},t.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE={name:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",value:36048,description:" "},t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME={name:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",value:36049,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",value:36050,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",value:36051,description:" "},t.COLOR_ATTACHMENT0={name:"COLOR_ATTACHMENT0",value:36064,description:" "},t.DEPTH_ATTACHMENT={name:"DEPTH_ATTACHMENT",value:36096,description:" "},t.STENCIL_ATTACHMENT={name:"STENCIL_ATTACHMENT",value:36128,description:" "},t.DEPTH_STENCIL_ATTACHMENT={name:"DEPTH_STENCIL_ATTACHMENT",value:33306,description:" "},t.NONE={name:"NONE",value:0,description:" "},t.FRAMEBUFFER_COMPLETE={name:"FRAMEBUFFER_COMPLETE",value:36053,description:" "},t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT={name:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",value:36054,description:" "},t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT={name:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",value:36055,description:" "},t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS={name:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",value:36057,description:" "},t.FRAMEBUFFER_UNSUPPORTED={name:"FRAMEBUFFER_UNSUPPORTED",value:36061,description:" "},t.FRAMEBUFFER_BINDING={name:"FRAMEBUFFER_BINDING",value:36006,description:" "},t.RENDERBUFFER_BINDING={name:"RENDERBUFFER_BINDING",value:36007,description:" "},t.MAX_RENDERBUFFER_SIZE={name:"MAX_RENDERBUFFER_SIZE",value:34024,description:" "},t.INVALID_FRAMEBUFFER_OPERATION={name:"INVALID_FRAMEBUFFER_OPERATION",value:1286,description:" "},t.UNPACK_FLIP_Y_WEBGL={name:"UNPACK_FLIP_Y_WEBGL",value:37440,description:" "},t.UNPACK_PREMULTIPLY_ALPHA_WEBGL={name:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",value:37441,description:" "},t.UNPACK_COLORSPACE_CONVERSION_WEBGL={name:"UNPACK_COLORSPACE_CONVERSION_WEBGL",value:37443,description:" "},t.READ_BUFFER={name:"READ_BUFFER",value:3074,description:" "},t.UNPACK_ROW_LENGTH={name:"UNPACK_ROW_LENGTH",value:3314,description:" "},t.UNPACK_SKIP_ROWS={name:"UNPACK_SKIP_ROWS",value:3315,description:" "},t.UNPACK_SKIP_PIXELS={name:"UNPACK_SKIP_PIXELS",value:3316,description:" "},t.PACK_ROW_LENGTH={name:"PACK_ROW_LENGTH",value:3330,description:" "},t.PACK_SKIP_ROWS={name:"PACK_SKIP_ROWS",value:3331,description:" "},t.PACK_SKIP_PIXELS={name:"PACK_SKIP_PIXELS",value:3332,description:" "},t.TEXTURE_BINDING_3D={name:"TEXTURE_BINDING_3D",value:32874,description:" "},t.UNPACK_SKIP_IMAGES={name:"UNPACK_SKIP_IMAGES",value:32877,description:" "},t.UNPACK_IMAGE_HEIGHT={name:"UNPACK_IMAGE_HEIGHT",value:32878,description:" "},t.MAX_3D_TEXTURE_SIZE={name:"MAX_3D_TEXTURE_SIZE",value:32883,description:" "},t.MAX_ELEMENTS_VERTICES={name:"MAX_ELEMENTS_VERTICES",value:33e3,description:" "},t.MAX_ELEMENTS_INDICES={name:"MAX_ELEMENTS_INDICES",value:33001,description:" "},t.MAX_TEXTURE_LOD_BIAS={name:"MAX_TEXTURE_LOD_BIAS",value:34045,description:" "},t.MAX_FRAGMENT_UNIFORM_COMPONENTS={name:"MAX_FRAGMENT_UNIFORM_COMPONENTS",value:35657,description:" "},t.MAX_VERTEX_UNIFORM_COMPONENTS={name:"MAX_VERTEX_UNIFORM_COMPONENTS",value:35658,description:" "},t.MAX_ARRAY_TEXTURE_LAYERS={name:"MAX_ARRAY_TEXTURE_LAYERS",value:35071,description:" "},t.MIN_PROGRAM_TEXEL_OFFSET={name:"MIN_PROGRAM_TEXEL_OFFSET",value:35076,description:" "},t.MAX_PROGRAM_TEXEL_OFFSET={name:"MAX_PROGRAM_TEXEL_OFFSET",value:35077,description:" "},t.MAX_VARYING_COMPONENTS={name:"MAX_VARYING_COMPONENTS",value:35659,description:" "},t.FRAGMENT_SHADER_DERIVATIVE_HINT={name:"FRAGMENT_SHADER_DERIVATIVE_HINT",value:35723,description:" "},t.RASTERIZER_DISCARD={name:"RASTERIZER_DISCARD",value:35977,description:" "},t.VERTEX_ARRAY_BINDING={name:"VERTEX_ARRAY_BINDING",value:34229,description:" "},t.MAX_VERTEX_OUTPUT_COMPONENTS={name:"MAX_VERTEX_OUTPUT_COMPONENTS",value:37154,description:" "},t.MAX_FRAGMENT_INPUT_COMPONENTS={name:"MAX_FRAGMENT_INPUT_COMPONENTS",value:37157,description:" "},t.MAX_SERVER_WAIT_TIMEOUT={name:"MAX_SERVER_WAIT_TIMEOUT",value:37137,description:" "},t.MAX_ELEMENT_INDEX={name:"MAX_ELEMENT_INDEX",value:36203,description:" "},t.RED={name:"RED",value:6403,description:" "},t.RGB8={name:"RGB8",value:32849,description:" "},t.RGBA8={name:"RGBA8",value:32856,description:" "},t.RGB10_A2={name:"RGB10_A2",value:32857,description:" "},t.TEXTURE_3D={name:"TEXTURE_3D",value:32879,description:" "},t.TEXTURE_WRAP_R={name:"TEXTURE_WRAP_R",value:32882,description:" "},t.TEXTURE_MIN_LOD={name:"TEXTURE_MIN_LOD",value:33082,description:" "},t.TEXTURE_MAX_LOD={name:"TEXTURE_MAX_LOD",value:33083,description:" "},t.TEXTURE_BASE_LEVEL={name:"TEXTURE_BASE_LEVEL",value:33084,description:" "},t.TEXTURE_MAX_LEVEL={name:"TEXTURE_MAX_LEVEL",value:33085,description:" "},t.TEXTURE_COMPARE_MODE={name:"TEXTURE_COMPARE_MODE",value:34892,description:" "},t.TEXTURE_COMPARE_FUNC={name:"TEXTURE_COMPARE_FUNC",value:34893,description:" "},t.SRGB={name:"SRGB",value:35904,description:" "},t.SRGB8={name:"SRGB8",value:35905,description:" "},t.SRGB8_ALPHA8={name:"SRGB8_ALPHA8",value:35907,description:" "},t.COMPARE_REF_TO_TEXTURE={name:"COMPARE_REF_TO_TEXTURE",value:34894,description:" "},t.RGBA32F={name:"RGBA32F",value:34836,description:" "},t.RGB32F={name:"RGB32F",value:34837,description:" "},t.RGBA16F={name:"RGBA16F",value:34842,description:" "},t.RGB16F={name:"RGB16F",value:34843,description:" "},t.TEXTURE_2D_ARRAY={name:"TEXTURE_2D_ARRAY",value:35866,description:" "},t.TEXTURE_BINDING_2D_ARRAY={name:"TEXTURE_BINDING_2D_ARRAY",value:35869,description:" "},t.R11F_G11F_B10F={name:"R11F_G11F_B10F",value:35898,description:" "},t.RGB9_E5={name:"RGB9_E5",value:35901,description:" "},t.RGBA32UI={name:"RGBA32UI",value:36208,description:" "},t.RGB32UI={name:"RGB32UI",value:36209,description:" "},t.RGBA16UI={name:"RGBA16UI",value:36214,description:" "},t.RGB16UI={name:"RGB16UI",value:36215,description:" "},t.RGBA8UI={name:"RGBA8UI",value:36220,description:" "},t.RGB8UI={name:"RGB8UI",value:36221,description:" "},t.RGBA32I={name:"RGBA32I",value:36226,description:" "},t.RGB32I={name:"RGB32I",value:36227,description:" "},t.RGBA16I={name:"RGBA16I",value:36232,description:" "},t.RGB16I={name:"RGB16I",value:36233,description:" "},t.RGBA8I={name:"RGBA8I",value:36238,description:" "},t.RGB8I={name:"RGB8I",value:36239,description:" "},t.RED_INTEGER={name:"RED_INTEGER",value:36244,description:" "},t.RGB_INTEGER={name:"RGB_INTEGER",value:36248,description:" "},t.RGBA_INTEGER={name:"RGBA_INTEGER",value:36249,description:" "},t.R8={name:"R8",value:33321,description:" "},t.RG8={name:"RG8",value:33323,description:" "},t.R16F={name:"R16F",value:33325,description:" "},t.R32F={name:"R32F",value:33326,description:" "},t.RG16F={name:"RG16F",value:33327,description:" "},t.RG32F={name:"RG32F",value:33328,description:" "},t.R8I={name:"R8I",value:33329,description:" "},t.R8UI={name:"R8UI",value:33330,description:" "},t.R16I={name:"R16I",value:33331,description:" "},t.R16UI={name:"R16UI",value:33332,description:" "},t.R32I={name:"R32I",value:33333,description:" "},t.R32UI={name:"R32UI",value:33334,description:" "},t.RG8I={name:"RG8I",value:33335,description:" "},t.RG8UI={name:"RG8UI",value:33336,description:" "},t.RG16I={name:"RG16I",value:33337,description:" "},t.RG16UI={name:"RG16UI",value:33338,description:" "},t.RG32I={name:"RG32I",value:33339,description:" "},t.RG32UI={name:"RG32UI",value:33340,description:" "},t.R8_SNORM={name:"R8_SNORM",value:36756,description:" "},t.RG8_SNORM={name:"RG8_SNORM",value:36757,description:" "},t.RGB8_SNORM={name:"RGB8_SNORM",value:36758,description:" "},t.RGBA8_SNORM={name:"RGBA8_SNORM",value:36759,description:" "},t.RGB10_A2UI={name:"RGB10_A2UI",value:36975,description:" "},t.TEXTURE_IMMUTABLE_FORMAT={name:"TEXTURE_IMMUTABLE_FORMAT",value:37167,description:" "},t.TEXTURE_IMMUTABLE_LEVELS={name:"TEXTURE_IMMUTABLE_LEVELS",value:33503,description:" "},t.UNSIGNED_INT_2_10_10_10_REV={name:"UNSIGNED_INT_2_10_10_10_REV",value:33640,description:" "},t.UNSIGNED_INT_10F_11F_11F_REV={name:"UNSIGNED_INT_10F_11F_11F_REV",value:35899,description:" "},t.UNSIGNED_INT_5_9_9_9_REV={name:"UNSIGNED_INT_5_9_9_9_REV",value:35902,description:" "},t.FLOAT_32_UNSIGNED_INT_24_8_REV={name:"FLOAT_32_UNSIGNED_INT_24_8_REV",value:36269,description:" "},t.UNSIGNED_INT_24_8={name:"UNSIGNED_INT_24_8",value:34042,description:" "},t.HALF_FLOAT={name:"HALF_FLOAT",value:5131,description:" "},t.RG={name:"RG",value:33319,description:" "},t.RG_INTEGER={name:"RG_INTEGER",value:33320,description:" "},t.INT_2_10_10_10_REV={name:"INT_2_10_10_10_REV",value:36255,description:" "},t.CURRENT_QUERY={name:"CURRENT_QUERY",value:34917,description:" "},t.QUERY_RESULT={name:"QUERY_RESULT",value:34918,description:" "},t.QUERY_RESULT_AVAILABLE={name:"QUERY_RESULT_AVAILABLE",value:34919,description:" "},t.ANY_SAMPLES_PASSED={name:"ANY_SAMPLES_PASSED",value:35887,description:" "},t.ANY_SAMPLES_PASSED_CONSERVATIVE={name:"ANY_SAMPLES_PASSED_CONSERVATIVE",value:36202,description:" "},t.MAX_DRAW_BUFFERS={name:"MAX_DRAW_BUFFERS",value:34852,description:" "},t.DRAW_BUFFER0={name:"DRAW_BUFFER0",value:34853,description:" "},t.DRAW_BUFFER1={name:"DRAW_BUFFER1",value:34854,description:" "},t.DRAW_BUFFER2={name:"DRAW_BUFFER2",value:34855,description:" "},t.DRAW_BUFFER3={name:"DRAW_BUFFER3",value:34856,description:" "},t.DRAW_BUFFER4={name:"DRAW_BUFFER4",value:34857,description:" "},t.DRAW_BUFFER5={name:"DRAW_BUFFER5",value:34858,description:" "},t.DRAW_BUFFER6={name:"DRAW_BUFFER6",value:34859,description:" "},t.DRAW_BUFFER7={name:"DRAW_BUFFER7",value:34860,description:" "},t.DRAW_BUFFER8={name:"DRAW_BUFFER8",value:34861,description:" "},t.DRAW_BUFFER9={name:"DRAW_BUFFER9",value:34862,description:" "},t.DRAW_BUFFER10={name:"DRAW_BUFFER10",value:34863,description:" "},t.DRAW_BUFFER11={name:"DRAW_BUFFER11",value:34864,description:" "},t.DRAW_BUFFER12={name:"DRAW_BUFFER12",value:34865,description:" "},t.DRAW_BUFFER13={name:"DRAW_BUFFER13",value:34866,description:" "},t.DRAW_BUFFER14={name:"DRAW_BUFFER14",value:34867,description:" "},t.DRAW_BUFFER15={name:"DRAW_BUFFER15",value:34868,description:" "},t.MAX_COLOR_ATTACHMENTS={name:"MAX_COLOR_ATTACHMENTS",value:36063,description:" "},t.COLOR_ATTACHMENT1={name:"COLOR_ATTACHMENT1",value:36065,description:" "},t.COLOR_ATTACHMENT2={name:"COLOR_ATTACHMENT2",value:36066,description:" "},t.COLOR_ATTACHMENT3={name:"COLOR_ATTACHMENT3",value:36067,description:" "},t.COLOR_ATTACHMENT4={name:"COLOR_ATTACHMENT4",value:36068,description:" "},t.COLOR_ATTACHMENT5={name:"COLOR_ATTACHMENT5",value:36069,description:" "},t.COLOR_ATTACHMENT6={name:"COLOR_ATTACHMENT6",value:36070,description:" "},t.COLOR_ATTACHMENT7={name:"COLOR_ATTACHMENT7",value:36071,description:" "},t.COLOR_ATTACHMENT8={name:"COLOR_ATTACHMENT8",value:36072,description:" "},t.COLOR_ATTACHMENT9={name:"COLOR_ATTACHMENT9",value:36073,description:" "},t.COLOR_ATTACHMENT10={name:"COLOR_ATTACHMENT10",value:36074,description:" "},t.COLOR_ATTACHMENT11={name:"COLOR_ATTACHMENT11",value:36075,description:" "},t.COLOR_ATTACHMENT12={name:"COLOR_ATTACHMENT12",value:36076,description:" "},t.COLOR_ATTACHMENT13={name:"COLOR_ATTACHMENT13",value:36077,description:" "},t.COLOR_ATTACHMENT14={name:"COLOR_ATTACHMENT14",value:36078,description:" "},t.COLOR_ATTACHMENT15={name:"COLOR_ATTACHMENT15",value:36079,description:" "},t.SAMPLER_3D={name:"SAMPLER_3D",value:35679,description:" "},t.SAMPLER_2D_SHADOW={name:"SAMPLER_2D_SHADOW",value:35682,description:" "},t.SAMPLER_2D_ARRAY={name:"SAMPLER_2D_ARRAY",value:36289,description:" "},t.SAMPLER_2D_ARRAY_SHADOW={name:"SAMPLER_2D_ARRAY_SHADOW",value:36292,description:" "},t.SAMPLER_CUBE_SHADOW={name:"SAMPLER_CUBE_SHADOW",value:36293,description:" "},t.INT_SAMPLER_2D={name:"INT_SAMPLER_2D",value:36298,description:" "},t.INT_SAMPLER_3D={name:"INT_SAMPLER_3D",value:36299,description:" "},t.INT_SAMPLER_CUBE={name:"INT_SAMPLER_CUBE",value:36300,description:" "},t.INT_SAMPLER_2D_ARRAY={name:"INT_SAMPLER_2D_ARRAY",value:36303,description:" "},t.UNSIGNED_INT_SAMPLER_2D={name:"UNSIGNED_INT_SAMPLER_2D",value:36306,description:" "},t.UNSIGNED_INT_SAMPLER_3D={name:"UNSIGNED_INT_SAMPLER_3D",value:36307,description:" "},t.UNSIGNED_INT_SAMPLER_CUBE={name:"UNSIGNED_INT_SAMPLER_CUBE",value:36308,description:" "},t.UNSIGNED_INT_SAMPLER_2D_ARRAY={name:"UNSIGNED_INT_SAMPLER_2D_ARRAY",value:36311,description:" "},t.MAX_SAMPLES={name:"MAX_SAMPLES",value:36183,description:" "},t.SAMPLER_BINDING={name:"SAMPLER_BINDING",value:35097,description:" "},t.PIXEL_PACK_BUFFER={name:"PIXEL_PACK_BUFFER",value:35051,description:" "},t.PIXEL_UNPACK_BUFFER={name:"PIXEL_UNPACK_BUFFER",value:35052,description:" "},t.PIXEL_PACK_BUFFER_BINDING={name:"PIXEL_PACK_BUFFER_BINDING",value:35053,description:" "},t.PIXEL_UNPACK_BUFFER_BINDING={name:"PIXEL_UNPACK_BUFFER_BINDING",value:35055,description:" "},t.COPY_READ_BUFFER={name:"COPY_READ_BUFFER",value:36662,description:" "},t.COPY_WRITE_BUFFER={name:"COPY_WRITE_BUFFER",value:36663,description:" "},t.COPY_READ_BUFFER_BINDING={name:"COPY_READ_BUFFER_BINDING",value:36662,description:" "},t.COPY_WRITE_BUFFER_BINDING={name:"COPY_WRITE_BUFFER_BINDING",value:36663,description:" "},t.FLOAT_MAT2x3={name:"FLOAT_MAT2x3",value:35685,description:" "},t.FLOAT_MAT2x4={name:"FLOAT_MAT2x4",value:35686,description:" "},t.FLOAT_MAT3x2={name:"FLOAT_MAT3x2",value:35687,description:" "},t.FLOAT_MAT3x4={name:"FLOAT_MAT3x4",value:35688,description:" "},t.FLOAT_MAT4x2={name:"FLOAT_MAT4x2",value:35689,description:" "},t.FLOAT_MAT4x3={name:"FLOAT_MAT4x3",value:35690,description:" "},t.UNSIGNED_INT_VEC2={name:"UNSIGNED_INT_VEC2",value:36294,description:" "},t.UNSIGNED_INT_VEC3={name:"UNSIGNED_INT_VEC3",value:36295,description:" "},t.UNSIGNED_INT_VEC4={name:"UNSIGNED_INT_VEC4",value:36296,description:" "},t.UNSIGNED_NORMALIZED={name:"UNSIGNED_NORMALIZED",value:35863,description:" "},t.SIGNED_NORMALIZED={name:"SIGNED_NORMALIZED",value:36764,description:" "},t.VERTEX_ATTRIB_ARRAY_INTEGER={name:"VERTEX_ATTRIB_ARRAY_INTEGER",value:35069,description:" "},t.VERTEX_ATTRIB_ARRAY_DIVISOR={name:"VERTEX_ATTRIB_ARRAY_DIVISOR",value:35070,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_MODE={name:"TRANSFORM_FEEDBACK_BUFFER_MODE",value:35967,description:" "},t.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS={name:"MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",value:35968,description:" "},t.TRANSFORM_FEEDBACK_VARYINGS={name:"TRANSFORM_FEEDBACK_VARYINGS",value:35971,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_START={name:"TRANSFORM_FEEDBACK_BUFFER_START",value:35972,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_SIZE={name:"TRANSFORM_FEEDBACK_BUFFER_SIZE",value:35973,description:" "},t.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN={name:"TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",value:35976,description:" "},t.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS={name:"MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",value:35978,description:" "},t.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS={name:"MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",value:35979,description:" "},t.INTERLEAVED_ATTRIBS={name:"INTERLEAVED_ATTRIBS",value:35980,description:" "},t.SEPARATE_ATTRIBS={name:"SEPARATE_ATTRIBS",value:35981,description:" "},t.TRANSFORM_FEEDBACK_BUFFER={name:"TRANSFORM_FEEDBACK_BUFFER",value:35982,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_BINDING={name:"TRANSFORM_FEEDBACK_BUFFER_BINDING",value:35983,description:" "},t.TRANSFORM_FEEDBACK={name:"TRANSFORM_FEEDBACK",value:36386,description:" "},t.TRANSFORM_FEEDBACK_PAUSED={name:"TRANSFORM_FEEDBACK_PAUSED",value:36387,description:" "},t.TRANSFORM_FEEDBACK_ACTIVE={name:"TRANSFORM_FEEDBACK_ACTIVE",value:36388,description:" "},t.TRANSFORM_FEEDBACK_BINDING={name:"TRANSFORM_FEEDBACK_BINDING",value:36389,description:" "},t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING={name:"FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",value:33296,description:" "},t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE={name:"FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",value:33297,description:" "},t.FRAMEBUFFER_ATTACHMENT_RED_SIZE={name:"FRAMEBUFFER_ATTACHMENT_RED_SIZE",value:33298,description:" "},t.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE={name:"FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",value:33299,description:" "},t.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE={name:"FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",value:33300,description:" "},t.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE={name:"FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",value:33301,description:" "},t.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE={name:"FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",value:33302,description:" "},t.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE={name:"FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",value:33303,description:" "},t.FRAMEBUFFER_DEFAULT={name:"FRAMEBUFFER_DEFAULT",value:33304,description:" "},t.DEPTH24_STENCIL8={name:"DEPTH24_STENCIL8",value:35056,description:" "},t.DRAW_FRAMEBUFFER_BINDING={name:"DRAW_FRAMEBUFFER_BINDING",value:36006,description:" "},t.READ_FRAMEBUFFER={name:"READ_FRAMEBUFFER",value:36008,description:" "},t.DRAW_FRAMEBUFFER={name:"DRAW_FRAMEBUFFER",value:36009,description:" "},t.READ_FRAMEBUFFER_BINDING={name:"READ_FRAMEBUFFER_BINDING",value:36010,description:" "},t.RENDERBUFFER_SAMPLES={name:"RENDERBUFFER_SAMPLES",value:36011,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",value:36052,description:" "},t.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE={name:"FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",value:36182,description:" "},t.UNIFORM_BUFFER={name:"UNIFORM_BUFFER",value:35345,description:" "},t.UNIFORM_BUFFER_BINDING={name:"UNIFORM_BUFFER_BINDING",value:35368,description:" "},t.UNIFORM_BUFFER_START={name:"UNIFORM_BUFFER_START",value:35369,description:" "},t.UNIFORM_BUFFER_SIZE={name:"UNIFORM_BUFFER_SIZE",value:35370,description:" "},t.MAX_VERTEX_UNIFORM_BLOCKS={name:"MAX_VERTEX_UNIFORM_BLOCKS",value:35371,description:" "},t.MAX_FRAGMENT_UNIFORM_BLOCKS={name:"MAX_FRAGMENT_UNIFORM_BLOCKS",value:35373,description:" "},t.MAX_COMBINED_UNIFORM_BLOCKS={name:"MAX_COMBINED_UNIFORM_BLOCKS",value:35374,description:" "},t.MAX_UNIFORM_BUFFER_BINDINGS={name:"MAX_UNIFORM_BUFFER_BINDINGS",value:35375,description:" "},t.MAX_UNIFORM_BLOCK_SIZE={name:"MAX_UNIFORM_BLOCK_SIZE",value:35376,description:" "},t.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS={name:"MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",value:35377,description:" "},t.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS={name:"MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",value:35379,description:" "},t.UNIFORM_BUFFER_OFFSET_ALIGNMENT={name:"UNIFORM_BUFFER_OFFSET_ALIGNMENT",value:35380,description:" "},t.ACTIVE_UNIFORM_BLOCKS={name:"ACTIVE_UNIFORM_BLOCKS",value:35382,description:" "},t.UNIFORM_TYPE={name:"UNIFORM_TYPE",value:35383,description:" "},t.UNIFORM_SIZE={name:"UNIFORM_SIZE",value:35384,description:" "},t.UNIFORM_BLOCK_INDEX={name:"UNIFORM_BLOCK_INDEX",value:35386,description:" "},t.UNIFORM_OFFSET={name:"UNIFORM_OFFSET",value:35387,description:" "},t.UNIFORM_ARRAY_STRIDE={name:"UNIFORM_ARRAY_STRIDE",value:35388,description:" "},t.UNIFORM_MATRIX_STRIDE={name:"UNIFORM_MATRIX_STRIDE",value:35389,description:" "},t.UNIFORM_IS_ROW_MAJOR={name:"UNIFORM_IS_ROW_MAJOR",value:35390,description:" "},t.UNIFORM_BLOCK_BINDING={name:"UNIFORM_BLOCK_BINDING",value:35391,description:" "},t.UNIFORM_BLOCK_DATA_SIZE={name:"UNIFORM_BLOCK_DATA_SIZE",value:35392,description:" "},t.UNIFORM_BLOCK_ACTIVE_UNIFORMS={name:"UNIFORM_BLOCK_ACTIVE_UNIFORMS",value:35394,description:" "},t.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES={name:"UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",value:35395,description:" "},t.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER={name:"UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",value:35396,description:" "},t.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER={name:"UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",value:35398,description:" "},t.OBJECT_TYPE={name:"OBJECT_TYPE",value:37138,description:" "},t.SYNC_CONDITION={name:"SYNC_CONDITION",value:37139,description:" "},t.SYNC_STATUS={name:"SYNC_STATUS",value:37140,description:" "},t.SYNC_FLAGS={name:"SYNC_FLAGS",value:37141,description:" "},t.SYNC_FENCE={name:"SYNC_FENCE",value:37142,description:" "},t.SYNC_GPU_COMMANDS_COMPLETE={name:"SYNC_GPU_COMMANDS_COMPLETE",value:37143,description:" "},t.UNSIGNALED={name:"UNSIGNALED",value:37144,description:" "},t.SIGNALED={name:"SIGNALED",value:37145,description:" "},t.ALREADY_SIGNALED={name:"ALREADY_SIGNALED",value:37146,description:" "},t.TIMEOUT_EXPIRED={name:"TIMEOUT_EXPIRED",value:37147,description:" "},t.CONDITION_SATISFIED={name:"CONDITION_SATISFIED",value:37148,description:" "},t.WAIT_FAILED={name:"WAIT_FAILED",value:37149,description:" "},t.SYNC_FLUSH_COMMANDS_BIT={name:"SYNC_FLUSH_COMMANDS_BIT",value:1,description:" "},t.COLOR={name:"COLOR",value:6144,description:" "},t.DEPTH={name:"DEPTH",value:6145,description:" "},t.STENCIL={name:"STENCIL",value:6146,description:" "},t.MIN={name:"MIN",value:32775,description:" "},t.MAX={name:"MAX",value:32776,description:" "},t.DEPTH_COMPONENT24={name:"DEPTH_COMPONENT24",value:33190,description:" "},t.STREAM_READ={name:"STREAM_READ",value:35041,description:" "},t.STREAM_COPY={name:"STREAM_COPY",value:35042,description:" "},t.STATIC_READ={name:"STATIC_READ",value:35045,description:" "},t.STATIC_COPY={name:"STATIC_COPY",value:35046,description:" "},t.DYNAMIC_READ={name:"DYNAMIC_READ",value:35049,description:" "},t.DYNAMIC_COPY={name:"DYNAMIC_COPY",value:35050,description:" "},t.DEPTH_COMPONENT32F={name:"DEPTH_COMPONENT32F",value:36012,description:" "},t.DEPTH32F_STENCIL8={name:"DEPTH32F_STENCIL8",value:36013,description:" "},t.INVALID_INDEX={name:"INVALID_INDEX",value:4294967295,description:" "},t.TIMEOUT_IGNORED={name:"TIMEOUT_IGNORED",value:-1,description:" "},t.MAX_CLIENT_WAIT_TIMEOUT_WEBGL={name:"MAX_CLIENT_WAIT_TIMEOUT_WEBGL",value:37447,description:" "},t.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE={name:"VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",value:35070,description:"Describes the frequency divisor used for instanced rendering.",extensionName:"ANGLE_instanced_arrays"},t.UNMASKED_VENDOR_WEBGL={name:"UNMASKED_VENDOR_WEBGL",value:37445,description:"Passed to getParameter to get the vendor string of the graphics driver.",extensionName:"ANGLE_instanced_arrays"},t.UNMASKED_RENDERER_WEBGL={name:"UNMASKED_RENDERER_WEBGL",value:37446,description:"Passed to getParameter to get the renderer string of the graphics driver.",extensionName:"WEBGL_debug_renderer_info"},t.MAX_TEXTURE_MAX_ANISOTROPY_EXT={name:"MAX_TEXTURE_MAX_ANISOTROPY_EXT",value:34047,description:"Returns the maximum available anisotropy.",extensionName:"EXT_texture_filter_anisotropic"},t.TEXTURE_MAX_ANISOTROPY_EXT={name:"TEXTURE_MAX_ANISOTROPY_EXT",value:34046,description:"Passed to texParameter to set the desired maximum anisotropy for a texture.",extensionName:"EXT_texture_filter_anisotropic"},t.COMPRESSED_RGB_S3TC_DXT1_EXT={name:"COMPRESSED_RGB_S3TC_DXT1_EXT",value:33776,description:"A DXT1-compressed image in an RGB image format.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT1_EXT={name:"COMPRESSED_RGBA_S3TC_DXT1_EXT",value:33777,description:"A DXT1-compressed image in an RGB image format with a simple on/off alpha value.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT3_EXT={name:"COMPRESSED_RGBA_S3TC_DXT3_EXT",value:33778,description:"A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT5_EXT={name:"COMPRESSED_RGBA_S3TC_DXT5_EXT",value:33779,description:"A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_R11_EAC={name:"COMPRESSED_R11_EAC",value:37488,description:"One-channel (red) unsigned format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SIGNED_R11_EAC={name:"COMPRESSED_SIGNED_R11_EAC",value:37489,description:"One-channel (red) signed format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RG11_EAC={name:"COMPRESSED_RG11_EAC",value:37490,description:"Two-channel (red and green) unsigned format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SIGNED_RG11_EAC={name:"COMPRESSED_SIGNED_RG11_EAC",value:37491,description:"Two-channel (red and green) signed format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB8_ETC2={name:"COMPRESSED_RGB8_ETC2",value:37492,description:"Compresses RBG8 data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGBA8_ETC2_EAC={name:"COMPRESSED_RGBA8_ETC2_EAC",value:37493,description:"Compresses RGBA8 data. The RGB part is encoded the same as RGB_ETC2, but the alpha part is encoded separately.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_ETC2={name:"COMPRESSED_SRGB8_ETC2",value:37494,description:"Compresses sRBG8 data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC={name:"COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",value:37495,description:"Compresses sRGBA8 data. The sRGB part is encoded the same as SRGB_ETC2, but the alpha part is encoded separately.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2={name:"COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",value:37496,description:"Similar to RGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2={name:"COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",value:37497,description:"Similar to SRGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG={name:"COMPRESSED_RGB_PVRTC_4BPPV1_IMG",value:35840,description:"RGB compression in 4-bit mode. One block for each 4×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG={name:"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",value:35842,description:"RGBA compression in 4-bit mode. One block for each 4×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG={name:"COMPRESSED_RGB_PVRTC_2BPPV1_IMG",value:35841,description:"RGB compression in 2-bit mode. One block for each 8×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG={name:"COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",value:35843,description:"RGBA compression in 2-bit mode. One block for each 8×4 pixe",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGB_ETC1_WEBGL={name:"COMPRESSED_RGB_ETC1_WEBGL",value:36196,description:"Compresses 24-bit RGB data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc1"},t.COMPRESSED_RGB_ATC_WEBGL={name:"COMPRESSED_RGB_ATC_WEBGL",value:35986,description:"Compresses RGB textures with no alpha channel.",extensionName:"WEBGL_compressed_texture_atc"},t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL={name:"COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",value:35986,description:"Compresses RGBA textures using explicit alpha encoding (useful when alpha transitions are sharp).",extensionName:"WEBGL_compressed_texture_atc"},t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL={name:"COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",value:34798,description:"Compresses RGBA textures using interpolated alpha encoding (useful when alpha transitions are gradient).",extensionName:"WEBGL_compressed_texture_atc"},t.UNSIGNED_INT_24_8_WEBGL={name:"UNSIGNED_INT_24_8_WEBGL",value:34042,description:"Unsigned integer type for 24-bit depth texture data.",extensionName:"WEBGL_depth_texture"},t.HALF_FLOAT_OES={name:"HALF_FLOAT_OES",value:36193,description:"Half floating-point type (16-bit).",extensionName:"OES_texture_half_float"},t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT={name:"FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",value:33297,description:" ",extensionName:"WEBGL_color_buffer_float"},t.UNSIGNED_NORMALIZED_EXT={name:"UNSIGNED_NORMALIZED_EXT",value:35863,description:" ",extensionName:"WEBGL_color_buffer_float"},t.MIN_EXT={name:"MIN_EXT",value:32775,description:"Produces the minimum color components of the source and destination colors.",extensionName:"EXT_blend_minmax"},t.MAX_EXT={name:"MAX_EXT",value:32776,description:"Produces the maximum color components of the source and destination colors.",extensionName:"EXT_blend_minmax"},t.SRGB_EXT={name:"SRGB_EXT",value:35904,description:"Unsized sRGB format that leaves the precision up to the driver.",extensionName:"EXT_sRGB"},t.SRGB_ALPHA_EXT={name:"SRGB_ALPHA_EXT",value:35906,description:"Unsized sRGB format with unsized alpha component.",extensionName:"EXT_sRGB"},t.SRGB8_ALPHA8_EXT={name:"SRGB8_ALPHA8_EXT",value:35907,description:"Sized (8-bit) sRGB and alpha formats.",extensionName:"EXT_sRGB"},t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT={name:"FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",value:33296,description:"Returns the framebuffer color encoding.",extensionName:"EXT_sRGB"},t.FRAGMENT_SHADER_DERIVATIVE_HINT_OES={name:"FRAGMENT_SHADER_DERIVATIVE_HINT_OES",value:35723,description:"Indicates the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth.",extensionName:"OES_standard_derivatives"},t.COLOR_ATTACHMENT0_WEBGL={name:"COLOR_ATTACHMENT0_WEBGL",value:36064,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT1_WEBGL={name:"COLOR_ATTACHMENT1_WEBGL",value:36065,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT2_WEBGL={name:"COLOR_ATTACHMENT2_WEBGL",value:36066,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT3_WEBGL={name:"COLOR_ATTACHMENT3_WEBGL",value:36067,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT4_WEBGL={name:"COLOR_ATTACHMENT4_WEBGL",value:36068,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT5_WEBGL={name:"COLOR_ATTACHMENT5_WEBGL",value:36069,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT6_WEBGL={name:"COLOR_ATTACHMENT6_WEBGL",value:36070,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT7_WEBGL={name:"COLOR_ATTACHMENT7_WEBGL",value:36071,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT8_WEBGL={name:"COLOR_ATTACHMENT8_WEBGL",value:36072,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT9_WEBGL={name:"COLOR_ATTACHMENT9_WEBGL",value:36073,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT10_WEBGL={name:"COLOR_ATTACHMENT10_WEBGL",value:36074,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT11_WEBGL={name:"COLOR_ATTACHMENT11_WEBGL",value:36075,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT12_WEBGL={name:"COLOR_ATTACHMENT12_WEBGL",value:36076,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT13_WEBGL={name:"COLOR_ATTACHMENT13_WEBGL",value:36077,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT14_WEBGL={name:"COLOR_ATTACHMENT14_WEBGL",value:36078,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT15_WEBGL={name:"COLOR_ATTACHMENT15_WEBGL",value:36079,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER0_WEBGL={name:"DRAW_BUFFER0_WEBGL",value:34853,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER1_WEBGL={name:"DRAW_BUFFER1_WEBGL",value:34854,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER2_WEBGL={name:"DRAW_BUFFER2_WEBGL",value:34855,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER3_WEBGL={name:"DRAW_BUFFER3_WEBGL",value:34856,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER4_WEBGL={name:"DRAW_BUFFER4_WEBGL",value:34857,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER5_WEBGL={name:"DRAW_BUFFER5_WEBGL",value:34858,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER6_WEBGL={name:"DRAW_BUFFER6_WEBGL",value:34859,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER7_WEBGL={name:"DRAW_BUFFER7_WEBGL",value:34860,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER8_WEBGL={name:"DRAW_BUFFER8_WEBGL",value:34861,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER9_WEBGL={name:"DRAW_BUFFER9_WEBGL",value:34862,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER10_WEBGL={name:"DRAW_BUFFER10_WEBGL",value:34863,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER11_WEBGL={name:"DRAW_BUFFER11_WEBGL",value:34864,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER12_WEBGL={name:"DRAW_BUFFER12_WEBGL",value:34865,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER13_WEBGL={name:"DRAW_BUFFER13_WEBGL",value:34866,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER14_WEBGL={name:"DRAW_BUFFER14_WEBGL",value:34867,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER15_WEBGL={name:"DRAW_BUFFER15_WEBGL",value:34868,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.MAX_COLOR_ATTACHMENTS_WEBGL={name:"MAX_COLOR_ATTACHMENTS_WEBGL",value:36063,description:"Maximum number of framebuffer color attachment points",extensionName:"WEBGL_draw_buffers"},t.MAX_DRAW_BUFFERS_WEBGL={name:"MAX_DRAW_BUFFERS_WEBGL",value:34852,description:"Maximum number of draw buffers",extensionName:"WEBGL_draw_buffers"},t.VERTEX_ARRAY_BINDING_OES={name:"VERTEX_ARRAY_BINDING_OES",value:34229,description:"The bound vertex array object (VAO).",extensionName:"VERTEX_ARRAY_BINDING_OES"},t.QUERY_COUNTER_BITS_EXT={name:"QUERY_COUNTER_BITS_EXT",value:34916,description:"The number of bits used to hold the query result for the given target.",extensionName:"EXT_disjoint_timer_query"},t.CURRENT_QUERY_EXT={name:"CURRENT_QUERY_EXT",value:34917,description:"The currently active query.",extensionName:"EXT_disjoint_timer_query"},t.QUERY_RESULT_EXT={name:"QUERY_RESULT_EXT",value:34918,description:"The query result.",extensionName:"EXT_disjoint_timer_query"},t.QUERY_RESULT_AVAILABLE_EXT={name:"QUERY_RESULT_AVAILABLE_EXT",value:34919,description:"A Boolean indicating whether or not a query result is available.",extensionName:"EXT_disjoint_timer_query"},t.TIME_ELAPSED_EXT={name:"TIME_ELAPSED_EXT",value:35007,description:"Elapsed time (in nanoseconds).",extensionName:"EXT_disjoint_timer_query"},t.TIMESTAMP_EXT={name:"TIMESTAMP_EXT",value:36392,description:"The current time.",extensionName:"EXT_disjoint_timer_query"},t.GPU_DISJOINT_EXT={name:"GPU_DISJOINT_EXT",value:36795,description:"A Boolean indicating whether or not the GPU performed any disjoint operation.",extensionName:"EXT_disjoint_timer_query"},t.zeroMeaningByCommand={getError:"NO_ERROR",blendFunc:"ZERO",blendFuncSeparate:"ZERO",readBuffer:"NONE",getFramebufferAttachmentParameter:"NONE",texParameterf:"NONE",texParameteri:"NONE",drawArrays:"POINTS",drawElements:"POINTS",drawArraysInstanced:"POINTS",drawArraysInstancedAngle:"POINTS",drawBuffers:"POINTS",drawElementsInstanced:"POINTS",drawRangeElements:"POINTS"},t.oneMeaningByCommand={blendFunc:"ONE",blendFuncSeparate:"ONE",drawArrays:"LINES",drawElements:"LINES",drawArraysInstanced:"LINES",drawArraysInstancedAngle:"LINES",drawBuffers:"LINES",drawElementsInstanced:"LINES",drawRangeElements:"LINES"},t}();e.WebGlConstants=t}(r||(r={})),function(e){e.WebGlConstantsByName={},function(){for(var t in e.WebGlConstants)if(e.WebGlConstants.hasOwnProperty(t)){var n=e.WebGlConstants[t];e.WebGlConstantsByName[n.name]=n}}()}(r||(r={})),function(e){e.WebGlConstantsByValue={},function(){for(var t in e.WebGlConstants)if(e.WebGlConstants.hasOwnProperty(t)){var n=e.WebGlConstants[t];e.WebGlConstantsByValue[n.value]=n}}()}(r||(r={})),function(e){!function(e){var t="__CommandName";e.command=function(e){return function(n){n[t]=e}},e.getCommandName=function(e){return e[t]};var n="__StateName";e.state=function(e){return function(t){t[n]=e}},e.getStateName=function(e){return e[n]};var i="___RecorderObjectName";e.recorder=function(e){return function(t){t[i]=e}},e.getRecorderName=function(e){return e[i]},e.OBJECTNAMEKEY="___ObjectName",e.OBJECTTYPEKEY="___ObjectType",e.webGlObject=function(t){return function(n){n[e.OBJECTNAMEKEY]=t,n[e.OBJECTTYPEKEY]=window[t]||null}},e.getWebGlObjectName=function(t){return t[e.OBJECTNAMEKEY]},e.getWebGlObjectType=function(t){return t[e.OBJECTTYPEKEY]};var r="___AnalyserObjectName";e.analyser=function(e){return function(t){t[r]=e}},e.getAnalyserName=function(e){return e[r]}}(e.Decorators||(e.Decorators={}))}(r||(r={})),function(e){var t=function(){function t(){}return t.isSupportedCombination=function(t,n,i){return t=t||e.WebGlConstants.UNSIGNED_BYTE.value,((n=n||e.WebGlConstants.RGBA.value)===e.WebGlConstants.RGB.value||n===e.WebGlConstants.RGBA.value)&&((i===e.WebGlConstants.RGB.value||i===e.WebGlConstants.RGBA.value||i===e.WebGlConstants.RGBA8.value||i===e.WebGlConstants.RGBA16F.value||i===e.WebGlConstants.RGBA32F.value||i===e.WebGlConstants.RGB16F.value||i===e.WebGlConstants.RGB32F.value||i===e.WebGlConstants.R11F_G11F_B10F.value)&&this.isSupportedComponentType(t))},t.readPixels=function(t,n,i,r,o,s){t.getError();var a,l=r*o*4;if(s===e.WebGlConstants.UNSIGNED_BYTE.value?a=new Uint8Array(l):(s=e.WebGlConstants.FLOAT.value,a=new Float32Array(l)),t.readPixels(n,i,r,o,t.RGBA,s,a),!t.getError()){if(s===e.WebGlConstants.UNSIGNED_BYTE.value)return a;for(var c=new Uint8Array(r*o*4),u=0;u<o;u++)for(var h=0;h<r;h++)c[u*r*4+4*h+0]=255*Math.min(Math.max(a[u*r*4+4*h+0],0),1),c[u*r*4+4*h+1]=255*Math.min(Math.max(a[u*r*4+4*h+1],0),1),c[u*r*4+4*h+2]=255*Math.min(Math.max(a[u*r*4+4*h+2],0),1),c[u*r*4+4*h+3]=255*Math.min(Math.max(a[u*r*4+4*h+3],0),1);return c}},t.isSupportedComponentType=function(t){return t===e.WebGlConstants.UNSIGNED_BYTE.value||t===e.WebGlConstants.UNSIGNED_SHORT_4_4_4_4.value||t===e.WebGlConstants.UNSIGNED_SHORT_5_5_5_1.value||t===e.WebGlConstants.UNSIGNED_SHORT_5_6_5.value||t===e.WebGlConstants.HALF_FLOAT.value||t===e.WebGlConstants.HALF_FLOAT_OES.value||t===e.WebGlConstants.FLOAT.value},t}();e.ReadPixelsHelper=t}(r||(r={})),function(e){var t=function(){function e(){}return e.storeOriginFunction=function(e,t){if(e&&e[t]){var n=this.getOriginFunctionName(t);e[n]||(e[n]=e[t])}},e.storePrototypeOriginFunction=function(e,t){if(e&&e.prototype[t]){var n=this.getOriginFunctionName(t);e.prototype[n]||(e.prototype[n]=e.prototype[t])}},e.executePrototypeOriginFunction=function(e,t,n,i){if(e){var r=this.getOriginFunctionName(n);if(t.prototype[r])return e[r]||(e[r]=t.prototype[r]),this.executeFunction(e,r,i)}},e.executeOriginFunction=function(e,t,n){if(e){var i=this.getOriginFunctionName(t);if(e[i])return this.executeFunction(e,i,n)}},e.executeFunction=function(e,t,n){var i=n;if(void 0===i||0===i.length)return e[t]();switch(i.length){case 1:return e[t](i[0]);case 2:return e[t](i[0],i[1]);case 3:return e[t](i[0],i[1],i[2]);case 4:return e[t](i[0],i[1],i[2],i[3]);case 5:return e[t](i[0],i[1],i[2],i[3],i[4]);case 6:return e[t](i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);case 11:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10]);case 12:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11]);case 13:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12]);case 14:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13]);case 15:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14]);case 16:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]);case 17:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15],i[16]);case 18:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15],i[16],i[17]);case 19:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15],i[16],i[17],i[18]);case 20:return e[t](i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15],i[16],i[17],i[18],i[19]);default:return e[t].apply(e,i)}},e.getOriginFunctionName=function(e){return this.originFunctionPrefix+e},e.originFunctionPrefix="__SPECTOR_Origin_",e}();e.OriginFunctionHelper=t}(r||(r={})),function(e){var t=function(){function e(){}return e.isBuildableProgram=function(e){return!!e&&!!e[this.rebuildProgramFunctionName]},e.rebuildProgram=function(e,t,n,i,r){this.isBuildableProgram(e)&&e[this.rebuildProgramFunctionName](t,n,i,r)},e.rebuildProgramFunctionName="__SPECTOR_rebuildProgram",e}();e.ProgramRecompilerHelper=t}(r||(r={})),function(e){!function(t){var n=function(){function t(e,n){this.options=e,this.logger=n,this.spiedWindow=e.spiedWindow||window,this.lastFrame=0,this.speedRatio=1,this.willPlayNextFrame=!1,this.onFrameStart=new e.eventConstructor,this.onFrameEnd=new e.eventConstructor,this.onError=new e.eventConstructor,this.time=new this.options.timeConstructor,this.lastSixtyFramesDuration=[],this.lastSixtyFramesCurrentIndex=0,this.lastSixtyFramesPreviousStart=0;for(var i=0;i<t.fpsWindowSize;i++)this.lastSixtyFramesDuration[i]=0;this.init()}return t.prototype.playNextFrame=function(){this.willPlayNextFrame=!0},t.prototype.changeSpeedRatio=function(e){this.speedRatio=e},t.prototype.getFps=function(){for(var e=0,n=0;n<t.fpsWindowSize;n++)e+=this.lastSixtyFramesDuration[n];return 0===e?0:6e4/e},t.prototype.init=function(){for(var e=this,n=0,i=t.requestAnimationFrameFunctions;n<i.length;n++){var r=i[n];this.spyRequestAnimationFrame(r,this.spiedWindow)}for(var o=0,s=t.setTimerFunctions;o<s.length;o++){r=s[o];this.spySetTimer(r)}this.spiedWindow.VRDisplay&&this.spiedWindow.addEventListener("vrdisplaypresentchange",function(t){e.spyRequestAnimationFrame("requestAnimationFrame",t.display)})},t.prototype.spyRequestAnimationFrame=function(t,n){var i=this;e.OriginFunctionHelper.storeOriginFunction(n,t),n[t]=function(){var r=arguments[0],o=i.getCallback(i,r,function(){i.spiedWindow[t](r)});return e.OriginFunctionHelper.executeOriginFunction(n,t,[o])}},t.prototype.spySetTimer=function(n){var i=this,r=this.spiedWindow,o="setTimeout"===n;e.OriginFunctionHelper.storeOriginFunction(r,n),r[n]=function(){var s=arguments[0],a=arguments[1],l=Array.prototype.slice.call(arguments);return t.setTimerCommonValues.indexOf(a)>-1&&(l[0]=i.getCallback(i,s,o?function(){r[n](s)}:null)),e.OriginFunctionHelper.executeOriginFunction(r,n,l)}},t.prototype.getCallback=function(e,n,i){return void 0===i&&(i=null),function(){var r=e.time.now;if(e.lastFrame=++e.lastFrame%e.speedRatio,e.willPlayNextFrame||e.speedRatio&&!e.lastFrame){e.onFrameStart.trigger(e);try{n.apply(e.spiedWindow,arguments)}catch(t){e.onError.trigger(t)}e.lastSixtyFramesCurrentIndex=(e.lastSixtyFramesCurrentIndex+1)%t.fpsWindowSize,e.lastSixtyFramesDuration[e.lastSixtyFramesCurrentIndex]=r-e.lastSixtyFramesPreviousStart,e.onFrameEnd.trigger(e),e.willPlayNextFrame=!1}else i&&i();e.lastSixtyFramesPreviousStart=r}},t.requestAnimationFrameFunctions=["requestAnimationFrame","msRequestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame"],t.setTimerFunctions=["setTimeout","setInterval"],t.setTimerCommonValues=[0,15,16,33,32,40],t.fpsWindowSize=60,t}();t.TimeSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t){this.options=e,this.logger=t,this.onContextRequested=new e.eventConstructor,this.canvas=e.canvas,this.init()}return t.prototype.init=function(){var t=this,n=function(){var n=t.canvas?e.OriginFunctionHelper.executeOriginFunction(this,"getContext",arguments):e.OriginFunctionHelper.executePrototypeOriginFunction(this,HTMLCanvasElement,"getContext",arguments);if(arguments.length>0&&"2d"===arguments[0])return n;if(n){var i=Array.prototype.slice.call(arguments),r="webgl2"===i[0]||"experimental-webgl2"===i[0]?2:1;t.onContextRequested.trigger({context:n,contextVersion:r})}return n};this.canvas?(e.OriginFunctionHelper.storeOriginFunction(this.canvas,"getContext"),this.canvas.getContext=n):(e.OriginFunctionHelper.storePrototypeOriginFunction(HTMLCanvasElement,"getContext"),HTMLCanvasElement.prototype.getContext=n)},t}();t.CanvasSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t,n){this.options=e,this.time=t,this.logger=n,this.commandId=0,this.context=e.context,this.version=e.version,this.onMaxCommand=new e.injection.EventCtor,this.capturing=!1,this.globalCapturing=!0,this.injection=e.injection,this.contextInformation={context:this.context,contextVersion:this.version,toggleCapture:this.toggleGlobalCapturing.bind(this),tagWebGlObject:this.tagWebGlObject.bind(this),extensions:{}},this.commandSpies={},this.stateSpy=new this.injection.StateSpyCtor({contextInformation:this.contextInformation,stateNamespace:this.injection.StateNamespace},n),this.recorderSpy=new this.injection.RecorderSpyCtor({contextInformation:this.contextInformation,recorderNamespace:this.injection.RecorderNamespace,timeConstructor:this.injection.TimeCtor},n),this.webGlObjectSpy=new this.injection.WebGlObjectSpyCtor({contextInformation:this.contextInformation,webGlObjectNamespace:this.injection.WebGlObjectNamespace},n),this.analyser=new this.injection.CaptureAnalyserCtor({contextInformation:this.contextInformation,analyserNamespace:this.injection.AnalyserNamespace},n),this.initStaticCapture(),e.recordAlways&&this.spy()}return t.prototype.spy=function(){this.spyContext(this.context);var e=this.contextInformation.extensions;for(var t in e)e.hasOwnProperty(t)&&this.spyContext(e[t])},t.prototype.unSpy=function(){for(var e in this.commandSpies)this.commandSpies.hasOwnProperty(e)&&this.commandSpies[e].unSpy()},t.prototype.startCapture=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.time.now;this.maxCommands=e,this.options.recordAlways||this.spy(),this.capturing=!0,this.commandId=0,this.currentCapture={canvas:this.canvasCapture,context:this.contextCapture,commands:[],initState:{},endState:{},startTime:n,listenCommandsStartTime:0,listenCommandsEndTime:0,endTime:0,analyses:[],frameMemory:{},memory:{}},this.currentCapture.canvas.width=this.context.canvas.width,this.currentCapture.canvas.height=this.context.canvas.height,this.currentCapture.canvas.clientWidth=this.context.canvas.clientWidth,this.currentCapture.canvas.clientHeight=this.context.canvas.clientHeight,this.stateSpy.startCapture(this.currentCapture,t),this.recorderSpy.startCapture(),this.currentCapture.listenCommandsStartTime=this.time.now},t.prototype.stopCapture=function(){var e=this.time.now;return this.options.recordAlways||this.unSpy(),this.capturing=!1,this.stateSpy.stopCapture(this.currentCapture),this.recorderSpy.stopCapture(),this.currentCapture.listenCommandsEndTime=e,this.currentCapture.endTime=this.time.now,this.recorderSpy.appendRecordedInformation(this.currentCapture),this.analyser.appendAnalyses(this.currentCapture),this.currentCapture},t.prototype.isCapturing=function(){return this.globalCapturing&&this.capturing},t.prototype.setMarker=function(e){this.marker=e},t.prototype.clearMarker=function(){this.marker=null},t.prototype.getNextCommandCaptureId=function(){return this.commandId++},t.prototype.onCommand=function(e,t){if(this.globalCapturing&&(this.webGlObjectSpy.tagWebGlObjects(t),this.recorderSpy.recordCommand(t),this.isCapturing())){var n=e.createCapture(t,this.getNextCommandCaptureId(),this.marker);this.stateSpy.captureState(n),this.currentCapture.commands.push(n),n.endTime=this.time.now,this.maxCommands>0&&this.currentCapture.commands.length===this.maxCommands&&this.onMaxCommand.trigger(this)}},t.prototype.spyContext=function(e){var n=[];for(var i in e)i&&n.push(i);for(var r=0;r<n.length;r++){i=n[r];if(!~t.unSpyableMembers.indexOf(i))try{"number"!=typeof e[i]&&this.spyFunction(i,e)}catch(e){this.logger.error("Cant Spy member: "+i),this.logger.error(e)}}},t.prototype.initStaticCapture=function(){var e=new this.injection.ExtensionsCtor(this.contextInformation,this.logger),t=e.getExtensions();for(var n in t)t.hasOwnProperty(n)&&(this.contextInformation.extensions[n]=t[n]);var i=new this.injection.CapabilitiesCtor(this.contextInformation,this.logger),r=new this.injection.CompressedTexturesCtor(this.contextInformation,this.logger);this.contextCapture={version:this.version,contextAttributes:this.context.getContextAttributes(),capabilities:i.getStateData(),extensions:e.getStateData(),compressedTextures:r.getStateData()},this.canvasCapture={width:this.context.canvas.width,height:this.context.canvas.height,clientWidth:this.context.canvas.clientWidth,clientHeight:this.context.canvas.clientHeight,browserAgent:navigator?navigator.userAgent:""}},t.prototype.spyFunction=function(t,n){if(0!==t.indexOf("__SPECTOR_Origin_")){if(!this.commandSpies[t]){var i=e.merge(this.contextInformation,{spiedCommandName:t,spiedCommandRunningContext:n,callback:this.onCommand.bind(this),commandNamespace:this.injection.CommandNamespace,stackTraceCtor:this.injection.StackTraceCtor,defaultCommandCtor:this.injection.DefaultCommandCtor});this.commandSpies[t]=new this.injection.CommandSpyCtor(i,this.time,this.logger)}this.commandSpies[t].spy()}},t.prototype.toggleGlobalCapturing=function(e){this.globalCapturing=e},t.prototype.tagWebGlObject=function(e){return this.webGlObjectSpy.tagWebGlObject(e)},t.unSpyableMembers=["canvas","drawingBufferWidth","drawingBufferHeight","glp"],t}();t.ContextSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(t,n,i){this.time=n,this.logger=i,this.stackTrace=new t.stackTraceCtor,this.spiedCommandName=t.spiedCommandName,this.spiedCommandRunningContext=t.spiedCommandRunningContext,this.spiedCommand=this.spiedCommandRunningContext[this.spiedCommandName],e.OriginFunctionHelper.storeOriginFunction(this.spiedCommandRunningContext,this.spiedCommandName),this.callback=t.callback,this.commandOptions={context:t.context,contextVersion:t.contextVersion,extensions:t.extensions,toggleCapture:t.toggleCapture,spiedCommandName:t.spiedCommandName},this.initCustomCommands(t.commandNamespace),this.initCommand(t.defaultCommandCtor)}return t.prototype.spy=function(){this.spiedCommandRunningContext[this.spiedCommandName]=this.overloadedCommand},t.prototype.unSpy=function(){this.spiedCommandRunningContext[this.spiedCommandName]=this.spiedCommand},t.prototype.createCapture=function(e,t,n){return this.command.createCapture(e,t,n)},t.prototype.initCustomCommands=function(n){if(!t.customCommandsConstructors)for(var i in t.customCommandsConstructors={},n)if(n.hasOwnProperty(i)){var r=n[i],o=e.Decorators.getCommandName(r);o&&(t.customCommandsConstructors[o]=r)}},t.prototype.initCommand=function(e){t.customCommandsConstructors[this.spiedCommandName]?this.command=new t.customCommandsConstructors[this.spiedCommandName](this.commandOptions,this.stackTrace,this.logger):this.command=new e(this.commandOptions,this.stackTrace,this.logger),this.overloadedCommand=this.getSpy()},t.prototype.getSpy=function(){var t=this;return function(){var n=t.time.now,i=e.OriginFunctionHelper.executeOriginFunction(t.spiedCommandRunningContext,t.spiedCommandName,arguments),r=t.time.now,o={name:t.spiedCommandName,arguments:arguments,result:i,startTime:n,endTime:r};return t.callback(t,o),i}},t}();t.CommandSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t,n){this.options=e,this.stackTrace=t,this.logger=n,this.spiedCommandName=e.spiedCommandName}return t.prototype.createCapture=function(e,t,n){var i=this.stackTrace.getStackTrace(4,1),r=0===e.name.indexOf("uniform")?this.stringifyUniform(e.arguments):this.stringify(e.arguments,e.result),o={id:t,startTime:e.startTime,commandEndTime:e.endTime,endTime:0,name:e.name,commandArguments:e.arguments,result:e.result,stackTrace:i,status:0,marker:n,text:r};this.transformCapture(o);for(var s=0;s<o.commandArguments.length;s++){var a=o.commandArguments[s];a&&a.length&&a.length>50&&(o.commandArguments[s]="Array Length: "+a.length)}if(o.commandArguments){var l=[];for(s=0;s<o.commandArguments.length;s++){var c=o.commandArguments[s];void 0===c?l.push(void 0):null===c?l.push(null):l.push(JSON.parse(this.stringifyJSON(c)))}o.commandArguments=l}return o.result&&(o.result=JSON.parse(this.stringifyJSON(o.result))),o},t.prototype.stringifyJSON=function(e){try{return JSON.stringify(e)}catch(e){return null}},t.prototype.transformCapture=function(e){},t.prototype.stringify=function(e,t){var n=this.options.spiedCommandName;return e&&e.length>0&&(n+=": "+this.stringifyArgs(e).join(", ")),t&&(n+=" -> "+this.stringifyResult(t)),n},t.prototype.stringifyUniform=function(e){var t=this.options.spiedCommandName;if(e&&e.length>0){var n=[];n.push(this.stringifyValue(e[0]));for(var i=1;i<e.length;i++)if("number"==typeof e[i]){var r=e[i]+"";n.push(r)}else{r=this.stringifyValue(e[i]);n.push(r)}t+=": "+n.join(", ")}return t},t.prototype.stringifyArgs=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.stringifyValue(i);t.push(r)}return t},t.prototype.stringifyResult=function(e){if(e)return this.stringifyValue(e)},t.prototype.stringifyValue=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var n=e.WebGlObjects.getWebGlObjectTag(t);return n?n.displayText:"number"==typeof t&&e.WebGlConstants.isWebGlConstant(t)?e.WebGlConstants.stringifyWebGlConstant(t,this.spiedCommandName):"string"==typeof t?t:t instanceof HTMLImageElement?t.src:t instanceof ArrayBuffer?"[--("+t.byteLength+")--]":t.length?"[..("+t.length+")..]":t},t}();t.BaseCommand=n}(e.Commands||(e.Commands={}))}(r||(r={}));var n=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(e){!function(e){var t=["lineWidth"],i=function(e){function i(n,i,r){var o=e.call(this,n,i,r)||this;return o.isDeprecated=t.indexOf(o.spiedCommandName)>-1,o}return n(i,e),i.prototype.transformCapture=function(e){this.isDeprecated&&(e.status=50)},i}(e.BaseCommand);e.DefaultCommand=i}(e.Commands||(e.Commands={}))}(r||(r={}));var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};!function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return(t[0]&e.WebGlConstants.DEPTH_BUFFER_BIT.value)===e.WebGlConstants.DEPTH_BUFFER_BIT.value&&n.push(e.WebGlConstants.DEPTH_BUFFER_BIT.name),(t[0]&e.WebGlConstants.STENCIL_BUFFER_BIT.value)===e.WebGlConstants.STENCIL_BUFFER_BIT.value&&n.push(e.WebGlConstants.STENCIL_BUFFER_BIT.name),(t[0]&e.WebGlConstants.COLOR_BUFFER_BIT.value)===e.WebGlConstants.COLOR_BUFFER_BIT.value&&n.push(e.WebGlConstants.COLOR_BUFFER_BIT.name),n},r=i([e.Decorators.command("clear")],r)}(t.BaseCommand);t.Clear=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[],i=this.options.context.getParameter(e.WebGlConstants.READ_FRAMEBUFFER_BINDING.value),r=this.options.tagWebGlObject(i);n.push("READ FROM: "+this.stringifyValue(r));var o=this.options.context.getParameter(e.WebGlConstants.DRAW_FRAMEBUFFER_BINDING.value),s=this.options.tagWebGlObject(o);n.push("WRITE TO: "+this.stringifyValue(s));for(var a=0;a<8;a++)n.push(t[a]);return(t[8]&e.WebGlConstants.DEPTH_BUFFER_BIT.value)===e.WebGlConstants.DEPTH_BUFFER_BIT.value&&n.push(e.WebGlConstants.DEPTH_BUFFER_BIT.name),(t[8]&e.WebGlConstants.STENCIL_BUFFER_BIT.value)===e.WebGlConstants.STENCIL_BUFFER_BIT.value&&n.push(e.WebGlConstants.STENCIL_BUFFER_BIT.name),(t[8]&e.WebGlConstants.COLOR_BUFFER_BIT.value)===e.WebGlConstants.COLOR_BUFFER_BIT.value&&n.push(e.WebGlConstants.COLOR_BUFFER_BIT.name),n.push(e.WebGlConstants.stringifyWebGlConstant(t[9],"blitFrameBuffer")),n},r=i([e.Decorators.command("blitFrameBuffer")],r)}(t.BaseCommand);t.BlitFrameBuffer=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(t[0]),n.push(t[1]),n.push(e.WebGlConstants.stringifyWebGlConstant(t[2],"vertexAttribPointer")),n.push(t[3]),n.push(t[4]),n.push(t[5]),n},r=i([e.Decorators.command("vertexAttribPointer")],r)}(t.BaseCommand);t.VertexAttribPointer=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(e){if(e)return"name: "+e.name+", size: "+e.size+", type: "+e.type},r=i([e.Decorators.command("getActiveAttrib")],r)}(t.BaseCommand);t.GetActiveAttrib=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(e){if(e)return"name: "+e.name+", size: "+e.size+", type: "+e.type},r=i([e.Decorators.command("getActiveUniform")],r)}(t.BaseCommand);t.GetActiveUniform=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(e){if(e)return"name: "+e.name+", size: "+e.size+", type: "+e.type},r=i([e.Decorators.command("getTransformFeedbackVarying")],r)}(t.BaseCommand);t.GetTransformFeedbackVarying=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(e){return e?"true":"false"},r=i([e.Decorators.command("getExtension")],r)}(t.BaseCommand);t.GetExtension=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(e){if(e)return"min: "+e.rangeMin+", max: "+e.rangeMax+", precision: "+e.precision},r=i([e.Decorators.command("getShaderPrecisionFormat")],r)}(t.BaseCommand);t.GetShaderPrecisionFormat=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyResult=function(t){if(!t)return"null";var n=e.WebGlObjects.getWebGlObjectTag(t);return n?n.displayText:t},r=i([e.Decorators.command("getParameter")],r)}(t.BaseCommand);t.GetParameter=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawArrays")),n.push(t[1]),n.push(t[2]),n},r=i([e.Decorators.command("drawArrays")],r)}(t.BaseCommand);t.DrawArrays=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawArraysInstanced")),n.push(t[1]),n.push(t[2]),n.push(t[3]),n},r=i([e.Decorators.command("drawArraysInstanced")],r)}(t.BaseCommand);t.DrawArraysInstanced=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawArraysInstancedANGLE")),n.push(t[1]),n.push(t[2]),n.push(t[3]),n},r=i([e.Decorators.command("drawArraysInstancedANGLE")],r)}(t.BaseCommand);t.DrawArraysInstancedAngle=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){for(var n=[],i=0;i<t.length;i++)n.push(e.WebGlConstants.stringifyWebGlConstant(t[i],"drawBuffers"));return n},r=i([e.Decorators.command("drawBuffers")],r)}(t.BaseCommand);t.DrawBuffers=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawElements")),n.push(t[1]),n.push(e.WebGlConstants.stringifyWebGlConstant(t[2],"drawElements")),n.push(t[3]),n},r=i([e.Decorators.command("drawElements")],r)}(t.BaseCommand);t.DrawElements=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawElementsInstanced")),n.push(t[1]),n.push(e.WebGlConstants.stringifyWebGlConstant(t[2],"drawElementsInstanced")),n.push(t[3]),n.push(t[4]),n},r=i([e.Decorators.command("drawElementsInstanced")],r)}(t.BaseCommand);t.DrawElementsInstanced=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawElementsInstancedANGLE")),n.push(t[1]),n.push(e.WebGlConstants.stringifyWebGlConstant(t[2],"drawElementsInstancedANGLE")),n.push(t[3]),n.push(t[4]),n},r=i([e.Decorators.command("drawElementsInstancedANGLE")],r)}(t.BaseCommand);t.DrawElementsInstancedAngle=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(t){var n=[];return n.push(e.WebGlConstants.stringifyWebGlConstant(t[0],"drawRangeElements")),n.push(t[1]),n.push(t[2]),n.push(t[3]),n.push(e.WebGlConstants.stringifyWebGlConstant(t[4],"drawRangeElements")),n.push(t[5]),n},r=i([e.Decorators.command("drawRangeElements")],r)}(t.BaseCommand);t.DrawRangeElements=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(e){for(var t=[],n=0;n<4;n++)t.push(e[n].toFixed(0));return t},r=i([e.Decorators.command("scissor")],r)}(t.BaseCommand);t.Scissor=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(e){for(var t=[],n=0;n<4;n++)t.push(e[n].toFixed(0));return t},r=i([e.Decorators.command("viewport")],r)}(t.BaseCommand);t.Viewport=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(e){var t=[];return t.push(e[0]),t},r=i([e.Decorators.command("disableVertexAttribArray")],r)}(t.BaseCommand);t.DisableVertexAttribArray=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.stringifyArgs=function(e){var t=[];return t.push(e[0]),t},r=i([e.Decorators.command("enableVertexAttribArray")],r)}(t.BaseCommand);t.EnableVertexAttribArray=r}(e.Commands||(e.Commands={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,n){this.options=e,this.logger=n,this.objectName=e.objectName,this.createCommandNames=this.getCreateCommandNames(),this.updateCommandNames=this.getUpdateCommandNames(),this.deleteCommandNames=this.getDeleteCommandNames(),this.startTime=this.options.time.now,this.memoryPerSecond={},this.totalMemory=0,this.frameMemory=0,this.capturing=!1,t.initializeByteSizeFormat()}return t.initializeByteSizeFormat=function(){var t;this.byteSizePerInternalFormat||(this.byteSizePerInternalFormat=((t={})[e.WebGlConstants.R8.value]=1,t[e.WebGlConstants.R16F.value]=2,t[e.WebGlConstants.R32F.value]=4,t[e.WebGlConstants.R8UI.value]=1,t[e.WebGlConstants.RG8.value]=2,t[e.WebGlConstants.RG16F.value]=4,t[e.WebGlConstants.RG32F.value]=8,t[e.WebGlConstants.ALPHA.value]=1,t[e.WebGlConstants.RGB.value]=3,t[e.WebGlConstants.RGBA.value]=4,t[e.WebGlConstants.LUMINANCE.value]=1,t[e.WebGlConstants.LUMINANCE_ALPHA.value]=2,t[e.WebGlConstants.DEPTH_COMPONENT.value]=1,t[e.WebGlConstants.DEPTH_STENCIL.value]=2,t[e.WebGlConstants.SRGB_EXT.value]=3,t[e.WebGlConstants.SRGB_ALPHA_EXT.value]=4,t[e.WebGlConstants.RGB8.value]=3,t[e.WebGlConstants.SRGB8.value]=3,t[e.WebGlConstants.RGB565.value]=2,t[e.WebGlConstants.R11F_G11F_B10F.value]=4,t[e.WebGlConstants.RGB9_E5.value]=2,t[e.WebGlConstants.RGB16F.value]=6,t[e.WebGlConstants.RGB32F.value]=12,t[e.WebGlConstants.RGB8UI.value]=3,t[e.WebGlConstants.RGBA8.value]=4,t[e.WebGlConstants.RGB5_A1.value]=2,t[e.WebGlConstants.RGBA16F.value]=8,t[e.WebGlConstants.RGBA32F.value]=16,t[e.WebGlConstants.RGBA8UI.value]=4,t[e.WebGlConstants.COMPRESSED_R11_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_SIGNED_R11_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_RG11_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_SIGNED_RG11_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_RGB8_ETC2.value]=4,t[e.WebGlConstants.COMPRESSED_RGBA8_ETC2_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_SRGB8_ETC2.value]=4,t[e.WebGlConstants.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC.value]=4,t[e.WebGlConstants.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2.value]=4,t[e.WebGlConstants.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2.value]=4,t))},t.prototype.registerCallbacks=function(e){for(var t=0,n=this.createCommandNames;t<n.length;t++){e[a=n[t]]=e[a]||[],e[a].push(this.createWithoutSideEffects.bind(this))}for(var i=0,r=this.updateCommandNames;i<r.length;i++){e[a=r[i]]=e[a]||[],e[a].push(this.updateWithoutSideEffects.bind(this))}for(var o=0,s=this.deleteCommandNames;o<s.length;o++){var a;e[a=s[o]]=e[a]||[],e[a].push(this.deleteWithoutSideEffects.bind(this))}},t.prototype.startCapture=function(){this.frameMemory=0,this.capturing=!0},t.prototype.stopCapture=function(){this.frameMemory=0,this.capturing=!1},t.prototype.appendRecordedInformation=function(e){e.frameMemory[this.objectName]=this.frameMemory,e.memory[this.objectName]=this.memoryPerSecond},t.prototype.create=function(e){},t.prototype.createWithoutSideEffects=function(e){this.options.toggleCapture(!1),this.create(e),this.options.toggleCapture(!0)},t.prototype.updateWithoutSideEffects=function(t){if(t&&0!==t.arguments.length){this.options.toggleCapture(!1);var n=t.arguments[0],i=this.getBoundInstance(n);if(i)if(e.WebGlObjects.getWebGlObjectTag(i)){var r=this.getWebGlConstant(n),o=this.update(t,r,i);this.changeMemorySize(o),this.options.toggleCapture(!0)}else this.options.toggleCapture(!0);else this.options.toggleCapture(!0)}},t.prototype.deleteWithoutSideEffects=function(e){if(e&&e.arguments&&!(e.arguments.length<1)){var t=e.arguments[0];if(t){this.options.toggleCapture(!1);var n=this.delete(t);this.changeMemorySize(-n),this.options.toggleCapture(!0)}}},t.prototype.changeMemorySize=function(e){this.totalMemory+=e,this.capturing&&(this.frameMemory+=e);var t=this.options.time.now-this.startTime,n=Math.round(t/1e3);this.memoryPerSecond[n]=this.totalMemory},t.prototype.getWebGlConstant=function(t){var n=e.WebGlConstantsByValue[t];return n?n.name:t+""},t.prototype.getByteSizeForInternalFormat=function(e){return t.byteSizePerInternalFormat[e]||4},t}();t.BaseRecorder=n}(e.Recorders||(e.Recorders={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getCreateCommandNames=function(){return["createTexture"]},r.prototype.getUpdateCommandNames=function(){return["texImage2D","compressedTexImage2D","texStorage2D"]},r.prototype.getDeleteCommandNames=function(){return["deleteTexture"]},r.prototype.getBoundInstance=function(t){var n=this.options.context;return t===e.WebGlConstants.TEXTURE_2D.value?n.getParameter(e.WebGlConstants.TEXTURE_BINDING_2D.value):t===e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_X.value||t===e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_Y.value||t===e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_Z.value||t===e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_X.value||t===e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_Y.value||t===e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_Z.value?n.getParameter(e.WebGlConstants.TEXTURE_BINDING_CUBE_MAP.value):void 0},r.prototype.delete=function(t){var n=t.__SPECTOR_Object_CustomData;return n?n.target===e.WebGlConstants.TEXTURE_2D_ARRAY.name||n.target===e.WebGlConstants.TEXTURE_3D.name?0:n.length:0},r.prototype.update=function(e,t,n){if(e.arguments.length>=2&&0!==e.arguments[1])return 0;var i=this.getCustomData(e,t,n);if(!i)return 0;var r=n.__SPECTOR_Object_CustomData?n.__SPECTOR_Object_CustomData.length:0,o="TEXTURE_2D"===t?1:6;return i.length=i.width*i.height*o*this.getByteSizeForInternalFormat(i.internalFormat),n.__SPECTOR_Object_CustomData=i,i.length-r},r.prototype.getCustomData=function(e,t,n){return"texImage2D"===e.name?this.getTexImage2DCustomData(e,t,n):"compressedTexImage2D"===e.name?this.getCompressedTexImage2DCustomData(e,t,n):"texStorage2D"===e.name?this.getTexStorage2DCustomData(e,t,n):void 0},r.prototype.getTexStorage2DCustomData=function(e,t,n){var i;return 5===e.arguments.length&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],length:0}),i},r.prototype.getCompressedTexImage2DCustomData=function(e,t,n){var i;if(0===e.arguments[1])return e.arguments.length>=7&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],length:0}),i},r.prototype.getTexImage2DCustomData=function(e,t,n){var i;if(0===e.arguments[1])return e.arguments.length>=8?i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],format:e.arguments[6],type:e.arguments[7],length:0}:6===e.arguments.length&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[5].width,height:e.arguments[5].height,format:e.arguments[3],type:e.arguments[4],length:0}),i},r=i([e.Decorators.recorder("Texture2d")],r)}(t.BaseRecorder);t.Texture2DRecorder=r}(e.Recorders||(e.Recorders={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getCreateCommandNames=function(){return["createTexture"]},r.prototype.getUpdateCommandNames=function(){return["texImage3D","compressedTexImage3D","texStorage3D"]},r.prototype.getDeleteCommandNames=function(){return["deleteTexture"]},r.prototype.getBoundInstance=function(t){var n=this.options.context;return t===e.WebGlConstants.TEXTURE_2D_ARRAY.value?n.getParameter(e.WebGlConstants.TEXTURE_BINDING_2D_ARRAY.value):t===e.WebGlConstants.TEXTURE_3D.value?n.getParameter(e.WebGlConstants.TEXTURE_BINDING_3D.value):void 0},r.prototype.delete=function(t){var n=t.__SPECTOR_Object_CustomData;return n?n.target!==e.WebGlConstants.TEXTURE_2D_ARRAY.name&&n.target!==e.WebGlConstants.TEXTURE_3D.name?0:n.length:0},r.prototype.update=function(e,t,n){if(e.arguments.length>=2&&0!==e.arguments[1])return 0;var i=this.getCustomData(e,t,n);if(!i)return 0;var r=n.__SPECTOR_Object_CustomData?n.__SPECTOR_Object_CustomData.length:0;return i.length=i.width*i.height*i.depth*this.getByteSizeForInternalFormat(i.internalFormat),i&&(n.__SPECTOR_Object_CustomData=i),i.length-r},r.prototype.getCustomData=function(e,t,n){return"texImage3D"===e.name?this.getTexImage3DCustomData(e,t,n):"compressedTexImage3D"===e.name?this.getCompressedTexImage3DCustomData(e,t,n):"texStorage3D"===e.name?this.getTexStorage3DCustomData(e,t,n):void 0},r.prototype.getTexStorage3DCustomData=function(e,t,n){var i;return 6===e.arguments.length&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],depth:e.arguments[5],length:0}),i},r.prototype.getCompressedTexImage3DCustomData=function(e,t,n){var i;if(0===e.arguments[1])return e.arguments.length>=8&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],depth:e.arguments[5],length:0}),i},r.prototype.getTexImage3DCustomData=function(e,t,n){var i;if(0===e.arguments[1])return e.arguments.length>=9&&(i={target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],depth:e.arguments[5],format:e.arguments[7],type:e.arguments[8],length:0}),i},r=i([e.Decorators.recorder("Texture3d")],r)}(t.BaseRecorder);t.Texture3DRecorder=r}(e.Recorders||(e.Recorders={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getCreateCommandNames=function(){return["createBuffer"]},r.prototype.getUpdateCommandNames=function(){return["bufferData"]},r.prototype.getDeleteCommandNames=function(){return["deleteBuffer"]},r.prototype.getBoundInstance=function(t){var n=this.options.context;return t===e.WebGlConstants.ARRAY_BUFFER.value?n.getParameter(e.WebGlConstants.ARRAY_BUFFER_BINDING.value):t===e.WebGlConstants.ELEMENT_ARRAY_BUFFER.value?n.getParameter(e.WebGlConstants.ELEMENT_ARRAY_BUFFER_BINDING.value):t===e.WebGlConstants.COPY_READ_BUFFER.value?n.getParameter(e.WebGlConstants.COPY_READ_BUFFER_BINDING.value):t===e.WebGlConstants.COPY_WRITE_BUFFER.value?n.getParameter(e.WebGlConstants.COPY_WRITE_BUFFER_BINDING.value):t===e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER.value?n.getParameter(e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER_BINDING.value):t===e.WebGlConstants.UNIFORM_BUFFER.value?n.getParameter(e.WebGlConstants.UNIFORM_BUFFER_BINDING.value):t===e.WebGlConstants.PIXEL_PACK_BUFFER.value?n.getParameter(e.WebGlConstants.PIXEL_PACK_BUFFER_BINDING.value):t===e.WebGlConstants.PIXEL_UNPACK_BUFFER.value?n.getParameter(e.WebGlConstants.PIXEL_UNPACK_BUFFER_BINDING.value):void 0},r.prototype.delete=function(e){var t=e.__SPECTOR_Object_CustomData;return t?t.length:0},r.prototype.update=function(e,t,n){var i=this.getCustomData(t,e);if(!i)return 0;var r=n.__SPECTOR_Object_CustomData?n.__SPECTOR_Object_CustomData.length:0;return n.__SPECTOR_Object_CustomData=i,i.length-r},r.prototype.getCustomData=function(e,t){var n=this.getLength(t);return t.arguments.length>=4?{target:e,length:n,usage:t.arguments[2],offset:t.arguments[3],sourceLength:t.arguments[1]?t.arguments[1].length:-1}:3===t.arguments.length?{target:e,length:n,usage:t.arguments[2]}:void 0},r.prototype.getLength=function(e){var t=-1,n=0;return 5===e.arguments.length&&(t=e.arguments[4],n=e.arguments[3]),t<=0&&(t="number"==typeof e.arguments[1]?e.arguments[1]:e.arguments[1]&&(e.arguments[1].byteLength||e.arguments[1].length)||0),t-n},r=i([e.Decorators.recorder("Buffer")],r)}(t.BaseRecorder);t.BufferRecorder=r}(e.Recorders||(e.Recorders={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getCreateCommandNames=function(){return["createRenderbuffer"]},r.prototype.getUpdateCommandNames=function(){return["renderbufferStorage","renderbufferStorageMultisample"]},r.prototype.getDeleteCommandNames=function(){return["deleteRenderbuffer"]},r.prototype.getBoundInstance=function(t){var n=this.options.context;if(t===e.WebGlConstants.RENDERBUFFER.value)return n.getParameter(e.WebGlConstants.RENDERBUFFER_BINDING.value)},r.prototype.delete=function(e){var t=e.__SPECTOR_Object_CustomData;return t?t.length:0},r.prototype.update=function(e,t,n){var i=this.getCustomData(e,t);if(!i)return 0;var r=n.__SPECTOR_Object_CustomData?n.__SPECTOR_Object_CustomData.length:0;return i.length=i.width*i.height*this.getByteSizeForInternalFormat(i.internalFormat),n.__SPECTOR_Object_CustomData=i,i.length-r},r.prototype.getCustomData=function(e,t){return 4===e.arguments.length?{target:t,internalFormat:e.arguments[1],width:e.arguments[2],height:e.arguments[3],length:0,samples:0}:{target:t,internalFormat:e.arguments[2],width:e.arguments[3],height:e.arguments[4],length:0,samples:e.arguments[1]}},r=i([e.Decorators.recorder("Renderbuffer")],r)}(t.BaseRecorder);t.RenderBufferRecorder=r}(e.Recorders||(e.Recorders={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t){this.options=e,this.logger=t,this.recorders={},this.recorderConstructors={},this.onCommandCallbacks={},this.contextInformation=e.contextInformation,this.time=new e.timeConstructor,this.initAvailableRecorders(),this.initRecorders()}return t.prototype.recordCommand=function(e){var t=this.onCommandCallbacks[e.name];if(t)for(var n=0,i=t;n<i.length;n++){(0,i[n])(e)}},t.prototype.startCapture=function(){for(var e in this.recorders){if(this.recorders.hasOwnProperty(e))this.recorders[e].startCapture()}},t.prototype.stopCapture=function(){for(var e in this.recorders){if(this.recorders.hasOwnProperty(e))this.recorders[e].stopCapture()}},t.prototype.appendRecordedInformation=function(e){for(var t in this.recorders){if(this.recorders.hasOwnProperty(t))this.recorders[t].appendRecordedInformation(e)}},t.prototype.initAvailableRecorders=function(){for(var t in this.options.recorderNamespace)if(this.options.recorderNamespace.hasOwnProperty(t)){var n=this.options.recorderNamespace[t],i=e.Decorators.getRecorderName(n);i&&(this.recorderConstructors[i]=n)}},t.prototype.initRecorders=function(){for(var t in this.recorderConstructors)if(this.recorderConstructors.hasOwnProperty(t)){var n=e.merge({objectName:t,time:this.time},this.contextInformation),i=new this.recorderConstructors[t](n,this.logger);this.recorders[t]=i,i.registerCallbacks(this.onCommandCallbacks)}},t}();t.RecorderSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t){this.options=e,this.logger=t,this.stateTrackers={},this.onCommandCapturedCallbacks={},this.stateConstructors={},this.contextInformation=e.contextInformation,this.initAvailableStateTrackers(),this.initStateTrackers()}return t.prototype.startCapture=function(e,t){for(var n in this.stateTrackers)if(this.stateTrackers.hasOwnProperty(n)){var i=this.stateTrackers[n],r=i.startCapture(!0,t);i.requireStartAndStopStates&&(e.initState[n]=r)}},t.prototype.stopCapture=function(e){for(var t in this.stateTrackers)if(this.stateTrackers.hasOwnProperty(t)){var n=this.stateTrackers[t],i=n.stopCapture();n.requireStartAndStopStates&&(e.endState[t]=i)}},t.prototype.captureState=function(e){var t=this.onCommandCapturedCallbacks[e.name];if(t)for(var n=0,i=t;n<i.length;n++){(0,i[n])(e)}},t.prototype.initAvailableStateTrackers=function(){for(var t in this.options.stateNamespace)if(this.options.stateNamespace.hasOwnProperty(t)){var n=this.options.stateNamespace[t],i=e.Decorators.getStateName(n);i&&(this.stateConstructors[i]=n)}},t.prototype.initStateTrackers=function(){for(var t in this.stateConstructors)if(this.stateConstructors.hasOwnProperty(t)){var n=e.merge({stateName:t},this.contextInformation),i=new this.stateConstructors[t](n,this.logger);this.stateTrackers[t]=i,i.registerCallbacks(this.onCommandCapturedCallbacks)}},t}();t.StateSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t){this.options=e,this.logger=t,this.webGlObjectConstructors={},this.webGlObjects={},this.contextInformation=e.contextInformation,this.initAvailableWebglObjects(),this.initWebglObjects()}return t.prototype.tagWebGlObjects=function(e){for(var t in this.webGlObjects)if(this.webGlObjects.hasOwnProperty(t)){for(var n=this.webGlObjects[t],i=0;i<e.arguments.length;i++){var r=e.arguments[i];if(n.tagWebGlObject(r))break}if(n.tagWebGlObject(e.result))break}},t.prototype.tagWebGlObject=function(e){for(var t in this.webGlObjects)if(this.webGlObjects.hasOwnProperty(t)){var n=this.webGlObjects[t].tagWebGlObject(e);if(n)return n}},t.prototype.initAvailableWebglObjects=function(){for(var t in this.options.webGlObjectNamespace)if(this.options.webGlObjectNamespace.hasOwnProperty(t)){var n=this.options.webGlObjectNamespace[t],i=e.Decorators.getWebGlObjectName(n),r=e.Decorators.getWebGlObjectType(n);i&&r&&(this.webGlObjectConstructors[i]={ctor:n,type:r})}},t.prototype.initWebglObjects=function(){for(var t in this.webGlObjectConstructors)if(this.webGlObjectConstructors.hasOwnProperty(t)){var n=e.merge({typeName:t,type:this.webGlObjectConstructors[t].type},this.contextInformation),i=new this.webGlObjectConstructors[t].ctor(n,this.logger);this.webGlObjects[t]=i}},t}();t.WebGlObjectSpy=n}(e.Spies||(e.Spies={}))}(r||(r={})),function(e){!function(t){t.drawCommands=["drawArrays","drawElements","drawArraysInstanced","drawArraysInstancedANGLE","drawElementsInstanced","drawElementsInstancedANGLE","drawRangeElements"];var n=function(){function t(e,t){this.options=e,this.logger=t,this.context=e.context,this.contextVersion=e.contextVersion,this.extensions=e.extensions,this.toggleCapture=e.toggleCapture,this.stateName=e.stateName,this.consumeCommands=this.getConsumeCommands(),this.changeCommandsByState=this.getChangeCommandsByState(),this.commandNameToStates=this.getCommandNameToStates()}return Object.defineProperty(t.prototype,"requireStartAndStopStates",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.startCapture=function(e,t){return this.quickCapture=t,this.capturedCommandsByState={},e&&this.requireStartAndStopStates&&(this.currentState={},this.readFromContextNoSideEffects()),this.copyCurrentStateToPrevious(),this.currentState={},this.previousState},t.prototype.stopCapture=function(){return this.requireStartAndStopStates&&this.readFromContextNoSideEffects(),this.analyse(void 0),this.currentState},t.prototype.registerCallbacks=function(e){for(var t in this.changeCommandsByState)if(this.changeCommandsByState.hasOwnProperty(t))for(var n=0,i=this.changeCommandsByState[t];n<i.length;n++){var r=i[n];e[r]=e[r]||[],e[r].push(this.onChangeCommand.bind(this))}for(var o=0,s=this.consumeCommands;o<s.length;o++){var a=s[o];e[a]=e[a]||[],e[a].push(this.onConsumeCommand.bind(this))}},t.prototype.getStateData=function(){return this.currentState},t.prototype.getConsumeCommands=function(){return[]},t.prototype.getChangeCommandsByState=function(){return{}},t.prototype.copyCurrentStateToPrevious=function(){this.currentState&&(this.previousState=this.currentState)},t.prototype.onChangeCommand=function(e){for(var t=0,n=this.commandNameToStates[e.name];t<n.length;t++){var i=n[t];if(!this.isValidChangeCommand(e,i))return;this.capturedCommandsByState[i]=this.capturedCommandsByState[i]||[],this.capturedCommandsByState[i].push(e)}},t.prototype.isValidChangeCommand=function(e,t){return!0},t.prototype.onConsumeCommand=function(e){this.isValidConsumeCommand(e)&&(this.readFromContextNoSideEffects(),this.analyse(e),this.storeCommandIds(),e[this.stateName]=this.currentState,this.startCapture(!1,this.quickCapture))},t.prototype.isValidConsumeCommand=function(e){return!0},t.prototype.analyse=function(e){for(var t in this.capturedCommandsByState)if(this.capturedCommandsByState.hasOwnProperty(t)){var n=this.capturedCommandsByState[t],i=n.length-1;if(i>=0)if(e){for(var r=0;r<i;r++){var o=n[r];o.consumeCommandId=e.id,this.changeCommandCaptureStatus(o,30)}var s=this.isStateEnableNoSideEffects(t,e.commandArguments);(a=n[i]).consumeCommandId=e.id,this.areStatesEquals(this.currentState[t],this.previousState[t])?this.changeCommandCaptureStatus(a,30):s?this.changeCommandCaptureStatus(a,40):this.changeCommandCaptureStatus(a,20)}else for(r=0;r<n.length;r++){var a=n[r];this.changeCommandCaptureStatus(a,10)}}},t.prototype.storeCommandIds=function(){for(var e=["unusedCommandIds","disabledCommandIds","redundantCommandIds","validCommandIds"],t=0,n=e;t<n.length;t++){var i=n[t];this.currentState[i]=[]}for(var r in this.capturedCommandsByState)if(this.capturedCommandsByState.hasOwnProperty(r))for(var o=0,s=this.capturedCommandsByState[r];o<s.length;o++){var a=s[o];switch(a.status){case 10:this.currentState.unusedCommandIds.push(a.id);break;case 20:this.currentState.disabledCommandIds.push(a.id);break;case 30:this.currentState.redundantCommandIds.push(a.id);break;case 40:this.currentState.validCommandIds.push(a.id)}}for(var l=0,c=e;l<c.length;l++){i=c[l];this.currentState[i].length||delete this.currentState[i]}},t.prototype.changeCommandCaptureStatus=function(e,t){return e.status<t&&(e.status=t,!0)},t.prototype.areStatesEquals=function(e,t){if(typeof e!=typeof t)return!1;if(e&&!t)return!1;if(t&&!e)return!1;if(void 0===e||null===e)return!0;if(e.length&&t.length&&"string"!=typeof e){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t},t.prototype.isStateEnable=function(e,t){return!0},t.prototype.getSpectorData=function(t){if(t)return{__SPECTOR_Object_TAG:e.WebGlObjects.getWebGlObjectTag(t)||this.options.tagWebGlObject(t),__SPECTOR_Object_CustomData:t.__SPECTOR_Object_CustomData,__SPECTOR_Metadata:t.__SPECTOR_Metadata}},t.prototype.readFromContextNoSideEffects=function(){this.toggleCapture(!1),this.readFromContext(),this.toggleCapture(!0)},t.prototype.isStateEnableNoSideEffects=function(e,t){this.toggleCapture(!1);var n=this.isStateEnable(e,t);return this.toggleCapture(!0),n},t.prototype.getCommandNameToStates=function(){var e={};for(var t in this.changeCommandsByState)if(this.changeCommandsByState.hasOwnProperty(t))for(var n=0,i=this.changeCommandsByState[t];n<i.length;n++){var r=i[n];e[r]=e[r]||[],e[r].push(t)}return e},t}();t.BaseState=n}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.getWebgl1Parameters=function(){return[]},i.prototype.getWebgl2Parameters=function(){return[]},i.prototype.getChangeCommandsByState=function(){this.parameters=[],this.parameters.push(this.getWebgl1Parameters()),this.contextVersion>1&&this.parameters.push(this.getWebgl2Parameters());for(var e={},t=1;t<=this.contextVersion&&!(t>this.parameters.length);t++)if(this.parameters[t-1])for(var n=0,i=this.parameters[t-1];n<i.length;n++){var r=i[n];if(r.changeCommands)for(var o=0,s=r.changeCommands;o<s.length;o++){var a=s[o];e[r.constant.name]=e[r.constant.name]||[],e[r.constant.name].push(a)}}return e},i.prototype.readFromContext=function(){for(var t=1;t<=this.contextVersion&&!(t>this.parameters.length);t++)for(var n=0,i=this.parameters[t-1];n<i.length;n++){var r=i[n],o=this.readParameterFromContext(r),s=e.WebGlObjects.getWebGlObjectTag(o);if(s)this.currentState[r.constant.name]=s;else{var a=this.stringifyParameterValue(o,r);this.currentState[r.constant.name]=a}}},i.prototype.readParameterFromContext=function(e){return e.constant.extensionName&&!this.extensions[e.constant.extensionName]?"Extension "+e.constant.extensionName+" is unavailble.":this.context.getParameter(e.constant.value)},i.prototype.stringifyParameterValue=function(t,n){if(null===t)return"null";if(void 0===t)return"undefined";if(30===n.returnType)return t=t.toString(2),t="00000000000000000000000000000000".substr(t.length)+t;if("number"==typeof t&&e.WebGlConstants.isWebGlConstant(t)){if(20===n.returnType){var i=n.changeCommands&&n.changeCommands[0]||"";return t=e.WebGlConstants.stringifyWebGlConstant(t,i)}return t}if(t.length&&"string"!=typeof t){for(var r=[],o=0;o<t.length;o++)r.push(t[o]);return r}return t},i}(t.BaseState);t.ParameterState=i}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){!function(i){var r=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.currentState=i.startCapture(!0,i.quickCapture),i}return n(i,t),i.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.RENDERER},{constant:e.WebGlConstants.VENDOR},{constant:e.WebGlConstants.VERSION},{constant:e.WebGlConstants.SHADING_LANGUAGE_VERSION},{constant:e.WebGlConstants.SAMPLES},{constant:e.WebGlConstants.SAMPLE_BUFFERS},{constant:e.WebGlConstants.RED_BITS},{constant:e.WebGlConstants.GREEN_BITS},{constant:e.WebGlConstants.BLUE_BITS},{constant:e.WebGlConstants.ALPHA_BITS},{constant:e.WebGlConstants.DEPTH_BITS},{constant:e.WebGlConstants.STENCIL_BITS},{constant:e.WebGlConstants.SUBPIXEL_BITS},{constant:e.WebGlConstants.LINE_WIDTH},{constant:e.WebGlConstants.ALIASED_LINE_WIDTH_RANGE},{constant:e.WebGlConstants.ALIASED_POINT_SIZE_RANGE},{constant:e.WebGlConstants.IMPLEMENTATION_COLOR_READ_FORMAT,returnType:20},{constant:e.WebGlConstants.IMPLEMENTATION_COLOR_READ_TYPE,returnType:20},{constant:e.WebGlConstants.MAX_COMBINED_TEXTURE_IMAGE_UNITS},{constant:e.WebGlConstants.MAX_CUBE_MAP_TEXTURE_SIZE},{constant:e.WebGlConstants.MAX_FRAGMENT_UNIFORM_VECTORS},{constant:e.WebGlConstants.MAX_RENDERBUFFER_SIZE},{constant:e.WebGlConstants.MAX_TEXTURE_IMAGE_UNITS},{constant:e.WebGlConstants.MAX_TEXTURE_SIZE},{constant:e.WebGlConstants.MAX_VARYING_VECTORS},{constant:e.WebGlConstants.MAX_VERTEX_ATTRIBS},{constant:e.WebGlConstants.MAX_VERTEX_TEXTURE_IMAGE_UNITS},{constant:e.WebGlConstants.MAX_VERTEX_UNIFORM_VECTORS},{constant:e.WebGlConstants.MAX_VIEWPORT_DIMS},{constant:e.WebGlConstants.MAX_TEXTURE_MAX_ANISOTROPY_EXT},{constant:e.WebGlConstants.MAX_COLOR_ATTACHMENTS_WEBGL},{constant:e.WebGlConstants.MAX_DRAW_BUFFERS_WEBGL}]},i.prototype.getWebgl2Parameters=function(){return[{constant:e.WebGlConstants.MAX_3D_TEXTURE_SIZE},{constant:e.WebGlConstants.MAX_ARRAY_TEXTURE_LAYERS},{constant:e.WebGlConstants.MAX_CLIENT_WAIT_TIMEOUT_WEBGL},{constant:e.WebGlConstants.MAX_COLOR_ATTACHMENTS},{constant:e.WebGlConstants.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS},{constant:e.WebGlConstants.MAX_COMBINED_UNIFORM_BLOCKS},{constant:e.WebGlConstants.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS},{constant:e.WebGlConstants.MAX_DRAW_BUFFERS},{constant:e.WebGlConstants.MAX_ELEMENT_INDEX},{constant:e.WebGlConstants.MAX_ELEMENTS_INDICES},{constant:e.WebGlConstants.MAX_ELEMENTS_VERTICES},{constant:e.WebGlConstants.MAX_FRAGMENT_INPUT_COMPONENTS},{constant:e.WebGlConstants.MAX_FRAGMENT_UNIFORM_BLOCKS},{constant:e.WebGlConstants.MAX_FRAGMENT_UNIFORM_COMPONENTS},{constant:e.WebGlConstants.MAX_PROGRAM_TEXEL_OFFSET},{constant:e.WebGlConstants.MAX_SAMPLES},{constant:e.WebGlConstants.MAX_SERVER_WAIT_TIMEOUT},{constant:e.WebGlConstants.MAX_TEXTURE_LOD_BIAS},{constant:e.WebGlConstants.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS},{constant:e.WebGlConstants.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS},{constant:e.WebGlConstants.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS},{constant:e.WebGlConstants.MAX_UNIFORM_BLOCK_SIZE},{constant:e.WebGlConstants.MAX_UNIFORM_BUFFER_BINDINGS},{constant:e.WebGlConstants.MAX_VARYING_COMPONENTS},{constant:e.WebGlConstants.MAX_VERTEX_OUTPUT_COMPONENTS},{constant:e.WebGlConstants.MAX_VERTEX_UNIFORM_BLOCKS},{constant:e.WebGlConstants.MAX_VERTEX_UNIFORM_COMPONENTS},{constant:e.WebGlConstants.MIN_PROGRAM_TEXEL_OFFSET}]},i}(t.ParameterState);i.Capabilities=r}(t.Information||(t.Information={}))}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){!function(i){var r=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.currentState=i.startCapture(!0,i.quickCapture),i}return n(i,t),i.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.COMPRESSED_TEXTURE_FORMATS}]},i.prototype.stringifyParameterValue=function(t,n){for(var i=[],r=0,o=t;r<o.length;r++){var s=o[r];i.push(e.WebGlConstants.stringifyWebGlConstant(s,"getParameter"))}return i},i}(t.ParameterState);i.CompressedTextures=r}(t.Information||(t.Information={}))}(e.States||(e.States={}))}(r||(r={})),function(e){!function(e){!function(t){var i=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.extensionDefinition=[[{name:"ANGLE_instanced_arrays",description:""},{name:"EXT_blend_minmax",description:""},{name:"EXT_color_buffer_float",description:""},{name:"EXT_color_buffer_half_float",description:""},{name:"EXT_disjoint_timer_query",description:""},{name:"EXT_frag_depth",description:""},{name:"EXT_sRGB",description:""},{name:"EXT_shader_texture_lod",description:""},{name:"EXT_texture_filter_anisotropic",description:""},{name:"OES_element_index_uint",description:""},{name:"OES_standard_derivatives",description:""},{name:"OES_texture_float",description:""},{name:"OES_texture_float_linear",description:""},{name:"OES_texture_half_float",description:""},{name:"OES_texture_half_float_linear",description:""},{name:"OES_vertex_array_object",description:""},{name:"WEBGL_color_buffer_float",description:""},{name:"WEBGL_compressed_texture_astc",description:""},{name:"WEBGL_compressed_texture_atc",description:""},{name:"WEBGL_compressed_texture_etc",description:""},{name:"WEBGL_compressed_texture_etc1",description:""},{name:"WEBGL_compressed_texture_pvrtc",description:""},{name:"WEBGL_compressed_texture_s3tc",description:""},{name:"WEBGL_depth_texture",description:""},{name:"WEBGL_draw_buffers",description:""}],[{name:"EXT_color_buffer_float",description:""},{name:"EXT_disjoint_timer_query",description:""},{name:"EXT_disjoint_timer_query_webgl2",description:""},{name:"EXT_texture_filter_anisotropic",description:""},{name:"OES_texture_float_linear",description:""},{name:"WEBGL_compressed_texture_astc",description:""},{name:"WEBGL_compressed_texture_atc",description:""},{name:"WEBGL_compressed_texture_etc",description:""},{name:"WEBGL_compressed_texture_etc1",description:""},{name:"WEBGL_compressed_texture_pvrtc",description:""},{name:"WEBGL_compressed_texture_s3tc",description:""}]],i.currentState=i.startCapture(!0,i.quickCapture),i}return n(t,e),t.prototype.getExtensions=function(){return this.extensions},t.prototype.readFromContext=function(){for(var e=0,t=1===this.contextVersion?this.extensionDefinition[0]:this.extensionDefinition[1];e<t.length;e++){var n=t[e],i=this.context.getExtension(n.name);i?(this.currentState[n.name]=!0,this.extensions[n.name]=i):this.currentState[n.name]=!1}},t}(e.BaseState);t.Extensions=i}(e.Information||(e.Information={}))}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.PACK_ALIGNMENT,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_ALIGNMENT,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_COLORSPACE_CONVERSION_WEBGL,returnType:20,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_FLIP_Y_WEBGL,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_PREMULTIPLY_ALPHA_WEBGL,changeCommands:["pixelStorei"]}]},r.prototype.getWebgl2Parameters=function(){return[{constant:e.WebGlConstants.PACK_ROW_LENGTH,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.PACK_SKIP_PIXELS,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.PACK_SKIP_ROWS,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_IMAGE_HEIGHT,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_SKIP_PIXELS,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_SKIP_ROWS,changeCommands:["pixelStorei"]},{constant:e.WebGlConstants.UNPACK_SKIP_IMAGES,changeCommands:["pixelStorei"]}]},r.prototype.getConsumeCommands=function(){return["readPixels","texImage2D","texSubImage2D"]},r.prototype.isValidChangeCommand=function(t,n){return e.WebGlConstantsByName[n].value===t.commandArguments[0]},r=i([e.Decorators.state("AlignmentState")],r)}(t.ParameterState);t.AlignmentState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.BLEND,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.BLEND_COLOR,changeCommands:["blendColor"]},{constant:e.WebGlConstants.BLEND_DST_ALPHA,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:e.WebGlConstants.BLEND_DST_RGB,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:e.WebGlConstants.BLEND_EQUATION_ALPHA,returnType:20,changeCommands:["blendEquation","blendEquationSeparate"]},{constant:e.WebGlConstants.BLEND_EQUATION_RGB,returnType:20,changeCommands:["blendEquation","blendEquationSeparate"]},{constant:e.WebGlConstants.BLEND_SRC_ALPHA,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:e.WebGlConstants.BLEND_SRC_RGB,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===e.WebGlConstants.BLEND.value},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.BLEND.value)},o=i([e.Decorators.state("BlendState")],o)}(t.ParameterState);t.BlendState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.COLOR_CLEAR_VALUE,changeCommands:["clearColor"]},{constant:e.WebGlConstants.DEPTH_CLEAR_VALUE,changeCommands:["clearDepth"]},{constant:e.WebGlConstants.STENCIL_CLEAR_VALUE,changeCommands:["clearStencil"]}]},r.prototype.getConsumeCommands=function(){return["clear"]},r.prototype.isStateEnable=function(t,n){switch(t){case e.WebGlConstants.COLOR_CLEAR_VALUE.name:return e.WebGlConstants.COLOR_BUFFER_BIT.value===(n[0]&e.WebGlConstants.COLOR_BUFFER_BIT.value);case e.WebGlConstants.DEPTH_CLEAR_VALUE.name:return e.WebGlConstants.DEPTH_BUFFER_BIT.value===(n[0]&e.WebGlConstants.DEPTH_BUFFER_BIT.value);case e.WebGlConstants.STENCIL_CLEAR_VALUE.name:return e.WebGlConstants.STENCIL_BUFFER_BIT.value===(n[0]&e.WebGlConstants.STENCIL_BUFFER_BIT.value)}return!1},r=i([e.Decorators.state("ClearState")],r)}(t.ParameterState);t.ClearState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.COLOR_WRITEMASK,changeCommands:["colorMask"]}]},o.prototype.getConsumeCommands=function(){return t.drawCommands},o=i([e.Decorators.state("ColorState")],o)}(t.ParameterState);t.ColorState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.SAMPLE_COVERAGE_VALUE,changeCommands:["sampleCoverage"]},{constant:e.WebGlConstants.SAMPLE_COVERAGE_INVERT,changeCommands:["sampleCoverage"]}]},o.prototype.getWebgl2Parameters=function(){return[{constant:e.WebGlConstants.SAMPLE_COVERAGE,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.SAMPLE_ALPHA_TO_COVERAGE,changeCommands:["enable","disable"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||(t.commandArguments[0]===e.WebGlConstants.SAMPLE_COVERAGE.value?n===e.WebGlConstants.SAMPLE_COVERAGE.name:t.commandArguments[0]===e.WebGlConstants.SAMPLE_ALPHA_TO_COVERAGE.value&&n===e.WebGlConstants.SAMPLE_ALPHA_TO_COVERAGE.name)},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){return 2===this.contextVersion&&this.context.isEnabled(e.WebGlConstants.SAMPLE_COVERAGE.value)},o=i([e.Decorators.state("CoverageState")],o)}(t.ParameterState);t.CoverageState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.CULL_FACE,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.CULL_FACE_MODE,returnType:20,changeCommands:["cullFace"]}]},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===e.WebGlConstants.CULL_FACE.value},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.CULL_FACE.value)},o=i([e.Decorators.state("CullState")],o)}(t.ParameterState);t.CullState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.DEPTH_TEST,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.DEPTH_FUNC,returnType:20,changeCommands:["depthFunc"]},{constant:e.WebGlConstants.DEPTH_RANGE,changeCommands:["depthRange"]},{constant:e.WebGlConstants.DEPTH_WRITEMASK,changeCommands:["depthMask"]}]},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===e.WebGlConstants.DEPTH_TEST.value},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.DEPTH_TEST.value)},o=i([e.Decorators.state("DepthState")],o)}(t.ParameterState);t.DepthState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.DITHER,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.VIEWPORT,changeCommands:["viewPort"]},{constant:e.WebGlConstants.FRONT_FACE,returnType:20,changeCommands:["frontFace"]},{constant:e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT_OES,changeCommands:["hint"]}]},o.prototype.getWebgl2Parameters=function(){return[{constant:e.WebGlConstants.RASTERIZER_DISCARD,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT,changeCommands:["hint"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"===t.name||"disable"===t.name?t.commandArguments[0]===e.WebGlConstants.DITHER.value?n===e.WebGlConstants.DITHER.name:t.commandArguments[0]===e.WebGlConstants.RASTERIZER_DISCARD.value&&n===e.WebGlConstants.RASTERIZER_DISCARD.name:"hint"!==t.name||(t.commandArguments[0]===e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT_OES.value?n===e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT_OES.name:t.commandArguments[0]===e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT.value&&n===e.WebGlConstants.FRAGMENT_SHADER_DERIVATIVE_HINT.name)},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){switch(t){case e.WebGlConstants.DITHER.name:return this.context.isEnabled(e.WebGlConstants.DITHER.value);case e.WebGlConstants.RASTERIZER_DISCARD.name:return this.context.isEnabled(e.WebGlConstants.RASTERIZER_DISCARD.value)}return!0},o=i([e.Decorators.state("DrawState")],o)}(t.ParameterState);t.DrawState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.GENERATE_MIPMAP_HINT,changeCommands:["hint"]}]},r.prototype.getConsumeCommands=function(){return["generateMipmap"]},r=i([e.Decorators.state("MipmapHintState")],r)}(t.ParameterState);t.MipmapHintState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.POLYGON_OFFSET_FILL,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.POLYGON_OFFSET_FACTOR,changeCommands:["polygonOffset"]},{constant:e.WebGlConstants.POLYGON_OFFSET_UNITS,changeCommands:["polygonOffset"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===e.WebGlConstants.POLYGON_OFFSET_FILL.value},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.POLYGON_OFFSET_FILL.value)},o=i([e.Decorators.state("PolygonOffsetState")],o)}(t.ParameterState);t.PolygonOffsetState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return n(o,r),o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.SCISSOR_TEST,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.SCISSOR_BOX,changeCommands:["scissor"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===e.WebGlConstants.SCISSOR_TEST.value},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.SCISSOR_TEST.value)},o=i([e.Decorators.state("ScissorState")],o)}(t.ParameterState);t.ScissorState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}var s;return n(o,r),s=o,o.prototype.getWebgl1Parameters=function(){return[{constant:e.WebGlConstants.STENCIL_TEST,changeCommands:["enable","disable"]},{constant:e.WebGlConstants.STENCIL_BACK_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_FUNC,returnType:20,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_PASS_DEPTH_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_PASS_DEPTH_PASS,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_REF,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_VALUE_MASK,returnType:30,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_BACK_WRITEMASK,returnType:30,changeCommands:["stencilMask","stencilMaskSeparate"]},{constant:e.WebGlConstants.STENCIL_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_FUNC,returnType:20,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_PASS_DEPTH_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_PASS_DEPTH_PASS,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:e.WebGlConstants.STENCIL_REF,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_VALUE_MASK,returnType:30,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:e.WebGlConstants.STENCIL_WRITEMASK,returnType:30,changeCommands:["stencilMask","stencilMaskSeparate"]}]},o.prototype.isValidChangeCommand=function(t,n){return"enable"===t.name||"disable"===t.name?t.commandArguments[0]===e.WebGlConstants.STENCIL_TEST.value:"stencilOp"===t.name||"stencilOpSeparate"===t.name?s.stencilOpStates.indexOf(t.commandArguments[0])>0:"stencilFunc"===t.name||"stencilFuncSeparate"===t.name?s.stencilFuncStates.indexOf(t.commandArguments[0])>0:"stencilMask"!==t.name&&"stencilMaskSeparate"!==t.name||s.stencilMaskStates.indexOf(t.commandArguments[0])>0},o.prototype.getConsumeCommands=function(){return t.drawCommands},o.prototype.isStateEnable=function(t,n){return this.context.isEnabled(e.WebGlConstants.STENCIL_TEST.value)},o.stencilOpStates=[e.WebGlConstants.STENCIL_BACK_FAIL.value,e.WebGlConstants.STENCIL_BACK_PASS_DEPTH_FAIL.value,e.WebGlConstants.STENCIL_BACK_PASS_DEPTH_PASS.value,e.WebGlConstants.STENCIL_FAIL.value,e.WebGlConstants.STENCIL_PASS_DEPTH_FAIL.value,e.WebGlConstants.STENCIL_PASS_DEPTH_PASS.value],o.stencilFuncStates=[e.WebGlConstants.STENCIL_BACK_FUNC.value,e.WebGlConstants.STENCIL_BACK_REF.value,e.WebGlConstants.STENCIL_BACK_VALUE_MASK.value,e.WebGlConstants.STENCIL_FUNC.value,e.WebGlConstants.STENCIL_REF.value,e.WebGlConstants.STENCIL_VALUE_MASK.value],o.stencilMaskStates=[e.WebGlConstants.STENCIL_BACK_WRITEMASK.value,e.WebGlConstants.STENCIL_WRITEMASK.value],o=s=i([e.Decorators.state("StencilState")],o)}(t.ParameterState);t.StencilState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r=function(r){function o(e,t){var n=r.call(this,e,t)||this;return n.captureFrameBuffer=e.context.createFramebuffer(),n.workingCanvas=document.createElement("canvas"),n.workingContext2D=n.workingCanvas.getContext("2d"),n.captureCanvas=document.createElement("canvas"),n.captureContext2D=n.captureCanvas.getContext("2d"),n.captureContext2D.imageSmoothingEnabled=!0,n.captureContext2D.mozImageSmoothingEnabled=!0,n.captureContext2D.oImageSmoothingEnabled=!0,n.captureContext2D.webkitImageSmoothingEnabled=!0,n.captureContext2D.msImageSmoothingEnabled=!0,n}var s;return n(o,r),s=o,o.prototype.getConsumeCommands=function(){return["clear","clearBufferfv","clearBufferiv","clearBufferuiv","clearBufferfi"].concat(t.drawCommands)},o.prototype.readFromContext=function(){var t=this.context;this.currentState.Attachments=[];var n=this.context.getParameter(e.WebGlConstants.FRAMEBUFFER_BINDING.value);if(!n)return this.currentState.FrameBuffer=null,void this.getCapture(t,"Canvas COLOR_ATTACHMENT",0,0,t.drawingBufferWidth,t.drawingBufferHeight,0,0,e.WebGlConstants.UNSIGNED_BYTE.value);var i=t.getParameter(t.VIEWPORT),r=i[0],o=i[1],s=i[2],a=i[3];this.currentState.FrameBuffer=this.getSpectorData(n);var l=this.context.checkFramebufferStatus(e.WebGlConstants.FRAMEBUFFER.value);if(this.currentState.FrameBufferStatus=e.WebGlConstantsByValue[l].name,l===e.WebGlConstants.FRAMEBUFFER_COMPLETE.value)if(this.extensions[e.WebGlConstants.MAX_DRAW_BUFFERS_WEBGL.extensionName])for(var c=this.context.getParameter(e.WebGlConstants.MAX_DRAW_BUFFERS_WEBGL.value),u=0;u<c;u++)this.readFrameBufferAttachmentFromContext(this.context,n,e.WebGlConstantsByName["COLOR_ATTACHMENT"+u+"_WEBGL"],r,o,s,a);else if(this.contextVersion>1)for(c=this.context.getParameter(e.WebGlConstants.MAX_DRAW_BUFFERS.value),u=0;u<c;u++)this.readFrameBufferAttachmentFromContext(this.context,n,e.WebGlConstantsByName["COLOR_ATTACHMENT"+u],r,o,s,a);else this.readFrameBufferAttachmentFromContext(this.context,n,e.WebGlConstantsByName.COLOR_ATTACHMENT0,r,o,s,a)},o.prototype.readFrameBufferAttachmentFromContext=function(t,n,i,r,o,s,a){var l=e.WebGlConstants.FRAMEBUFFER.value,c=this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value);if(c!==e.WebGlConstants.NONE.value){var u=this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.value);if(u){var h=this.contextVersion>1?this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE.value):e.WebGlConstants.UNSIGNED_BYTE.value;c===e.WebGlConstants.RENDERBUFFER.value?this.readFrameBufferAttachmentFromRenderBuffer(t,n,i,r,o,s,a,l,h,u):c===e.WebGlConstants.TEXTURE.value&&this.readFrameBufferAttachmentFromTexture(t,n,i,r,o,s,a,l,h,u)}}},o.prototype.readFrameBufferAttachmentFromRenderBuffer=function(t,n,i,r,o,s,a,l,c,u){var h=0,d=0;if(u.__SPECTOR_Object_CustomData){var m=u.__SPECTOR_Object_CustomData;if(s=m.width,a=m.height,h=m.samples,d=m.internalFormat,!h&&!e.ReadPixelsHelper.isSupportedCombination(c,e.WebGlConstants.RGBA.value,d))return}if(h){var p=t,f=t.createRenderbuffer(),g=t.getParameter(t.RENDERBUFFER_BINDING);t.bindRenderbuffer(t.RENDERBUFFER,f),t.renderbufferStorage(t.RENDERBUFFER,d,s,a),t.bindRenderbuffer(t.RENDERBUFFER,g),t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,this.captureFrameBuffer),t.framebufferRenderbuffer(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,e.WebGlConstants.RENDERBUFFER.value,f);var C=p.getParameter(p.READ_FRAMEBUFFER_BINDING),E=p.getParameter(p.DRAW_FRAMEBUFFER_BINDING);p.bindFramebuffer(p.READ_FRAMEBUFFER,n),p.bindFramebuffer(p.DRAW_FRAMEBUFFER,this.captureFrameBuffer),p.blitFramebuffer(0,0,s,a,0,0,s,a,t.COLOR_BUFFER_BIT,t.NEAREST),p.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,this.captureFrameBuffer),p.bindFramebuffer(p.READ_FRAMEBUFFER,C),p.bindFramebuffer(p.DRAW_FRAMEBUFFER,E),this.context.checkFramebufferStatus(e.WebGlConstants.FRAMEBUFFER.value)===e.WebGlConstants.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,r,o,s,a,0,0,e.WebGlConstants.UNSIGNED_BYTE.value),t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,n),t.deleteRenderbuffer(f)}else{t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,this.captureFrameBuffer),t.framebufferRenderbuffer(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,e.WebGlConstants.RENDERBUFFER.value,u),this.context.checkFramebufferStatus(e.WebGlConstants.FRAMEBUFFER.value)===e.WebGlConstants.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,r,o,s,a,0,0,c),t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,n)}},o.prototype.readFrameBufferAttachmentFromTexture=function(t,n,i,r,o,s,a,l,c,u){var h=0;this.contextVersion>1&&(h=this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER.value));var d=this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.value),m=this.context.getFramebufferAttachmentParameter(l,i.value,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.value),p=(m>0?e.WebGlConstantsByValue[m].name:e.WebGlConstants.TEXTURE_2D.name,c);if(u.__SPECTOR_Object_CustomData){var f=u.__SPECTOR_Object_CustomData;if(s=f.width,a=f.height,p=f.type,!e.ReadPixelsHelper.isSupportedCombination(f.type,f.format,f.internalFormat))return}t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,this.captureFrameBuffer),0===h?t.framebufferTexture2D(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,m||e.WebGlConstants.TEXTURE_2D.value,u,d):t.framebufferTextureLayer(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,u,d,h),this.context.checkFramebufferStatus(e.WebGlConstants.FRAMEBUFFER.value)===e.WebGlConstants.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,r,o,s,a,m,h,p),t.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,n)},o.prototype.getCapture=function(t,n,i,r,o,a,l,c,u){var h={attachmentName:n,src:null,textureCubeMapFace:l?e.WebGlConstantsByValue[l].name:null,textureLayer:c};if(!this.quickCapture)try{var d=e.ReadPixelsHelper.readPixels(t,i,r,o,a,u);if(d){this.workingCanvas.width=o,this.workingCanvas.height=a;var m=this.workingContext2D.createImageData(Math.ceil(o),Math.ceil(a));m.data.set(d),this.workingContext2D.putImageData(m,0,0);var p=o/a;p<1?(this.captureCanvas.width=s.captureBaseSize*p,this.captureCanvas.height=s.captureBaseSize):p>1?(this.captureCanvas.width=s.captureBaseSize,this.captureCanvas.height=s.captureBaseSize/p):(this.captureCanvas.width=s.captureBaseSize,this.captureCanvas.height=s.captureBaseSize),this.captureCanvas.width=Math.max(this.captureCanvas.width,1),this.captureCanvas.height=Math.max(this.captureCanvas.height,1),this.captureContext2D.globalCompositeOperation="copy",this.captureContext2D.scale(1,-1),this.captureContext2D.translate(0,-this.captureCanvas.height),this.captureContext2D.drawImage(this.workingCanvas,0,0,o,a,0,0,this.captureCanvas.width,this.captureCanvas.height),this.captureContext2D.setTransform(1,0,0,1,0,0),this.captureContext2D.globalCompositeOperation="source-over",h.src=this.captureCanvas.toDataURL()}}catch(e){this.logger.warn("Spector can not capture the visual state: "+e)}this.currentState.Attachments.push(h)},o.prototype.analyse=function(e){},o.captureBaseSize=256,o=s=i([e.Decorators.state("VisualState")],o)}(t.BaseState);t.VisualState=r}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var r,o=function(o){function s(e,n){var i=o.call(this,e,n)||this;return i.drawCallTextureInputState=new t.DrawCallTextureInputState(e,n),i.drawCallUboInputState=new t.DrawCallUboInputState(e,n),i}var a;return n(s,o),a=s,Object.defineProperty(s.prototype,"requireStartAndStopStates",{get:function(){return!1},enumerable:!0,configurable:!0}),s.prototype.getConsumeCommands=function(){return t.drawCommands},s.prototype.getChangeCommandsByState=function(){return{}},s.prototype.readFromContext=function(){var t=this.context.getParameter(e.WebGlConstants.CURRENT_PROGRAM.value);if(t){this.currentState.frameBuffer=this.readFrameBufferFromContext(),this.currentState.programStatus={program:this.getSpectorData(t),DELETE_STATUS:this.context.getProgramParameter(t,e.WebGlConstants.DELETE_STATUS.value),LINK_STATUS:this.context.getProgramParameter(t,e.WebGlConstants.LINK_STATUS.value),VALIDATE_STATUS:this.context.getProgramParameter(t,e.WebGlConstants.VALIDATE_STATUS.value),RECOMPILABLE:e.ProgramRecompilerHelper.isBuildableProgram(t)},this.currentState.programStatus.RECOMPILABLE&&e.WebGlObjects.Program.saveInGlobalStore(t);var n=this.context.getAttachedShaders(t);this.currentState.shaders=[];for(var i=0,r=n;i<r.length;i++){var o=r[i],s=this.readShaderFromContext(o);this.currentState.shaders.push(s)}var l=this.context.getProgramParameter(t,e.WebGlConstants.ACTIVE_ATTRIBUTES.value);this.currentState.attributes=[];for(var c=0;c<l;c++){var u=this.readAttributeFromContext(t,c);this.currentState.attributes.push(u)}var h=this.context.getProgramParameter(t,e.WebGlConstants.ACTIVE_UNIFORMS.value);this.currentState.uniforms=[];var d=[];for(c=0;c<h;c++){d.push(c);var m=this.readUniformFromContext(t,c);this.currentState.uniforms.push(m)}if(this.contextVersion>1){this.readUniformsFromContextIntoState(t,d,this.currentState.uniforms);var p=this.context.getProgramParameter(t,e.WebGlConstants.ACTIVE_UNIFORM_BLOCKS.value);this.currentState.uniformBlocks=[];for(c=0;c<p;c++){var f=this.readUniformBlockFromContext(t,c);this.currentState.uniformBlocks.push(f)}if(this.context.getParameter(e.WebGlConstants.TRANSFORM_FEEDBACK_ACTIVE.value)){var g=this.context.getProgramParameter(t,e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER_MODE.value);this.currentState.transformFeedbackMode=this.getWebGlConstant(g),this.currentState.transformFeedbacks=[];var C=this.context.getProgramParameter(t,e.WebGlConstants.TRANSFORM_FEEDBACK_VARYINGS.value);for(c=0;c<C;c++){var E=this.readTransformFeedbackFromContext(t,c);this.currentState.transformFeedbacks.push(E)}}}for(c=0;c<d.length;c++){if(null!==(m=this.currentState.uniforms[c]).value&&void 0!==m.value){var A=a.samplerTypes[m.typeValue];if(A)if(m.value.length){m.textures=[];for(var v=0;v<m.value.length;v++)m.textures.push(this.readTextureFromContext(m.value[v],A))}else m.texture=this.readTextureFromContext(m.value,A)}delete m.typeValue}}},s.prototype.readFrameBufferFromContext=function(){var t=this.context.getParameter(e.WebGlConstants.FRAMEBUFFER_BINDING.value);if(!t)return null;var n={};if(n.frameBuffer=this.getSpectorData(t),this.readFrameBufferAttachmentFromContext(e.WebGlConstants.DEPTH_ATTACHMENT.value)&&(n.depthAttachment=this.readFrameBufferAttachmentFromContext(e.WebGlConstants.DEPTH_ATTACHMENT.value)),this.readFrameBufferAttachmentFromContext(e.WebGlConstants.STENCIL_ATTACHMENT.value)&&(n.stencilAttachment=this.readFrameBufferAttachmentFromContext(e.WebGlConstants.STENCIL_ATTACHMENT.value)),this.extensions[e.WebGlConstants.MAX_DRAW_BUFFERS_WEBGL.extensionName]){n.colorAttachments=[];for(var i=this.context.getParameter(e.WebGlConstants.MAX_DRAW_BUFFERS_WEBGL.value),r=0;r<i;r++){(s=this.readFrameBufferAttachmentFromContext(e.WebGlConstantsByName["COLOR_ATTACHMENT"+r+"_WEBGL"].value))&&n.colorAttachments.push(s)}}else if(this.contextVersion>1){var o=this.context;n.colorAttachments=[];for(i=o.getParameter(e.WebGlConstants.MAX_DRAW_BUFFERS.value),r=0;r<i;r++){(s=this.readFrameBufferAttachmentFromContext(e.WebGlConstantsByName["COLOR_ATTACHMENT"+r].value))&&n.colorAttachments.push(s)}}else{var s;(s=this.readFrameBufferAttachmentFromContext(e.WebGlConstantsByName.COLOR_ATTACHMENT0.value))&&(n.colorAttachments=[s])}return n},s.prototype.readFrameBufferAttachmentFromContext=function(t){var n=e.WebGlConstants.FRAMEBUFFER.value,i=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value);if(i!==e.WebGlConstants.NONE.value){var r={},o=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.value);if(i===e.WebGlConstants.RENDERBUFFER.value){if(r.type="RENDERBUFFER",r.buffer=this.getSpectorData(o),o){var s=o.__SPECTOR_Object_CustomData;s&&(s.internalFormat&&(r.internalFormat=this.getWebGlConstant(s.internalFormat)),r.width=s.width,r.height=s.height,r.msaaSamples=s.samples)}}else if(i===e.WebGlConstants.TEXTURE.value){r.type="TEXTURE",r.texture=this.getSpectorData(o),r.textureLevel=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.value);var a=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.value);r.textureCubeMapFace=this.getWebGlConstant(a),this.drawCallTextureInputState.appendTextureState(r,o)}return this.extensions.EXT_sRGB&&(r.encoding=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT.value))),this.contextVersion>1&&(r.alphaSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE.value),r.blueSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE.value),r.encoding=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING.value)),r.componentType=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE.value)),r.depthSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE.value),r.greenSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE.value),r.redSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_RED_SIZE.value),r.stencilSize=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE.value),i===e.WebGlConstants.TEXTURE.value&&(r.textureLayer=this.context.getFramebufferAttachmentParameter(n,t,e.WebGlConstants.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER.value))),r}},s.prototype.readShaderFromContext=function(t){var n=this.context.getShaderSource(t),i=this.getSpectorData(t),r=t&&t.__SPECTOR_Metadata&&t.__SPECTOR_Metadata.name?t.__SPECTOR_Metadata.name:this.readNameFromShaderSource(n);return r||(r=this.context.getShaderParameter(t,e.WebGlConstants.SHADER_TYPE.value)===e.WebGlConstants.FRAGMENT_SHADER.value?"Fragment":"Vertex"),{shader:i,COMPILE_STATUS:this.context.getShaderParameter(t,e.WebGlConstants.COMPILE_STATUS.value),DELETE_STATUS:this.context.getShaderParameter(t,e.WebGlConstants.DELETE_STATUS.value),SHADER_TYPE:this.getWebGlConstant(this.context.getShaderParameter(t,e.WebGlConstants.SHADER_TYPE.value)),source:n,name:r}},s.prototype.readAttributeFromContext=function(t,n){var i=this.context.getActiveAttrib(t,n),r=this.context.getAttribLocation(t,i.name);if(-1===r)return{name:i.name,size:i.size,type:this.getWebGlConstant(i.type),location:-1};var o=this.context.getVertexAttrib(r,e.WebGlConstants.CURRENT_VERTEX_ATTRIB.value),s=this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING.value),a={name:i.name,size:i.size,type:this.getWebGlConstant(i.type),location:r,offsetPointer:this.context.getVertexAttribOffset(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_POINTER.value),bufferBinding:this.getSpectorData(s),enabled:this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_ENABLED.value),arraySize:this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_SIZE.value),stride:this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_STRIDE.value),arrayType:this.getWebGlConstant(this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_TYPE.value)),normalized:this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_NORMALIZED.value),vertexAttrib:Array.prototype.slice.call(o)};return this.extensions[e.WebGlConstants.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE.extensionName]?a.divisor=this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE.value):this.contextVersion>1&&(a.integer=this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_INTEGER.value),a.divisor=this.context.getVertexAttrib(r,e.WebGlConstants.VERTEX_ATTRIB_ARRAY_DIVISOR.value)),this.appendBufferCustomData(a,s),a},s.prototype.readUniformFromContext=function(e,t){var n=this.context.getActiveUniform(e,t),i=this.context.getUniformLocation(e,n.name);if(i){if(n.size>1&&n.name&&n.name.indexOf("[0]")===n.name.length-3){for(var r=[],o=0;o<n.size;o++){var s=this.context.getUniformLocation(e,n.name.replace("[0]","["+o+"]"));if(s)(a=this.context.getUniform(e,s)).length&&(a=Array.prototype.slice.call(a)),r.push({value:a})}return{name:n.name.replace("[0]",""),size:n.size,type:this.getWebGlConstant(n.type),typeValue:n.type,location:this.getSpectorData(i),values:r}}var a;return(a=this.context.getUniform(e,i)).length&&(a=Array.prototype.slice.call(a)),{name:n.name,size:n.size,type:this.getWebGlConstant(n.type),typeValue:n.type,location:this.getSpectorData(i),value:a}}return{name:n.name,size:n.size,type:this.getWebGlConstant(n.type),typeValue:n.type}},s.prototype.readTextureFromContext=function(t,n){var i=this.context.getParameter(e.WebGlConstants.ACTIVE_TEXTURE.value);this.context.activeTexture(e.WebGlConstants.TEXTURE0.value+t);var r={magFilter:this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_MAG_FILTER.value)),minFilter:this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_MIN_FILTER.value)),wrapS:this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_WRAP_S.value)),wrapT:this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_WRAP_T.value))};if(this.extensions[e.WebGlConstants.TEXTURE_MAX_ANISOTROPY_EXT.extensionName]&&(r.anisotropy=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_MAX_ANISOTROPY_EXT.value)),this.contextVersion>1){r.baseLevel=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_BASE_LEVEL.value),r.immutable=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_FORMAT.value),r.immutableLevels=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value),r.maxLevel=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value);var o=this.context.getParameter(e.WebGlConstants.SAMPLER_BINDING.value);if(o){r.sampler=this.getSpectorData(o);var s=this.context;r.samplerMaxLod=s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value),r.samplerMinLod=s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value),r.samplerCompareFunc=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_COMPARE_FUNC.value)),r.samplerCompareMode=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_COMPARE_MODE.value)),r.samplerWrapS=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_WRAP_S.value)),r.samplerWrapT=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_WRAP_T.value)),r.samplerWrapR=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value)),r.samplerMagFilter=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_MAG_FILTER.value)),r.samplerMinFilter=this.getWebGlConstant(s.getSamplerParameter(o,e.WebGlConstants.TEXTURE_MIN_FILTER.value))}else r.maxLod=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value),r.minLod=this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value),r.compareFunc=this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_COMPARE_FUNC.value)),r.compareMode=this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_COMPARE_MODE.value)),r.wrapR=this.getWebGlConstant(this.context.getTexParameter(n.value,e.WebGlConstants.TEXTURE_IMMUTABLE_LEVELS.value))}var a=this.getTextureStorage(n);if(a){var l=this.quickCapture?null:n;this.drawCallTextureInputState.appendTextureState(r,a,l)}return this.context.activeTexture(i),r},s.prototype.getTextureStorage=function(t){return t===e.WebGlConstants.TEXTURE_2D?this.context.getParameter(e.WebGlConstants.TEXTURE_BINDING_2D.value):t===e.WebGlConstants.TEXTURE_CUBE_MAP?this.context.getParameter(e.WebGlConstants.TEXTURE_BINDING_CUBE_MAP.value):t===e.WebGlConstants.TEXTURE_3D?this.context.getParameter(e.WebGlConstants.TEXTURE_BINDING_3D.value):t===e.WebGlConstants.TEXTURE_2D_ARRAY?this.context.getParameter(e.WebGlConstants.TEXTURE_BINDING_2D_ARRAY.value):void 0},s.prototype.readUniformsFromContextIntoState=function(t,n,i){for(var r=this.context,o=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_TYPE.value),s=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_SIZE.value),a=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_BLOCK_INDEX.value),l=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_OFFSET.value),c=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_ARRAY_STRIDE.value),u=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_MATRIX_STRIDE.value),h=r.getActiveUniforms(t,n,e.WebGlConstants.UNIFORM_IS_ROW_MAJOR.value),d=0;d<n.length;d++){var m=i[d];m.type=this.getWebGlConstant(o[d]),m.size=s[d],m.blockIndice=a[d],m.blockIndice>-1&&(m.blockName=r.getActiveUniformBlockName(t,m.blockIndice)),m.offset=l[d],m.arrayStride=c[d],m.matrixStride=u[d],m.rowMajor=h[d],m.blockIndice>-1&&(m.value=this.drawCallUboInputState.getUboValue(a[d],m.offset,m.size,o[d]))}},s.prototype.readTransformFeedbackFromContext=function(t,n){var i=this.context,r=i.getTransformFeedbackVarying(t,n),o=i.getIndexedParameter(e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER_BINDING.value,n),s={name:r.name,size:r.size,type:this.getWebGlConstant(r.type),buffer:this.getSpectorData(o),bufferSize:i.getIndexedParameter(e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER_SIZE.value,n),bufferStart:i.getIndexedParameter(e.WebGlConstants.TRANSFORM_FEEDBACK_BUFFER_START.value,n)};return this.appendBufferCustomData(s,o),s},s.prototype.readUniformBlockFromContext=function(t,n){var i=this.context,r=i.getActiveUniformBlockParameter(t,n,e.WebGlConstants.UNIFORM_BLOCK_BINDING.value),o=i.getIndexedParameter(e.WebGlConstants.UNIFORM_BUFFER_BINDING.value,r),s={name:i.getActiveUniformBlockName(t,n),bindingPoint:r,size:i.getActiveUniformBlockParameter(t,n,e.WebGlConstants.UNIFORM_BLOCK_DATA_SIZE.value),activeUniformCount:i.getActiveUniformBlockParameter(t,n,e.WebGlConstants.UNIFORM_BLOCK_ACTIVE_UNIFORMS.value),vertex:i.getActiveUniformBlockParameter(t,n,e.WebGlConstants.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER.value),fragment:i.getActiveUniformBlockParameter(t,n,e.WebGlConstants.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER.value),buffer:this.getSpectorData(o)};return this.appendBufferCustomData(s,o),s},s.prototype.appendBufferCustomData=function(e,t){if(t){var n=t.__SPECTOR_Object_CustomData;n&&(n.usage&&(e.bufferUsage=this.getWebGlConstant(n.usage)),e.bufferLength=n.length,n.offset&&(e.bufferOffset=n.offset),n.sourceLength&&(e.bufferSourceLength=n.sourceLength))}},s.prototype.getWebGlConstant=function(t){var n=e.WebGlConstantsByValue[t];return n?n.name:t},s.prototype.readNameFromShaderSource=function(e){try{var t="",n=void 0,i=/#define[\s]+SHADER_NAME[\s]+([\S]+)(\n|$)/gi;if(null!==(n=i.exec(e))&&(n.index===i.lastIndex&&i.lastIndex++,t=n[1]),""===t){var r=/#define[\s]+SHADER_NAME_B64[\s]+([\S]+)(\n|$)/gi;null!==(n=r.exec(e))&&(n.index===r.lastIndex&&r.lastIndex++,t=n[1]),t&&(t=decodeURIComponent(atob(t)))}return t}catch(e){return null}},s.samplerTypes=((r={})[e.WebGlConstants.SAMPLER_2D.value]=e.WebGlConstants.TEXTURE_2D,r[e.WebGlConstants.SAMPLER_CUBE.value]=e.WebGlConstants.TEXTURE_CUBE_MAP,r[e.WebGlConstants.SAMPLER_3D.value]=e.WebGlConstants.TEXTURE_3D,r[e.WebGlConstants.SAMPLER_2D_SHADOW.value]=e.WebGlConstants.TEXTURE_2D,r[e.WebGlConstants.SAMPLER_2D_ARRAY.value]=e.WebGlConstants.TEXTURE_2D_ARRAY,r[e.WebGlConstants.SAMPLER_2D_ARRAY_SHADOW.value]=e.WebGlConstants.TEXTURE_2D_ARRAY,r[e.WebGlConstants.SAMPLER_CUBE_SHADOW.value]=e.WebGlConstants.TEXTURE_CUBE_MAP,r[e.WebGlConstants.INT_SAMPLER_2D.value]=e.WebGlConstants.TEXTURE_2D,r[e.WebGlConstants.INT_SAMPLER_3D.value]=e.WebGlConstants.TEXTURE_3D,r[e.WebGlConstants.INT_SAMPLER_CUBE.value]=e.WebGlConstants.TEXTURE_CUBE_MAP,r[e.WebGlConstants.INT_SAMPLER_2D_ARRAY.value]=e.WebGlConstants.TEXTURE_2D_ARRAY,r[e.WebGlConstants.UNSIGNED_INT_SAMPLER_2D.value]=e.WebGlConstants.TEXTURE_2D,r[e.WebGlConstants.UNSIGNED_INT_SAMPLER_3D.value]=e.WebGlConstants.TEXTURE_3D,r[e.WebGlConstants.UNSIGNED_INT_SAMPLER_CUBE.value]=e.WebGlConstants.TEXTURE_CUBE_MAP,r[e.WebGlConstants.UNSIGNED_INT_SAMPLER_2D_ARRAY.value]=e.WebGlConstants.TEXTURE_2D_ARRAY,r),s=a=i([e.Decorators.state("DrawCall")],s)}(t.BaseState);t.DrawCallState=o}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var n=function(){function n(e,t){this.logger=t,this.context=e.context,this.captureFrameBuffer=e.context.createFramebuffer(),this.workingCanvas=document.createElement("canvas"),this.workingContext2D=this.workingCanvas.getContext("2d"),this.captureCanvas=document.createElement("canvas"),this.captureContext2D=this.captureCanvas.getContext("2d"),this.captureContext2D.imageSmoothingEnabled=!0,this.captureContext2D.mozImageSmoothingEnabled=!0,this.captureContext2D.oImageSmoothingEnabled=!0,this.captureContext2D.webkitImageSmoothingEnabled=!0,this.captureContext2D.msImageSmoothingEnabled=!0}return n.prototype.appendTextureState=function(e,t,n){if(void 0===n&&(n=null),t){var i=t.__SPECTOR_Object_CustomData;i&&(i.type&&(e.textureType=this.getWebGlConstant(i.type)),i.format&&(e.format=this.getWebGlConstant(i.format)),i.internalFormat&&(e.internalFormat=this.getWebGlConstant(i.internalFormat)),e.width=i.width,e.height=i.height,i.depth&&(e.depth=i.depth),n&&(e.visual=this.getTextureVisualState(n,t,i)))}},n.prototype.getTextureVisualState=function(t,i,r){try{var o=this.context,s={};if(!e.ReadPixelsHelper.isSupportedCombination(r.type,r.format,r.internalFormat))return s;var a=this.context.getParameter(e.WebGlConstants.FRAMEBUFFER_BINDING.value);o.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,this.captureFrameBuffer);try{var l=r.width,c=r.height;if(t===e.WebGlConstants.TEXTURE_3D&&r.depth)for(var u=o,h=0;h<r.depth;h++)h>2&&h<r.depth-3||(u.framebufferTextureLayer(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,i,0,h),s["3D Layer "+h]=this.getCapture(o,0,0,l,c,r.type));else if(t===e.WebGlConstants.TEXTURE_2D_ARRAY&&r.depth)for(u=o,h=0;h<r.depth;h++)h>2&&h<r.depth-3||(u.framebufferTextureLayer(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,i,0,h),s["Layer "+h]=this.getCapture(o,0,0,l,c,r.type));else if(t===e.WebGlConstants.TEXTURE_CUBE_MAP)for(var d=0,m=n.cubeMapFaces;d<m.length;d++){var p=m[d];o.framebufferTexture2D(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,p.value,i,0),s[p.name]=this.getCapture(o,0,0,l,c,r.type)}else o.framebufferTexture2D(e.WebGlConstants.FRAMEBUFFER.value,e.WebGlConstants.COLOR_ATTACHMENT0.value,e.WebGlConstants.TEXTURE_2D.value,i,0),s[e.WebGlConstants.TEXTURE_2D.name]=this.getCapture(o,0,0,l,c,r.type)}catch(e){}return o.bindFramebuffer(e.WebGlConstants.FRAMEBUFFER.value,a),s}catch(e){}},n.prototype.getCapture=function(n,i,r,o,s,a){try{if(this.context.checkFramebufferStatus(e.WebGlConstants.FRAMEBUFFER.value)!==e.WebGlConstants.FRAMEBUFFER_COMPLETE.value)return;a=a||e.WebGlConstants.UNSIGNED_BYTE.value;var l=e.ReadPixelsHelper.readPixels(n,i,r,o,s,a);if(!l)return;this.workingCanvas.width=o,this.workingCanvas.height=s;var c=this.workingContext2D.createImageData(o,s);c.data.set(l),this.workingContext2D.putImageData(c,0,0);var u=o/s;return u<1?(this.captureCanvas.width=t.VisualState.captureBaseSize*u,this.captureCanvas.height=t.VisualState.captureBaseSize):u>1?(this.captureCanvas.width=t.VisualState.captureBaseSize,this.captureCanvas.height=t.VisualState.captureBaseSize/u):(this.captureCanvas.width=t.VisualState.captureBaseSize,this.captureCanvas.height=t.VisualState.captureBaseSize),this.captureCanvas.width=Math.max(this.captureCanvas.width,1),this.captureCanvas.height=Math.max(this.captureCanvas.height,1),this.captureContext2D.globalCompositeOperation="copy",this.captureContext2D.scale(1,-1),this.captureContext2D.translate(0,-this.captureCanvas.height),this.captureContext2D.drawImage(this.workingCanvas,0,0,o,s,0,0,this.captureCanvas.width,this.captureCanvas.height),this.captureContext2D.setTransform(1,0,0,1,0,0),this.captureContext2D.globalCompositeOperation="source-over",this.captureCanvas.toDataURL()}catch(e){}},n.prototype.getWebGlConstant=function(t){var n=e.WebGlConstantsByValue[t];return n?n.name:t+""},n.captureBaseSize=64,n.cubeMapFaces=[e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_X,e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_Y,e.WebGlConstants.TEXTURE_CUBE_MAP_POSITIVE_Z,e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_X,e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_Y,e.WebGlConstants.TEXTURE_CUBE_MAP_NEGATIVE_Z],n}();t.DrawCallTextureInputState=n}(e.States||(e.States={}))}(r||(r={})),function(e){!function(t){var n,i=function(){function t(e,t){this.logger=t,this.context=e.context}return t.prototype.getUboValue=function(n,i,r,o){var s=t.uboTypes[o];if(s){var a=new s.arrayBufferView(r*s.lengthMultiplier),l=this.context,c=l.getIndexedParameter(e.WebGlConstants.UNIFORM_BUFFER_BINDING.value,n);if(c){var u=l.getParameter(e.WebGlConstants.UNIFORM_BUFFER_BINDING.value);try{l.bindBuffer(e.WebGlConstants.UNIFORM_BUFFER.value,c),l.getBufferSubData(e.WebGlConstants.UNIFORM_BUFFER.value,i,a)}catch(e){return}u&&l.bindBuffer(e.WebGlConstants.UNIFORM_BUFFER.value,u)}return Array.prototype.slice.call(a)}},t.uboTypes=((n={})[e.WebGlConstants.BOOL.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},n[e.WebGlConstants.BOOL_VEC2.value]={arrayBufferView:Uint8Array,lengthMultiplier:2},n[e.WebGlConstants.BOOL_VEC3.value]={arrayBufferView:Uint8Array,lengthMultiplier:3},n[e.WebGlConstants.BOOL_VEC4.value]={arrayBufferView:Uint8Array,lengthMultiplier:4},n[e.WebGlConstants.INT.value]={arrayBufferView:Int32Array,lengthMultiplier:1},n[e.WebGlConstants.INT_VEC2.value]={arrayBufferView:Int32Array,lengthMultiplier:2},n[e.WebGlConstants.INT_VEC3.value]={arrayBufferView:Int32Array,lengthMultiplier:3},n[e.WebGlConstants.INT_VEC4.value]={arrayBufferView:Int32Array,lengthMultiplier:4},n[e.WebGlConstants.UNSIGNED_INT.value]={arrayBufferView:Uint32Array,lengthMultiplier:1},n[e.WebGlConstants.UNSIGNED_INT_VEC2.value]={arrayBufferView:Uint32Array,lengthMultiplier:2},n[e.WebGlConstants.UNSIGNED_INT_VEC3.value]={arrayBufferView:Uint32Array,lengthMultiplier:3},n[e.WebGlConstants.UNSIGNED_INT_VEC4.value]={arrayBufferView:Uint32Array,lengthMultiplier:4},n[e.WebGlConstants.FLOAT.value]={arrayBufferView:Float32Array,lengthMultiplier:1},n[e.WebGlConstants.FLOAT_VEC2.value]={arrayBufferView:Float32Array,lengthMultiplier:2},n[e.WebGlConstants.FLOAT_VEC3.value]={arrayBufferView:Float32Array,lengthMultiplier:3},n[e.WebGlConstants.FLOAT_VEC4.value]={arrayBufferView:Float32Array,lengthMultiplier:4},n[e.WebGlConstants.FLOAT_MAT2.value]={arrayBufferView:Float32Array,lengthMultiplier:4},n[e.WebGlConstants.FLOAT_MAT2x3.value]={arrayBufferView:Float32Array,lengthMultiplier:6},n[e.WebGlConstants.FLOAT_MAT2x4.value]={arrayBufferView:Float32Array,lengthMultiplier:8},n[e.WebGlConstants.FLOAT_MAT3.value]={arrayBufferView:Float32Array,lengthMultiplier:9},n[e.WebGlConstants.FLOAT_MAT3x2.value]={arrayBufferView:Float32Array,lengthMultiplier:6},n[e.WebGlConstants.FLOAT_MAT3x4.value]={arrayBufferView:Float32Array,lengthMultiplier:12},n[e.WebGlConstants.FLOAT_MAT4.value]={arrayBufferView:Float32Array,lengthMultiplier:16},n[e.WebGlConstants.FLOAT_MAT4x2.value]={arrayBufferView:Float32Array,lengthMultiplier:8},n[e.WebGlConstants.FLOAT_MAT4x3.value]={arrayBufferView:Float32Array,lengthMultiplier:12},n[e.WebGlConstants.SAMPLER_2D.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},n[e.WebGlConstants.SAMPLER_CUBE.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},n),t}();t.DrawCallUboInputState=i}(e.States||(e.States={}))}(r||(r={})),function(e){!function(e){var t="__SPECTOR_Object_TAG";function n(e){return e?e.typeName+" - ID: "+e.id:"No tag available."}e.getWebGlObjectTag=function(e){return e[t]},e.attachWebGlObjectTag=function(e,i){i.displayText=n(i),e[t]=i},e.stringifyWebGlObjectTag=n}(e.WebGlObjects||(e.WebGlObjects={}))}(r||(r={})),function(e){!function(e){var t=function(){function t(e,t){this.options=e,this.typeName=e.typeName,this.type=e.type,this.id=0}return t.prototype.tagWebGlObject=function(t){if(this.type){var n;if(!t)return n;if(n=e.getWebGlObjectTag(t))return n;if(t instanceof this.type){var i=this.getNextId();return n={typeName:this.typeName,id:i},e.attachWebGlObjectTag(t,n),n}return n}},t.prototype.getNextId=function(){return this.id++},t}();e.BaseWebGlObject=t}(e.WebGlObjects||(e.WebGlObjects={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLBuffer")],r)}(t.BaseWebGlObject);t.Buffer=r;var o=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLFramebuffer")],r)}(t.BaseWebGlObject);t.FrameBuffer=o;var s=function(r){function o(e,t){return r.call(this,e,t)||this}return n(o,r),o.saveInGlobalStore=function(e){var n=t.getWebGlObjectTag(e);n&&(this.store[n.id]=e)},o.getFromGlobalStore=function(e){return this.store[e]},o.updateInGlobalStore=function(e,n){if(n){var i=this.getFromGlobalStore(e);if(i){var r=t.getWebGlObjectTag(i);r&&(t.attachWebGlObjectTag(n,r),this.store[r.id]=n)}}},o.store={},o=i([e.Decorators.webGlObject("WebGLProgram")],o)}(t.BaseWebGlObject);t.Program=s;var a=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLQuery")],r)}(t.BaseWebGlObject);t.Query=a;var l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLRenderbuffer")],r)}(t.BaseWebGlObject);t.Renderbuffer=l;var c=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLSampler")],r)}(t.BaseWebGlObject);t.Sampler=c;var u=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLShader")],r)}(t.BaseWebGlObject);t.Shader=u;var h=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLSync")],r)}(t.BaseWebGlObject);t.Sync=h;var d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLTexture")],r)}(t.BaseWebGlObject);t.Texture=d;var m=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLTransformFeedback")],r)}(t.BaseWebGlObject);t.TransformFeedback=m;var p=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLUniformLocation")],r)}(t.BaseWebGlObject);t.UniformLocation=p;var f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r=i([e.Decorators.webGlObject("WebGLVertexArrayObject")],r)}(t.BaseWebGlObject);t.VertexArrayObject=f}(e.WebGlObjects||(e.WebGlObjects={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(e,t){this.options=e,this.logger=t,this.analyserName=e.analyserName}return e.prototype.appendAnalysis=function(e){e.analyses=e.analyses||[];var t=this.getAnalysis(e);e.analyses.push(t)},e.prototype.getAnalysis=function(e){var t={analyserName:this.analyserName};return this.appendToAnalysis(e,t),t},e}();e.BaseAnalyser=t}(e.Analysers||(e.Analysers={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e,t){this.options=e,this.logger=t,this.analysers={},this.analyserConstructors={},this.contextInformation=e.contextInformation,this.initAvailableAnalysers(),this.initAnalysers()}return t.prototype.appendAnalyses=function(e){for(var t in this.analysers){if(this.analysers.hasOwnProperty(t))this.analysers[t].appendAnalysis(e)}},t.prototype.initAvailableAnalysers=function(){for(var t in this.options.analyserNamespace)if(this.options.analyserNamespace.hasOwnProperty(t)){var n=this.options.analyserNamespace[t],i=e.Decorators.getAnalyserName(n);i&&(this.analyserConstructors[i]=n)}},t.prototype.initAnalysers=function(){for(var t in this.analyserConstructors)if(this.analyserConstructors.hasOwnProperty(t)){var n=e.merge({analyserName:t},this.contextInformation),i=new this.analyserConstructors[t](n,this.logger);this.analysers[t]=i}},t}();t.CaptureAnalyser=n}(e.Analysers||(e.Analysers={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}var o;return n(r,t),o=r,r.prototype.appendToAnalysis=function(e,t){if(e.commands){t.total=e.commands.length,t.draw=0,t.clear=0;for(var n=0,i=e.commands;n<i.length;n++){var r=i[n];"clear"===r.name?t.clear++:o.drawCommands.indexOf(r.name)>-1&&t.draw++}}},r.drawCommands=["drawArrays","drawElements","drawArraysInstanced","drawArraysInstancedANGLE","drawElementsInstanced","drawElementsInstancedANGLE","drawRangeElements"],r=o=i([e.Decorators.analyser("CommandsSummary")],r)}(t.BaseAnalyser);t.CommandsSummaryAnalyser=r}(e.Analysers||(e.Analysers={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.appendToAnalysis=function(e,t){if(e.commands){for(var n={},i=0,r=e.commands;i<r.length;i++){var o=r[i];n[o.name]=n[o.name]||0,n[o.name]++}var s=Object.keys(n).map(function(e){return[e,n[e]]});s.sort(function(e,t){var n=t[1]-e[1];return 0===n?e[0].localeCompare(t[0]):n});for(var a=0,l=s;a<l.length;a++){var c=l[a];t[c[0]]=c[1]}}},r=i([e.Decorators.analyser("Commands")],r)}(t.BaseAnalyser);t.CommandsAnalyser=r}(e.Analysers||(e.Analysers={}))}(r||(r={})),function(e){!function(t){var r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.appendToAnalysis=function(e,t){if(e.commands){for(var n={total:0,totalTriangles:0,totalTriangleStrip:0,totalTriangleFan:0,totalLines:0,totalLineStrip:0,totalLineLoop:0,totalPoints:0},i=0,r=e.commands;i<r.length;i++){var o=r[i];"drawArrays"===o.name&&o.commandArguments.length>=3?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[2]):"drawArraysInstanced"===o.name&&o.commandArguments.length>=3?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[2]):"drawArraysInstancedANGLE"===o.name&&o.commandArguments.length>=3?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[2]):"drawElements"===o.name&&o.commandArguments.length>=2?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[1]):"drawElementsInstanced"===o.name&&o.commandArguments.length>=2?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[1]):"drawElementsInstancedANGLE"===o.name&&o.commandArguments.length>=2?this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[1]):"drawRangeElements"===o.name&&o.commandArguments.length>=4&&this.appendToPrimitives(n,o.commandArguments[0],o.commandArguments[3])}t.total=n.total,t.triangles=n.totalTriangles,t.triangleStrip=n.totalTriangleStrip,t.triangleFan=n.totalTriangleFan,t.lines=n.totalLines,t.lineStrip=n.totalLineStrip,t.lineLoop=n.totalLineLoop,t.points=n.totalPoints}},r.prototype.appendToPrimitives=function(t,n,i){n===e.WebGlConstants.POINTS.value?t.totalPoints+=i:n===e.WebGlConstants.LINES.value?t.totalLines+=i:n===e.WebGlConstants.LINE_STRIP.value?t.totalLineStrip+=i:n===e.WebGlConstants.LINE_LOOP.value?t.totalLineLoop+=i:n===e.WebGlConstants.TRIANGLES.value?t.totalTriangles+=i:n===e.WebGlConstants.TRIANGLE_STRIP.value?t.totalTriangleStrip+=i:n===e.WebGlConstants.TRIANGLE_FAN.value&&(t.totalTriangleFan+=i),t.total+=i},r=i([e.Decorators.analyser("Primitives")],r)}(t.BaseAnalyser);t.PrimitivesAnalyser=r}(e.Analysers||(e.Analysers={}))}(r||(r={})),function(e){!function(t){var n=function(){function t(e){this.logger=e}return t.prototype.compare=function(e,t){var n={groups:[],properties:[]},i=this.compareGroups("Command",e,t).groups[0];return n.groups=i.groups,n.properties=i.properties,n},t.prototype.compareGroups=function(t,n,i){var r={},o={name:t,groups:[],properties:[],status:e.CaptureComparisonStatus.Equal};for(var s in n)if(n.hasOwnProperty(s)){var a=n[s];if(i.hasOwnProperty(s)){var l=i[s];if("object"==typeof a)(c=this.compareGroups(s,a,l)).status!==e.CaptureComparisonStatus.Equal&&(o.status=e.CaptureComparisonStatus.Different),o.groups.push(c);else(c=this.compareProperties(s,a,l)).status!==e.CaptureComparisonStatus.Equal&&(o.status=e.CaptureComparisonStatus.Different),o.properties.push(c)}else if(o.status=e.CaptureComparisonStatus.Different,"object"==typeof a){var c={name:t,status:e.CaptureComparisonStatus.OnlyInA,groups:[],properties:[]};o.groups.push(c)}else{c={name:t,status:e.CaptureComparisonStatus.OnlyInA,valueA:a,valueB:null};o.properties.push(c)}r[s]=!0}for(var u in i){if(i.hasOwnProperty(u))if(!r[u])if(o.status=e.CaptureComparisonStatus.Different,"object"==typeof(l=i[u])){c={name:t,status:e.CaptureComparisonStatus.OnlyInB,groups:[],properties:[]};o.groups.push(c)}else{c={name:t,status:e.CaptureComparisonStatus.OnlyInB,valueA:null,valueB:l};o.properties.push(c)}}return o},t.prototype.compareProperties=function(t,n,i){return{name:t,status:n===i?e.CaptureComparisonStatus.Equal:e.CaptureComparisonStatus.Different,valueA:n,valueB:i}},t}();t.CommandComparator=n}(e.Comparators||(e.Comparators={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(){}return e.scrollIntoView=function(e){for(var t=e.getBoundingClientRect(),n=e.parentElement;n&&n.clientHeight===n.offsetHeight;)n=n.parentElement;if(n){var i=n.getBoundingClientRect();t.top<i.top?e.scrollIntoView(!0):t.bottom>i.bottom&&e.scrollIntoView(!1)}},e}();e.ScrollIntoViewHelper=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(e,t){this.eventConstructor=e,this.logger=t,this.dummyTextGeneratorElement=document.createElement("div")}return e.prototype.createFromHtml=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},e.prototype.htmlTemplate=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=e.raw,o="";return n.forEach(function(e,n){var i=r[n];Array.isArray(e)&&(e=e.join("")),i&&i.length>0&&"$"===i[i.length-1]?i=i.slice(0,-1):e=t.htmlEscape(e),o+=i,o+=e}),o+=r[r.length-1]},e.prototype.htmlEscape=function(e){return null===e||void 0===e||0===e.length?e:(this.dummyTextGeneratorElement.innerText=e,this.dummyTextGeneratorElement.innerHTML)},e}();e.BaseNoneGenericComponent=t;var i=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.events={},i}return n(t,e),t.prototype.addEventListener=function(e,t,n){return void 0===n&&(n=null),this.events[e]?this.events[e].add(t,n):-1},t.prototype.removeEventListener=function(e,t){this.events[e]&&this.events[e].remove(t)},t.prototype.renderElementFromTemplate=function(e,t,n){var i=this.createFromHtml(e);return this.bindCommands(i,t,n),i},t.prototype.bindCommands=function(e,t,n){e.getAttribute("commandname")&&this.bindCommand(e,t,n);for(var i=e.querySelectorAll("[commandName]"),r=0;r<i.length;r++){var o=i[r];this.bindCommand(o,t,n)}},t.prototype.bindCommand=function(e,t,n){var i=e.getAttribute("commandname"),r=e.getAttribute("commandeventbinding")||"";0===r.length&&(r="click");var o="true"===e.getAttribute("usecapture");this.createEvent(i),this.mapEventListener(e,r,i,t,n,o)},t.prototype.mapEventListener=function(e,t,n,i,r,o,s){void 0===o&&(o=!1),void 0===s&&(s=!1);var a=this;s?e.addEventListener(t,function(e){e.stopPropagation(),e.preventDefault(),a.triggerEvent(n,this,i,r)},o):e.addEventListener(t,function(){a.triggerEvent(n,this,i,r)},o)},t.prototype.createEvent=function(e){if(!this.events[e]){var t=new this.eventConstructor;this.events[e]=t}return this.events[e]},t.prototype.triggerEvent=function(e,t,n,i){this.events[e].trigger({sender:t,stateId:i,state:n})},t}(t);e.BaseComponent=i}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(e,t,n){this.logger=n,this.placeHolder=e,this.stateStore=t}return e.prototype.compose=function(e){var t=this.stateStore.getStatesToProcess(),n=!1;for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],o=this.stateStore.getLastOperation(r),s=this.stateStore.getComponentInstance(r),a=this.stateStore.getData(r);s.render(a,r,o),n=!0}if(n){var l=this.stateStore.getLastOperation(e);this.composeInContainer(this.placeHolder,Number.MAX_VALUE,e,l)}},e.prototype.composeChildren=function(e,t){if(t)for(var n=this.stateStore.getChildrenIds(e),i=0,r=0;r<n.length;r++){var o=n[r],s=this.stateStore.getLastOperation(o);this.composeInContainer(t,i,o,s),50!==s&&i++}},e.prototype.composeInContainer=function(e,t,n,i){var r=this.stateStore.getComponentInstance(n).composeInContainer(e,t,i);this.composeChildren(n,r)},e}();e.Compositor=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function t(t,n){this.logger=n,this.stateStore=new e.StateStore(n),this.compositor=new e.Compositor(t,this.stateStore,n),this.willRender=!1,this.rootStateId=-1}return t.prototype.addRootState=function(t,n,i){void 0===i&&(i=!1);var r=new e.ComponentInstance(n,this.logger),o=this.stateStore.add(t,r);return this.rootStateId=o,this.setForRender(i),o},t.prototype.addChildState=function(e,t,n,i){void 0===i&&(i=!1);var r=this.insertChildState(e,t,Number.MAX_VALUE,n);return this.setForRender(i),r},t.prototype.insertChildState=function(t,n,i,r,o){void 0===o&&(o=!1);var s=new e.ComponentInstance(r,this.logger),a=this.stateStore.insertChildAt(t,i,n,s);return this.setForRender(o),a},t.prototype.updateState=function(e,t,n){void 0===n&&(n=!1),this.stateStore.update(e,t),this.setForRender(n)},t.prototype.removeState=function(e,t){void 0===t&&(t=!1),this.stateStore.remove(e),this.setForRender(t)},t.prototype.removeChildrenStates=function(e,t){void 0===t&&(t=!1),this.stateStore.removeChildren(e),this.setForRender(t)},t.prototype.getState=function(e){return this.stateStore.getData(e)},t.prototype.getGenericState=function(e){return this.getState(e)},t.prototype.getChildrenState=function(e){var t=this;return this.stateStore.getChildrenIds(e).map(function(n){return t.stateStore.getData(e)})},t.prototype.getChildrenGenericState=function(e){return this.getChildrenState(e)},t.prototype.hasChildren=function(e){return this.stateStore.hasChildren(e)},t.prototype.updateAllChildrenState=function(e,t){for(var n=0,i=this.stateStore.getChildrenIds(e);n<i.length;n++){var r=i[n],o=this.getGenericState(r);t(o),this.updateState(r,o)}},t.prototype.updateAllChildrenGenericState=function(e,t){this.updateAllChildrenState(e,t)},t.prototype.setForRender=function(e){this.willRender||(this.willRender=!0,e?this.compose():setTimeout(this.compose.bind(this),t.REFRESHRATEINMILLISECONDS))},t.prototype.compose=function(){this.willRender=!1,this.compositor.compose(this.rootStateId),this.stateStore.flushPendingOperations()},t.REFRESHRATEINMILLISECONDS=100,t}();e.MVX=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(e,t){this.logger=t,this.component=e}return e.prototype.render=function(e,t,n){0!==n&&(50!==n?this.domNode=this.component.render(e,t):this.removeNode())},e.prototype.composeInContainer=function(e,t,n){if(50===n)return this.removeNode(),null;var i=this.cachedCurrentChildrenContainer;if(0===n)return i;var r=this.domNode,o=r.getAttribute("childrencontainer")?r:r.querySelector("[childrenContainer]");if(o&&i)for(var s=i.children;s.length>0;)o.appendChild(s[0]);if(this.cachedCurrentChildrenContainer=o,t>=e.children.length)e.appendChild(r),this.cachedCurrentDomNode&&40===n&&(this.cachedCurrentDomNode.remove?this.cachedCurrentDomNode.remove():this.cachedCurrentDomNode.parentNode&&this.cachedCurrentDomNode.parentNode.removeChild(this.cachedCurrentDomNode));else{var a=e.children[t];e.insertBefore(r,a),40===n&&e.removeChild(a)}return this.cachedCurrentDomNode=this.domNode,o},e.prototype.removeNode=function(){this.domNode&&this.domNode.parentElement&&(this.domNode.remove?this.domNode.remove():this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode)),this.cachedCurrentDomNode&&this.cachedCurrentDomNode.parentElement&&(this.cachedCurrentDomNode.remove?this.cachedCurrentDomNode.remove():this.cachedCurrentDomNode.parentNode&&this.cachedCurrentDomNode.parentNode.removeChild(this.cachedCurrentDomNode))},e.idGenerator=0,e}();e.ComponentInstance=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(e){this.logger=e,this.store={},this.idGenerator=0,this.pendingOperation={}}return e.prototype.getLastOperation=function(e){return this.store[e].lastOperation},e.prototype.getData=function(e){return this.store[e].data},e.prototype.getComponentInstance=function(e){return this.store[e].componentInstance},e.prototype.getParentId=function(e){return this.store[e].parent?this.store[e].parent.id:-1},e.prototype.getChildrenIds=function(e){for(var t=[],n=0,i=this.store[e].children;n<i.length;n++){var r=i[n];t.push(r.id)}return t},e.prototype.hasChildren=function(e){return this.store[e].children.length>0},e.prototype.add=function(e,t){var n=this.getNewId();return this.pendingOperation[n]=n,this.store[n]={data:e,id:n,parent:null,children:[],componentInstance:t,lastOperation:20},n},e.prototype.update=function(e,t){this.store[e];this.pendingOperation[e]=e,this.store[e].data=t,this.store[e].lastOperation=40},e.prototype.addChild=function(e,t,n){var i=this.store[e],r=this.add(t,n);this.pendingOperation[r]=r;var o=this.store[r];return o.parent=i,i.children.push(o),r},e.prototype.insertChildAt=function(e,t,n,i){var r=this.store[e],o=this.add(n,i);this.pendingOperation[o]=o;var s=this.store[o];return s.parent=r,t>=r.children.length?r.children.push(s):t>=0?r.children.splice(t,0,s):r.children.unshift(s),o},e.prototype.removeChildById=function(e,t){for(var n=this.store[e],i=n.children.length-1;i>=0;i--){if(n.children[i].id===t){this.removeChildAt(e,i);break}}},e.prototype.removeChildAt=function(e,t){var n,i=this.store[e];t>i.children.length-1?(n=i.children[i.children.length-1],i.children[i.children.length-1].parent=null,i.children.splice(i.children.length-1,1)):t>=0?(n=i.children[t],i.children[t].parent=null,i.children.splice(t,1)):(n=i.children[0],i.children[0].parent=null,i.children.splice(0,1)),n.parent=null,this.remove(n.id)},e.prototype.remove=function(e){var t=this.store[e];if(t.parent){this.store[t.parent.id];this.removeChildById(t.parent.id,e)}else this.removeChildren(e),this.store[e].lastOperation=50,this.pendingOperation[e]=e},e.prototype.removeChildren=function(e){for(var t=this.store[e];t.children.length;)this.remove(t.children[0].id)},e.prototype.getStatesToProcess=function(){return this.pendingOperation},e.prototype.flushPendingOperations=function(){for(var e in this.pendingOperation)this.pendingOperation[e]&&(50===this.store[e].lastOperation?delete this.store[e]:this.store[e].lastOperation=0);this.pendingOperation={}},e.prototype.getNewId=function(){return++this.idGenerator},e}();e.StateStore=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={}));var r,o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){!function(t){var i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.render=function(t,n){var i=this.htmlTemplate(o(['<div>\n <div childrenContainer="true" class="captureMenuComponent ','">\n </div>\n <div class="captureMenuLogComponent ','">\n <span class="','">',"<span>\n </div>\n </div>"],['<div>\n <div childrenContainer="true" class="captureMenuComponent ','">\n </div>\n <div class="captureMenuLogComponent ','">\n <span class="','">',"<span>\n </div>\n </div>"]),t?"active":"",t.logVisible?"active":"",t.logLevel===e.LogLevel.error?"error":"",t.logText);return this.renderElementFromTemplate(i,t,n)},i}(t.BaseComponent);t.CaptureMenuComponent=i}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCaptureRequested=i.createEvent("onCaptureRequested"),i.onPlayRequested=i.createEvent("onPlayRequested"),i.onPauseRequested=i.createEvent("onPauseRequested"),i.onPlayNextFrameRequested=i.createEvent("onPlayNextFrameRequested"),i}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="captureMenuActionsComponent">\n <div commandName="onCaptureRequested">\n </div>\n $',"\n </div>"],['\n <div class="captureMenuActionsComponent">\n <div commandName="onCaptureRequested">\n </div>\n $',"\n </div>"]),e?'<div commandName="onPauseRequested">\n </div>':'<div commandName="onPlayRequested">\n </div>\n <div commandName="onPlayNextFrameRequested">\n </div>');return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.CaptureMenuActionsComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCanvasSelection=i.createEvent("onCanvasSelection"),i}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="canvasListComponent">\n <span commandName="onCanvasSelection">\n ','\n </span>\n <ul childrenContainer="true" style="','"></ul>\n </div>'],['\n <div class="canvasListComponent">\n <span commandName="onCanvasSelection">\n ','\n </span>\n <ul childrenContainer="true" style="','"></ul>\n </div>']),e.currentCanvasInformation?e.currentCanvasInformation.id+" ("+e.currentCanvasInformation.width+"*"+e.currentCanvasInformation.height+")":"Choose Canvas...",e.showList?"display:block;visibility:visible":"display:none;visibility:hidden");return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.CanvasListComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCanvasSelected=i.createEvent("onCanvasSelected"),i}return n(t,e),t.prototype.render=function(e,t){var n=document.createElement("li"),i=document.createElement("span");return i.innerText="Id: "+e.id+" - Size: "+e.width+"*"+e.height,n.appendChild(i),this.mapEventListener(n,"click","onCanvasSelected",e,t),n},t}(e.BaseComponent);e.CanvasListItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=document.createElement("span");return n.className="fpsCounterComponent",n.innerText=e.toFixed(2)+" Fps",n},t}(e.BaseComponent);e.FpsCounterComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(t){var n=function(){function n(i,r){var o=this;this.options=i,this.logger=r,this.rootPlaceHolder=i.rootPlaceHolder||document.body,this.mvx=new t.MVX(this.rootPlaceHolder,r),this.isTrackingCanvas=!1,this.onCanvasSelected=new i.eventConstructor,this.onCaptureRequested=new i.eventConstructor,this.onPauseRequested=new i.eventConstructor,this.onPlayRequested=new i.eventConstructor,this.onPlayNextFrameRequested=new i.eventConstructor,this.captureMenuComponent=new t.CaptureMenuComponent(i.eventConstructor,r),this.canvasListComponent=new t.CanvasListComponent(i.eventConstructor,r),this.canvasListItemComponent=new t.CanvasListItemComponent(this.options.eventConstructor,this.logger),this.actionsComponent=new t.CaptureMenuActionsComponent(i.eventConstructor,r),this.fpsCounterComponent=new t.FpsCounterComponent(i.eventConstructor,r),this.rootStateId=this.mvx.addRootState({visible:!0,logLevel:e.LogLevel.info,logText:n.SelectCanvasHelpText,logVisible:!this.options.hideLog},this.captureMenuComponent),this.canvasListStateId=this.mvx.addChildState(this.rootStateId,{currentCanvasInformation:null,showList:!1},this.canvasListComponent),this.actionsStateId=this.mvx.addChildState(this.rootStateId,!0,this.actionsComponent),this.fpsStateId=this.mvx.addChildState(this.rootStateId,0,this.fpsCounterComponent),this.actionsComponent.onCaptureRequested.add(function(){var t=o.getSelectedCanvasInformation();t&&o.updateMenuStateLog(e.LogLevel.info,n.PleaseWaitHelpText,!0),setTimeout(function(){o.onCaptureRequested.trigger(t)},200)}),this.actionsComponent.onPauseRequested.add(function(){o.onPauseRequested.trigger(o.getSelectedCanvasInformation()),o.mvx.updateState(o.actionsStateId,!1)}),this.actionsComponent.onPlayRequested.add(function(){o.onPlayRequested.trigger(o.getSelectedCanvasInformation()),o.mvx.updateState(o.actionsStateId,!0)}),this.actionsComponent.onPlayNextFrameRequested.add(function(){o.onPlayNextFrameRequested.trigger(o.getSelectedCanvasInformation())}),this.canvasListComponent.onCanvasSelection.add(function(t){o.mvx.updateState(o.canvasListStateId,{currentCanvasInformation:null,showList:!t.state.showList}),o.updateMenuStateLog(e.LogLevel.info,n.SelectCanvasHelpText),o.onCanvasSelected.trigger(null),o.isTrackingCanvas&&o.trackPageCanvases(),t.state.showList?o.showMenuStateLog():o.hideMenuStateLog()}),this.canvasListItemComponent.onCanvasSelected.add(function(t){o.mvx.updateState(o.canvasListStateId,{currentCanvasInformation:t.state,showList:!1}),o.onCanvasSelected.trigger(t.state),o.updateMenuStateLog(e.LogLevel.info,n.ActionsHelpText),o.showMenuStateLog()})}return n.prototype.getSelectedCanvasInformation=function(){return this.mvx.getGenericState(this.canvasListStateId).currentCanvasInformation},n.prototype.trackPageCanvases=function(){if(this.isTrackingCanvas=!0,document.body){var e=document.body.querySelectorAll("canvas");this.updateCanvasesList(e)}},n.prototype.updateCanvasesList=function(e){this.updateCanvasesListInformationInternal(e,function(e){return{id:e.id,width:e.width,height:e.height,ref:e}})},n.prototype.updateCanvasesListInformation=function(e){this.updateCanvasesListInformationInternal(e,function(e){return{id:e.id,width:e.width,height:e.height,ref:e.ref}})},n.prototype.display=function(){this.updateMenuStateVisibility(!0)},n.prototype.hide=function(){this.updateMenuStateVisibility(!1)},n.prototype.captureComplete=function(t){t?this.updateMenuStateLog(e.LogLevel.error,t):this.updateMenuStateLog(e.LogLevel.info,n.ActionsHelpText)},n.prototype.setFPS=function(e){this.mvx.updateState(this.fpsStateId,e)},n.prototype.updateCanvasesListInformationInternal=function(t,i){this.mvx.removeChildrenStates(this.canvasListStateId);for(var r=[],o=0;o<t.length;o++){var s=i(t[o]);r.push(s),this.mvx.addChildState(this.canvasListStateId,s,this.canvasListItemComponent)}var a=r.length,l=this.mvx.getGenericState(this.canvasListStateId).showList;if(!l)if(1===a){var c=r[0];this.mvx.updateState(this.canvasListStateId,{currentCanvasInformation:c,showList:l}),this.updateMenuStateLog(e.LogLevel.info,n.ActionsHelpText),this.onCanvasSelected.trigger(c)}else this.updateMenuStateLog(e.LogLevel.info,n.SelectCanvasHelpText),this.onCanvasSelected.trigger(null)},n.prototype.hideMenuStateLog=function(){var e=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:e.visible,logLevel:e.logLevel,logText:e.logText,logVisible:!1})},n.prototype.showMenuStateLog=function(){var e=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:e.visible,logLevel:e.logLevel,logText:e.logText,logVisible:!this.options.hideLog})},n.prototype.updateMenuStateLog=function(e,t,n){void 0===n&&(n=!1);var i=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:i.visible,logLevel:e,logText:t,logVisible:!this.options.hideLog},n)},n.prototype.updateMenuStateVisibility=function(e){var t=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:e,logLevel:t.logLevel,logText:t.logText,logVisible:t.logVisible})},n.SelectCanvasHelpText="Please, select a canvas in the list above.",n.ActionsHelpText="Record with the red button, you can also pause or continue playing the current scene.",n.PleaseWaitHelpText="Capturing, be patient (this can take up to 3 minutes)...",n}();t.CaptureMenu=n}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCaptureLoaded=new i.eventConstructor,i}return n(t,e),t.prototype.render=function(e,t){var n=this,i=this.htmlTemplate(o(['\n <div class="captureListComponent ','">\n <div class="openCaptureFile">\n <Span>Drag files here to open a previously saved capture.</span>\n </div>\n <ul childrenContainer="true"></ul>\n </div>'],['\n <div class="captureListComponent ','">\n <div class="openCaptureFile">\n <Span>Drag files here to open a previously saved capture.</span>\n </div>\n <ul childrenContainer="true"></ul>\n </div>']),e?"active":""),r=this.renderElementFromTemplate(i,e,t),s=r.querySelector(".openCaptureFile");return s.addEventListener("dragenter",function(e){return n.drag(e),!1},!1),s.addEventListener("dragover",function(e){return n.drag(e),!1},!1),s.addEventListener("drop",function(e){n.drop(e)},!1),r},t.prototype.drag=function(e){e.stopPropagation(),e.preventDefault()},t.prototype.drop=function(e){e.stopPropagation(),e.preventDefault(),this.loadFiles(e)},t.prototype.loadFiles=function(e){var t=this,n=null;if(e&&e.dataTransfer&&e.dataTransfer.files&&(n=e.dataTransfer.files),e&&e.target&&e.target.files&&(n=e.target.files),n&&n.length>0)for(var i=function(e){var i=n[e].name.toLowerCase().split(".").pop();n[e].type;if("json"===i){var r=n[e],o=new FileReader;o.onerror=function(e){t.logger.error("Error while reading file: "+r.name+e)},o.onload=function(e){try{var n=JSON.parse(e.target.result);t.onCaptureLoaded.trigger(n)}catch(e){t.logger.error("Error while reading file: "+r.name+e)}},o.readAsText(r)}},r=0;r<n.length;r++)i(r)},t}(e.BaseComponent);e.CaptureListComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCaptureSelected=i.createEvent("onCaptureSelected"),i.onSaveRequested=i.createEvent("onSaveRequested"),i}return n(t,e),t.prototype.render=function(e,t){var n=document.createElement("li");if(e.active&&(n.className="active"),e.capture.endState.VisualState.Attachments)for(var i=0,r=e.capture.endState.VisualState.Attachments;i<r.length;i++){var o=r[i],s=document.createElement("img");s.src=encodeURI(o.src),n.appendChild(s)}else{var a=document.createElement("span");a.innerText=e.capture.endState.VisualState.FrameBufferStatus,n.appendChild(a)}var l=document.createElement("span");l.innerText=new Date(e.capture.startTime).toTimeString().split(" ")[0],n.appendChild(l);var c=document.createElement("a");return c.href="#",c.className="captureListItemSave",this.mapEventListener(c,"click","onSaveRequested",e,t,!1,!0),l.appendChild(c),this.mapEventListener(n,"click","onCaptureSelected",e,t),n},t}(e.BaseComponent);e.CaptureListItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="visualStateListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],['\n <div class="visualStateListComponent">\n <ul childrenContainer="true"></ul>\n </div>']));return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.VisualStateListComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.onVisualStateSelected=i.createEvent("onVisualStateSelected"),i}return n(i,t),i.prototype.render=function(t,n){var i=document.createElement("li");if(t.active&&(i.className="active",setTimeout(function(){e.ScrollIntoViewHelper.scrollIntoView(i)},1)),t.VisualState.Attachments)for(var r=0,o=t.VisualState.Attachments;r<o.length;r++){var s=o[r];if(s.src){var a=document.createElement("img");if(a.src=encodeURI(s.src),i.appendChild(a),t.VisualState.Attachments.length>1){var l=document.createElement("span");l.innerText=s.attachmentName,i.appendChild(l)}if(s.textureLayer){var c=document.createElement("span");c.innerText="Layer: "+s.textureLayer,i.appendChild(c)}if(s.textureCubeMapFace){var u=document.createElement("span");u.innerText=s.textureCubeMapFace,i.appendChild(u)}}}else{var h=document.createElement("span");h.innerText=t.VisualState.FrameBufferStatus,i.appendChild(h)}var d=document.createElement("span");return d.innerText=t.VisualState.FrameBuffer?"Frame buffer: "+t.VisualState.FrameBuffer.__SPECTOR_Object_TAG.id:"Canvas frame buffer",i.appendChild(d),this.mapEventListener(i,"click","onVisualStateSelected",t,n),i},i}(e.BaseComponent);e.VisualStateListItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="commandListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],['\n <div class="commandListComponent">\n <ul childrenContainer="true"></ul>\n </div>']));return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.CommandListComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(t){function i(e,n){var i=t.call(this,e,n)||this;return i.onCommandSelected=i.createEvent("onCommandSelected"),i.onVertexSelected=i.createEvent("onVertexSelected"),i.onFragmentSelected=i.createEvent("onFragmentSelected"),i}return n(i,t),i.prototype.render=function(t,n){var i=document.createElement("li"),r="unknown";switch(t.capture.status){case 50:r="deprecated";break;case 10:r="unused";break;case 20:r="disabled";break;case 30:r="redundant";break;case 40:r="valid"}if(t.capture.VisualState&&(i.className=" drawCall"),t.active&&(i.className=" active",setTimeout(function(){e.ScrollIntoViewHelper.scrollIntoView(i)},1)),t.capture.marker){var o=document.createElement("span");o.className=r+" marker important",o.innerText=t.capture.marker+" ",o.style.fontWeight="1000",i.appendChild(o)}var s=document.createElement("span"),a=t.capture.text;if(a=a.replace(t.capture.name,'<span class=" '+r+' important">'+t.capture.name+"</span>"),s.innerHTML=a,i.appendChild(s),t.capture.VisualState&&"clear"!==t.capture.name)try{var l=t.capture.DrawCall.shaders[0],c=t.capture.DrawCall.shaders[1],u=document.createElement("a");u.innerText=l.name,u.href="#",i.appendChild(u),this.mapEventListener(u,"click","onVertexSelected",t,n);var h=document.createElement("a");h.innerText=c.name,h.href="#",i.appendChild(h),this.mapEventListener(h,"click","onFragmentSelected",t,n)}catch(e){}return this.mapEventListener(i,"click","onCommandSelected",t,n),i},i}(e.BaseComponent);e.CommandListItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="commandDetailComponent" childrenContainer="true">\n </div>'],['\n <div class="commandDetailComponent" childrenContainer="true">\n </div>']));return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.CommandDetailComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function e(){}return e.getMDNLink=function(t){var n=e.WebGL2Functions[t];if(n)return e.WebGL2RootUrl+n;var i=e.WebGLFunctions[t];return i?e.WebGLRootUrl+i:e.WebGLRootUrl+t},e.WebGL2RootUrl="https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/",e.WebGLRootUrl="https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/",e.WebGL2Functions={beginQuery:"beginQuery",beginTransformFeedback:"beginTransformFeedback",bindBufferBase:"bindBufferBase",bindBufferRange:"bindBufferRange",bindSampler:"bindSampler",bindTransformFeedback:"bindTransformFeedback",bindVertexArray:"bindVertexArray",blitFramebuffer:"blitFramebuffer",clearBufferfv:"clearBuffer",clearBufferiv:"clearBuffer",clearBufferuiv:"clearBuffer",clearBufferfi:"clearBuffer",clientWaitSync:"clientWaitSync",compressedTexImage3D:"compressedTexImage3D",compressedTexSubImage3D:"compressedTexSubImage3D",copyBufferSubData:"copyBufferSubData",copyTexSubImage3D:"copyTexSubImage3D",createQuery:"createQuery",createSampler:"createSampler",createTransformFeedback:"createTransformFeedback",createVertexArray:"createVertexArray",deleteQuery:"deleteQuery",deleteSampler:"deleteSampler",deleteSync:"deleteSync",deleteTransformFeedback:"deleteTransformFeedback",deleteVertexArray:"deleteVertexArray",drawArraysInstanced:"drawArraysInstanced",drawBuffers:"drawBuffers",drawElementsInstanced:"drawElementsInstanced",drawRangeElements:"drawRangeElements",endQuery:"endQuery",endTransformFeedback:"endTransformFeedback",fenceSync:"fenceSync",framebufferTextureLayer:"framebufferTextureLayer",getActiveUniformBlockName:"getActiveUniformBlockName",getActiveUniformBlockParameter:"getActiveUniformBlockParameter",getActiveUniforms:"getActiveUniforms",getBufferSubData:"getBufferSubData",getFragDataLocation:"getFragDataLocation",getIndexedParameter:"getIndexedParameter",getInternalformatParameter:"getInternalformatParameter",getQuery:"getQuery",getQueryParameter:"getQueryParameter",getSamplerParameter:"getSamplerParameter",getSyncParameter:"getSyncParameter",getTransformFeedbackVarying:"getTransformFeedbackVarying",getUniformBlockIndex:"getUniformBlockIndex",getUniformIndices:"getUniformIndices",invalidateFramebuffer:"invalidateFramebuffer",invalidateSubFramebuffer:"invalidateSubFramebuffer",isQuery:"isQuery",isSampler:"isSampler",isSync:"isSync",isTransformFeedback:"isTransformFeedback",isVertexArray:"isVertexArray",pauseTransformFeedback:"pauseTransformFeedback",readBuffer:"readBuffer",renderbufferStorageMultisample:"renderbufferStorageMultisample",resumeTransformFeedback:"resumeTransformFeedback",samplerParameteri:"samplerParameter",samplerParameterf:"samplerParameter",texImage3D:"texImage3D",texStorage2D:"texStorage2D",texStorage3D:"texStorage3D",texSubImage3D:"texSubImage3D",transformFeedbackVaryings:"transformFeedbackVaryings",uniform1ui:"uniform",uniform2ui:"uniform",uniform3ui:"uniform",uniform4ui:"uniform",uniform1fv:"uniform",uniform2fv:"uniform",uniform3fv:"uniform",uniform4fv:"uniform",uniform1iv:"uniform",uniform2iv:"uniform",uniform3iv:"uniform",uniform4iv:"uniform",uniform1uiv:"uniform",uniform2uiv:"uniform",uniform3uiv:"uniform",uniform4uiv:"uniform",uniformBlockBinding:"uniformBlockBinding",uniformMatrix2fv:"uniformMatrix",uniformMatrix3x2fv:"uniformMatrix",uniformMatrix4x2fv:"uniformMatrix",uniformMatrix2x3fv:"uniformMatrix",uniformMatrix3fv:"uniformMatrix",uniformMatrix4x3fv:"uniformMatrix",uniformMatrix2x4fv:"uniformMatrix",uniformMatrix3x4fv:"uniformMatrix",uniformMatrix4fv:"uniformMatrix",vertexAttribDivisor:"vertexAttribDivisor",vertexAttribI4i:"vertexAttribI",vertexAttribI4ui:"vertexAttribI",vertexAttribI4iv:"vertexAttribI",vertexAttribI4uiv:"vertexAttribI",vertexAttribIPointer:"vertexAttribIPointer",waitSync:"waitSync"},e.WebGLFunctions={uniform1f:"uniform",uniform1fv:"uniform",uniform1i:"uniform",uniform1iv:"uniform",uniform2f:"uniform",uniform2fv:"uniform",uniform2i:"uniform",uniform2iv:"uniform",uniform3f:"uniform",uniform3i:"uniform",uniform3iv:"uniform",uniform4f:"uniform",uniform4fv:"uniform",uniform4i:"uniform",uniform4iv:"uniform",uniformMatrix2fv:"uniformMatrix",uniformMatrix3fv:"uniformMatrix",uniformMatrix4fv:"uniformMatrix",vertexAttrib1f:"vertexAttrib",vertexAttrib2f:"vertexAttrib",vertexAttrib3f:"vertexAttrib",vertexAttrib4f:"vertexAttrib",vertexAttrib1fv:"vertexAttrib",vertexAttrib2fv:"vertexAttrib",vertexAttrib3fv:"vertexAttrib",vertexAttrib4fv:"vertexAttrib"},e}();e.MDNCommandLinkHelper=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="jsonContentComponent" childrenContainer="true">\n </div>'],['\n <div class="jsonContentComponent" childrenContainer="true">\n </div>']));return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONContentComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div class="jsonGroupComponent">\n <div class="jsonGroupComponentTitle">','</div>\n <ul childrenContainer="true"></ul>\n </div>'],['\n <div class="jsonGroupComponent">\n <div class="jsonGroupComponentTitle">','</div>\n <ul childrenContainer="true"></ul>\n </div>']),e?e.replace(/([A-Z])/g," $1").trim():"");return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONGroupComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <li><span class="jsonItemComponentKey">',': </span><span class="jsonItemComponentValue">',"</span><li>"],['\n <li><span class="jsonItemComponentKey">',': </span><span class="jsonItemComponentValue">',"</span><li>"]),e.key,e.value);return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <li class="jsonItemImageHolder"><div class="jsonItemImage"><img src="','"/><span>',"</span></div></li>"],['\n <li class="jsonItemImageHolder"><div class="jsonItemImage"><img src="','"/><span>',"</span></div></li>"]),e.value,e.key);return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONImageItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onOpenSourceClicked=i.createEvent("onOpenSourceClicked"),i}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <li commandName="onOpenSourceClicked"><span class="jsonItemComponentKey">',': </span><span class="jsonSourceItemComponentOpen">Click to Open.</span><li>'],['\n <li commandName="onOpenSourceClicked"><span class="jsonItemComponentKey">',': </span><span class="jsonSourceItemComponentOpen">Click to Open.</span><li>']),e.key);return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONSourceItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <li><span class="jsonItemComponentKey">',': </span>\n <span class="jsonItemComponentValue">',' (<a href="','" target="_blank" class="jsonSourceItemComponentOpen">Open help page</a>)\n </span>\n <li>'],['\n <li><span class="jsonItemComponentKey">',': </span>\n <span class="jsonItemComponentValue">',' (<a href="','" target="_blank" class="jsonSourceItemComponentOpen">Open help page</a>)\n </span>\n <li>']),e.key,e.value,e.help);return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.JSONHelpItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(e,t){var n=document.createElement("div");if(n.className="jsonVisualStateItemComponent",e.Attachments)for(var i=0,r=e.Attachments;i<r.length;i++){var o=r[i];if(o.src){var s=document.createElement("img");if(s.src=encodeURI(o.src),n.appendChild(s),e.Attachments.length>1){var a=document.createElement("span");a.innerText=o.attachmentName,n.appendChild(a)}}}else{var l=document.createElement("span");l.innerText=e.FrameBufferStatus,n.appendChild(l)}var c=document.createElement("span");return c.innerText=e.FrameBuffer?e.FrameBuffer.__SPECTOR_Object_TAG.displayText:"Canvas frame buffer",n.appendChild(c),n},t}(e.BaseComponent);e.JSONVisualStateItemComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onCapturesClicked=i.createEvent("onCapturesClicked"),i.onCommandsClicked=i.createEvent("onCommandsClicked"),i.onInformationClicked=i.createEvent("onInformationClicked"),i.onInitStateClicked=i.createEvent("onInitStateClicked"),i.onEndStateClicked=i.createEvent("onEndStateClicked"),i.onCloseClicked=i.createEvent("onCloseClicked"),i.onSearchTextChanged=i.createEvent("onSearchTextChanged"),i.onSearchTextCleared=i.createEvent("onSearchTextCleared"),i}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['<ul class="resultViewMenuComponent">\n <li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>\n\n <li class="searchContainer">\n <input type="text" placeHolder="Search..." value="','" commandName="onSearchTextChanged" commandEventBinding="change">\n <a class="clearSearch" href="#" CommandName="onSearchTextCleared">X</a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onCapturesClicked">Captures</a></li>\n <li><a class="',' href="#" role="button" commandName="onInformationClicked">Information</a></li>\n <li><a class="',' href="#" role="button" commandName="onInitStateClicked">Init State</a></li>\n <li>\n <a class="',' href="#" role="button" commandName="onCommandsClicked">\n Commands','\n </a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onEndStateClicked">End State</a></li>\n <li><a href="#" role="button" commandName="onCloseClicked">Close</a></li>\n </ul>'],['<ul class="resultViewMenuComponent">\n <li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>\n\n <li class="searchContainer">\n <input type="text" placeHolder="Search..." value="','" commandName="onSearchTextChanged" commandEventBinding="change">\n <a class="clearSearch" href="#" CommandName="onSearchTextCleared">X</a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onCapturesClicked">Captures</a></li>\n <li><a class="',' href="#" role="button" commandName="onInformationClicked">Information</a></li>\n <li><a class="',' href="#" role="button" commandName="onInitStateClicked">Init State</a></li>\n <li>\n <a class="',' href="#" role="button" commandName="onCommandsClicked">\n Commands','\n </a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onEndStateClicked">End State</a></li>\n <li><a href="#" role="button" commandName="onCloseClicked">Close</a></li>\n </ul>']),e.searchText,0===e.status?"active":"",10===e.status?"active":"",20===e.status?"active":"",40===e.status?"active":"",e.commandCount>0?" ("+e.commandCount+")":"",30===e.status?"active":""),i=this.renderElementFromTemplate(n,e,t),r=i.querySelector(".resultViewMenuOpen"),s=i.querySelectorAll("li:not(.resultViewMenuSmall)");return r.addEventListener("click",function(e){if("true"===r.getAttribute("open")){r.setAttribute("open","false");for(var t=0;t<s.length;t++)s[t].style.display="none",s[t].style.visibility="hidden"}else{r.setAttribute("open","true");for(t=0;t<s.length;t++)s[t].style.display="block",s[t].style.visibility="visible"}}),i},t}(e.BaseComponent);e.ResultViewMenuComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.render=function(e,t){return this.renderElementFromTemplate('<div childrenContainer="true" class="resultViewContentComponent"></div>',e,t)},t}(e.BaseComponent);e.ResultViewContentComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div childrenContainer="true" class="','"></div>'],['\n <div childrenContainer="true" class="','"></div>']),e?"informationColumnLeftComponent":"informationColumnRightComponent");return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.InformationColumnComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){return e.call(this,t,n)||this}return n(t,e),t.prototype.render=function(e,t){var n=this.htmlTemplate(o(['\n <div childrenContainer="true" class="resultViewComponent ','">\n </div>'],['\n <div childrenContainer="true" class="resultViewComponent ','">\n </div>']),e?"active":"");return this.renderElementFromTemplate(n,e,t)},t}(e.BaseComponent);e.ResultViewComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.onVertexSourceClicked=i.createEvent("onVertexSourceClicked"),i.onFragmentSourceClicked=i.createEvent("onFragmentSourceClicked"),i.onSourceCodeCloseClicked=i.createEvent("onSourceCodeCloseClicked"),i.onSourceCodeChanged=i.createEvent("onSourceCodeChanged"),i}return n(t,e),t.prototype.showError=function(e){if(this.editor){var t=[];if(e=e||"")for(var n=/^.*ERROR:\W([0-9]+):([0-9]+):(.*)$/gm,i=n.exec(e);null!=i;)t.push({row:+i[2]-1,column:i[1],text:i[3]||"Error",type:"error"}),i=n.exec(e);this.editor.getSession().setAnnotations(t)}},t.prototype.render=function(e,t){var n=this,i=e.fragment?e.sourceFragment:e.sourceVertex,r=i?this._indentIfdef(this._beautify(i)):"",s=this.htmlTemplate(o(['\n <div class="sourceCodeComponentContainer">\n <div class="sourceCodeMenuComponentContainer">\n <ul class="sourceCodeMenuComponent">\n <li><a class="','" href="#" role="button" commandName="onVertexSourceClicked">Vertex</a></li>\n <li><a class="','" href="#" role="button" commandName="onFragmentSourceClicked">Fragment</a></li>\n <li><a href="#" role="button" commandName="onSourceCodeCloseClicked">Close</a></li>\n </ul>\n </div>\n $',"\n </div>"],['\n <div class="sourceCodeComponentContainer">\n <div class="sourceCodeMenuComponentContainer">\n <ul class="sourceCodeMenuComponent">\n <li><a class="','" href="#" role="button" commandName="onVertexSourceClicked">Vertex</a></li>\n <li><a class="','" href="#" role="button" commandName="onFragmentSourceClicked">Fragment</a></li>\n <li><a href="#" role="button" commandName="onSourceCodeCloseClicked">Close</a></li>\n </ul>\n </div>\n $',"\n </div>"]),e.fragment?"":"active",e.fragment?"active":"",e.editable?this.htmlTemplate(o(['<div class="sourceCodeComponentEditable">',"</div>"],['<div class="sourceCodeComponentEditable">',"</div>"]),r):this.htmlTemplate(o(['<div class="sourceCodeComponent">\n <pre class="language-glsl"><code>',"</code></pre>\n </div>"],['<div class="sourceCodeComponent">\n <pre class="language-glsl"><code>',"</code></pre>\n </div>"]),r)),a=this.renderElementFromTemplate(s.replace(/<br>/g,"\n"),e,t);if(e.editable){this.editor=ace.edit(a.querySelector(".sourceCodeComponentEditable")),this.editor.setTheme("ace/theme/monokai"),this.editor.getSession().setMode("ace/mode/glsl"),this.editor.setShowPrintMargin(!1);var l=-1;this.editor.getSession().on("change",function(i){-1!==l&&clearTimeout(l),l=setTimeout(function(){n._triggerCompilation(n.editor,e,a,t)},1500)})}else Prism.highlightElement(a.querySelector("pre"));return a},t.prototype._triggerCompilation=function(e,t,n,i){t.fragment?t.sourceFragment=e.getValue():t.sourceVertex=e.getValue(),this.triggerEvent("onSourceCodeChanged",n,t,i)},t.prototype._beautify=function(e,n){void 0===n&&(n=0),e=e.trim(),e=this._removeReturnInComments(e);for(var i,r=this._getBracket(e),o=r.firstIteration,s=r.lastIteration,a="",l=0;l<n;l++)a+=" ";if(-1===o)i=e=(e=(e=(e=(e=(e=(e=(e=a+e).replace(/;(?![^\(]*\))\s*/g,";\n")).replace(/\s*([*+-/=><\s]*=)\s*/g,function(e){return" "+e.trim()+" "})).replace(/\s*(,)\s*/g,function(e){return e.trim()+" "})).replace(/\n[ \t]+/g,"\n")).replace(/\n/g,"\n"+a)).replace(/\s+$/g,"")).replace(/\n+$/g,"");else{var c=e.substr(0,o),u=e.substr(s+1,e.length),h=e.substr(o+1,s-o-1).trim(),d=this._beautify(h,n+1);i=(i=(i=this._beautify(c,n)+" {\n"+d+"\n"+a+"}\n"+this._beautify(u,n)).replace(/\s*\n+\s*;/g,";")).replace(/#endif[\t \f\v]*{/g,"\n {")}return i=i.replace(t.semicolonReplacementKey,";")},t.prototype._removeReturnInComments=function(e){for(var n=!1,i=!1,r=0;r<e.length;r++){var o=e[r];"/"===o?"*"===e[r-1]?i=!1:"*"===e[r+1]?n||(i=!0,r++):"/"===e[r+1]&&(i||(n=!0,r++)):"\n"===o?n=!1:";"===o&&(n||i)&&(e=e.substr(0,r)+t.semicolonReplacementKey+e.substr(r+1))}return e},t.prototype._getBracket=function(e,t){void 0===t&&(t=-1);for(var n=e.indexOf("{",t),i=1,r=n,o=0,s=0,a=e.substr(n+1).split("");s<a.length;s++){var l=a[s];if(r++,"{"===l&&i++,"}"===l&&i--,0===i){o=r;break}}return n>-1&&0===o?this._getBracket(e,n+1):{firstIteration:n,lastIteration:o}},t.prototype._indentIfdef=function(e){for(var t=0,n=e.split("\n"),i=0;i<n.length;i++){var r=n[i];-1!==r.indexOf("#endif")&&t--,-1!==r.indexOf("#else")&&t--;for(var o="",s=0;s<t;s++)o+=" ";n[i]=o+r,-1===r.indexOf("#if")&&-1===r.indexOf("#else")||t++}return n.join("\n")},t.semicolonReplacementKey="[[[semicolonReplacementKey]]]",t}(e.BaseComponent);e.SourceCodeComponent=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(e){var t=function(){function t(t,n){var i=this;this.options=t,this.logger=n,this.onSourceCodeChanged=new t.eventConstructor,this.rootPlaceHolder=t.rootPlaceHolder||document.body,this.mvx=new e.MVX(this.rootPlaceHolder,n),this.searchText="",this.currentCommandId=-1,this.visible=!1,this.commandCount=0,this.commandListStateId=-1,this.commandDetailStateId=-1,this.currentCaptureStateId=-1,this.currentCommandStateId=-1,this.currentVisualStateId=-1,this.visualStateListStateId=-1,this.initVisualStateId=-1,this.sourceCodeComponentStateId=-1,this.captureListComponent=new e.CaptureListComponent(t.eventConstructor,n),this.captureListItemComponent=new e.CaptureListItemComponent(t.eventConstructor,n),this.visualStateListComponent=new e.VisualStateListComponent(t.eventConstructor,n),this.visualStateListItemComponent=new e.VisualStateListItemComponent(t.eventConstructor,n),this.commandListComponent=new e.CommandListComponent(t.eventConstructor,n),this.commandListItemComponent=new e.CommandListItemComponent(t.eventConstructor,n),this.commandDetailComponent=new e.CommandDetailComponent(t.eventConstructor,n),this.jsonContentComponent=new e.JSONContentComponent(t.eventConstructor,n),this.jsonGroupComponent=new e.JSONGroupComponent(t.eventConstructor,n),this.jsonItemComponent=new e.JSONItemComponent(t.eventConstructor,n),this.jsonImageItemComponent=new e.JSONImageItemComponent(t.eventConstructor,n),this.jsonSourceItemComponent=new e.JSONSourceItemComponent(t.eventConstructor,n),this.jsonHelpItemComponent=new e.JSONHelpItemComponent(t.eventConstructor,n),this.jsonVisualStateItemComponent=new e.JSONVisualStateItemComponent(t.eventConstructor,n),this.resultViewMenuComponent=new e.ResultViewMenuComponent(t.eventConstructor,n),this.resultViewContentComponent=new e.ResultViewContentComponent(t.eventConstructor,n),this.resultViewComponent=new e.ResultViewComponent(t.eventConstructor,n),this.sourceCodeComponent=new e.SourceCodeComponent(t.eventConstructor,n),this.informationColumnComponent=new e.InformationColumnComponent(t.eventConstructor,n),this.rootStateId=this.mvx.addRootState(null,this.resultViewComponent),this.menuStateId=this.mvx.addChildState(this.rootStateId,null,this.resultViewMenuComponent),this.contentStateId=this.mvx.addChildState(this.rootStateId,null,this.resultViewContentComponent),this.captureListStateId=this.mvx.addChildState(this.rootStateId,!1,this.captureListComponent),this.initKeyboardEvents(),this.initMenuComponent(),this.captureListComponent.onCaptureLoaded.add(function(e){i.addCapture(e)}),this.captureListItemComponent.onCaptureSelected.add(function(e){i.selectCapture(e.stateId)}),this.captureListItemComponent.onSaveRequested.add(function(e){i.saveCapture(e.state.capture)}),this.visualStateListItemComponent.onVisualStateSelected.add(function(e){i.selectVisualState(e.stateId)}),this.commandListItemComponent.onCommandSelected.add(function(e){i.selectCommand(e.stateId)}),this.commandListItemComponent.onVertexSelected.add(function(e){i.selectCommand(e.stateId),i.openShader(!1)}),this.commandListItemComponent.onFragmentSelected.add(function(e){i.selectCommand(e.stateId),i.openShader(!0)}),this.sourceCodeComponent.onSourceCodeCloseClicked.add(function(){i.displayCurrentCapture()}),this.sourceCodeComponent.onVertexSourceClicked.add(function(e){var t=i.mvx.getGenericState(i.sourceCodeComponentStateId);t.fragment=!1,i.mvx.updateState(i.sourceCodeComponentStateId,t)}),this.sourceCodeComponent.onFragmentSourceClicked.add(function(e){var t=i.mvx.getGenericState(i.sourceCodeComponentStateId);t.fragment=!0,i.mvx.updateState(i.sourceCodeComponentStateId,t)}),this.sourceCodeComponent.onSourceCodeChanged.add(function(e){i.onSourceCodeChanged.trigger({programId:e.state.programId,sourceFragment:e.state.sourceFragment,sourceVertex:e.state.sourceVertex})}),this.jsonSourceItemComponent.onOpenSourceClicked.add(function(e){i.openShader("FRAGMENT_SHADER"===e.state.value)}),this.updateViewState()}return t.prototype.saveCapture=function(e){var t=JSON.stringify(e,null,4),n=new Blob([t],{type:"octet/stream"}),i="capture "+new Date(e.startTime).toTimeString().split(" ")[0]+".json";if(navigator.msSaveBlob)navigator.msSaveBlob(n,i);else{var r=document.createElement("a"),o=window.URL.createObjectURL(n);r.setAttribute("href",o),r.setAttribute("download",i),r.click()}},t.prototype.selectCapture=function(e){this.currentCommandId=-1,this.currentCaptureStateId=e,this.displayCurrentCapture()},t.prototype.selectCommand=function(e){this.currentCommandStateId=e,this.currentVisualStateId=this.displayCurrentCommand(),this.displayCurrentVisualState()},t.prototype.selectVisualState=function(e){this.currentVisualStateId=e,this.currentCommandStateId=this.displayCurrentVisualState(),this.displayCurrentCommand()},t.prototype.display=function(){this.visible=!0,this.updateViewState()},t.prototype.hide=function(){this.visible=!1,this.updateViewState()},t.prototype.addCapture=function(e){var t=this.mvx.insertChildState(this.captureListStateId,{capture:e,active:!1},0,this.captureListItemComponent);return this.selectCapture(t),t},t.prototype.showSourceCodeError=function(e){this.sourceCodeComponent.showError(e)},t.prototype.initKeyboardEvents=function(){var e=this;this.rootPlaceHolder.addEventListener("keydown",function(t){40===e.mvx.getGenericState(e.menuStateId).status&&(38===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.selectPreviousCommand()):40===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.selectNextCommand()):33===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.selectPreviousVisualState()):34===t.keyCode&&(t.preventDefault(),t.stopPropagation(),e.selectNextVisualState()))})},t.prototype.openShader=function(e){this.mvx.removeChildrenStates(this.contentStateId);var t=this.mvx.getGenericState(this.currentCommandStateId);this.sourceCodeComponentStateId=this.mvx.addChildState(this.contentStateId,{programId:t.capture.DrawCall.programStatus.program.__SPECTOR_Object_TAG.id,nameVertex:t.capture.DrawCall.shaders[0].name,nameFragment:t.capture.DrawCall.shaders[1].name,sourceVertex:t.capture.DrawCall.shaders[0].source,sourceFragment:t.capture.DrawCall.shaders[1].source,fragment:e,editable:t.capture.DrawCall.programStatus.RECOMPILABLE},this.sourceCodeComponent),this.commandDetailStateId=this.mvx.addChildState(this.contentStateId,null,this.commandDetailComponent),this.displayCurrentCommandDetail(t)},t.prototype.selectPreviousCommand=function(){var e=this.mvx.getGenericState(this.currentCommandStateId);e.previousCommandStateId<0||this.selectCommand(e.previousCommandStateId)},t.prototype.selectNextCommand=function(){var e=this.mvx.getGenericState(this.currentCommandStateId);e.nextCommandStateId<0||this.selectCommand(e.nextCommandStateId)},t.prototype.selectPreviousVisualState=function(){var e=this.mvx.getGenericState(this.currentVisualStateId);e.previousVisualStateId<0||this.selectVisualState(e.previousVisualStateId)},t.prototype.selectNextVisualState=function(){var e=this.mvx.getGenericState(this.currentVisualStateId);e.nextVisualStateId<0||this.selectVisualState(e.nextVisualStateId)},t.prototype.initMenuComponent=function(){var e=this;this.mvx.updateState(this.menuStateId,{status:0,searchText:this.searchText,commandCount:0}),this.resultViewMenuComponent.onCloseClicked.add(function(t){e.hide()}),this.resultViewMenuComponent.onCapturesClicked.add(function(t){e.displayCaptures()}),this.resultViewMenuComponent.onCommandsClicked.add(function(t){e.displayCurrentCapture()}),this.resultViewMenuComponent.onInformationClicked.add(function(t){e.displayInformation()}),this.resultViewMenuComponent.onInitStateClicked.add(function(t){e.displayInitState()}),this.resultViewMenuComponent.onEndStateClicked.add(function(t){e.displayEndState()}),this.resultViewMenuComponent.onSearchTextChanged.add(function(t){e.search(t.sender.value)}),this.resultViewMenuComponent.onSearchTextCleared.add(function(t){e.mvx.updateState(e.menuStateId,{status:t.state.status,searchText:"",commandCount:t.state.commandCount}),e.search("")})},t.prototype.onCaptureRelatedAction=function(e){var t=this.mvx.getGenericState(this.currentCaptureStateId);return this.commandCount=t.capture.commands.length,this.mvx.removeChildrenStates(this.contentStateId),this.mvx.updateState(this.menuStateId,{status:e,searchText:this.searchText,commandCount:this.commandCount}),this.mvx.getGenericState(this.captureListStateId)&&this.mvx.updateState(this.captureListStateId,!1),t.capture},t.prototype.displayCaptures=function(){this.mvx.updateState(this.menuStateId,{status:0,searchText:this.searchText,commandCount:this.commandCount}),this.mvx.updateState(this.captureListStateId,!0)},t.prototype.displayInformation=function(){var e=this.onCaptureRelatedAction(10),t=this.mvx.addChildState(this.contentStateId,!0,this.informationColumnComponent),n=this.mvx.addChildState(this.contentStateId,!1,this.informationColumnComponent),i=this.mvx.addChildState(t,null,this.jsonContentComponent);this.displayJSONGroup(i,"Canvas",e.canvas),this.displayJSONGroup(i,"Context",e.context);for(var r=this.mvx.addChildState(n,null,this.jsonContentComponent),o=0,s=e.analyses;o<s.length;o++){var a=s[o];this.displayJSONGroup(r,a.analyserName,a)}this.displayJSONGroup(r,"Frame Memory Changes",e.frameMemory),this.displayJSONGroup(r,"Total Memory (seconds since application start: bytes)",e.memory)},t.prototype.displayJSON=function(e,t){for(var n in t.VisualState&&this.mvx.addChildState(e,t.VisualState,this.jsonVisualStateItemComponent),t)if("VisualState"!==n&&"analyserName"!==n){var i=t[n];if("source"===n)this.mvx.addChildState(e,{key:n,value:t.SHADER_TYPE},this.jsonSourceItemComponent);else if("visual"===n)for(var r in i)i.hasOwnProperty(r)&&i[r]&&this.mvx.addChildState(e,{key:r,value:i[r]},this.jsonImageItemComponent);else{var o=this.getJSONAsString(e,n,i);if(null===o||void 0===o)continue;if(this.toFilter(n)&&this.toFilter(i))continue;this.mvx.addChildState(e,{key:n,value:o},this.jsonItemComponent)}i&&i.__SPECTOR_Metadata&&this.displayJSONGroup(e,"Metadata",i.__SPECTOR_Metadata)}},t.prototype.getJSONAsString=function(e,t,n){if(null===n)return"null";if(void 0===n)return"undefined";if("number"==typeof n)return Math.floor(n)===n?n.toFixed(0):n.toFixed(4);if("string"==typeof n)return n;if("boolean"==typeof n)return n?"true":"false";if(0===n.length)return"Empty Array";if(n.length){for(var i=[],r=0;r<n.length;r++){var o=this.getJSONAsString(e,t+"("+r.toFixed(0)+")",n[r]);null!==o&&i.push(o)}return 0===i.length?null:i.join(", ")}return n.help?(this.mvx.addChildState(e,{key:t,value:n.name,help:n.help},this.jsonHelpItemComponent),null):n.__SPECTOR_Object_TAG?n.__SPECTOR_Object_TAG.displayText:n.displayText?n.displayText:("object"==typeof n&&this.displayJSONGroup(e,t,n),null)},t.prototype.displayJSONGroup=function(e,t,n){if(n){var i=this.mvx.addChildState(e,t,this.jsonGroupComponent);this.displayJSON(i,n),this.mvx.hasChildren(i)||this.mvx.removeState(i)}},t.prototype.displayInitState=function(){var e=this.onCaptureRelatedAction(20),t=this.mvx.addChildState(this.contentStateId,null,this.jsonContentComponent);this.displayJSON(t,e.initState)},t.prototype.displayEndState=function(){var e=this.onCaptureRelatedAction(30),t=this.mvx.addChildState(this.contentStateId,null,this.jsonContentComponent);this.displayJSON(t,e.endState)},t.prototype.displayCurrentCapture=function(){var e=this.onCaptureRelatedAction(40);this.mvx.updateAllChildrenGenericState(this.captureListStateId,function(e){return e.active=!1,e}),this.mvx.updateState(this.currentCaptureStateId,{capture:e,active:!0}),this.createVisualStates(e),this.commandListStateId=this.mvx.addChildState(this.contentStateId,null,this.commandListComponent),this.commandDetailStateId=this.mvx.addChildState(this.contentStateId,null,this.commandDetailComponent),this.createCommands(e)},t.prototype.displayCurrentCommand=function(){if(40!==this.mvx.getGenericState(this.menuStateId).status)return-1;var e=this.mvx.getGenericState(this.currentCommandStateId),t=e.capture;return this.currentCommandId=t.id,this.mvx.updateAllChildrenGenericState(this.commandListStateId,function(e){return e.active=!1,e}),this.mvx.updateState(this.currentCommandStateId,{capture:t,visualStateId:e.visualStateId,previousCommandStateId:e.previousCommandStateId,nextCommandStateId:e.nextCommandStateId,active:!0}),this.displayCurrentCommandDetail(e)},t.prototype.displayCurrentCommandDetail=function(t){var n=t.capture;this.mvx.removeChildrenStates(this.commandDetailStateId);var i=this.mvx.getGenericState(t.visualStateId);this.mvx.addChildState(this.commandDetailStateId,i.VisualState,this.jsonVisualStateItemComponent);var r="Unknown";switch(n.status){case 50:r="Deprecated";break;case 10:r="Unused";break;case 20:r="Disabled";break;case 30:r="Redundant";break;case 40:r="Valid"}var o=e.MDNCommandLinkHelper.getMDNLink(n.name);for(var s in n.result?this.displayJSONGroup(this.commandDetailStateId,"Global",{name:{help:o,name:n.name},duration:n.commandEndTime-n.startTime,result:n.result,status:r}):this.displayJSONGroup(this.commandDetailStateId,"Global",{name:{help:o,name:n.name},duration:n.commandEndTime-n.startTime,status:r}),n)"VisualState"!==s&&"result"!==s&&"object"==typeof n[s]&&this.displayJSONGroup(this.commandDetailStateId,s,n[s]);return t.visualStateId},t.prototype.displayCurrentVisualState=function(){if(40!==this.mvx.getGenericState(this.menuStateId).status)return null;var e=this.mvx.getGenericState(this.currentVisualStateId);return e.commandStateId===Number.MIN_VALUE?this.displayInitState():e.commandStateId===Number.MAX_VALUE&&this.displayEndState(),this.mvx.updateAllChildrenGenericState(this.visualStateListStateId,function(e){return e.active=!1,e}),e.active=!0,this.mvx.updateState(this.currentVisualStateId,e),e.commandStateId},t.prototype.createVisualStates=function(e){this.visualStateListStateId=this.mvx.addChildState(this.contentStateId,null,this.visualStateListComponent),this.mvx.removeChildrenStates(this.visualStateListStateId),this.initVisualStateId=this.mvx.addChildState(this.visualStateListStateId,{VisualState:e.initState.VisualState,time:e.startTime,commandStateId:Number.MIN_VALUE,active:!1},this.visualStateListItemComponent)},t.prototype.createCommands=function(e){this.mvx.removeChildrenStates(this.commandListStateId);for(var t=this.initVisualStateId,n=!1,i=null,r=-1,o=null,s=-1,a=0;a<e.commands.length;a++){var l=e.commands[a];if(!this.toFilter(l.marker)||!this.toFilter(l.name)||l.id===this.currentCommandId){var c={capture:l,previousCommandStateId:r,nextCommandStateId:-1,visualStateId:void 0,active:!1},u=this.mvx.addChildState(this.commandListStateId,c,this.commandListItemComponent);if(i&&((i=this.mvx.getGenericState(r)).nextCommandStateId=u,this.mvx.updateState(r,i)),r=u,i=c,l.VisualState){var h={VisualState:l.VisualState,time:l.endTime,commandStateId:u,active:!1,previousVisualStateId:s,nextVisualStateId:-1};t=this.mvx.addChildState(this.visualStateListStateId,h,this.visualStateListItemComponent),o&&((o=this.mvx.getGenericState(s)).nextVisualStateId=t,this.mvx.updateState(s,o)),o=h,s=t,n=!0}else if(!n){var d=this.mvx.getGenericState(this.initVisualStateId);d.commandStateId=u,d.previousVisualStateId=-1,d.nextVisualStateId=-1,this.mvx.updateState(this.initVisualStateId,d),o=d,s=t,n=!0}c.visualStateId=t,this.mvx.updateState(u,c),(-1===this.currentCommandId&&0===a||this.currentCommandId===l.id)&&(this.currentCommandStateId=u,this.displayCurrentCommand(),this.currentVisualStateId=t,this.displayCurrentVisualState())}}},t.prototype.updateViewState=function(){this.mvx.updateState(this.rootStateId,this.visible)},t.prototype.toFilter=function(e){return e=(e+="").toLowerCase(),!!(this.searchText&&this.searchText.length>2&&-1===e.indexOf(this.searchText.toLowerCase()))},t.prototype.search=function(e){switch(this.searchText=e,this.mvx.getGenericState(this.menuStateId).status){case 0:case 40:this.displayCurrentCapture();break;case 30:this.displayEndState();break;case 10:this.displayInformation();break;case 20:this.displayInitState()}this.searchText=""},t}();e.ResultView=t}(e.EmbeddedFrontend||(e.EmbeddedFrontend={}))}(r||(r={})),function(e){!function(t){t.DefaultInjection={WebGlObjectNamespace:e.WebGlObjects,RecorderNamespace:e.Recorders,CommandNamespace:e.Commands,StateNamespace:e.States,AnalyserNamespace:e.Analysers,StackTraceCtor:e.Utils.StackTrace,LoggerCtor:e.Utils.ConsoleLogger,EventCtor:e.Utils.Event,TimeCtor:e.Utils.Time,CanvasSpyCtor:e.Spies.CanvasSpy,CommandSpyCtor:e.Spies.CommandSpy,ContextSpyCtor:e.Spies.ContextSpy,RecorderSpyCtor:e.Spies.RecorderSpy,StateSpyCtor:e.Spies.StateSpy,TimeSpyCtor:e.Spies.TimeSpy,WebGlObjectSpyCtor:e.Spies.WebGlObjectSpy,CaptureAnalyserCtor:e.Analysers.CaptureAnalyser,ExtensionsCtor:e.States.Information.Extensions,CapabilitiesCtor:e.States.Information.Capabilities,CompressedTexturesCtor:e.States.Information.CompressedTextures,DefaultCommandCtor:e.Commands.DefaultCommand,CommandComparatorCtor:e.Comparators.CommandComparator,CaptureMenuConstructor:e.EmbeddedFrontend.CaptureMenu,ResultViewConstructor:e.EmbeddedFrontend.ResultView}}(e.ProvidedInjection||(e.ProvidedInjection={}))}(r||(r={})),function(e){var t=function(){function t(t){void 0===t&&(t={}),this.options=t,this.noFrameTimeout=-1,this.injection=t.injection||e.ProvidedInjection.DefaultInjection,this.captureNextFrames=0,this.captureNextCommands=0,this.quickCapture=!1,this.retry=0,this.contexts=[],this.logger=new this.injection.LoggerCtor,this.time=new this.injection.TimeCtor,this.timeSpy=new this.injection.TimeSpyCtor({eventConstructor:this.injection.EventCtor,timeConstructor:this.injection.TimeCtor},this.logger),this.onCaptureStarted=new this.injection.EventCtor,this.onCapture=new this.injection.EventCtor,this.onError=new this.injection.EventCtor,this.timeSpy.onFrameStart.add(this.onFrameStart,this),this.timeSpy.onFrameEnd.add(this.onFrameEnd,this),this.timeSpy.onError.add(this.onErrorInternal,this)}return t.getFirstAvailable3dContext=function(e){return this.tryGetContextFromHelperField(e)||this.tryGetContextFromCanvas(e,"webgl")||this.tryGetContextFromCanvas(e,"experimental-webgl")||this.tryGetContextFromCanvas(e,"webgl2")||this.tryGetContextFromCanvas(e,"experimental-webgl2")},t.tryGetContextFromHelperField=function(e){var t=e.getAttribute("__spector_context_type");if(t)return this.tryGetContextFromCanvas(e,t)},t.tryGetContextFromCanvas=function(e,t){var n;try{n=e.getContext(t)}catch(e){}return n},t.prototype.displayUI=function(){var e=this;this.captureMenu||(this.getCaptureUI(),this.captureMenu.onPauseRequested.add(this.pause,this),this.captureMenu.onPlayRequested.add(this.play,this),this.captureMenu.onPlayNextFrameRequested.add(this.playNextFrame,this),this.captureMenu.onCaptureRequested.add(function(t){t&&e.captureCanvas(t.ref)},this),setInterval(function(){e.captureMenu.setFPS(e.getFps())},1e3),this.captureMenu.trackPageCanvases(),this.captureMenu.display()),this.resultView||(this.getResultUI(),this.onCapture.add(function(t){e.resultView.display(),e.resultView.addCapture(t)}))},t.prototype.getResultUI=function(){var e=this;return this.resultView||(this.resultView=new this.injection.ResultViewConstructor({eventConstructor:this.injection.EventCtor},this.logger),this.resultView.onSourceCodeChanged.add(function(t){e.rebuildProgramFromProgramId(t.programId,t.sourceVertex,t.sourceFragment,function(n){e.referenceNewProgram(t.programId,n),e.resultView.showSourceCodeError(null)},function(t){e.resultView.showSourceCodeError(t)})})),this.resultView},t.prototype.getCaptureUI=function(){return this.captureMenu||(this.captureMenu=new this.injection.CaptureMenuConstructor({eventConstructor:this.injection.EventCtor},this.logger)),this.captureMenu},t.prototype.rebuildProgramFromProgramId=function(t,n,i,r,o){var s=e.WebGlObjects.Program.getFromGlobalStore(t);this.rebuildProgram(s,n,i,r,o)},t.prototype.rebuildProgram=function(t,n,i,r,o){e.ProgramRecompilerHelper.rebuildProgram(t,n,i,r,o)},t.prototype.referenceNewProgram=function(t,n){e.WebGlObjects.Program.updateInGlobalStore(t,n)},t.prototype.pause=function(){this.timeSpy.changeSpeedRatio(0)},t.prototype.play=function(){this.timeSpy.changeSpeedRatio(1)},t.prototype.playNextFrame=function(){this.timeSpy.playNextFrame()},t.prototype.drawOnlyEveryXFrame=function(e){this.timeSpy.changeSpeedRatio(e)},t.prototype.getFps=function(){return this.timeSpy.getFps()},t.prototype.spyCanvases=function(){this.canvasSpy?this.onErrorInternal("Already spying canvas."):(this.canvasSpy=new this.injection.CanvasSpyCtor({eventConstructor:this.injection.EventCtor},this.logger),this.canvasSpy.onContextRequested.add(this.spyContext,this))},t.prototype.spyCanvas=function(e){this.canvasSpy?this.onErrorInternal("Already spying canvas."):(this.canvasSpy=new this.injection.CanvasSpyCtor({eventConstructor:this.injection.EventCtor,canvas:e},this.logger),this.canvasSpy.onContextRequested.add(this.spyContext,this))},t.prototype.getAvailableContexts=function(){return this.getAvailableContexts()},t.prototype.captureCanvas=function(e,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var r=this.getAvailableContextSpyByCanvas(e);if(r)this.captureContextSpy(r,n,i);else{var o=t.getFirstAvailable3dContext(e);o?this.captureContext(o,n,i):this.logger.error("No webgl context available on the chosen canvas.")}},t.prototype.captureContext=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.getAvailableContextSpyByCanvas(e.canvas);i||((i=e.getIndexedParameter?new this.injection.ContextSpyCtor({context:e,version:2,recordAlways:!1,injection:this.injection},this.time,this.logger):new this.injection.ContextSpyCtor({context:e,version:1,recordAlways:!1,injection:this.injection},this.time,this.logger)).onMaxCommand.add(this.stopCapture,this),this.contexts.push({canvas:i.context.canvas,contextSpy:i})),i&&this.captureContextSpy(i,t,n)},t.prototype.captureContextSpy=function(e,t,n){var i=this;void 0===t&&(t=0),void 0===n&&(n=!1),this.quickCapture=n,this.capturingContext?this.onErrorInternal("Already capturing a context."):(this.retry=0,this.capturingContext=e,this.capturingContext.setMarker(this.marker),(t=Math.min(t,5e3))>0?this.captureCommands(t):this.captureFrames(1),this.noFrameTimeout=setTimeout(function(){t>0?i.stopCapture():i.capturingContext&&i.retry>1?i.onErrorInternal("No frames with gl commands detected. Try moving the camera."):i.onErrorInternal("No frames detected. Try moving the camera or implementing requestAnimationFrame.")},1e4))},t.prototype.captureNextFrame=function(e,t){void 0===t&&(t=!1),e instanceof HTMLCanvasElement?this.captureCanvas(e,0,t):this.captureContext(e,0,t)},t.prototype.startCapture=function(e,t,n){void 0===n&&(n=!1),e instanceof HTMLCanvasElement?this.captureCanvas(e,t,n):this.captureContext(e,t,n)},t.prototype.stopCapture=function(){if(this.capturingContext){var e=this.capturingContext.stopCapture();if(e.commands.length>0)return this.noFrameTimeout>-1&&clearTimeout(this.noFrameTimeout),this.triggerCapture(e),this.capturingContext=void 0,this.captureNextFrames=0,this.captureNextCommands=0,e;0===this.captureNextCommands&&(this.retry++,this.captureFrames(1))}},t.prototype.setMarker=function(e){this.marker=e,this.capturingContext&&this.capturingContext.setMarker(e)},t.prototype.clearMarker=function(){this.marker=null,this.capturingContext&&this.capturingContext.clearMarker()},t.prototype.captureFrames=function(e){this.captureNextFrames=e,this.captureNextCommands=0,this.playNextFrame()},t.prototype.captureCommands=function(e){this.captureNextFrames=0,this.captureNextCommands=e,this.play(),this.capturingContext?(this.onCaptureStarted.trigger(void 0),this.capturingContext.startCapture(e,this.quickCapture)):(this.onErrorInternal("No context to capture from."),this.captureNextCommands=0)},t.prototype.spyContext=function(e){var t=this.getAvailableContextSpyByCanvas(e.context.canvas);t||((t=new this.injection.ContextSpyCtor({context:e.context,version:e.contextVersion,recordAlways:!0,injection:this.injection},this.time,this.logger)).onMaxCommand.add(this.stopCapture,this),this.contexts.push({canvas:t.context.canvas,contextSpy:t})),t.spy()},t.prototype.getAvailableContextSpyByCanvas=function(e){for(var t=0,n=this.contexts;t<n.length;t++){var i=n[t];if(i.canvas===e)return i.contextSpy}},t.prototype.onFrameStart=function(){this.captureNextCommands>0||(this.captureNextFrames>0?(this.capturingContext&&(this.onCaptureStarted.trigger(void 0),this.capturingContext.startCapture(0,this.quickCapture)),this.captureNextFrames--):this.capturingContext=void 0)},t.prototype.onFrameEnd=function(){this.captureNextCommands>0||0===this.captureNextFrames&&this.stopCapture()},t.prototype.triggerCapture=function(e){this.captureMenu&&this.captureMenu.captureComplete(null),this.onCapture.trigger(e)},t.prototype.onErrorInternal=function(e){if(this.logger.error(e),this.noFrameTimeout>-1&&clearTimeout(this.noFrameTimeout),!this.capturingContext)throw e;this.capturingContext=void 0,this.captureNextFrames=0,this.captureNextCommands=0,this.retry=0,this.captureMenu&&this.captureMenu.captureComplete(e),this.onError.trigger(e)},t}();e.Spector=t}(r||(r={})),e.exports=r}])}); |