Skip to content

Instantly share code, notes, and snippets.

@nsdevaraj
Created October 26, 2018 06:12
Show Gist options
  • Save nsdevaraj/4ce1b04222d8961dd7d78c5d3593d41e to your computer and use it in GitHub Desktop.
Save nsdevaraj/4ce1b04222d8961dd7d78c5d3593d41e to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=490)}([function(e,t,n){e.exports=n(620)()},function(e,t,n){"use strict";e.exports=n(97)},function(e,t,n){"use strict";function o(e,t){var n=[null].concat(t);return new(e.bind.apply(e,n))}function r(e,t,n){var o=p(e.constructor);o.postConstructMethods||(o.preConstructMethods=[]),o.preConstructMethods.push(t)}function i(e,t,n){var o=p(e.constructor);o.postConstructMethods||(o.postConstructMethods=[]),o.postConstructMethods.push(t)}function a(e,t,n){var o=p(e.constructor);o.preDestroyMethods||(o.preDestroyMethods=[]),o.preDestroyMethods.push(t)}function s(e){return function(t){p(t).beanName=e}}function l(e){return function(t,n,o){c(t,e,!1,t,n,null)}}function u(e){return function(t,n,o){c(t,e,!0,t,n,null)}}function c(e,t,n,o,r,i){if(null===t)return void console.error("ag-Grid: Autowired name should not be null");if("number"===typeof i)return void console.error("ag-Grid: Autowired should be on an attribute");var a=p(e.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:r,beanName:t,optional:n})}function d(e){return function(t,n,o){var r,i="function"==typeof t?t:t.constructor;if("number"===typeof o){var a=void 0;n?(r=p(i),a=n):(r=p(i),a="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[a]||(r.autowireMethods[a]={}),r.autowireMethods[a][o]=e}}}function p(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}Object.defineProperty(t,"__esModule",{value:!0});var h=n(3),f=function(){function e(e,t){if(this.beans={},this.componentsMappedByName={},this.destroyed=!1,e&&e.beans){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.setupComponents(),this.createBeans();var n=h.Utils.mapObject(this.beans,function(e){return e.beanInstance});this.wireBeans(n),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.setupComponents=function(){var e=this;this.contextParams.components&&this.contextParams.components.forEach(function(t){return e.addComponent(t)})},e.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),n=t.toUpperCase();this.componentsMappedByName[n]=e.theClass},e.prototype.createComponent=function(e){var t=e.nodeName;if(this.componentsMappedByName&&this.componentsMappedByName[t]){var n=new this.componentsMappedByName[t];return this.wireBean(n),this.copyAttributesFromNode(e,n.getHtmlElement()),n.attributesSet(),n}return null},e.prototype.copyAttributesFromNode=function(e,t){if(e.attributes)for(var n=e.attributes.length,o=0;o<n;o++){var r=e.attributes[o];t.setAttribute(r.name,r.value)}},e.prototype.wireBean=function(e){if(!e)throw Error("Can't wire to bean since it is null");this.wireBeans([e])},e.prototype.wireBeans=function(e){this.autoWireBeans(e),this.methodWireBeans(e),this.preConstruct(e),this.postConstruct(e)},e.prototype.createBeans=function(){var e=this;this.contextParams.beans.forEach(this.createBeanEntry.bind(this)),this.contextParams.overrideBeans&&this.contextParams.overrideBeans.forEach(this.createBeanEntry.bind(this)),h.Utils.iterateObject(this.beans,function(t,n){var r;n.bean.__agBeanMetaData&&n.bean.__agBeanMetaData.autowireMethods&&n.bean.__agBeanMetaData.autowireMethods.agConstructor&&(r=n.bean.__agBeanMetaData.autowireMethods.agConstructor);var i=e.getBeansForParameters(r,n.bean.name),a=o(n.bean,i);n.beanInstance=a,e.logger.log("bean "+e.getBeanName(a)+" created")})},e.prototype.createBeanEntry=function(e){var t=e.__agBeanMetaData;if(!t){var n=void 0;return n=e.prototype.constructor?e.prototype.constructor.name:""+e,void console.error("context item "+n+" is not a bean")}var o={bean:e,beanInstance:null,beanName:t.beanName};this.beans[t.beanName]=o},e.prototype.autoWireBeans=function(e){var t=this;e.forEach(function(e){return t.autoWireBean(e)})},e.prototype.methodWireBeans=function(e){var t=this;e.forEach(function(e){if(!e)throw Error("Can't wire to bean since it is null");return t.methodWireBean(e)})},e.prototype.autoWireBean=function(e){for(var t=this,n=e,o=this;null!=n;){var r=function(){var r=n.constructor;if(r.__agBeanMetaData&&r.__agBeanMetaData.agClassAttributes){var i=r.__agBeanMetaData.agClassAttributes;if(!i)return{value:void 0};var a=o.getBeanName(r);i.forEach(function(n){var o=t.lookupBeanInstance(a,n.beanName,n.optional);e[n.attributeName]=o})}n=Object.getPrototypeOf(n)?Object.getPrototypeOf(n):null}();if("object"===typeof r)return r.value}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.methodWireBean=function(e){var t,n=this;e.constructor.__agBeanMetaData&&e.constructor.__agBeanMetaData.autowireMethods&&(t=e.constructor.__agBeanMetaData.autowireMethods),h.Utils.iterateObject(t,function(t,o){if("agConstructor"!==t){var r=n.getBeanName(e.constructor),i=n.getBeansForParameters(o,r);e[t].apply(e,i)}})},e.prototype.getBeansForParameters=function(e,t){var n=this,o=[];return e&&h.Utils.iterateObject(e,function(e,r){var i=n.lookupBeanInstance(t,r);o[Number(e)]=i}),o},e.prototype.lookupBeanInstance=function(e,t,n){if(void 0===n&&(n=!1),"context"===t)return this;if(this.contextParams.seed&&this.contextParams.seed.hasOwnProperty(t))return this.contextParams.seed[t];var o=this.beans[t];return o?o.beanInstance:(n||console.error("ag-Grid: unable to find bean reference "+t+" while initialising "+e),null)},e.prototype.postConstruct=function(e){e.forEach(function(e){e.constructor.__agBeanMetaData&&e.constructor.__agBeanMetaData.postConstructMethods&&e.constructor.__agBeanMetaData&&e.constructor.__agBeanMetaData.postConstructMethods.forEach(function(t){return e[t]()})})},e.prototype.preConstruct=function(e){e.forEach(function(e){e.constructor.__agBeanMetaData&&e.constructor.__agBeanMetaData.preConstructMethods&&e.constructor.__agBeanMetaData.preConstructMethods.forEach(function(t){return e[t]()})})},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){this.destroyed||(this.logger.log(">> Shutting down ag-Application Context"),h.Utils.iterateObject(this.beans,function(e,t){var n=t.beanInstance;n.constructor.__agBeanMetaData&&n.constructor.__agBeanMetaData.preDestroyMethods&&n.constructor.__agBeanMetaData.preDestroyMethods.forEach(function(e){return n[e]()})}),this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead"))},e}();t.Context=f,t.PreConstruct=r,t.PostConstruct=i,t.PreDestroy=a,t.Bean=s,t.Autowired=l,t.Optional=u,t.Qualifier=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,r=/([^\s,]+)/g,i=function(){function e(){this.timestamp=(new Date).getTime()}return e.prototype.print=function(e){var t=(new Date).getTime()-this.timestamp;console.log(e+" = "+t),this.timestamp=(new Date).getTime()},e}();t.Timer=i;var a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=/[&<>"']/g,l=function(){function e(){}return e.areEventsNear=function(e,t,n){if(0===n)return!1;var o=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(o,r)<=n},e.shallowCompare=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},e.getNameOfClass=function(e){var t=/function (.{1,})\(/,n=e.toString(),o=t.exec(n);return o&&o.length>1?o[1]:""},e.values=function(e){var t=[];return this.iterateObject(e,function(e,n){t.push(n)}),t},e.getValueUsingField=function(e,t,n){if(t&&e){if(n){for(var o=t.split("."),r=e,i=0;i<o.length;i++)if(r=r[o[i]],this.missing(r))return null;return r}return e[t]}},e.getScrollLeft=function(e,t){var n=e.scrollLeft;return t&&(n=Math.abs(n),(this.isBrowserSafari()||this.isBrowserChrome())&&(n=e.scrollWidth-e.clientWidth-n)),n},e.cleanNumber=function(e){return"string"===typeof e&&(e=parseInt(e)),e="number"===typeof e?Math.floor(e):null},e.setScrollLeft=function(e,t,n){n&&((this.isBrowserSafari()||this.isBrowserChrome())&&(t=e.scrollWidth-e.clientWidth-t),this.isBrowserFirefox()&&(t*=-1)),e.scrollLeft=t},e.iterateObject=function(e,t){if(!this.missing(e))for(var n=Object.keys(e),o=0;o<n.length;o++){var r=n[o],i=e[r];t(r,i)}},e.cloneObject=function(e){for(var t={},n=Object.keys(e),o=0;o<n.length;o++){var r=n[o],i=e[r];t[r]=i}return t},e.map=function(e,t){for(var n=[],o=0;o<e.length;o++){var r=e[o],i=t(r);n.push(i)}return n},e.mapObject=function(t,n){var o=[];return e.iterateObject(t,function(e,t){o.push(n(t))}),o},e.forEach=function(e,t){if(e)for(var n=0;n<e.length;n++){var o=e[n];t(o,n)}},e.filter=function(e,t){var n=[];return e.forEach(function(e){t(e)&&n.push(e)}),n},e.getAllKeysInObjects=function(e){var t={};return e.forEach(function(e){e&&Object.keys(e).forEach(function(e){return t[e]=null})}),Object.keys(t)},e.mergeDeep=function(t,n){this.exists(n)&&this.iterateObject(n,function(n,o){var r=t[n];return null==r?void(t[n]=o):"object"===typeof r&&o?void e.mergeDeep(r,o):void(o&&(t[n]=o))})},e.assign=function(e){for(var t=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return n.forEach(function(n){t.exists(n)&&t.iterateObject(n,function(t,n){e[t]=n})}),e},e.parseYyyyMmDdToDate=function(e,t){try{if(!e)return null;if(-1===e.indexOf(t))return null;var n=e.split(t);return 3!=n.length?null:new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))}catch(e){return null}},e.serializeDateToYyyyMmDd=function(t,n){return t?t.getFullYear()+n+e.pad(t.getMonth()+1,2)+n+e.pad(t.getDate(),2):null},e.pad=function(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n},e.pushAll=function(e,t){this.missing(t)||this.missing(e)||t.forEach(function(t){return e.push(t)})},e.createArrayOfNumbers=function(e,t){for(var n=[],o=e;o<=t;o++)n.push(o);return n},e.getFunctionParameters=function(e){var t=e.toString().replace(o,""),n=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(r);return null===n?[]:n},e.find=function(e,t,n){if(null===e||void 0===e)return null;if(!Array.isArray(e)){var o=this.values(e);return this.find(o,t,n)}for(var r,i=e,a=0;a<i.length;a++){var s=i[a];if("string"===typeof t){if(s[t]===n){r=s;break}}else{if(t(s)){r=s;break}}}return r},e.toStrings=function(e){return this.map(e,function(e){return void 0!==e&&null!==e&&e.toString?e.toString():null})},e.iterateArray=function(e,t){for(var n=0;n<e.length;n++){t(e[n],n)}},e.isNode=function(e){return"function"===typeof Node?e instanceof Node:e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},e.isElement=function(e){return"function"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&null!==e&&1===e.nodeType&&"string"===typeof e.nodeName},e.isNodeOrElement=function(e){return this.isNode(e)||this.isElement(e)},e.isEventFromPrintableCharacter=function(n){var o=String.fromCharCode(n.charCode);return t._.exists(n.key)?1===n.key.length:e.PRINTABLE_CHARACTERS.indexOf(o)>=0},e.addChangeListener=function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t),e.addEventListener("keydown",t),e.addEventListener("keyup",t)},e.makeNull=function(e){return null===e||void 0===e||""===e?null:e},e.missing=function(e){return!this.exists(e)},e.missingOrEmpty=function(e){return this.missing(e)||0===e.length},e.missingOrEmptyObject=function(e){return this.missing(e)||0===Object.keys(e).length},e.exists=function(e){return null!==e&&void 0!==e&&""!==e},e.anyExists=function(e){if(e)for(var t=0;t<e.length;t++)if(this.exists(e[t]))return!0;return!1},e.existsAndNotEmpty=function(e){return this.exists(e)&&e.length>0},e.removeAllChildren=function(e){if(e)for(;e.hasChildNodes();)e.removeChild(e.lastChild)},e.removeElement=function(e,t){this.removeFromParent(e.querySelector(t))},e.removeFromParent=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.isVisible=function(e){return null!==e.offsetParent},e.loadTemplate=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},e.assertHtmlElement=function(e){return"string"===typeof e?(console.error("ag-grid: Found a string template for a component type where only HTMLElements are allow. \n Please change the component to return back an HTMLElement from getGui(). Only some element types can return back strings.\n The found template is "+e),null):e},e.ensureElement=function(e){return"string"===typeof e?this.loadTemplate(e):e},e.appendHtml=function(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t},e.addOrRemoveCssClass=function(e,t,n){n?this.addCssClass(e,t):this.removeCssClass(e,t)},e.callIfPresent=function(e){e&&e()},e.addCssClass=function(e,t){var n=this;if(t&&0!==t.length){if(t.indexOf(" ")>=0)return void t.split(" ").forEach(function(t){return n.addCssClass(e,t)});if(e.classList)e.classList.add(t);else if(e.className&&e.className.length>0){var o=e.className.split(" ");o.indexOf(t)<0&&(o.push(t),e.className=o.join(" "))}else e.className=t}},e.containsClass=function(e,t){if(e.classList)return e.classList.contains(t);if(e.className){var n=e.className===t,o=e.className.indexOf(" "+t+" ")>=0,r=0===e.className.indexOf(t+" "),i=e.className.lastIndexOf(" "+t)===e.className.length-t.length-1;return n||o||r||i}return!1},e.getElementAttribute=function(e,t){if(e.attributes){if(e.attributes[t]){return e.attributes[t].value}return null}return null},e.offsetHeight=function(e){return e&&e.clientHeight?e.clientHeight:0},e.offsetWidth=function(e){return e&&e.clientWidth?e.clientWidth:0},e.sortNumberArray=function(e){e.sort(function(e,t){return e-t})},e.removeCssClass=function(e,t){if(e.classList)e.classList.remove(t);else if(e.className&&e.className.length>0){var n=e.className.split(" ");if(n.indexOf(t)>=0){for(;n.indexOf(t)>=0;)n.splice(n.indexOf(t),1);e.className=n.join(" ")}}},e.removeRepeatsFromArray=function(e,t){if(e)for(var n=e.length-2;n>=0;n--){var o=e[n]===t,r=e[n+1]===t;o&&r&&e.splice(n+1,1)}},e.removeFromArray=function(e,t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)},e.removeAllFromArray=function(e,t){t.forEach(function(t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)})},e.insertIntoArray=function(e,t,n){e.splice(n,0,t)},e.insertArrayIntoArray=function(e,t,n){if(!this.missing(e)&&!this.missing(t))for(var o=t.length-1;o>=0;o--){var r=t[o];this.insertIntoArray(e,r,n)}},e.moveInArray=function(e,t,n){var o=this;t.forEach(function(t){o.removeFromArray(e,t)}),t.slice().reverse().forEach(function(t){o.insertIntoArray(e,t,n)})},e.defaultComparator=function(e,t,n){function o(e,t){return e>t?1:e<t?-1:0}void 0===n&&(n=!1);var r=null===e||void 0===e,i=null===t||void 0===t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&i)return 0;if(r)return-1;if(i)return 1;if("string"===typeof e){if(!n)return o(e,t);try{return e.localeCompare(t)}catch(n){return o(e,t)}}return e<t?-1:e>t?1:0},e.compareArrays=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},e.ensureDomOrder=function(e,t,n){n&&n.nextSibling===t||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.insertBefore(t,e.firstChild))},e.insertWithDomOrder=function(e,t,n){n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.insertTemplateWithDomOrder=function(e,t,n){var o;return n?(n.insertAdjacentHTML("afterend",t),o=n.nextSibling):(e.firstChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t,o=e.firstChild),o},e.toStringOrNull=function(e){return this.exists(e)&&e.toString?e.toString():null},e.formatWidth=function(e){return"number"===typeof e?e+"px":e},e.formatNumberTwoDecimalPlacesAndCommas=function(e){return"number"!==typeof e?"":(Math.round(100*e)/100).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.formatNumberCommas=function(e){return"number"!==typeof e?"":e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.prependDC=function(e,t){this.exists(e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.createIcon=function(e,t,n){var o=this.createIconNoSpan(e,t,n);if(o.className.indexOf("ag-icon")>-1)return o;var r=document.createElement("span");return r.appendChild(o),r},e.createIconNoSpan=function(e,t,n){var o;if(n&&n.getColDef().icons&&(o=n.getColDef().icons[e]),!o&&t.getIcons()&&(o=t.getIcons()[e]),o){var r=void 0;if("function"===typeof o)r=o();else{if("string"!==typeof o)throw"icon from grid options needs to be a string or a function";r=o}if("string"===typeof r)return this.loadTemplate(r);if(this.isNodeOrElement(r))return r;throw"iconRenderer should return back a string or a dom object"}var i=document.createElement("span"),a=this.iconNameClassMap[e];if(!a)throw new Error(e+" did not find class");return i.setAttribute("class","ag-icon ag-icon-"+a),i},e.addStylesToElement=function(e,t){var n=this;t&&Object.keys(t).forEach(function(o){var r=n.hyphenToCamelCase(o);e.style[r]=t[o]})},e.isHorizontalScrollShowing=function(e){return e.clientWidth<e.scrollWidth},e.isVerticalScrollShowing=function(e){return e.clientHeight<e.scrollHeight},e.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var o=n.offsetWidth;return e.parentNode.removeChild(e),t-o},e.isKeyPressed=function(e,t){return(e.which||e.keyCode)===t},e.setVisible=function(e,t){this.addOrRemoveCssClass(e,"ag-hidden",!t)},e.setHidden=function(e,t){this.addOrRemoveCssClass(e,"ag-visibility-hidden",t)},e.isBrowserIE=function(){return void 0===this.isIE&&(this.isIE=!!document.documentMode),this.isIE},e.isBrowserEdge=function(){return void 0===this.isEdge&&(this.isEdge=!this.isBrowserIE()&&!!window.StyleMedia),this.isEdge},e.isBrowserSafari=function(){if(void 0===this.isSafari){var e=window;this.isSafari=Object.prototype.toString.call(e.HTMLElement).indexOf("Constructor")>0||function(e){return"[object SafariRemoteNotification]"===e.toString()}(!e.safari||e.safari.pushNotification)}return this.isSafari},e.isBrowserChrome=function(){if(void 0===this.isChrome){var e=window;this.isChrome=!!e.chrome&&!!e.chrome.webstore}return this.isChrome},e.isBrowserFirefox=function(){if(void 0===this.isFirefox){var e=window;this.isFirefox="undefined"!==typeof e.InstallTrigger}return this.isFirefox},e.getTarget=function(e){var t=e;return t.target||t.srcElement},e.isElementInEventPath=function(e,n){return!(!n||!e)&&t._.getEventPath(n).indexOf(e)>=0},e.createEventPath=function(e){for(var n=[],o=t._.getTarget(e);o;)n.push(o),o=o.parentElement;return n},e.addAgGridEventPath=function(e){e.__agGridEventPath=this.getEventPath(e)},e.getEventPath=function(e){var t=e;return e.deepPath?e.deepPath():t.path?t.path:t.composedPath?t.composedPath():t.__agGridEventPath?t.__agGridEventPath:this.createEventPath(e)},e.forEachSnapshotFirst=function(e,t){if(e){e.slice(0).forEach(t)}},e.getBodyWidth=function(){return document.body?document.body.clientWidth:window.innerHeight?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:-1},e.getBodyHeight=function(){return document.body?document.body.clientHeight:window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:-1},e.setCheckboxState=function(e,t){"boolean"===typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0},e.traverseNodesWithKey=function(e,t){function n(e){e.forEach(function(e){if(e.group){o.push(e.key);var r=o.join("|");t(e,r),n(e.childrenAfterGroup),o.pop()}})}var o=[];n(e)},e.camelCaseToHyphen=function(e){return null===e||void 0===e?null:e.replace(/([A-Z])/g,function(e){return"-"+e[0].toLowerCase()})},e.hyphenToCamelCase=function(e){return null===e||void 0===e?null:e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},e.cssStyleObjectToMarkup=function(e){var t=this;if(!e)return"";var n=[];return this.iterateObject(e,function(e,o){var r=t.camelCaseToHyphen(e);n.push(r+": "+o+";")}),n.join(" ")},e.isNumeric=function(e){return""!==e&&(!isNaN(parseFloat(e))&&isFinite(e))},e.escape=function(e){return null===e?null:e.replace?e.replace(s,function(e){return a[e]}):e},e.normalizeWheel=function(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}},e.debounce=function(e,t,n){void 0===n&&(n=!1);var o;return function(){var r=this,i=arguments,a=n&&!o;clearTimeout(o),o=setTimeout(function(){o=null,n||e.apply(r,i)},t),a&&e.apply(r,i)}},e.executeInAWhile=function(e){this.executeAfter(e,400)},e.executeNextVMTurn=function(e){this.executeAfter(e,0)},e.executeAfter=function(e,t){e.length>0&&setTimeout(function(){e.forEach(function(e){return e()})},t)},e.referenceCompare=function(e,t){return null==e&&null==t||(null!=e||!t)&&((!e||null!=t)&&e===t)},e.get=function(t,n,o){if(null==t)return o;if(n.indexOf(".")>-1){var r=n.split("."),i=r[0],a=t[i];return null!=a?e.get(a,r.slice(1,r.length).join("."),o):o}var a=t[n];return null!=a?a:o},e.addSafePassiveEventListener=function(t,n,o){t.addEventListener(n,o,e.passiveEvents.indexOf(n)>-1?{passive:!0}:null)},e.camelCaseToHumanText=function(e){if(null==e)return null;var t=/([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;return e.replace(t,"$1$4 $2$3$5").replace("."," ").split(" ").map(function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")}).join(" ")},e.PRINTABLE_CHARACTERS="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!\"\xa3$%^&*()_+-=[];'#,./|<>?:@~{}",e.iconNameClassMap={columnMovePin:"pin",columnMoveAdd:"plus",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"expanded",groupExpanded:"contracted",checkboxChecked:"checkbox-checked",checkboxUnchecked:"checkbox-unchecked",checkboxIndeterminate:"checkbox-indeterminate",checkboxCheckedReadOnly:"checkbox-checked-readonly",checkboxUncheckedReadOnly:"checkbox-unchecked-readonly",checkboxIndeterminateReadOnly:"checkbox-indeterminate-readonly",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},e.passiveEvents=["touchstart","touchend","touchmove","touchcancel"],e}();t.Utils=l;var u=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=1),this.nextValue=e,this.step=t}return e.prototype.next=function(){var e=this.nextValue;return this.nextValue+=this.step,e},e.prototype.peek=function(){return this.nextValue},e.prototype.skip=function(e){this.nextValue+=e},e}();t.NumberSequence=u,t._=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(227),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,r.default)(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}()},function(e,t,n){"use strict";function o(e){return!0===e||"true"===e}function r(e,t){return e>=0?e:t}function i(e,t){return e>0?e:t}var a=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),c=n(22),d=n(269),p=n(21),h=n(2),f=n(13),g=n(3),m=n(914),v=n(198),y=function(){function e(){this.propertyEventService=new u.EventService,this.domDataKey="__AG_"+Math.random().toString()}return t=e,e.prototype.agWire=function(e,t){this.gridOptions.api=e,this.gridOptions.columnApi=t,this.checkForDeprecated()},e.prototype.destroy=function(){this.gridOptions.api=null,this.gridOptions.columnApi=null},e.prototype.init=function(){var e=this.useAsyncEvents();this.eventService.addGlobalListener(this.globalEventHandler.bind(this),e),this.isGroupSelectsChildren()&&this.isSuppressParentsInRowNodes()&&console.warn("ag-Grid: groupSelectsChildren does not work wth suppressParentsInRowNodes, this selection method needs the part in rowNode to work"),this.isGroupSelectsChildren()&&(this.isRowSelectionMulti()||console.warn("ag-Grid: rowSelectionMulti must be true for groupSelectsChildren to make sense"),this.isRowModelEnterprise()&&console.warn("ag-Grid: group selects children is NOT support for Enterprise Row Model. This is because the rows are lazy loaded, so selecting a group is not possible asthe grid has no way of knowing what the children are.")),this.isGroupRemoveSingleChildren()&&this.isGroupHideOpenParents()&&console.warn("ag-Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!")},e.prototype.getDomData=function(e,t){var n=e[this.domDataKey];return n?n[t]:void 0},e.prototype.setDomData=function(e,t,n){var o=e[this.domDataKey];g.Utils.missing(o)&&(o={},e[this.domDataKey]=o),o[t]=n},e.prototype.isEnterprise=function(){return this.enterprise},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isRowDeselection=function(){return o(this.gridOptions.rowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isPivotMode=function(){return o(this.gridOptions.pivotMode)},e.prototype.isPivotTotals=function(){return o(this.gridOptions.pivotTotals)},e.prototype.isRowModelInfinite=function(){return this.gridOptions.rowModelType===c.Constants.ROW_MODEL_TYPE_INFINITE},e.prototype.isRowModelViewport=function(){return this.gridOptions.rowModelType===c.Constants.ROW_MODEL_TYPE_VIEWPORT},e.prototype.isRowModelEnterprise=function(){return this.gridOptions.rowModelType===c.Constants.ROW_MODEL_TYPE_ENTERPRISE},e.prototype.isRowModelDefault=function(){return g.Utils.missing(this.gridOptions.rowModelType)||this.gridOptions.rowModelType===c.Constants.ROW_MODEL_TYPE_IN_MEMORY||this.gridOptions.rowModelType===c.Constants.DEPRECATED_ROW_MODEL_TYPE_NORMAL},e.prototype.isFullRowEdit=function(){return"fullRow"===this.gridOptions.editType},e.prototype.isSuppressFocusAfterRefresh=function(){return o(this.gridOptions.suppressFocusAfterRefresh)},e.prototype.isShowToolPanel=function(){return o(this.gridOptions.showToolPanel)},e.prototype.isToolPanelSuppressRowGroups=function(){return o(this.gridOptions.toolPanelSuppressRowGroups)},e.prototype.isToolPanelSuppressValues=function(){return o(this.gridOptions.toolPanelSuppressValues)},e.prototype.isToolPanelSuppressPivots=function(){return o(this.gridOptions.toolPanelSuppressPivots)},e.prototype.isToolPanelSuppressPivotMode=function(){return o(this.gridOptions.toolPanelSuppressPivotMode)},e.prototype.isSuppressTouch=function(){return o(this.gridOptions.suppressTouch)},e.prototype.useAsyncEvents=function(){return!o(this.gridOptions.suppressAsyncEvents)},e.prototype.isEnableCellChangeFlash=function(){return o(this.gridOptions.enableCellChangeFlash)},e.prototype.isGroupSelectsChildren=function(){return o(this.gridOptions.groupSelectsChildren)},e.prototype.isGroupSelectsFiltered=function(){return o(this.gridOptions.groupSelectsFiltered)},e.prototype.isGroupHideOpenParents=function(){return o(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupMultiAutoColumn=function(){return o(this.gridOptions.groupMultiAutoColumn)||o(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupRemoveSingleChildren=function(){return o(this.gridOptions.groupRemoveSingleChildren)},e.prototype.isGroupIncludeFooter=function(){return o(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return o(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return o(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellSelection=function(){return o(this.gridOptions.suppressCellSelection)},e.prototype.isSuppressMultiSort=function(){return o(this.gridOptions.suppressMultiSort)},e.prototype.isGroupSuppressAutoColumn=function(){return o(this.gridOptions.groupSuppressAutoColumn)},e.prototype.isSuppressDragLeaveHidesColumns=function(){return o(this.gridOptions.suppressDragLeaveHidesColumns)},e.prototype.isSuppressScrollOnNewData=function(){return o(this.gridOptions.suppressScrollOnNewData)},e.prototype.isForPrint=function(){return"forPrint"===this.gridOptions.domLayout},e.prototype.isAutoHeight=function(){return"autoHeight"===this.gridOptions.domLayout},e.prototype.isSuppressHorizontalScroll=function(){return o(this.gridOptions.suppressHorizontalScroll)},e.prototype.isSuppressLoadingOverlay=function(){return o(this.gridOptions.suppressLoadingOverlay)},e.prototype.isSuppressNoRowsOverlay=function(){return o(this.gridOptions.suppressNoRowsOverlay)},e.prototype.isSuppressFieldDotNotation=function(){return o(this.gridOptions.suppressFieldDotNotation)},e.prototype.getPinnedTopRowData=function(){return this.gridOptions.pinnedTopRowData},e.prototype.getPinnedBottomRowData=function(){return this.gridOptions.pinnedBottomRowData},e.prototype.isFunctionsPassive=function(){return o(this.gridOptions.functionsPassive)},e.prototype.isSuppressTabbing=function(){return o(this.gridOptions.suppressTabbing)},e.prototype.isSuppressChangeDetection=function(){return o(this.gridOptions.suppressChangeDetection)},e.prototype.isSuppressAnimationFrame=function(){return o(this.gridOptions.suppressAnimationFrame)},e.prototype.getQuickFilterText=function(){return this.gridOptions.quickFilterText},e.prototype.isCacheQuickFilter=function(){return o(this.gridOptions.cacheQuickFilter)},e.prototype.isUnSortIcon=function(){return o(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return o(this.gridOptions.suppressMenuHide)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.gridOptions.getRowStyle},e.prototype.getRowClassFunc=function(){return this.gridOptions.getRowClass},e.prototype.rowClassRules=function(){return this.gridOptions.rowClassRules},e.prototype.getPostProcessPopupFunc=function(){return this.gridOptions.postProcessPopup},e.prototype.getDoesDataFlowerFunc=function(){return this.gridOptions.doesDataFlower},e.prototype.getPaginationNumberFormatterFunc=function(){return this.gridOptions.paginationNumberFormatter},e.prototype.getChildCountFunc=function(){return this.gridOptions.getChildCount},e.prototype.getIsFullWidthCellFunc=function(){return this.gridOptions.isFullWidthCell},e.prototype.getFullWidthCellRendererParams=function(){return this.gridOptions.fullWidthCellRendererParams},e.prototype.isEmbedFullWidthRows=function(){return this.isAutoHeight()||o(this.gridOptions.embedFullWidthRows)},e.prototype.getBusinessKeyForNodeFunc=function(){return this.gridOptions.getBusinessKeyForNode},e.prototype.getHeaderCellRenderer=function(){return this.gridOptions.headerCellRenderer},e.prototype.getApi=function(){return this.gridOptions.api},e.prototype.getColumnApi=function(){return this.gridOptions.columnApi},e.prototype.isDeltaRowDataMode=function(){return o(this.gridOptions.deltaRowDataMode)},e.prototype.isEnsureDomOrder=function(){return o(this.gridOptions.ensureDomOrder)},e.prototype.isEnableColResize=function(){return o(this.gridOptions.enableColResize)},e.prototype.isSingleClickEdit=function(){return o(this.gridOptions.singleClickEdit)},e.prototype.isSuppressClickEdit=function(){return o(this.gridOptions.suppressClickEdit)},e.prototype.isStopEditingWhenGridLosesFocus=function(){return o(this.gridOptions.stopEditingWhenGridLosesFocus)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getMaxConcurrentDatasourceRequests=function(){return this.gridOptions.maxConcurrentDatasourceRequests},e.prototype.getMaxBlocksInCache=function(){return this.gridOptions.maxBlocksInCache},e.prototype.getCacheOverflowSize=function(){return this.gridOptions.cacheOverflowSize},e.prototype.getPaginationPageSize=function(){return this.gridOptions.paginationPageSize},e.prototype.getCacheBlockSize=function(){return this.gridOptions.cacheBlockSize},e.prototype.getInfiniteInitialRowCount=function(){return this.gridOptions.infiniteInitialRowCount},e.prototype.isPurgeClosedRowNodes=function(){return o(this.gridOptions.purgeClosedRowNodes)},e.prototype.isSuppressPaginationPanel=function(){return o(this.gridOptions.suppressPaginationPanel)},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isGroupUseEntireRow=function(){return o(this.gridOptions.groupUseEntireRow)},e.prototype.isEnableRtl=function(){return o(this.gridOptions.enableRtl)},e.prototype.getAutoGroupColumnDef=function(){return this.gridOptions.autoGroupColumnDef},e.prototype.isGroupSuppressRow=function(){return o(this.gridOptions.groupSuppressRow)},e.prototype.getRowGroupPanelShow=function(){return this.gridOptions.rowGroupPanelShow},e.prototype.getPivotPanelShow=function(){return this.gridOptions.pivotPanelShow},e.prototype.isAngularCompileRows=function(){return o(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return o(this.gridOptions.angularCompileFilters)},e.prototype.isAngularCompileHeaders=function(){return o(this.gridOptions.angularCompileHeaders)},e.prototype.isDebug=function(){return o(this.gridOptions.debug)},e.prototype.getColumnDefs=function(){return this.gridOptions.columnDefs},e.prototype.getColumnTypes=function(){return g.Utils.assign({},this.gridOptions.columnTypes,m.DefaultColumnTypes)},e.prototype.getDatasource=function(){return this.gridOptions.datasource},e.prototype.getViewportDatasource=function(){return this.gridOptions.viewportDatasource},e.prototype.getEnterpriseDatasource=function(){return this.gridOptions.enterpriseDatasource},e.prototype.isEnableSorting=function(){return o(this.gridOptions.enableSorting)||o(this.gridOptions.enableServerSideSorting)},e.prototype.isAccentedSort=function(){return o(this.gridOptions.accentedSort)},e.prototype.isEnableCellExpressions=function(){return o(this.gridOptions.enableCellExpressions)},e.prototype.isEnableGroupEdit=function(){return o(this.gridOptions.enableGroupEdit)},e.prototype.isSuppressMiddleClickScrolls=function(){return o(this.gridOptions.suppressMiddleClickScrolls)},e.prototype.isSuppressPreventDefaultOnMouseWheel=function(){return o(this.gridOptions.suppressPreventDefaultOnMouseWheel)},e.prototype.isSuppressColumnVirtualisation=function(){return o(this.gridOptions.suppressColumnVirtualisation)},e.prototype.isSuppressContextMenu=function(){return o(this.gridOptions.suppressContextMenu)},e.prototype.isAllowContextMenuWithControlKey=function(){return o(this.gridOptions.allowContextMenuWithControlKey)},e.prototype.isSuppressCopyRowsToClipboard=function(){return o(this.gridOptions.suppressCopyRowsToClipboard)},e.prototype.isEnableFilter=function(){return o(this.gridOptions.enableFilter)||o(this.gridOptions.enableServerSideFilter)},e.prototype.isPagination=function(){return o(this.gridOptions.pagination)},e.prototype.isEnableServerSideFilter=function(){return this.gridOptions.enableServerSideFilter},e.prototype.isEnableServerSideSorting=function(){return o(this.gridOptions.enableServerSideSorting)},e.prototype.isSuppressMovableColumns=function(){return o(this.gridOptions.suppressMovableColumns)},e.prototype.isAnimateRows=function(){return!this.isEnsureDomOrder()&&o(this.gridOptions.animateRows)},e.prototype.isSuppressColumnMoveAnimation=function(){return o(this.gridOptions.suppressColumnMoveAnimation)},e.prototype.isSuppressAggFuncInHeader=function(){return o(this.gridOptions.suppressAggFuncInHeader)},e.prototype.isSuppressAggAtRootLevel=function(){return o(this.gridOptions.suppressAggAtRootLevel)},e.prototype.isEnableRangeSelection=function(){return o(this.gridOptions.enableRangeSelection)},e.prototype.isPaginationAutoPageSize=function(){return o(this.gridOptions.paginationAutoPageSize)},e.prototype.isRememberGroupStateWhenNewData=function(){return o(this.gridOptions.rememberGroupStateWhenNewData)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getAggFuncs=function(){return this.gridOptions.aggFuncs},e.prototype.getSortingOrder=function(){return this.gridOptions.sortingOrder},e.prototype.getAlignedGrids=function(){return this.gridOptions.alignedGrids},e.prototype.getGroupRowRendererParams=function(){return this.gridOptions.groupRowRendererParams},e.prototype.getOverlayLoadingTemplate=function(){return this.gridOptions.overlayLoadingTemplate},e.prototype.getOverlayNoRowsTemplate=function(){return this.gridOptions.overlayNoRowsTemplate},e.prototype.isSuppressAutoSize=function(){return o(this.gridOptions.suppressAutoSize)},e.prototype.isSuppressParentsInRowNodes=function(){return o(this.gridOptions.suppressParentsInRowNodes)},e.prototype.isEnableStatusBar=function(){return o(this.gridOptions.enableStatusBar)},e.prototype.isAlwaysShowStatusBar=function(){return o(this.gridOptions.alwaysShowStatusBar)},e.prototype.isFunctionsReadOnly=function(){return o(this.gridOptions.functionsReadOnly)},e.prototype.isFloatingFilter=function(){return this.gridOptions.floatingFilter},e.prototype.getDefaultColDef=function(){return this.gridOptions.defaultColDef},e.prototype.getDefaultColGroupDef=function(){return this.gridOptions.defaultColGroupDef},e.prototype.getDefaultExportParams=function(){return this.gridOptions.defaultExportParams},e.prototype.isSuppressCsvExport=function(){return o(this.gridOptions.suppressCsvExport)},e.prototype.isSuppressExcelExport=function(){return o(this.gridOptions.suppressExcelExport)},e.prototype.getHeaderCellTemplate=function(){return this.gridOptions.headerCellTemplate},e.prototype.getHeaderCellTemplateFunc=function(){return this.gridOptions.getHeaderCellTemplate},e.prototype.getNodeChildDetailsFunc=function(){return this.gridOptions.getNodeChildDetails},e.prototype.getGroupRowAggNodesFunc=function(){return this.gridOptions.groupRowAggNodes},e.prototype.getContextMenuItemsFunc=function(){return this.gridOptions.getContextMenuItems},e.prototype.getMainMenuItemsFunc=function(){return this.gridOptions.getMainMenuItems},e.prototype.getRowNodeIdFunc=function(){return this.gridOptions.getRowNodeId},e.prototype.getNavigateToNextCellFunc=function(){return this.gridOptions.navigateToNextCell},e.prototype.getTabToNextCellFunc=function(){return this.gridOptions.tabToNextCell},e.prototype.isValueCache=function(){return o(this.gridOptions.valueCache)},e.prototype.isValueCacheNeverExpires=function(){return o(this.gridOptions.valueCacheNeverExpires)},e.prototype.isAggregateOnlyChangedColumns=function(){return o(this.gridOptions.aggregateOnlyChangedColumns)},e.prototype.getProcessSecondaryColDefFunc=function(){return this.gridOptions.processSecondaryColDef},e.prototype.getProcessSecondaryColGroupDefFunc=function(){return this.gridOptions.processSecondaryColGroupDef},e.prototype.getSendToClipboardFunc=function(){return this.gridOptions.sendToClipboard},e.prototype.getProcessRowPostCreateFunc=function(){return this.gridOptions.processRowPostCreate},e.prototype.getProcessCellForClipboardFunc=function(){return this.gridOptions.processCellForClipboard},e.prototype.getProcessCellFromClipboardFunc=function(){return this.gridOptions.processCellFromClipboard},e.prototype.getViewportRowModelPageSize=function(){return i(this.gridOptions.viewportRowModelPageSize,5)},e.prototype.getViewportRowModelBufferSize=function(){return r(this.gridOptions.viewportRowModelBufferSize,5)},e.prototype.getClipboardDeliminator=function(){return g.Utils.exists(this.gridOptions.clipboardDeliminator)?this.gridOptions.clipboardDeliminator:"\t"},e.prototype.setProperty=function(e,t){var n=this.gridOptions,o=n[e];if(o!==t){n[e]=t;var r={type:e,currentValue:t,previousValue:o};this.propertyEventService.dispatchEvent(r)}},e.prototype.addEventListener=function(e,t){this.propertyEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.getAutoSizePadding=function(){var e=this.gridOptions.autoSizePadding;return"number"===typeof e&&e>0?e:this.specialForNewMaterial(4,24)},e.prototype.getHeaderHeight=function(){return"number"===typeof this.gridOptions.headerHeight?this.gridOptions.headerHeight:this.specialForNewMaterial(25,56)},e.prototype.getFloatingFiltersHeight=function(){return"number"===typeof this.gridOptions.floatingFiltersHeight?this.gridOptions.floatingFiltersHeight:this.specialForNewMaterial(25,56)},e.prototype.getGroupPaddingSize=function(){return this.specialForNewMaterial(10,42)},e.prototype.getFooterPaddingAddition=function(){return this.specialForNewMaterial(15,32)},e.prototype.getLeafNodePaddingAddition=function(){return this.specialForNewMaterial(10,24)},e.prototype.getGroupHeaderHeight=function(){return"number"===typeof this.gridOptions.groupHeaderHeight?this.gridOptions.groupHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotHeaderHeight=function(){return"number"===typeof this.gridOptions.pivotHeaderHeight?this.gridOptions.pivotHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotGroupHeaderHeight=function(){return"number"===typeof this.gridOptions.pivotGroupHeaderHeight?this.gridOptions.pivotGroupHeaderHeight:this.getGroupHeaderHeight()},e.prototype.isExternalFilterPresent=function(){return"function"===typeof this.gridOptions.isExternalFilterPresent&&this.gridOptions.isExternalFilterPresent()},e.prototype.doesExternalFilterPass=function(e){return"function"===typeof this.gridOptions.doesExternalFilterPass&&this.gridOptions.doesExternalFilterPass(e)},e.prototype.getDocument=function(){var e;return g.Utils.exists(this.gridOptions.getDocument)&&(e=this.gridOptions.getDocument()),g.Utils.exists(e)?e:document},e.prototype.getLayoutInterval=function(){return"number"===typeof this.gridOptions.layoutInterval?this.gridOptions.layoutInterval:c.Constants.LAYOUT_INTERVAL},e.prototype.getMinColWidth=function(){return this.gridOptions.minColWidth>t.MIN_COL_WIDTH?this.gridOptions.minColWidth:t.MIN_COL_WIDTH},e.prototype.getMaxColWidth=function(){return this.gridOptions.maxColWidth>t.MIN_COL_WIDTH?this.gridOptions.maxColWidth:null},e.prototype.getColWidth=function(){return"number"!==typeof this.gridOptions.colWidth||this.gridOptions.colWidth<t.MIN_COL_WIDTH?200:this.gridOptions.colWidth},e.prototype.getRowBuffer=function(){return"number"===typeof this.gridOptions.rowBuffer?(this.gridOptions.rowBuffer<0&&console.warn("ag-Grid: rowBuffer should not be negative"),this.gridOptions.rowBuffer):c.Constants.ROW_BUFFER_SIZE},e.prototype.getScrollbarWidth=function(){var e=this.gridOptions.scrollbarWidth;return("number"!==typeof e||e<0)&&(e=g.Utils.getScrollbarWidth()),e},e.prototype.checkForDeprecated=function(){var e=this.gridOptions;e.suppressUnSort&&console.warn("ag-grid: as of v1.12.4 suppressUnSort is not used. Please use sortOrder instead."),e.suppressDescSort&&console.warn("ag-grid: as of v1.12.4 suppressDescSort is not used. Please use sortOrder instead."),e.groupAggFields&&console.warn("ag-grid: as of v3 groupAggFields is not used. Please add appropriate agg fields to your columns."),e.groupHidePivotColumns&&console.warn("ag-grid: as of v3 groupHidePivotColumns is not used as pivot columns are now called rowGroup columns. Please refer to the documentation"),e.groupKeys&&console.warn("ag-grid: as of v3 groupKeys is not used. You need to set rowGroupIndex on the columns to group. Please refer to the documentation"),"boolean"===typeof e.groupDefaultExpanded&&console.warn("ag-grid: groupDefaultExpanded can no longer be boolean. for groupDefaultExpanded=true, use groupDefaultExpanded=9999 instead, to expand all the groups"),(e.onRowDeselected||e.rowDeselected)&&console.warn("ag-grid: since version 3.4 event rowDeselected no longer exists, please check the docs"),e.rowsAlreadyGrouped&&console.warn("ag-grid: since version 3.4 rowsAlreadyGrouped no longer exists, please use getNodeChildDetails() instead"),e.groupAggFunction&&console.warn("ag-grid: since version 4.3.x groupAggFunction is now called groupRowAggNodes"),e.checkboxSelection&&console.warn("ag-grid: since version 8.0.x checkboxSelection is not supported as a grid option. If you want this on all columns, use defaultColDef instead and set it there"),e.paginationInitialRowCount&&console.warn("ag-grid: since version 9.0.x paginationInitialRowCount is now called infiniteInitialRowCount"),e.infinitePageSize&&console.warn("ag-grid: since version 9.0.x infinitePageSize is now called cacheBlockSize"),e.infiniteBlockSize&&console.warn("ag-grid: since version 10.0.x infiniteBlockSize is now called cacheBlockSize"),e.maxPagesInCache&&console.warn("ag-grid: since version 10.0.x maxPagesInCache is now called maxBlocksInCache"),e.paginationOverflowSize&&console.warn("ag-grid: since version 10.0.x paginationOverflowSize is now called cacheOverflowSize"),e.forPrint&&console.warn('ag-grid: since version 10.1.x, use property domLayout="forPrint" instead of forPrint=true'),e.suppressMenuFilterPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','columnsMenuTab'] instead of suppressMenuFilterPanel=true"),e.suppressMenuMainPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['filterMenuTab','columnsMenuTab'] instead of suppressMenuMainPanel=true"),e.suppressMenuColumnPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','filterMenuTab'] instead of suppressMenuColumnPanel=true"),e.suppressUseColIdForGroups&&console.warn("ag-grid: since version 11.0.x, this is not in use anymore. You should be able to remove it from your definition"),e.groupColumnDef&&console.warn("ag-grid: since version 11.0.x, groupColumnDef has been renamed, this property is now called autoGroupColumnDef. Please change your configuration accordingly"),e.slaveGrids&&console.warn("ag-grid: since version 12.x, slaveGrids has been renamed, this property is now called alignedGrids. Please change your configuration accordingly"),e.floatingTopRowData&&console.warn("ag-grid: since version 12.x, floatingTopRowData is now called pinnedTopRowData"),e.floatingBottomRowData&&console.warn("ag-grid: since version 12.x, floatingBottomRowData is now called pinnedBottomRowData"),e.paginationStartPage&&console.warn("ag-grid: since version 12.x, paginationStartPage is gone, please call api.paginationGoToPage("+e.paginationStartPage+") instead.")},e.prototype.getLocaleTextFunc=function(){if(this.gridOptions.localeTextFunc)return this.gridOptions.localeTextFunc;var e=this;return function(t,n){var o=e.gridOptions.localeText;return o&&o[t]?o[t]:n}},e.prototype.globalEventHandler=function(e,t){var n=d.ComponentUtil.getCallbackForEvent(e);"function"===typeof this.gridOptions[n]&&this.gridOptions[n](t)},e.prototype.getRowHeightAsNumber=function(){var e=this.gridOptions.rowHeight;return g.Utils.missing(e)?this.getDefaultRowHeight():this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:(console.warn("ag-Grid row height must be a number if not using standard row model"),this.getDefaultRowHeight())},e.prototype.getRowHeightForNode=function(e){if("function"===typeof this.gridOptions.getRowHeight){var t={node:e,data:e.data,api:this.gridOptions.api,context:this.gridOptions.context};return this.gridOptions.getRowHeight(t)}return this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:this.getDefaultRowHeight()},e.prototype.isDynamicRowHeight=function(){return"function"===typeof this.gridOptions.getRowHeight},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"===typeof e},e.prototype.specialForNewMaterial=function(e,t){return"ag-theme-material"==this.environment.getTheme()?t:e},e.prototype.getDefaultRowHeight=function(){return this.specialForNewMaterial(25,48)},e.MIN_COL_WIDTH=10,e.PROP_HEADER_HEIGHT="headerHeight",e.PROP_GROUP_REMOVE_SINGLE_CHILDREN="groupRemoveSingleChildren",e.PROP_PIVOT_HEADER_HEIGHT="pivotHeaderHeight",e.PROP_GROUP_HEADER_HEIGHT="groupHeaderHeight",e.PROP_PIVOT_GROUP_HEADER_HEIGHT="pivotGroupHeaderHeight",e.PROP_FLOATING_FILTERS_HEIGHT="floatingFiltersHeight",a([h.Autowired("gridOptions"),s("design:type",Object)],e.prototype,"gridOptions",void 0),a([h.Autowired("columnController"),s("design:type",f.ColumnController)],e.prototype,"columnController",void 0),a([h.Autowired("eventService"),s("design:type",u.EventService)],e.prototype,"eventService",void 0),a([h.Autowired("enterprise"),s("design:type",Boolean)],e.prototype,"enterprise",void 0),a([h.Autowired("frameworkFactory"),s("design:type",Object)],e.prototype,"frameworkFactory",void 0),a([h.Autowired("gridApi"),s("design:type",p.GridApi)],e.prototype,"gridApi",void 0),a([h.Autowired("columnApi"),s("design:type",f.ColumnApi)],e.prototype,"columnApi",void 0),a([h.Autowired("environment"),s("design:type",v.Environment)],e.prototype,"environment",void 0),a([l(0,h.Qualifier("gridApi")),l(1,h.Qualifier("columnApi")),s("design:type",Function),s("design:paramtypes",[p.GridApi,f.ColumnApi]),s("design:returntype",void 0)],e.prototype,"agWire",null),a([h.PreDestroy,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],e.prototype,"destroy",null),a([h.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],e.prototype,"init",null),e=t=a([h.Bean("gridOptionsWrapper")],e);var t}();t.GridOptionsWrapper=y},function(e,t,n){e.exports={default:n(587),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(157),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,r.default)(t))&&"function"!==typeof t?e:t}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(613),i=o(r),a=n(617),s=o(a),l=n(157),u=o(l);t.default=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":(0,u.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},function(e,t){e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(371),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(91),l=n(29),u=n(6),c=n(60),d=n(181),p=n(183),h=n(271),f=n(14),g=n(113),m=n(33),v=n(17),y=n(114),C=n(289),b=n(2),w=n(35),_=n(278),E=n(444),x=n(115),S=n(21),A=function(){function e(){}return e.prototype.sizeColumnsToFit=function(e){this._columnController.sizeColumnsToFit(e)},e.prototype.setColumnGroupOpened=function(e,t){this._columnController.setColumnGroupOpened(e,t)},e.prototype.getColumnGroup=function(e,t){return this._columnController.getColumnGroup(e,t)},e.prototype.getOriginalColumnGroup=function(e){return this._columnController.getOriginalColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this._columnController.getDisplayNameForColumn(e,t)},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this._columnController.getDisplayNameForColumnGroup(e,t)},e.prototype.getColumn=function(e){return this._columnController.getPrimaryColumn(e)},e.prototype.setColumnState=function(e){return this._columnController.setColumnState(e)},e.prototype.getColumnState=function(){return this._columnController.getColumnState()},e.prototype.resetColumnState=function(){this._columnController.resetColumnState()},e.prototype.getColumnGroupState=function(){return this._columnController.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this._columnController.setColumnGroupState(e)},e.prototype.resetColumnGroupState=function(){this._columnController.resetColumnGroupState()},e.prototype.isPinning=function(){return this._columnController.isPinningLeft()||this._columnController.isPinningRight()},e.prototype.isPinningLeft=function(){return this._columnController.isPinningLeft()},e.prototype.isPinningRight=function(){return this._columnController.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this._columnController.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this._columnController.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this._columnController.setColumnVisible(e,t)},e.prototype.setColumnsVisible=function(e,t){this._columnController.setColumnsVisible(e,t)},e.prototype.setColumnPinned=function(e,t){this._columnController.setColumnPinned(e,t)},e.prototype.setColumnsPinned=function(e,t){this._columnController.setColumnsPinned(e,t)},e.prototype.getAllColumns=function(){return this._columnController.getAllPrimaryColumns()},e.prototype.getAllGridColumns=function(){return this._columnController.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this._columnController.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this._columnController.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this._columnController.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this._columnController.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this._columnController.getAllDisplayedVirtualColumns()},e.prototype.moveColumn=function(e,t){"number"===typeof e?(console.log("ag-Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead"),this._columnController.moveColumnByIndex(e,t)):this._columnController.moveColumn(e,t)},e.prototype.moveColumnByIndex=function(e,t){this._columnController.moveColumnByIndex(e,t)},e.prototype.moveColumns=function(e,t){this._columnController.moveColumns(e,t)},e.prototype.moveRowGroupColumn=function(e,t){this._columnController.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this._columnController.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,n){void 0===n&&(n=!0),this._columnController.setColumnWidth(e,t,n)},e.prototype.setPivotMode=function(e){this._columnController.setPivotMode(e)},e.prototype.isPivotMode=function(){return this._columnController.isPivotMode()},e.prototype.getSecondaryPivotColumn=function(e,t){return this._columnController.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this._columnController.setValueColumns(e)},e.prototype.getValueColumns=function(){return this._columnController.getValueColumns()},e.prototype.removeValueColumn=function(e){this._columnController.removeValueColumn(e)},e.prototype.removeValueColumns=function(e){this._columnController.removeValueColumns(e)},e.prototype.addValueColumn=function(e){this._columnController.addValueColumn(e)},e.prototype.addValueColumns=function(e){this._columnController.addValueColumns(e)},e.prototype.setRowGroupColumns=function(e){this._columnController.setRowGroupColumns(e)},e.prototype.removeRowGroupColumn=function(e){this._columnController.removeRowGroupColumn(e)},e.prototype.removeRowGroupColumns=function(e){this._columnController.removeRowGroupColumns(e)},e.prototype.addRowGroupColumn=function(e){this._columnController.addRowGroupColumn(e)},e.prototype.addRowGroupColumns=function(e){this._columnController.addRowGroupColumns(e)},e.prototype.getRowGroupColumns=function(){return this._columnController.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this._columnController.setPivotColumns(e)},e.prototype.removePivotColumn=function(e){this._columnController.removePivotColumn(e)},e.prototype.removePivotColumns=function(e){this._columnController.removePivotColumns(e)},e.prototype.addPivotColumn=function(e){this._columnController.addPivotColumn(e)},e.prototype.addPivotColumns=function(e){this._columnController.addPivotColumns(e)},e.prototype.getPivotColumns=function(){return this._columnController.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this._columnController.getLeftDisplayedColumnGroups()},e.prototype.getCenterDisplayedColumnGroups=function(){return this._columnController.getCenterDisplayedColumnGroups()},e.prototype.getRightDisplayedColumnGroups=function(){return this._columnController.getRightDisplayedColumnGroups()},e.prototype.getAllDisplayedColumnGroups=function(){return this._columnController.getAllDisplayedColumnGroups()},e.prototype.autoSizeColumn=function(e){return this._columnController.autoSizeColumn(e)},e.prototype.autoSizeColumns=function(e){return this._columnController.autoSizeColumns(e)},e.prototype.autoSizeAllColumns=function(){this._columnController.autoSizeAllColumns()},e.prototype.setSecondaryColumns=function(e){this._columnController.setSecondaryColumns(e)},e.prototype.columnGroupOpened=function(e,t){console.error("ag-Grid: columnGroupOpened no longer exists, use setColumnGroupOpened"),this.setColumnGroupOpened(e,t)},e.prototype.hideColumns=function(e,t){console.error("ag-Grid: hideColumns is deprecated, use setColumnsVisible"),this._columnController.setColumnsVisible(e,!t)},e.prototype.hideColumn=function(e,t){console.error("ag-Grid: hideColumn is deprecated, use setColumnVisible"),this._columnController.setColumnVisible(e,!t)},e.prototype.setState=function(e){return console.error("ag-Grid: setState is deprecated, use setColumnState"),this.setColumnState(e)},e.prototype.getState=function(){return console.error("ag-Grid: getState is deprecated, use getColumnState"),this.getColumnState()},e.prototype.resetState=function(){console.error("ag-Grid: resetState is deprecated, use resetColumnState"),this.resetColumnState()},e.prototype.getAggregationColumns=function(){return console.error("ag-Grid: getAggregationColumns is deprecated, use getValueColumns"),this._columnController.getValueColumns()},e.prototype.removeAggregationColumn=function(e){console.error("ag-Grid: removeAggregationColumn is deprecated, use removeValueColumn"),this._columnController.removeValueColumn(e)},e.prototype.removeAggregationColumns=function(e){console.error("ag-Grid: removeAggregationColumns is deprecated, use removeValueColumns"),this._columnController.removeValueColumns(e)},e.prototype.addAggregationColumn=function(e){console.error("ag-Grid: addAggregationColumn is deprecated, use addValueColumn"),this._columnController.addValueColumn(e)},e.prototype.addAggregationColumns=function(e){console.error("ag-Grid: addAggregationColumns is deprecated, use addValueColumns"),this._columnController.addValueColumns(e)},e.prototype.setColumnAggFunction=function(e,t){console.error("ag-Grid: setColumnAggFunction is deprecated, use setColumnAggFunc"),this._columnController.setColumnAggFunc(e,t)},e.prototype.getDisplayNameForCol=function(e){return console.error("ag-Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn"),this.getDisplayNameForColumn(e,null)},o([b.Autowired("columnController"),r("design:type",R)],e.prototype,"_columnController",void 0),e=o([b.Bean("columnApi")],e)}();t.ColumnApi=A;var R=function(){function e(){this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.secondaryColumnsPresent=!1,this.gridHeaderRowCount=0,this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[],this.allDisplayedCenterVirtualColumns=[],this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.autoGroupsNeedBuilding=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}return e.prototype.init=function(){this.pivotMode=this.gridOptionsWrapper.isPivotMode()},e.prototype.setVirtualViewportLeftAndRight=function(){this.gridOptionsWrapper.isEnableRtl()?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},e.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,n=[];a.Utils.exists(t);)n.push(t),t=this.getDisplayedColAfter(t);return n},e.prototype.checkDisplayedVirtualColumns=function(){if(a.Utils.exists(this.displayedCenterColumns)){var e=this.allDisplayedVirtualColumns.map(function(e){return e.getId()}).join("#");this.updateVirtualSets();if(e!==this.allDisplayedVirtualColumns.map(function(e){return e.getId()}).join("#")){var t={type:v.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}}},e.prototype.setVirtualViewportPosition=function(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setVirtualViewportLeftAndRight(),this.ready&&this.checkDisplayedVirtualColumns())},e.prototype.isPivotMode=function(){return this.pivotMode},e.prototype.setPivotMode=function(e){if(e!==this.pivotMode){this.pivotMode=e,this.updateDisplayedColumns();var t={type:v.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},e.prototype.getSecondaryPivotColumn=function(e,t){if(!this.secondaryColumnsPresent)return null;var n=this.getPrimaryColumn(t),o=null;return this.secondaryColumns.forEach(function(t){var r=t.getColDef().pivotKeys,i=t.getColDef().pivotValueColumn,s=a.Utils.compareArrays(r,e),l=i===n;s&&l&&(o=t)}),o},e.prototype.setBeans=function(e){this.logger=e.create("ColumnController")},e.prototype.setFirstRightAndLastLeftPinned=function(){var e,t;this.gridOptionsWrapper.isEnableRtl()?(e=this.displayedLeftColumns?this.displayedLeftColumns[0]:null,t=this.displayedRightColumns?this.displayedRightColumns[this.displayedRightColumns.length-1]:null):(e=this.displayedLeftColumns?this.displayedLeftColumns[this.displayedLeftColumns.length-1]:null,t=this.displayedRightColumns?this.displayedRightColumns[0]:null),this.gridColumns.forEach(function(n){n.setLastLeftPinned(n===e),n.setFirstRightPinned(n===t)})},e.prototype.autoSizeColumns=function(e){for(var t=this,n=[],o=-1;0!==o;)o=0,this.actionOnGridColumns(e,function(e){if(!(n.indexOf(e)>=0)){var r=t.autoWidthCalculator.getPreferredWidthForColumn(e);if(r>0){var i=t.normaliseColumnWidth(e,r);e.setActualWidth(i),n.push(e),o++}return!0}});if(n.length>0){var r={type:v.Events.EVENT_COLUMN_RESIZED,columns:n,column:1===n.length?n[0]:null,finished:!0,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)}},e.prototype.autoSizeColumn=function(e){this.autoSizeColumns([e])},e.prototype.autoSizeAllColumns=function(){var e=this.getAllDisplayedColumns();this.autoSizeColumns(e)},e.prototype.getColumnsFromTree=function(e){function t(e){for(var o=0;o<e.length;o++){var r=e[o];r instanceof l.Column?n.push(r):r instanceof y.OriginalColumnGroup&&t(r.getChildren())}}var n=[];return t(e),n},e.prototype.getAllDisplayedColumnGroups=function(){return this.displayedLeftColumnTree&&this.displayedRightColumnTree&&this.displayedCentreColumnTree?this.displayedLeftColumnTree.concat(this.displayedCentreColumnTree).concat(this.displayedRightColumnTree):null},e.prototype.getPrimaryColumnTree=function(){return this.primaryBalancedTree},e.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},e.prototype.getLeftDisplayedColumnGroups=function(){return this.displayedLeftColumnTree},e.prototype.getRightDisplayedColumnGroups=function(){return this.displayedRightColumnTree},e.prototype.getCenterDisplayedColumnGroups=function(){return this.displayedCentreColumnTree},e.prototype.getDisplayedColumnGroups=function(e){switch(e){case l.Column.PINNED_LEFT:return this.getLeftDisplayedColumnGroups();case l.Column.PINNED_RIGHT:return this.getRightDisplayedColumnGroups();default:return this.getCenterDisplayedColumnGroups()}},e.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},e.prototype.getAllDisplayedColumns=function(){return this.allDisplayedColumns},e.prototype.getAllDisplayedVirtualColumns=function(){return this.allDisplayedVirtualColumns},e.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedLeftColumns):this.displayedLeftColumns},e.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedRightColumns):this.displayedRightColumns},e.prototype.getDisplayedColumnsForRow=function(e,t,n,o){for(var r=[],i=null,a=0;a<t.length;a++){var s=t[a],l=s.getColSpan(e);if(l>1){a+=l-1}if(!n||n(s)){var u=!!o&&o(s);0===r.length&&u&&i&&r.push(i),r.push(s)}i=s}return r},e.prototype.getAllDisplayedCenterVirtualColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.allDisplayedCenterVirtualColumns;var n=function(e){return e.getLeft()>t.viewportLeft};return this.getDisplayedColumnsForRow(e,this.displayedCenterColumns,this.isColumnInViewport.bind(this),n)},e.prototype.isColumnInViewport=function(e){var t=e.getLeft(),n=e.getLeft()+e.getActualWidth(),o=t<this.viewportLeft&&n<this.viewportLeft,r=t>this.viewportRight&&n>this.viewportRight;return!o&&!r},e.prototype.getPinnedLeftContainerWidth=function(){return this.getWidthOfColsInList(this.displayedLeftColumns)},e.prototype.getPinnedRightContainerWidth=function(){return this.getWidthOfColsInList(this.displayedRightColumns)},e.prototype.updatePrimaryColumnList=function(e,t,n,o,r){var i=this;if(!a.Utils.missingOrEmpty(e)){var s=!1;if(e.forEach(function(e){var r=i.getPrimaryColumn(e);if(r){if(n){if(t.indexOf(r)>=0)return;t.push(r)}else{if(t.indexOf(r)<0)return;a.Utils.removeFromArray(t,r)}o(r),s=!0}}),s){this.updateDisplayedColumns();var l={type:r,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(l)}}},e.prototype.setRowGroupColumns=function(e){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,v.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this))},e.prototype.setRowGroupActive=function(e,t){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e),e||t.setVisible(!0))},e.prototype.addRowGroupColumn=function(e){this.addRowGroupColumns([e])},e.prototype.addRowGroupColumns=function(e){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),v.Events.EVENT_COLUMN_ROW_GROUP_CHANGED)},e.prototype.removeRowGroupColumns=function(e){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),v.Events.EVENT_COLUMN_ROW_GROUP_CHANGED)},e.prototype.removeRowGroupColumn=function(e){this.removeRowGroupColumns([e])},e.prototype.addPivotColumns=function(e){this.updatePrimaryColumnList(e,this.pivotColumns,!0,function(e){return e.setPivotActive(!0)},v.Events.EVENT_COLUMN_PIVOT_CHANGED)},e.prototype.setPivotColumns=function(e){this.setPrimaryColumnList(e,this.pivotColumns,v.Events.EVENT_COLUMN_PIVOT_CHANGED,function(e,t){t.setPivotActive(e)})},e.prototype.addPivotColumn=function(e){this.addPivotColumns([e])},e.prototype.removePivotColumns=function(e){this.updatePrimaryColumnList(e,this.pivotColumns,!1,function(e){return e.setPivotActive(!1)},v.Events.EVENT_COLUMN_PIVOT_CHANGED)},e.prototype.removePivotColumn=function(e){this.removePivotColumns([e])},e.prototype.setPrimaryColumnList=function(e,t,n,o){var r=this;t.length=0,a.Utils.exists(e)&&e.forEach(function(e){var n=r.getPrimaryColumn(e);t.push(n)}),this.primaryColumns.forEach(function(e){var n=t.indexOf(e)>=0;o(n,e)}),this.updateDisplayedColumns();var i={type:n,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(i)},e.prototype.setValueColumns=function(e){this.setPrimaryColumnList(e,this.valueColumns,v.Events.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this))},e.prototype.setValueActive=function(e,t){if(e!==t.isValueActive()&&(t.setValueActive(e),e&&!t.getAggFunc())){var n=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(n)}},e.prototype.addValueColumns=function(e){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),v.Events.EVENT_COLUMN_VALUE_CHANGED)},e.prototype.addValueColumn=function(e){this.addValueColumns([e])},e.prototype.removeValueColumn=function(e){this.removeValueColumns([e])},e.prototype.removeValueColumns=function(e){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),v.Events.EVENT_COLUMN_VALUE_CHANGED)},e.prototype.normaliseColumnWidth=function(e,t){return t<e.getMinWidth()&&(t=e.getMinWidth()),e.isGreaterThanMax(t)&&(t=e.getMaxWidth()),t},e.prototype.getPrimaryOrGridColumn=function(e){var t=this.getPrimaryColumn(e);return t||this.getGridColumn(e)},e.prototype.setColumnWidth=function(e,t,n){var o=this.getPrimaryOrGridColumn(e);if(o){t=this.normaliseColumnWidth(o,t);var r=o.getActualWidth()!==t;if(r&&(o.setActualWidth(t),this.setLeftValues()),this.updateBodyWidths(),this.checkDisplayedVirtualColumns(),n||r){var i={type:v.Events.EVENT_COLUMN_RESIZED,columns:[o],column:o,finished:n,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(i)}}},e.prototype.setColumnAggFunc=function(e,t){e.setAggFunc(t);var n={type:v.Events.EVENT_COLUMN_VALUE_CHANGED,columns:[e],column:e,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(n)},e.prototype.moveRowGroupColumn=function(e,t){var n=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,n);var o={type:v.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:1===this.rowGroupColumns.length?this.rowGroupColumns[0]:null,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.moveColumns=function(e,t){if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("ag-Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("ag-Grid: remember that you should not count the moving columns when calculating the new index");var n=this.getGridColumns(e);if(this.doesMovePassRules(n,t)){a.Utils.moveInArray(this.gridColumns,n,t),this.updateDisplayedColumns();var o={type:v.Events.EVENT_COLUMN_MOVED,columns:n,column:1===n.length?n[0]:null,toIndex:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o),this.columnAnimationService.finish()}},e.prototype.doesMovePassRules=function(e,t){var n=this.gridColumns.slice();a.Utils.moveInArray(n,e,t);var o=!0;return this.columnUtils.depthFirstOriginalTreeSearch(this.gridBalancedTree,function(e){if(e instanceof y.OriginalColumnGroup){var t=e;if(t.getColGroupDef()&&t.getColGroupDef().marryChildren){var r=[];t.getLeafColumns().forEach(function(e){var t=n.indexOf(e);r.push(t)});Math.max.apply(Math,r)-Math.min.apply(Math,r)>t.getLeafColumns().length-1&&(o=!1)}}}),o},e.prototype.moveColumn=function(e,t){this.moveColumns([e],t)},e.prototype.moveColumnByIndex=function(e,t){var n=this.gridColumns[e];this.moveColumn(n,t)},e.prototype.getBodyContainerWidth=function(){return this.bodyWidth},e.prototype.getContainerWidth=function(e){switch(e){case l.Column.PINNED_LEFT:return this.leftWidth;case l.Column.PINNED_RIGHT:return this.rightWidth;default:return this.bodyWidth}},e.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedCenterColumns),t=this.getWidthOfColsInList(this.displayedLeftColumns),n=this.getWidthOfColsInList(this.displayedRightColumns);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n;var o={type:v.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)}},e.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},e.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},e.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},e.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},e.prototype.getDisplayedCenterColumns=function(){return this.displayedCenterColumns},e.prototype.getDisplayedLeftColumns=function(){return this.displayedLeftColumns},e.prototype.getDisplayedRightColumns=function(){return this.displayedRightColumns},e.prototype.getDisplayedColumns=function(e){switch(e){case l.Column.PINNED_LEFT:return this.getDisplayedLeftColumns();case l.Column.PINNED_RIGHT:return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},e.prototype.getAllPrimaryColumns=function(){return this.primaryColumns},e.prototype.getAllGridColumns=function(){return this.gridColumns},e.prototype.isEmpty=function(){return a.Utils.missingOrEmpty(this.gridColumns)},e.prototype.isRowGroupEmpty=function(){return a.Utils.missingOrEmpty(this.rowGroupColumns)},e.prototype.setColumnVisible=function(e,t){this.setColumnsVisible([e],t)},e.prototype.setColumnsVisible=function(e,t){var n=this;this.columnAnimationService.start(),this.actionOnGridColumns(e,function(e){return e.setVisible(t),!0},function(){return{type:v.Events.EVENT_COLUMN_VISIBLE,visible:t,column:null,columns:null,api:n.gridApi,columnApi:n.columnApi}}),this.columnAnimationService.finish()},e.prototype.setColumnPinned=function(e,t){this.setColumnsPinned([e],t)},e.prototype.setColumnsPinned=function(e,t){var n=this;this.columnAnimationService.start();var o;o=!0===t||t===l.Column.PINNED_LEFT?l.Column.PINNED_LEFT:t===l.Column.PINNED_RIGHT?l.Column.PINNED_RIGHT:null,this.actionOnGridColumns(e,function(e){return e.setPinned(o),!0},function(){return{type:v.Events.EVENT_COLUMN_PINNED,pinned:o,column:null,columns:null,api:n.gridApi,columnApi:n.columnApi}}),this.columnAnimationService.finish()},e.prototype.actionOnGridColumns=function(e,t,n){var o=this;if(!a.Utils.missingOrEmpty(e)){var r=[];if(e.forEach(function(e){var n=o.getGridColumn(e);if(n){!1!==t(n)&&r.push(n)}}),0!==r.length&&(this.updateDisplayedColumns(),a.Utils.exists(n))){var i=n();i.columns=r,i.column=1===r.length?r[0]:null,this.eventService.dispatchEvent(i)}}},e.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n>0?t[n-1]:null},e.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n<t.length-1?t[n+1]:null},e.prototype.isPinningLeft=function(){return this.displayedLeftColumns.length>0},e.prototype.isPinningRight=function(){return this.displayedRightColumns.length>0},e.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e=this.primaryColumns?this.primaryColumns.slice(0):[];return a.Utils.exists(this.groupAutoColumns)&&this.groupAutoColumns.forEach(function(t){return e.push(t)}),this.secondaryColumnsPresent&&this.secondaryColumns.forEach(function(t){return e.push(t)}),e},e.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,n=e.isPivotActive()?this.pivotColumns.indexOf(e):null,o=e.isValueActive()?e.getAggFunc():null;return{colId:e.getColId(),hide:!e.isVisible(),aggFunc:o,width:e.getActualWidth(),pivotIndex:n,pinned:e.getPinned(),rowGroupIndex:t}},e.prototype.getColumnState=function(){if(a.Utils.missing(this.primaryColumns))return[];var e=this.primaryColumns.map(this.createStateItemFromColumn.bind(this));return this.pivotMode||this.orderColumnStateList(e),e},e.prototype.orderColumnStateList=function(e){var t=this.gridColumns.map(function(e){return e.getColId()});e.sort(function(e,n){return t.indexOf(e.colId)-t.indexOf(n.colId)})},e.prototype.resetColumnState=function(){var e=this.getColumnsFromTree(this.primaryBalancedTree),t=[];e&&e.forEach(function(e){t.push({colId:e.getColId(),aggFunc:e.getColDef().aggFunc,hide:e.getColDef().hide,pinned:e.getColDef().pinned,rowGroupIndex:e.getColDef().rowGroupIndex,pivotIndex:e.getColDef().pivotIndex,width:e.getColDef().width})}),this.setColumnState(t)},e.prototype.setColumnState=function(e){var t=this;if(a.Utils.missingOrEmpty(this.primaryColumns))return!1;this.autoGroupsNeedBuilding=!0;var n=this.primaryColumns.slice();this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[];var o=!0,r={},i={};e&&e.forEach(function(e){var s=t.getPrimaryColumn(e.colId);s?(t.syncColumnWithStateItem(s,e,r,i),a.Utils.removeFromArray(n,s)):(console.warn("ag-grid: column "+e.colId+" not found"),o=!1)}),n.forEach(this.syncColumnWithNoState.bind(this)),this.rowGroupColumns.sort(this.sortColumnListUsingIndexes.bind(this,r)),this.pivotColumns.sort(this.sortColumnListUsingIndexes.bind(this,i)),this.copyDownGridColumns();var s=e.map(function(e){return e.colId});this.gridColumns.sort(function(e,t){return s.indexOf(e.getId())-s.indexOf(t.getId())}),this.updateDisplayedColumns();var l={type:v.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi};return this.eventService.dispatchEvent(l),o},e.prototype.sortColumnListUsingIndexes=function(e,t,n){return e[t.getId()]-e[n.getId()]},e.prototype.syncColumnWithNoState=function(e){e.setVisible(!1),e.setAggFunc(null),e.setPinned(null),e.setRowGroupActive(!1),e.setPivotActive(!1),e.setValueActive(!1)},e.prototype.syncColumnWithStateItem=function(e,t,n,o){e.setVisible(!t.hide),e.setPinned(t.pinned),t.width>=this.gridOptionsWrapper.getMinColWidth()&&e.setActualWidth(t.width),"string"===typeof t.aggFunc?(e.setAggFunc(t.aggFunc),e.setValueActive(!0),this.valueColumns.push(e)):(a.Utils.exists(t.aggFunc)&&console.warn("ag-Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it isintended for the column state to be stored and retrieved as simple JSON."),e.setAggFunc(null),e.setValueActive(!1)),"number"===typeof t.rowGroupIndex?(this.rowGroupColumns.push(e),e.setRowGroupActive(!0),n[e.getId()]=t.rowGroupIndex):e.setRowGroupActive(!1),"number"===typeof t.pivotIndex?(this.pivotColumns.push(e),e.setPivotActive(!0),o[e.getId()]=t.pivotIndex):e.setPivotActive(!1)},e.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},e.prototype.getColumns=function(e,t){var n=[];return e&&e.forEach(function(e){var o=t(e);o&&n.push(o)}),n},e.prototype.getColumnWithValidation=function(e){var t=this.getPrimaryColumn(e);return t||console.warn("ag-Grid: could not find column "+t),t},e.prototype.getPrimaryColumn=function(e){return this.getColumn(e,this.primaryColumns)},e.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns)},e.prototype.getColumn=function(e,t){if(!e)return null;for(var n=0;n<t.length;n++)if(this.columnsMatch(t[n],e))return t[n];return this.getAutoColumn(e)},e.prototype.getAutoColumn=function(e){var t=this;return!a.Utils.exists(this.groupAutoColumns)||a.Utils.missing(this.groupAutoColumns)?null:a.Utils.find(this.groupAutoColumns,function(n){return t.columnsMatch(n,e)})},e.prototype.columnsMatch=function(e,t){var n=e===t,o=e.getColDef()===t,r=e.getColId()==t;return n||o||r},e.prototype.getDisplayNameForColumn=function(e,t,n){void 0===n&&(n=!1);var o=this.getHeaderName(e.getColDef(),e,null,t);return n?this.wrapHeaderNameWithAggFunc(e,o):o},e.prototype.getDisplayNameForColumnGroup=function(e,t){var n=e.getOriginalColumnGroup().getColGroupDef();return n?this.getHeaderName(n,null,e,t):null},e.prototype.getHeaderName=function(e,t,n,o){var r=e.headerValueGetter;if(r){var i={colDef:e,column:t,columnGroup:n,location:o,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};return"function"===typeof r?r(i):"string"===typeof r?this.expressionService.evaluate(r,i):(console.warn("ag-grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?a.Utils.camelCaseToHumanText(e.field):""},e.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsWrapper.isSuppressAggFuncInHeader())return t;var n,o=e.getColDef().pivotValueColumn,r=a.Utils.exists(o),i=null;if(r)i=o.getAggFunc(),n=!0;else{var s=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();s&&l?(i=e.getAggFunc(),n=!0):n=!1}if(n){var u="string"===typeof i?i:"func";return this.gridOptionsWrapper.getLocaleTextFunc()(u,u)+"("+t+")"}return t},e.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof s.ColumnGroup)return e;var n=this.getAllDisplayedColumnGroups(),o="number"===typeof t,r=null;return this.columnUtils.depthFirstAllColumnTreeSearch(n,function(n){if(n instanceof s.ColumnGroup){var i=n,a=void 0;a=o?e===i.getGroupId()&&t===i.getInstanceId():e===i.getGroupId(),a&&(r=i)}}),r},e.prototype.setColumnDefs=function(e){this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var t=this.balancedColumnTreeBuilder.createBalancedColumnGroups(e,!0);this.primaryBalancedTree=t.balancedTree,this.primaryHeaderRowCount=t.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryBalancedTree),this.extractRowGroupColumns(),this.extractPivotColumns(),this.createValueColumns(),this.copyDownGridColumns(),this.updateDisplayedColumns(),this.checkDisplayedVirtualColumns(),this.ready=!0;var n={type:v.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(n);var o={type:v.Events.EVENT_NEW_COLUMNS_LOADED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.isReady=function(){return this.ready},e.prototype.extractRowGroupColumns=function(){var e=this;this.rowGroupColumns.forEach(function(e){return e.setRowGroupActive(!1)}),this.rowGroupColumns=[],this.primaryColumns.forEach(function(t){"number"===typeof t.getColDef().rowGroupIndex&&(e.rowGroupColumns.push(t),t.setRowGroupActive(!0))}),this.rowGroupColumns.sort(function(e,t){return e.getColDef().rowGroupIndex-t.getColDef().rowGroupIndex}),this.primaryColumns.forEach(function(t){if(t.getColDef().rowGroup){if(e.rowGroupColumns.indexOf(t)>=0)return;e.rowGroupColumns.push(t),t.setRowGroupActive(!0)}})},e.prototype.extractPivotColumns=function(){var e=this;this.pivotColumns.forEach(function(e){return e.setPivotActive(!1)}),this.pivotColumns=[],this.primaryColumns.forEach(function(t){"number"===typeof t.getColDef().pivotIndex&&(e.pivotColumns.push(t),t.setPivotActive(!0))}),this.pivotColumns.sort(function(e,t){return e.getColDef().pivotIndex-t.getColDef().pivotIndex}),this.primaryColumns.forEach(function(t){if(t.getColDef().pivot){if(e.pivotColumns.indexOf(t)>=0)return;e.pivotColumns.push(t),t.setPivotActive(!0)}})},e.prototype.resetColumnGroupState=function(){var e=[];this.columnUtils.depthFirstOriginalTreeSearch(this.primaryBalancedTree,function(t){if(t instanceof y.OriginalColumnGroup){var n={groupId:t.getGroupId(),open:t.getColGroupDef().openByDefault};e.push(n)}}),this.setColumnGroupState(e)},e.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(this.gridBalancedTree,function(t){if(t instanceof y.OriginalColumnGroup){var n=t;e.push({groupId:n.getGroupId(),open:n.isExpanded()})}}),e},e.prototype.setColumnGroupState=function(e){var t=this;this.columnAnimationService.start();var n=[];e.forEach(function(e){var o=e.groupId,r=e.open,i=t.getOriginalColumnGroup(o);i&&i.isExpanded()!==r&&(t.logger.log("columnGroupOpened("+i.getGroupId()+","+r+")"),i.setExpanded(r),n.push(i))}),this.updateGroupsAndDisplayedColumns(),n.forEach(function(e){var n={type:v.Events.EVENT_COLUMN_GROUP_OPENED,columnGroup:e,api:t.gridApi,columnApi:t.columnApi};t.eventService.dispatchEvent(n)}),this.columnAnimationService.finish()},e.prototype.setColumnGroupOpened=function(e,t){var n;n=e instanceof y.OriginalColumnGroup?e.getId():e,this.setColumnGroupState([{groupId:n,open:t}])},e.prototype.getOriginalColumnGroup=function(e){if(e instanceof y.OriginalColumnGroup)return e;"string"!==typeof e&&console.error("ag-Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(this.gridBalancedTree,function(n){if(n instanceof y.OriginalColumnGroup){var o=n;o.getId()===e&&(t=o)}}),t},e.prototype.calculateColumnsForDisplay=function(){var e;return e=this.pivotMode&&!this.secondaryColumnsPresent?this.createColumnsToDisplayFromValueColumns():a.Utils.filter(this.gridColumns,function(e){return e.isVisible()}),this.createGroupAutoColumnsIfNeeded(),a.Utils.exists(this.groupAutoColumns)&&(e=this.groupAutoColumns.concat(e)),e},e.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach(function(e){a.Utils.exists(e.getColDef().colSpan)&&(t=!0)}),t},e.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[];var t=function(t){var n=t.getColDef();n&&a.Utils.exists(n.showRowGroup)&&e.groupDisplayColumns.push(t)};this.gridColumns.forEach(t),this.groupAutoColumns&&this.groupAutoColumns.forEach(t)},e.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},e.prototype.createColumnsToDisplayFromValueColumns=function(){var e=this,t=this.valueColumns.slice();return t.sort(function(t,n){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(n)}),t},e.prototype.updateDisplayedColumns=function(){var e=this.calculateColumnsForDisplay();this.buildDisplayedTrees(e),this.calculateColumnsForGroupDisplay(),this.updateGroupsAndDisplayedColumns(),this.setFirstRightAndLastLeftPinned()},e.prototype.isSecondaryColumnsPresent=function(){return this.secondaryColumnsPresent},e.prototype.setSecondaryColumns=function(e){var t=e&&e.length>0;if(t||this.secondaryColumnsPresent){if(t){this.processSecondaryColumnDefinitions(e);var n=this.balancedColumnTreeBuilder.createBalancedColumnGroups(e,!1);this.secondaryBalancedTree=n.balancedTree,this.secondaryHeaderRowCount=n.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsPresent=!0}else this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsPresent=!1;this.copyDownGridColumns(),this.updateDisplayedColumns()}},e.prototype.processSecondaryColumnDefinitions=function(e){function t(e){e.forEach(function(e){if(a.Utils.exists(e.children)){var r=e;o&&o(r),t(r.children)}else{var i=e;n&&n(i)}})}var n=this.gridOptionsWrapper.getProcessSecondaryColDefFunc(),o=this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();(n||o)&&t(e)},e.prototype.copyDownGridColumns=function(){this.secondaryColumns?(this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice()):(this.gridBalancedTree=this.primaryBalancedTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice()),this.clearDisplayedColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns);var e={type:v.Events.EVENT_GRID_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.clearDisplayedColumns=function(){this.displayedLeftColumnTree=[],this.displayedRightColumnTree=[],this.displayedCentreColumnTree=[],this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[]},e.prototype.updateGroupsAndDisplayedColumns=function(){this.updateGroups(),this.updateDisplayedColumnsFromTrees(),this.updateVirtualSets(),this.updateBodyWidths();var e={type:v.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.updateDisplayedColumnsFromTrees=function(){this.addToDisplayedColumns(this.displayedLeftColumnTree,this.displayedLeftColumns),this.addToDisplayedColumns(this.displayedCentreColumnTree,this.displayedCenterColumns),this.addToDisplayedColumns(this.displayedRightColumnTree,this.displayedRightColumns),this.setupAllDisplayedColumns(),this.setLeftValues()},e.prototype.setupAllDisplayedColumns=function(){this.gridOptionsWrapper.isEnableRtl()?this.allDisplayedColumns=this.displayedRightColumns.concat(this.displayedCenterColumns).concat(this.displayedLeftColumns):this.allDisplayedColumns=this.displayedLeftColumns.concat(this.displayedCenterColumns).concat(this.displayedRightColumns)},e.prototype.setLeftValues=function(){this.setLeftValuesOfColumns(),this.setLeftValuesOfGroups()},e.prototype.setLeftValuesOfColumns=function(){var e=this,t=this.primaryColumns.slice(0),n=this.gridOptionsWrapper.isEnableRtl();[this.displayedLeftColumns,this.displayedRightColumns,this.displayedCenterColumns].forEach(function(o){if(n){var r=e.getWidthOfColsInList(o);o.forEach(function(e){r-=e.getActualWidth(),e.setLeft(r)})}else{var i=0;o.forEach(function(e){e.setLeft(i),i+=e.getActualWidth()})}a.Utils.removeAllFromArray(t,o)}),t.forEach(function(e){e.setLeft(null)})},e.prototype.setLeftValuesOfGroups=function(){[this.displayedLeftColumnTree,this.displayedRightColumnTree,this.displayedCentreColumnTree].forEach(function(e){e.forEach(function(e){if(e instanceof s.ColumnGroup){e.checkLeft()}})})},e.prototype.addToDisplayedColumns=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,function(e){e instanceof l.Column&&t.push(e)})},e.prototype.updateDisplayedCenterVirtualColumns=function(){var e=this.gridOptionsWrapper.isSuppressColumnVirtualisation()||this.gridOptionsWrapper.isForPrint();this.allDisplayedCenterVirtualColumns=e?this.displayedCenterColumns:this.filterOutColumnsWithinViewport(),this.allDisplayedVirtualColumns=this.allDisplayedCenterVirtualColumns.concat(this.displayedLeftColumns).concat(this.displayedRightColumns);var t={};return this.allDisplayedVirtualColumns.forEach(function(e){t[e.getId()]=!0}),t},e.prototype.getVirtualHeaderGroupRow=function(e,t){var n;switch(e){case l.Column.PINNED_LEFT:n=this.displayedLeftHeaderRows[t];break;case l.Column.PINNED_RIGHT:n=this.displayedRightHeaderRows[t];break;default:n=this.displayedCentreHeaderRows[t]}return a.Utils.missing(n)&&(n=[]),n},e.prototype.updateDisplayedVirtualGroups=function(e){function t(n,o,r){for(var i=!1,a=0;a<n.length;a++){var s=n[a],u=void 0;if(s instanceof l.Column)u=!0===e[s.getId()];else{u=t(s.getDisplayedChildren(),o,r+1)}u&&(i=!0,o[r]||(o[r]=[]),o[r].push(s))}return i}this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},t(this.displayedLeftColumnTree,this.displayedLeftHeaderRows,0),t(this.displayedRightColumnTree,this.displayedRightHeaderRows,0),t(this.displayedCentreColumnTree,this.displayedCentreHeaderRows,0)},e.prototype.updateVirtualSets=function(){var e=this.updateDisplayedCenterVirtualColumns();this.updateDisplayedVirtualGroups(e)},e.prototype.filterOutColumnsWithinViewport=function(){return a.Utils.filter(this.displayedCenterColumns,this.isColumnInViewport.bind(this))},e.prototype.sizeColumnsToFit=function(e){function t(e){a.Utils.removeFromArray(i,e),r.push(e)}var n=this,o=this.getAllDisplayedColumns();if(!(e<=0||0===o.length)){for(var r=a.Utils.filter(o,function(e){return!0===e.getColDef().suppressSizeToFit}),i=a.Utils.filter(o,function(e){return!0!==e.getColDef().suppressSizeToFit}),s=i.slice(0),l=!1;!l;){l=!0;var u=e-this.getWidthOfColsInList(r);if(u<=0)i.forEach(function(e){e.setMinimum()});else for(var c=u/this.getWidthOfColsInList(i),d=u,p=i.length-1;p>=0;p--){var h=i[p],f=Math.round(h.getActualWidth()*c);if(f<h.getMinWidth())h.setMinimum(),t(h),l=!1;else if(h.isGreaterThanMax(f))h.setActualWidth(h.getMaxWidth()),t(h),l=!1;else{var g=0===p;g?h.setActualWidth(d):h.setActualWidth(f)}d-=f}}this.setLeftValues(),this.updateBodyWidths(),s.forEach(function(e){var t={type:v.Events.EVENT_COLUMN_RESIZED,column:e,columns:[e],finished:!0,api:n.gridApi,columnApi:n.columnApi};n.eventService.dispatchEvent(t)})}},e.prototype.buildDisplayedTrees=function(e){var t=a.Utils.filter(e,function(e){return"left"===e.getPinned()}),n=a.Utils.filter(e,function(e){return"right"===e.getPinned()}),o=a.Utils.filter(e,function(e){return"left"!==e.getPinned()&&"right"!==e.getPinned()}),r=new C.GroupInstanceIdCreator;this.displayedLeftColumnTree=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,r,this.displayedLeftColumnTree),this.displayedRightColumnTree=this.displayedGroupCreator.createDisplayedGroups(n,this.gridBalancedTree,r,this.displayedRightColumnTree),this.displayedCentreColumnTree=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,r,this.displayedCentreColumnTree)},e.prototype.updateGroups=function(){var e=this.getAllDisplayedColumnGroups();this.columnUtils.depthFirstAllColumnTreeSearch(e,function(e){if(e instanceof s.ColumnGroup){e.calculateDisplayedColumns()}})},e.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},e.prototype.createGroupAutoColumnsIfNeeded=function(){if(this.autoGroupsNeedBuilding){this.autoGroupsNeedBuilding=!1;var e=this.rowGroupColumns.length>0&&!this.gridOptionsWrapper.isGroupSuppressAutoColumn()&&!this.gridOptionsWrapper.isGroupUseEntireRow()&&!this.gridOptionsWrapper.isGroupSuppressRow();this.groupAutoColumns=e?this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns):null}},e.prototype.createValueColumns=function(){this.valueColumns.forEach(function(e){return e.setValueActive(!1)}),this.valueColumns=[];for(var e=0;e<this.primaryColumns.length;e++){var t=this.primaryColumns[e];t.getColDef().aggFunc&&(t.setAggFunc(t.getColDef().aggFunc),this.valueColumns.push(t),t.setValueActive(!0))}},e.prototype.getWidthOfColsInList=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].getActualWidth();return t},e.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},o([b.Autowired("gridOptionsWrapper"),r("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([b.Autowired("expressionService"),r("design:type",c.ExpressionService)],e.prototype,"expressionService",void 0),o([b.Autowired("balancedColumnTreeBuilder"),r("design:type",d.BalancedColumnTreeBuilder)],e.prototype,"balancedColumnTreeBuilder",void 0),o([b.Autowired("displayedGroupCreator"),r("design:type",p.DisplayedGroupCreator)],e.prototype,"displayedGroupCreator",void 0),o([b.Autowired("autoWidthCalculator"),r("design:type",h.AutoWidthCalculator)],e.prototype,"autoWidthCalculator",void 0),o([b.Autowired("eventService"),r("design:type",f.EventService)],e.prototype,"eventService",void 0),o([b.Autowired("columnUtils"),r("design:type",g.ColumnUtils)],e.prototype,"columnUtils",void 0),o([b.Autowired("gridPanel"),r("design:type",w.GridPanel)],e.prototype,"gridPanel",void 0),o([b.Autowired("context"),r("design:type",b.Context)],e.prototype,"context",void 0),o([b.Autowired("columnAnimationService"),r("design:type",_.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),o([b.Autowired("autoGroupColService"),r("design:type",E.AutoGroupColService)],e.prototype,"autoGroupColService",void 0),o([b.Optional("aggFuncService"),r("design:type",Object)],e.prototype,"aggFuncService",void 0),o([b.Optional("valueCache"),r("design:type",x.ValueCache)],e.prototype,"valueCache",void 0),o([b.Autowired("columnApi"),r("design:type",A)],e.prototype,"columnApi",void 0),o([b.Autowired("gridApi"),r("design:type",S.GridApi)],e.prototype,"gridApi",void 0),o([b.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),o([i(0,b.Qualifier("loggerFactory")),r("design:type",Function),r("design:paramtypes",[m.LoggerFactory]),r("design:returntype",void 0)],e.prototype,"setBeans",null),e=o([b.Bean("columnController")],e)}();t.ColumnController=R},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),s=n(3),l=n(2),u=n(2),c=n(6),d=function(){function e(){this.allSyncListeners={},this.allAsyncListeners={},this.globalSyncListeners=[],this.globalAsyncListeners=[],this.asyncFunctionsQueue=[],this.scheduled=!1}return t=e,e.prototype.setBeans=function(e,t,n){if(void 0===n&&(n=null),this.logger=e.create("EventService"),n){var o=t.useAsyncEvents();this.addGlobalListener(n,o)}},e.prototype.getListenerList=function(e,t){var n=t?this.allAsyncListeners:this.allSyncListeners,o=n[e];return o||(o=[],n[e]=o),o},e.prototype.addEventListener=function(e,t,n){if(void 0===n&&(n=!1),this.assertNotDeprecated(e)){var o=this.getListenerList(e,n);o.indexOf(t)<0&&o.push(t)}},e.prototype.assertNotDeprecated=function(e){return"floatingRowDataChanged"!==e||(console.warn("ag-Grid: floatingRowDataChanged is now called pinnedRowDataChanged"),!1)},e.prototype.addModalPriorityEventListener=function(e,n,o){void 0===o&&(o=!1),this.assertNotDeprecated(e)&&this.addEventListener(e+t.PRIORITY,n,o)},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),t?this.globalAsyncListeners.push(e):this.globalSyncListeners.push(e)},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n=!1);var o=this.getListenerList(e,n);s.Utils.removeFromArray(o,t)},e.prototype.removeGlobalListener=function(e){s.Utils.removeFromArray(this.globalSyncListeners,e)},e.prototype.dispatchEvent=function(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1)},e.prototype.dispatchToListeners=function(e,n){var o=this,r=n?this.globalAsyncListeners:this.globalSyncListeners,i=e.type,a=this.getListenerList(i+t.PRIORITY,n);s.Utils.forEachSnapshotFirst(a,function(t){n?o.dispatchAsync(function(){return t(e)}):t(e)});var l=this.getListenerList(i,n);s.Utils.forEachSnapshotFirst(l,function(t){n?o.dispatchAsync(function(){return t(e)}):t(e)}),s.Utils.forEachSnapshotFirst(r,function(t){n?o.dispatchAsync(function(){return t(i,e)}):t(i,e)})},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(function(e){return e()})},e.PRIORITY="-P1",o([i(0,u.Qualifier("loggerFactory")),i(1,u.Qualifier("gridOptionsWrapper")),i(2,u.Qualifier("globalEventListener")),r("design:type",Function),r("design:paramtypes",[a.LoggerFactory,c.GridOptionsWrapper,Function]),r("design:returntype",void 0)],e.prototype,"setBeans",null),e=t=o([l.Bean("eventService")],e);var t}();t.EventService=d},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=n(992),i=o(r),a=n(1028),s=o(a),l=n(1050),u=o(l),c=n(1051),d=o(c),p=n(1052),h=o(p),f=n(1053),g=o(f);t.hover=d.default,t.handleHover=d.default,t.handleActive=h.default,t.loop=g.default;var m=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=(0,i.default)(n),a=(0,s.default)(e,r);return(0,u.default)(a)};t.default=m},function(e,t,n){"use strict";function o(e,t,n,o,i,a,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,s,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var r=function(e){};e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(903);t.Events=o.Events},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={easeOutFunction:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutFunction:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeOut:function(e,t,n,o){if(o=o||this.easeOutFunction,t&&"[object Array]"===Object.prototype.toString.call(t)){for(var r="",i=0;i<t.length;i++)r&&(r+=","),r+=this.create(e,t[i],n,o);return r}return this.create(e,t,n,o)},create:function(e,t,n,o){return e=e||"450ms",t=t||"all",n=n||"0ms",o=o||"linear",t+" "+e+" "+o+" "+n}}},function(e,t,n){"use strict";var o=n(44),r=o;e.exports=r},function(e,t,n){"use strict";function o(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var r=new Error(n);throw r.name="Invariant Violation",r.framesToPop=1,r}e.exports=o},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(182),a=n(61),s=n(197),l=n(55),u=n(13),c=n(53),d=n(6),p=n(35),h=n(62),f=n(14),g=n(22),m=n(2),v=n(118),y=n(78),C=n(93),b=n(92),w=n(3),_=n(194),E=n(193),x=n(117),S=n(445),A=n(115),R=n(186),T=n(94),O=function(){function e(){}return e.prototype.init=function(){switch(this.rowModel.getType()){case g.Constants.ROW_MODEL_TYPE_IN_MEMORY:this.inMemoryRowModel=this.rowModel;break;case g.Constants.ROW_MODEL_TYPE_INFINITE:this.infinitePageRowModel=this.rowModel;break;case g.Constants.ROW_MODEL_TYPE_ENTERPRISE:this.enterpriseRowModel=this.rowModel}},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.getDataAsCsv=function(e){return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){this.csvCreator.exportDataAsCsv(e)},e.prototype.getDataAsExcel=function(e){return this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.getDataAsExcelXml(e)},e.prototype.exportDataAsExcel=function(e){this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.exportDataAsExcel(e)},e.prototype.setEnterpriseDatasource=function(e){this.gridOptionsWrapper.isRowModelEnterprise()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '"+g.Constants.ROW_MODEL_TYPE_ENTERPRISE+"'")},e.prototype.setDatasource=function(e){this.gridOptionsWrapper.isRowModelInfinite()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use a datasource when gridOptions.rowModelType is '"+g.Constants.ROW_MODEL_TYPE_INFINITE+"'")},e.prototype.setViewportDatasource=function(e){this.gridOptionsWrapper.isRowModelViewport()?this.rowModel.setViewportDatasource(e):console.warn("ag-Grid: you can only use a viewport datasource when gridOptions.rowModelType is '"+g.Constants.ROW_MODEL_TYPE_VIEWPORT+"'")},e.prototype.setRowData=function(e){if(this.gridOptionsWrapper.isRowModelDefault())if(this.gridOptionsWrapper.isDeltaRowDataMode()){var t=this.immutableService.createTransactionForRowData(e);this.inMemoryRowModel.updateRowData(t)}else this.selectionController.reset(),this.inMemoryRowModel.setRowData(e);else console.log("cannot call setRowData unless using normal row model")},e.prototype.setFloatingTopRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()"),this.setPinnedTopRowData(e)},e.prototype.setFloatingBottomRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()"),this.setPinnedBottomRowData(e)},e.prototype.getFloatingTopRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()"),this.getPinnedTopRowCount()},e.prototype.getFloatingBottomRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()"),this.getPinnedBottomRowCount()},e.prototype.getFloatingTopRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()"),this.getPinnedTopRow(e)},e.prototype.getFloatingBottomRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()"),this.getPinnedBottomRow(e)},e.prototype.setPinnedTopRowData=function(e){this.pinnedRowModel.setPinnedTopRowData(e)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedRowModel.setPinnedBottomRowData(e)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},e.prototype.getPinnedTopRow=function(e){return this.pinnedRowModel.getPinnedTopRow(e)},e.prototype.getPinnedBottomRow=function(e){return this.pinnedRowModel.getPinnedBottomRow(e)},e.prototype.setColumnDefs=function(e){this.columnController.setColumnDefs(e)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridPanel.getVerticalPixelRange()},e.prototype.refreshCells=function(e){if(void 0===e&&(e={}),Array.isArray(e))return void console.warn("since ag-Grid v11.1, refreshCells() now takes parameters, please see the documentation.");this.rowRenderer.refreshCells(e)},e.prototype.redrawRows=function(e){void 0===e&&(e={}),e&&e.rowNodes?this.rowRenderer.redrawRows(e.rowNodes):this.rowRenderer.redrawAfterModelUpdate()},e.prototype.timeFullRedraw=function(e){function t(){var s=(new Date).getTime();a.rowRenderer.redrawAfterModelUpdate();var l=(new Date).getTime();setTimeout(function(){var a=(new Date).getTime(),u=l-s,c=a-l;console.log("duration: processing = "+u+"ms, reflow = "+c+"ms"),o++,r+=u,i+=c,o<e?setTimeout(t,1e3):n()},0)}function n(){console.log("tests complete. iteration count = "+o),console.log("average processing = "+r/o+"ms"),console.log("average reflow = "+i/o+"ms")}void 0===e&&(e=1);var o=0,r=0,i=0,a=this;t()},e.prototype.refreshView=function(){console.warn("ag-Grid: since v11.1, refreshView() is deprecated, please call redrawRows() instead"),this.redrawRows()},e.prototype.refreshRows=function(e){console.warn("since ag-Grid v11.1, refreshRows() is deprecated, please use refreshCells({rowNodes: rows}) or redrawRows({rowNodes: rows}) instead"),this.refreshCells({rowNodes:e})},e.prototype.rowDataChanged=function(e){console.log("ag-Grid: rowDataChanged is deprecated, either call refreshView() to refresh everything, or call rowNode.setRowData(newData) to set value on a particular node"),this.redrawRows()},e.prototype.softRefreshView=function(){console.warn("ag-Grid: since v11.1, softRefreshView() is deprecated, call refreshCells(params) instead."),this.refreshCells({volatile:!0})},e.prototype.refreshGroupRows=function(){console.warn("ag-Grid: since v11.1, refreshGroupRows() is no longer supported, call refreshCells() instead. Because refreshCells() now does dirty checking, it will only refresh cells that have changed, so it should not be necessary to only refresh the group rows."),this.refreshCells()},e.prototype.setFunctionsReadOnly=function(e){this.gridOptionsWrapper.setProperty("functionsReadOnly",e)},e.prototype.refreshHeader=function(){this.headerRenderer.refreshHeader()},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isAdvancedFilterPresent=function(){return this.filterManager.isAdvancedFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.onGroupExpandedOrCollapsed=function(e){w.Utils.missing(this.inMemoryRowModel)&&console.log("ag-Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model"),w.Utils.exists(e)&&console.log("ag-Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is not longer used, the grid will refresh all rows"),this.inMemoryRowModel.refreshModel({step:g.Constants.STEP_MAP})},e.prototype.refreshInMemoryRowModel=function(e){w.Utils.missing(this.inMemoryRowModel)&&console.log("cannot call refreshInMemoryRowModel unless using normal row model");var t=g.Constants.STEP_EVERYTHING,n={group:g.Constants.STEP_EVERYTHING,filter:g.Constants.STEP_FILTER,map:g.Constants.STEP_MAP,aggregate:g.Constants.STEP_AGGREGATE,sort:g.Constants.STEP_SORT,pivot:g.Constants.STEP_PIVOT};if(w.Utils.exists(e)&&(t=n[e]),w.Utils.missing(t))return void console.error("ag-Grid: invalid step "+e+", available steps are "+Object.keys(n).join(", "));var o={step:t,keepRenderedRows:!0,animate:!0,keepEditingRows:!0};this.inMemoryRowModel.refreshModel(o)},e.prototype.getRowNode=function(e){return w.Utils.missing(this.inMemoryRowModel)?void console.warn("ag-Grid: cannot call getRowNode unless using normal row model"):this.inMemoryRowModel.getRowNode(e)},e.prototype.expandAll=function(){if(w.Utils.missing(this.inMemoryRowModel))return void console.warn("ag-Grid: cannot call expandAll unless using normal row model");this.inMemoryRowModel.expandOrCollapseAll(!0)},e.prototype.collapseAll=function(){if(w.Utils.missing(this.inMemoryRowModel))return void console.warn("ag-Grid: cannot call collapseAll unless using normal row model");this.inMemoryRowModel.expandOrCollapseAll(!1)},e.prototype.addVirtualRowListener=function(e,t,n){"string"!==typeof e&&console.log("ag-Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener."),this.addRenderedRowListener(e,t,n)},e.prototype.addRenderedRowListener=function(e,t,n){"virtualRowRemoved"===e&&(console.log("ag-Grid: event virtualRowRemoved is deprecated, now called renderedRowRemoved"),e=""),"virtualRowSelected"===e&&console.log("ag-Grid: event virtualRowSelected is deprecated, to register for individual row selection events, add a listener directly to the row node."),this.rowRenderer.addRenderedRowListener(e,t,n)},e.prototype.setQuickFilter=function(e){this.filterManager.setQuickFilter(e)},e.prototype.selectIndex=function(e,t,n){console.log("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),n&&console.log("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.selectIndex(e,t)},e.prototype.deselectIndex=function(e,t){void 0===t&&(t=!1),console.log("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),t&&console.log("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.deselectIndex(e)},e.prototype.selectNode=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),console.log("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),n&&console.log("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectNode=function(e,t){void 0===t&&(t=!1),console.log("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),t&&console.log("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!1})},e.prototype.selectAll=function(){this.selectionController.selectAllRowNodes()},e.prototype.deselectAll=function(){this.selectionController.deselectAllRowNodes()},e.prototype.selectAllFiltered=function(){this.selectionController.selectAllRowNodes(!0)},e.prototype.deselectAllFiltered=function(){this.selectionController.deselectAllRowNodes(!0)},e.prototype.recomputeAggregates=function(){w.Utils.missing(this.inMemoryRowModel)&&console.log("cannot call recomputeAggregates unless using normal row model"),this.inMemoryRowModel.refreshModel({step:g.Constants.STEP_AGGREGATE})},e.prototype.sizeColumnsToFit=function(){if(this.gridOptionsWrapper.isForPrint())return void console.warn("ag-grid: sizeColumnsToFit does not work when forPrint=true");this.gridPanel.sizeColumnsToFit()},e.prototype.showLoadingOverlay=function(){this.gridPanel.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.gridPanel.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.gridPanel.hideOverlay()},e.prototype.isNodeSelected=function(e){return console.log("ag-Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead"),e.isSelected()},e.prototype.getSelectedNodesById=function(){return console.error("ag-Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead"),null},e.prototype.getSelectedNodes=function(){return this.selectionController.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionController.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){return this.selectionController.getBestCostNodeSelection()},e.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},e.prototype.ensureColIndexVisible=function(e){console.warn("ag-Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.")},e.prototype.ensureColumnVisible=function(e){this.gridPanel.ensureColumnVisible(e)},e.prototype.ensureIndexVisible=function(e,t){void 0===t&&(t="top"),this.gridPanel.ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t="top"),this.gridCore.ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){w.Utils.missing(this.inMemoryRowModel)&&console.log("cannot call forEachNode unless using normal row model"),this.inMemoryRowModel.forEachLeafNode(e)},e.prototype.forEachNode=function(e){this.rowModel.forEachNode(e)},e.prototype.forEachNodeAfterFilter=function(e){w.Utils.missing(this.inMemoryRowModel)&&console.log("cannot call forEachNodeAfterFilter unless using normal row model"),this.inMemoryRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){w.Utils.missing(this.inMemoryRowModel)&&console.log("cannot call forEachNodeAfterFilterAndSort unless using normal row model"),this.inMemoryRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterApiForColDef=function(e){return console.warn("ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead"),this.getFilterInstance(e)},e.prototype.getFilterInstance=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.getFilterComponent(t)},e.prototype.getFilterApi=function(e){return console.warn("ag-Grid: getFilterApi is deprecated, use getFilterInstance instead"),this.getFilterInstance(e)},e.prototype.destroyFilter=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t)},e.prototype.getColumnDef=function(e){var t=this.columnController.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.onFilterChanged=function(){this.filterManager.onFilterChanged()},e.prototype.onSortChanged=function(){this.sortController.onSortChanged()},e.prototype.setSortModel=function(e){this.sortController.setSortModel(e)},e.prototype.getSortModel=function(){return this.sortController.getSortModel()},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusedCellController.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusedCellController.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,n){this.focusedCellController.setFocusedCell(e,t,n,!0)},e.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setFloatingFiltersHeight=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,e),this.doLayout()},e.prototype.setPivotGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setPivotHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,e),this.doLayout()},e.prototype.showToolPanel=function(e){this.gridCore.showToolPanel(e)},e.prototype.isToolPanelShowing=function(){return this.gridCore.isToolPanelShowing()},e.prototype.doLayout=function(){this.gridCore.doLayout()},e.prototype.resetRowHeights=function(){w.Utils.exists(this.inMemoryRowModel)&&this.inMemoryRowModel.resetRowHeights()},e.prototype.setGroupRemoveSingleChildren=function(e){this.gridOptionsWrapper.setProperty(d.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN,e)},e.prototype.onRowHeightChanged=function(){w.Utils.exists(this.inMemoryRowModel)&&this.inMemoryRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var n=this.columnController.getPrimaryColumn(e);return w.Utils.missing(n)&&(n=this.columnController.getGridColumn(e)),w.Utils.missing(n)?null:this.valueService.getValue(n,t)},e.prototype.addEventListener=function(e,t){var n=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addEventListener(e,t,n)},e.prototype.addGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addGlobalListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.removeGlobalListener=function(e){this.eventService.removeGlobalListener(e)},e.prototype.dispatchEvent=function(e){this.eventService.dispatchEvent(e)},e.prototype.destroy=function(){this.context.destroy()},e.prototype.resetQuickFilter=function(){this.rowModel.forEachNode(function(e){return e.quickFilterAggregateText=null})},e.prototype.getRangeSelections=function(){return this.rangeController?this.rangeController.getCellRanges():(console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),null)},e.prototype.camelCaseToHumanReadable=function(e){return w.Utils.camelCaseToHumanText(e)},e.prototype.addRangeSelection=function(e){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.addRange(e)},e.prototype.clearRangeSelection=function(){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.clearSelection()},e.prototype.copySelectedRowsToClipboard=function(e,t){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRowsToClipboard(e,t)},e.prototype.copySelectedRangeToClipboard=function(e){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRangeToClipboard(e)},e.prototype.copySelectedRangeDown=function(){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copyRangeDown()},e.prototype.showColumnMenuAfterButtonClick=function(e,t){var n=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterButtonClick(n,t)},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var n=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterMouseEvent(n,t)},e.prototype.tabToNextCell=function(){return this.rowRenderer.tabToNextCell(!1)},e.prototype.tabToPreviousCell=function(){return this.rowRenderer.tabToNextCell(!0)},e.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.rowRenderer.stopEditing(e)},e.prototype.startEditingCell=function(e){var t=this.columnController.getGridColumn(e.colKey);if(!t)return void console.warn("ag-Grid: no column found for "+e.colKey);var n={rowIndex:e.rowIndex,floating:null,column:t},o=new b.GridCell(n);this.gridPanel.ensureIndexVisible(e.rowIndex),this.rowRenderer.startEditingCell(o,e.keyPress,e.charPress)},e.prototype.addAggFunc=function(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)},e.prototype.addAggFuncs=function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)},e.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},e.prototype.updateRowData=function(e){var t=null;return this.inMemoryRowModel?t=this.inMemoryRowModel.updateRowData(e):this.infinitePageRowModel?this.infinitePageRowModel.updateRowData(e):console.error("ag-Grid: updateRowData() only works with InMemoryRowModel and InfiniteRowModel."),this.gridOptionsWrapper.isSuppressChangeDetection()||this.rowRenderer.refreshCells(),t},e.prototype.insertItemsAtIndex=function(e,t,n){void 0===n&&(n=!1),console.warn("ag-Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:t,addIndex:e,update:null,remove:null})},e.prototype.removeItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: removeItems() is deprecated, use updateRowData(transaction) instead.");var n=e.map(function(e){return e.data});this.updateRowData({add:null,addIndex:null,update:null,remove:n})},e.prototype.addItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: addItems() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:e,addIndex:null,update:null,remove:null})},e.prototype.refreshVirtualPageCache=function(){console.warn("ag-Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfinitePageCache=function(){console.warn("ag-Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.refreshCache():console.warn("ag-Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeVirtualPageCache=function(){console.warn("ag-Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfinitePageCache()},e.prototype.purgeInfinitePageCache=function(){console.warn("ag-Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfiniteCache()},e.prototype.purgeInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.purgeCache():console.warn("ag-Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeEnterpriseCache=function(e){this.enterpriseRowModel?this.enterpriseRowModel.purgeCache(e):console.warn("ag-Grid: api.purgeEnterpriseCache is only available when rowModelType='enterprise'.")},e.prototype.getVirtualRowCount=function(){return console.warn("ag-Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead"),this.getInfiniteRowCount()},e.prototype.getInfiniteRowCount=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.getVirtualRowCount();console.warn("ag-Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.isMaxRowFound=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.isMaxRowFound();console.warn("ag-Grid: api.isMaxRowFound is only available when rowModelType='virtual'.")},e.prototype.setVirtualRowCount=function(e,t){console.warn("ag-Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead"),this.setInfiniteRowCount(e,t)},e.prototype.setInfiniteRowCount=function(e,t){this.infinitePageRowModel?this.infinitePageRowModel.setVirtualRowCount(e,t):console.warn("ag-Grid: api.setVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.getVirtualPageState=function(){return console.warn("ag-Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getInfinitePageState=function(){return console.warn("ag-Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getCacheBlockState=function(){return this.infinitePageRowModel?this.infinitePageRowModel.getBlockState():this.enterpriseRowModel?this.enterpriseRowModel.getBlockState():void console.warn("ag-Grid: api.getCacheBlockState() is only available when rowModelType='infinite' or rowModelType='enterprise'.")},e.prototype.checkGridSize=function(){this.gridPanel.setBodyAndHeaderHeights()},e.prototype.getFirstRenderedRow=function(){return console.log("in ag-Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()"),this.getFirstDisplayedRow()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastRenderedRow=function(){return console.log("in ag-Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()"),this.getLastDisplayedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationSetPageSize=function(e){this.gridOptionsWrapper.setProperty("paginationPageSize",e)},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getTotalRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},o([m.Autowired("immutableService"),r("design:type",S.ImmutableService)],e.prototype,"immutableService",void 0),o([m.Autowired("csvCreator"),r("design:type",i.CsvCreator)],e.prototype,"csvCreator",void 0),o([m.Optional("excelCreator"),r("design:type",Object)],e.prototype,"excelCreator",void 0),o([m.Autowired("gridCore"),r("design:type",v.GridCore)],e.prototype,"gridCore",void 0),o([m.Autowired("rowRenderer"),r("design:type",a.RowRenderer)],e.prototype,"rowRenderer",void 0),o([m.Autowired("headerRenderer"),r("design:type",s.HeaderRenderer)],e.prototype,"headerRenderer",void 0),o([m.Autowired("filterManager"),r("design:type",l.FilterManager)],e.prototype,"filterManager",void 0),o([m.Autowired("columnController"),r("design:type",u.ColumnController)],e.prototype,"columnController",void 0),o([m.Autowired("selectionController"),r("design:type",c.SelectionController)],e.prototype,"selectionController",void 0),o([m.Autowired("gridOptionsWrapper"),r("design:type",d.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([m.Autowired("gridPanel"),r("design:type",p.GridPanel)],e.prototype,"gridPanel",void 0),o([m.Autowired("valueService"),r("design:type",h.ValueService)],e.prototype,"valueService",void 0),o([m.Autowired("alignedGridsService"),r("design:type",R.AlignedGridsService)],e.prototype,"alignedGridsService",void 0),o([m.Autowired("eventService"),r("design:type",f.EventService)],e.prototype,"eventService",void 0),o([m.Autowired("pinnedRowModel"),r("design:type",T.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),o([m.Autowired("context"),r("design:type",m.Context)],e.prototype,"context",void 0),o([m.Autowired("rowModel"),r("design:type",Object)],e.prototype,"rowModel",void 0),o([m.Autowired("sortController"),r("design:type",y.SortController)],e.prototype,"sortController",void 0),o([m.Autowired("paginationProxy"),r("design:type",x.PaginationProxy)],e.prototype,"paginationProxy",void 0),o([m.Autowired("focusedCellController"),r("design:type",C.FocusedCellController)],e.prototype,"focusedCellController",void 0),o([m.Optional("rangeController"),r("design:type",Object)],e.prototype,"rangeController",void 0),o([m.Optional("clipboardService"),r("design:type",Object)],e.prototype,"clipboardService",void 0),o([m.Optional("aggFuncService"),r("design:type",Object)],e.prototype,"aggFuncService",void 0),o([m.Autowired("menuFactory"),r("design:type",Object)],e.prototype,"menuFactory",void 0),o([m.Autowired("cellRendererFactory"),r("design:type",_.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),o([m.Autowired("cellEditorFactory"),r("design:type",E.CellEditorFactory)],e.prototype,"cellEditorFactory",void 0),o([m.Autowired("valueCache"),r("design:type",A.ValueCache)],e.prototype,"valueCache",void 0),o([m.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([m.Bean("gridApi")],e)}();t.GridApi=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STEP_EVERYTHING=0,e.STEP_FILTER=1,e.STEP_SORT=2,e.STEP_MAP=3,e.STEP_AGGREGATE=4,e.STEP_PIVOT=5,e.ROW_BUFFER_SIZE=10,e.LAYOUT_INTERVAL=500,e.EXPORT_TYPE_DRAG_COPY="dragCopy",e.EXPORT_TYPE_CLIPBOARD="clipboard",e.EXPORT_TYPE_EXCEL="excel",e.EXPORT_TYPE_CSV="csv",e.KEY_BACKSPACE=8,e.KEY_TAB=9,e.KEY_ENTER=13,e.KEY_SHIFT=16,e.KEY_ESCAPE=27,e.KEY_SPACE=32,e.KEY_LEFT=37,e.KEY_UP=38,e.KEY_RIGHT=39,e.KEY_DOWN=40,e.KEY_DELETE=46,e.KEY_A=65,e.KEY_C=67,e.KEY_V=86,e.KEY_D=68,e.KEY_F2=113,e.KEY_PAGE_UP=33,e.KEY_PAGE_DOWN=34,e.KEY_PAGE_HOME=36,e.KEY_PAGE_END=35,e.KEY_PAGE_UP_NAME="pageUp",e.KEY_PAGE_DOWN_NAME="pageDown",e.KEY_PAGE_HOME_NAME="home",e.KEY_PAGE_END_NAME="end",e.KEY_CTRL_UP_NAME="ctrlUp",e.KEY_CTRL_LEFT_NAME="ctrlLeft",e.KEY_CTRL_RIGHT_NAME="ctrlRight",e.KEY_CTRL_DOWN_NAME="ctrlDown",e.ROW_MODEL_TYPE_INFINITE="infinite",e.ROW_MODEL_TYPE_VIEWPORT="viewport",e.ROW_MODEL_TYPE_IN_MEMORY="inMemory",e.ROW_MODEL_TYPE_ENTERPRISE="enterprise",e.DEPRECATED_ROW_MODEL_TYPE_NORMAL="normal",e.ALWAYS="always",e.ONLY_WHEN_GROUPING="onlyWhenGrouping",e.PINNED_TOP="top",e.PINNED_BOTTOM="bottom",e.VERTICAL_SCROLL_KEYS_ID="verticalScrollKeys",e.HORIZONTAL_SCROLL_KEYS_ID="horizontalScrollKeys",e.DIAGONAL_SCROLL_KEYS_ID="diagonalScrollKeys",e.VERTICAL_SCROLL_KEYS={id:e.VERTICAL_SCROLL_KEYS_ID,bindings:[{id:e.KEY_PAGE_UP_NAME,ctlRequired:!1,altRequired:!1,keyCode:e.KEY_PAGE_UP},{id:e.KEY_PAGE_DOWN_NAME,ctlRequired:!1,altRequired:!1,keyCode:e.KEY_PAGE_DOWN},{id:e.KEY_CTRL_UP_NAME,ctlRequired:!0,altRequired:!1,keyCode:e.KEY_UP},{id:e.KEY_CTRL_DOWN_NAME,ctlRequired:!0,altRequired:!1,keyCode:e.KEY_DOWN}]},e.HORIZONTAL_SCROLL_KEYS={id:e.HORIZONTAL_SCROLL_KEYS_ID,bindings:[{id:e.KEY_CTRL_LEFT_NAME,ctlRequired:!0,altRequired:!1,keyCode:e.KEY_LEFT},{id:e.KEY_CTRL_RIGHT_NAME,ctlRequired:!0,altRequired:!1,keyCode:e.KEY_RIGHT}]},e.DIAGONAL_SCROLL_KEYS={id:e.DIAGONAL_SCROLL_KEYS_ID,bindings:[{id:e.KEY_PAGE_HOME_NAME,ctlRequired:!1,altRequired:!1,keyCode:e.KEY_PAGE_HOME},{id:e.KEY_PAGE_END_NAME,ctlRequired:!1,altRequired:!1,keyCode:e.KEY_PAGE_END}]},e}();t.Constants=o},function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=o(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)i.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)a.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=(n.n(o),n(247));"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellPosition",{value:{columnIndex:n(0).number.isRequired,rowIndex:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellRendererParams",{value:{columnIndex:n(0).number.isRequired,isScrolling:n(0).bool.isRequired,isVisible:n(0).bool.isRequired,key:n(0).string.isRequired,parent:n(0).object.isRequired,rowIndex:n(0).number.isRequired,style:n(0).object.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellRenderer",{value:n(0).func,configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams",{value:{cellCache:n(0).object.isRequired,cellRenderer:n(0).func.isRequired,columnSizeAndPositionManager:"function"===typeof r.a?n(0).instanceOf(r.a).isRequired:n(0).any.isRequired,columnStartIndex:n(0).number.isRequired,columnStopIndex:n(0).number.isRequired,deferredMeasurementCache:n(0).object,horizontalOffsetAdjustment:n(0).number.isRequired,isScrolling:n(0).bool.isRequired,parent:n(0).object.isRequired,rowSizeAndPositionManager:"function"===typeof r.a?n(0).instanceOf(r.a).isRequired:n(0).any.isRequired,rowStartIndex:n(0).number.isRequired,rowStopIndex:n(0).number.isRequired,scrollLeft:n(0).number.isRequired,scrollTop:n(0).number.isRequired,styleCache:n(0).object.isRequired,verticalOffsetAdjustment:n(0).number.isRequired,visibleColumnIndices:n(0).object.isRequired,visibleRowIndices:n(0).object.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellRangeRenderer",{value:n(0).func,configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellSizeGetter",{value:n(0).func,configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_CellSize",{value:n(0).oneOfType([n(0).func,n(0).number]),configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_NoContentRenderer",{value:n(0).func,configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_Scroll",{value:{clientHeight:n(0).number.isRequired,clientWidth:n(0).number.isRequired,scrollHeight:n(0).number.isRequired,scrollLeft:n(0).number.isRequired,scrollTop:n(0).number.isRequired,scrollWidth:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange",{value:{horizontal:n(0).bool.isRequired,vertical:n(0).bool.isRequired,size:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_RenderedSection",{value:{columnOverscanStartIndex:n(0).number.isRequired,columnOverscanStopIndex:n(0).number.isRequired,columnStartIndex:n(0).number.isRequired,columnStopIndex:n(0).number.isRequired,rowOverscanStartIndex:n(0).number.isRequired,rowOverscanStopIndex:n(0).number.isRequired,rowStartIndex:n(0).number.isRequired,rowStopIndex:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams",{value:{direction:n(0).oneOf(["horizontal","vertical"]).isRequired,scrollDirection:n(0).oneOf([-1,1]).isRequired,cellCount:n(0).number.isRequired,overscanCellsCount:n(0).number.isRequired,startIndex:n(0).number.isRequired,stopIndex:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_OverscanIndices",{value:{overscanStartIndex:n(0).number.isRequired,overscanStopIndex:n(0).number.isRequired},configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter",{value:n(0).func,configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_Alignment",{value:n(0).oneOf(["auto","end","start","center"]),configurable:!0}),"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_VisibleCellRange",{value:{start:n(0).number,stop:n(0).number},configurable:!0})},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(48),a=new r.NumberSequence,s=function(e){function t(t){var n=e.call(this)||this;return n.childComponents=[],n.hydrated=!1,n.annotatedEventListeners=[],n.visible=!0,n.compId=a.next(),t&&n.setTemplate(t),n}return o(t,e),t.prototype.setTemplateNoHydrate=function(e){this.template=e},t.prototype.afterGuiAttached=function(e){!this.eHtmlElement&&e.eComponent&&this.setHtmlElement(e.eComponent)},t.prototype.getCompId=function(){return this.compId},t.prototype.instantiate=function(e){var t=this.getHtmlElement();this.instantiateRecurse(t,e)},t.prototype.instantiateRecurse=function(e,t){for(var n=e.childNodes?e.childNodes.length:0,o=0;o<n;o++){var r=e.childNodes[o],i=t.createComponent(r);i?this.swapComponentForNode(i,e,r):r.childNodes&&this.instantiateRecurse(r,t)}},t.prototype.swapComponentForNode=function(e,t,n){var o=e.getHtmlElement();t.replaceChild(o,n),this.childComponents.push(e),this.swapInComponentForQuerySelectors(e,n)},t.prototype.swapInComponentForQuerySelectors=function(e,t){for(var n=Object.getPrototypeOf(this),o=this;null!=n;){var r=n.__agComponentMetaData,i=n.constructor.name;r&&r[i]&&r[i].querySelectors&&r[i].querySelectors.forEach(function(n){o[n.attributeName]===t&&(o[n.attributeName]=e)}),n=Object.getPrototypeOf(n)}},t.prototype.setTemplate=function(e){this.template=e;var t=r.Utils.loadTemplate(e);this.setHtmlElement(t)},t.prototype.setHtmlElement=function(e){this.eHtmlElement=e,this.eHtmlElement.__agComponent=this,this.hydrate()},t.prototype.hydrate=function(){this.addAnnotatedEventListeners(),this.wireQuerySelectors(),this.hydrated=!0},t.prototype.attributesSet=function(){},t.prototype.wireQuerySelectors=function(){var e=this.getHtmlElement();if(e)for(var t=Object.getPrototypeOf(this),n=this;null!=t;)!function(){var o=t.__agComponentMetaData,r=t.constructor.name;if(o&&o[r]&&o[r].querySelectors){var i=n;o[r].querySelectors.forEach(function(t){var n=e.querySelector(t.querySelector);if(n){var o=n.__agComponent;i[t.attributeName]=o||n}})}t=Object.getPrototypeOf(t)}()},t.prototype.addAnnotatedEventListeners=function(){var e=this;this.removeAnnotatedEventListeners();var t=this.getHtmlElement();if(t)for(var n=Object.getPrototypeOf(this);null!=n;){var o=n.__agComponentMetaData,r=n.constructor.name;o&&o[r]&&o[r].listenerMethods&&(this.annotatedEventListeners||(this.annotatedEventListeners=[]),o[r].listenerMethods.forEach(function(n){var o=e[n.methodName].bind(e);t.addEventListener(n.eventName,o),e.annotatedEventListeners.push({eventName:n.eventName,listener:o})})),n=Object.getPrototypeOf(n)}},t.prototype.removeAnnotatedEventListeners=function(){if(this.annotatedEventListeners){var e=this.getHtmlElement();e&&(this.annotatedEventListeners.forEach(function(t){e.removeEventListener(t.eventName,t.listener)}),this.annotatedEventListeners=null)}},t.prototype.getGui=function(){return this.eHtmlElement?this.eHtmlElement:this.template},t.prototype.getHtmlElement=function(){return this.eHtmlElement?this.eHtmlElement:(console.warn("getHtmlElement() called on component before gui was attached"),null)},t.prototype.setHtmlElementNoHydrate=function(e){this.eHtmlElement=e},t.prototype.queryForHtmlElement=function(e){return this.getHtmlElement().querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.getHtmlElement().querySelector(e)},t.prototype.appendChild=function(e){var t=this.getHtmlElement();if(r.Utils.isNodeOrElement(e))t.appendChild(e);else{var n=e;t.appendChild(r.Utils.ensureElement(n.getGui())),this.childComponents.push(n)}},t.prototype.addFeature=function(e,t){e.wireBean(t),t.destroy&&this.addDestroyFunc(t.destroy.bind(t))},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e){var n=this.getHtmlElement();if(e!==this.visible){this.visible=e,r.Utils.addOrRemoveCssClass(n,"ag-hidden",!e);var o={type:t.EVENT_VISIBLE_CHANGED,visible:this.visible};this.dispatchEvent(o)}},t.prototype.addOrRemoveCssClass=function(e,t){var n=this.getHtmlElement();r.Utils.addOrRemoveCssClass(n,e,t)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.childComponents.forEach(function(e){return e.destroy()}),this.childComponents.length=0,this.hydrated&&this.removeAnnotatedEventListeners()},t.prototype.addGuiEventListener=function(e,t){var n=this.getHtmlElement();n.addEventListener(e,t),this.addDestroyFunc(function(){return n.removeEventListener(e,t)})},t.prototype.addCssClass=function(e){var t=this.getHtmlElement();r.Utils.addCssClass(t,e)},t.prototype.removeCssClass=function(e){var t=this.getHtmlElement();r.Utils.removeCssClass(t,e)},t.prototype.getAttribute=function(e){var t=this.getHtmlElement();return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_VISIBLE_CHANGED="visibleChanged",t}(i.BeanStub);t.Component=s},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1054);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return o(r).default}});var i=n(486);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return o(i).default}});var a=n(1057);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return o(a).default}});var s=n(1058);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return o(s).default}});var l=n(1060);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return o(l).default}});var u=n(1061);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return o(u).default}});var c=n(488);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return o(c).default}});var d=n(1069);Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return o(d).default}})},function(e,t,n){"use strict";e.exports=n(509)},function(e,t,n){"use strict";function o(e,t){return 1===e.nodeType&&e.getAttribute(f)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function i(e,t){var n=r(e);n._hostNode=t,t[m]=n}function a(e){var t=e._hostNode;t&&(delete t[m],e._hostNode=null)}function s(e,t){if(!(e._flags&g.hasCachedChildNodes)){var n=e._renderedChildren,a=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var l=n[s],u=r(l)._domID;if(0!==u){for(;null!==a;a=a.nextSibling)if(o(a,u)){i(l,a);continue e}d("32",u)}}e._flags|=g.hasCachedChildNodes}}function l(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,o;e&&(o=e[m]);e=t.pop())n=o,t.length&&s(o,e);return n}function u(e){var t=l(e);return null!=t&&t._hostNode===e?t:null}function c(e){if(void 0===e._hostNode&&d("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||d("34"),e=e._hostParent;for(;t.length;e=t.pop())s(e,e._hostNode);return e._hostNode}var d=n(20),p=n(99),h=n(317),f=(n(16),p.ID_ATTRIBUTE_NAME),g=h,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:l,getInstanceFromNode:u,getNodeFromInstance:c,precacheChildNodes:s,precacheNode:i,uncacheNode:a};e.exports=v},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),a=n(3),s=n(2),l=n(6),u=n(113),c=n(13),d=n(21),p=function(){function e(e,t,n){this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new i.EventService,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.visible=!e.hide,this.sort=e.sort,this.sortedAt=e.sortedAt,this.colId=t,this.primary=n}return e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.initialise=function(){this.filter=this.frameworkFactory.colDefFilter(this.colDef),this.setPinned(this.colDef.pinned);var e=this.gridOptionsWrapper.getMinColWidth(),t=this.gridOptionsWrapper.getMaxColWidth();this.colDef.minWidth?this.minWidth=this.colDef.minWidth:this.minWidth=e,this.colDef.maxWidth?this.maxWidth=this.colDef.maxWidth:this.maxWidth=t,this.actualWidth=this.columnUtils.calculateColInitialWidth(this.colDef);var n=this.gridOptionsWrapper.isSuppressFieldDotNotation();this.fieldContainsDots=a.Utils.exists(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!n,this.tooltipFieldContainsDots=a.Utils.exists(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!n,this.validate()},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(a.Utils.missing(this.colDef)||a.Utils.missing(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,n=this.colDef.showRowGroup===e;return t||n},e.prototype.getFilter=function(){return this.filter},e.prototype.getUniqueId=function(){return this.getId()},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){return this.primary&&!this.colDef.suppressFilter},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.validate=function(){this.gridOptionsWrapper.isEnterprise()||(a.Utils.exists(this.colDef.aggFunc)&&console.warn("ag-Grid: aggFunc is only valid in ag-Grid-Enterprise"),a.Utils.exists(this.colDef.rowGroupIndex)&&console.warn("ag-Grid: rowGroupIndex is only valid in ag-Grid-Enterprise"),a.Utils.exists(this.colDef.rowGroup)&&console.warn("ag-Grid: rowGroup is only valid in ag-Grid-Enterprise"),a.Utils.exists(this.colDef.pivotIndex)&&console.warn("ag-Grid: pivotIndex is only valid in ag-Grid-Enterprise"),a.Utils.exists(this.colDef.pivot)&&console.warn("ag-Grid: pivot is only valid in ag-Grid-Enterprise")),a.Utils.exists(this.colDef.width)&&"number"!==typeof this.colDef.width&&console.warn("ag-Grid: colDef.width should be a number, not "+typeof this.colDef.width),a.Utils.get(this,"colDef.cellRendererParams.restrictToOneGroup",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.restrictToOneGroup is deprecated. You should use showRowGroup"),a.Utils.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator"),a.Utils.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator");var e=this.colDef;e.floatingCellRenderer&&(console.warn("ag-Grid: since v11, floatingCellRenderer is now pinnedRowCellRenderer"),this.colDef.pinnedRowCellRenderer=e.floatingCellRenderer),e.floatingRendererFramework&&(console.warn("ag-Grid: since v11, floatingRendererFramework is now pinnedRowCellRendererFramework"),this.colDef.pinnedRowCellRendererFramework=e.floatingRendererFramework),e.floatingRendererParams&&(console.warn("ag-Grid: since v11, floatingRendererParams is now pinnedRowCellRendererParams"),this.colDef.pinnedRowCellRendererParams=e.floatingRendererParams),e.floatingValueFormatter&&(console.warn("ag-Grid: since v11, floatingValueFormatter is now pinnedRowValueFormatter"),this.colDef.pinnedRowValueFormatter=e.floatingValueFormatter),e.cellFormatter&&(console.warn("ag-Grid: since v12, cellFormatter is now valueFormatter"),a.Utils.missing(this.colDef.valueFormatter)&&(this.colDef.valueFormatter=e.cellFormatter))},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createIsColumnFuncParams=function(e){return{node:e,column:this,colDef:this.colDef,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.isSuppressNavigable=function(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){var t=this.createIsColumnFuncParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsWrapper.isEnableGroupEdit())&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){var e=this.gridOptionsWrapper.isEnableColResize(),t=this.colDef&&this.colDef.suppressResize;return e&&!t},e.prototype.isColumnFunc=function(e,t){if("boolean"===typeof t)return t;if("function"===typeof t){return t(this.createIsColumnFuncParams(e))}return!1},e.prototype.setMoving=function(t){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MOVING_CHANGED))},e.prototype.createColumnEvent=function(e){return{api:this.gridApi,columnApi:this.columnApi,type:e,column:this,columns:[this]}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(t){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_SORT_CHANGED)))},e.prototype.setMenuVisible=function(t){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MENU_VISIBLE_CHANGED)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortAscending=function(){return this.sort===e.SORT_ASC},e.prototype.isSortDescending=function(){return this.sort===e.SORT_DESC},e.prototype.isSortNone=function(){return a.Utils.missing(this.sort)},e.prototype.isSorting=function(){return a.Utils.exists(this.sort)},e.prototype.getSortedAt=function(){return this.sortedAt},e.prototype.setSortedAt=function(e){this.sortedAt=e},e.prototype.setAggFunc=function(e){this.aggFunc=e},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(t){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_ACTIVE_CHANGED))),this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_CHANGED))},e.prototype.setPinned=function(t){this.gridOptionsWrapper.isForPrint()||(!0===t||t===e.PINNED_LEFT?this.pinned=e.PINNED_LEFT:t===e.PINNED_RIGHT?this.pinned=e.PINNED_RIGHT:this.pinned=null)},e.prototype.setFirstRightPinned=function(t){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FIRST_RIGHT_PINNED_CHANGED)))},e.prototype.setLastLeftPinned=function(t){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LAST_LEFT_PINNED_CHANGED)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return this.pinned===e.PINNED_LEFT||this.pinned===e.PINNED_RIGHT},e.prototype.isPinnedLeft=function(){return this.pinned===e.PINNED_LEFT},e.prototype.isPinnedRight=function(){return this.pinned===e.PINNED_RIGHT},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(t){var n=!0===t;this.visible!==n&&(this.visible=n,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VISIBLE_CHANGED)))},e.prototype.isVisible=function(){return this.visible},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.getColId()},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.getColSpan=function(e){if(a.Utils.missing(this.colDef.colSpan))return 1;var t={node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()},n=this.colDef.colSpan(t);return n>1?n:1},e.prototype.setActualWidth=function(t){this.actualWidth!==t&&(this.actualWidth=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_WIDTH_CHANGED)))},e.prototype.isGreaterThanMax=function(e){return!!this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.setMinimum=function(){this.setActualWidth(this.minWidth)},e.prototype.setRowGroupActive=function(t){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_ROW_GROUP_CHANGED)))},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(t){this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_PIVOT_CHANGED)))},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(t){this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VALUE_CHANGED)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.PINNED_RIGHT="right",e.PINNED_LEFT="left",e.SORT_ASC="asc",e.SORT_DESC="desc",o([s.Autowired("gridOptionsWrapper"),r("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([s.Autowired("columnUtils"),r("design:type",u.ColumnUtils)],e.prototype,"columnUtils",void 0),o([s.Autowired("frameworkFactory"),r("design:type",Object)],e.prototype,"frameworkFactory",void 0),o([s.Autowired("columnApi"),r("design:type",c.ColumnApi)],e.prototype,"columnApi",void 0),o([s.Autowired("gridApi"),r("design:type",d.GridApi)],e.prototype,"gridApi",void 0),o([s.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"initialise",null),e}();t.Column=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(714),i=o(r),a=n(86),s=o(a),l=n(375),u=(o(l),n(376)),c=(o(u),function(e){var t=(0,i.default)(function(e,t){return!(0,s.default)(e,t)});return t(e)});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(717),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(2),u=function(){function e(){}return e.prototype.setBeans=function(e){this.logging=e.isDebug()},e.prototype.create=function(e){return new c(e,this.isLogging.bind(this))},e.prototype.isLogging=function(){return this.logging},o([i(0,l.Qualifier("gridOptionsWrapper")),r("design:type",Function),r("design:paramtypes",[a.GridOptionsWrapper]),r("design:returntype",void 0)],e.prototype,"setBeans",null),e=o([s.Bean("loggerFactory")],e)}();t.LoggerFactory=u;var c=function(){function e(e,t){this.name=e,this.isLoggingFunc=t}return e.prototype.isLogging=function(){return this.isLoggingFunc()},e.prototype.log=function(e){this.isLoggingFunc()&&console.log("ag-Grid."+this.name+": "+e)},e}();t.Logger=c},function(e,t,n){(function(e,o){var r;(function(){function i(e,t){return e.set(t[0],t[1]),e}function a(e,t){return e.add(t),e}function s(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function l(e,t,n,o){for(var r=-1,i=null==e?0:e.length;++r<i;){var a=e[r];t(o,a,n(a),e)}return o}function u(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function d(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(!t(e[n],n,e))return!1;return!0}function p(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var a=e[n];t(a,n,e)&&(i[r++]=a)}return i}function h(e,t){return!!(null==e?0:e.length)&&x(e,t,0)>-1}function f(e,t,n){for(var o=-1,r=null==e?0:e.length;++o<r;)if(n(t,e[o]))return!0;return!1}function g(e,t){for(var n=-1,o=null==e?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}function m(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}function v(e,t,n,o){var r=-1,i=null==e?0:e.length;for(o&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n}function y(e,t,n,o){var r=null==e?0:e.length;for(o&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function C(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function b(e){return e.split("")}function w(e){return e.match(jt)||[]}function _(e,t,n){var o;return n(e,function(e,n,r){if(t(e,n,r))return o=n,!1}),o}function E(e,t,n,o){for(var r=e.length,i=n+(o?1:-1);o?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function x(e,t,n){return t===t?Q(e,t,n):E(e,A,n)}function S(e,t,n,o){for(var r=n-1,i=e.length;++r<i;)if(o(e[r],t))return r;return-1}function A(e){return e!==e}function R(e,t){var n=null==e?0:e.length;return n?D(e,t)/n:Le}function T(e){return function(t){return null==t?re:t[e]}}function O(e){return function(t){return null==e?re:e[t]}}function k(e,t,n,o,r){return r(e,function(e,r,i){n=o?(o=!1,e):t(n,e,r,i)}),n}function P(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function D(e,t){for(var n,o=-1,r=e.length;++o<r;){var i=t(e[o]);i!==re&&(n=n===re?i:n+i)}return n}function F(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}function M(e,t){return g(t,function(t){return[t,e[t]]})}function L(e){return function(t){return e(t)}}function I(e,t){return g(t,function(t){return e[t]})}function N(e,t){return e.has(t)}function B(e,t){for(var n=-1,o=e.length;++n<o&&x(t,e[n],0)>-1;);return n}function W(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n}function j(e,t){for(var n=e.length,o=0;n--;)e[n]===t&&++o;return o}function G(e){return"\\"+Tn[e]}function H(e,t){return null==e?re:e[t]}function V(e){return Cn.test(e)}function U(e){return bn.test(e)}function z(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}function q(e,t){return function(n){return e(t(n))}}function K(e,t){for(var n=-1,o=e.length,r=0,i=[];++n<o;){var a=e[n];a!==t&&a!==ce||(e[n]=ce,i[r++]=n)}return i}function Y(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function X(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Q(e,t,n){for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}function Z(e,t,n){for(var o=n+1;o--;)if(e[o]===t)return o;return o}function J(e){return V(e)?te(e):zn(e)}function ee(e){return V(e)?ne(e):b(e)}function te(e){for(var t=vn.lastIndex=0;vn.test(e);)++t;return t}function ne(e){return e.match(vn)||[]}function oe(e){return e.match(yn)||[]}var re,ie=200,ae="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",se="Expected a function",le="__lodash_hash_undefined__",ue=500,ce="__lodash_placeholder__",de=1,pe=2,he=4,fe=1,ge=2,me=1,ve=2,ye=4,Ce=8,be=16,we=32,_e=64,Ee=128,xe=256,Se=512,Ae=30,Re="...",Te=800,Oe=16,ke=1,Pe=2,De=1/0,Fe=9007199254740991,Me=1.7976931348623157e308,Le=NaN,Ie=4294967295,Ne=Ie-1,Be=Ie>>>1,We=[["ary",Ee],["bind",me],["bindKey",ve],["curry",Ce],["curryRight",be],["flip",Se],["partial",we],["partialRight",_e],["rearg",xe]],je="[object Arguments]",Ge="[object Array]",He="[object AsyncFunction]",Ve="[object Boolean]",Ue="[object Date]",ze="[object DOMException]",$e="[object Error]",qe="[object Function]",Ke="[object GeneratorFunction]",Ye="[object Map]",Xe="[object Number]",Qe="[object Null]",Ze="[object Object]",Je="[object Proxy]",et="[object RegExp]",tt="[object Set]",nt="[object String]",ot="[object Symbol]",rt="[object Undefined]",it="[object WeakMap]",at="[object WeakSet]",st="[object ArrayBuffer]",lt="[object DataView]",ut="[object Float32Array]",ct="[object Float64Array]",dt="[object Int8Array]",pt="[object Int16Array]",ht="[object Int32Array]",ft="[object Uint8Array]",gt="[object Uint8ClampedArray]",mt="[object Uint16Array]",vt="[object Uint32Array]",yt=/\b__p \+= '';/g,Ct=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,_t=/[&<>"']/g,Et=RegExp(wt.source),xt=RegExp(_t.source),St=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,Rt=/<%=([\s\S]+?)%>/g,Tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,kt=/^\./,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dt=/[\\^$.*+?()[\]{}|]/g,Ft=RegExp(Dt.source),Mt=/^\s+|\s+$/g,Lt=/^\s+/,It=/\s+$/,Nt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Wt=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,Ut=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,$t=/^\[object .+?Constructor\]$/,qt=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,Qt=/['\n\r\u2028\u2029\\]/g,Zt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",en="["+Jt+"]",tn="["+Zt+"]",nn="[a-z\\xdf-\\xf6\\xf8-\\xff]",on="[^\\ud800-\\udfff"+Jt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",rn="\\ud83c[\\udffb-\\udfff]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",sn="[\\ud800-\\udbff][\\udc00-\\udfff]",ln="[A-Z\\xc0-\\xd6\\xd8-\\xde]",un="(?:"+nn+"|"+on+")",cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",dn="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",an,sn].join("|")+")[\\ufe0e\\ufe0f]?"+cn+")*",pn="[\\ufe0e\\ufe0f]?"+cn+dn,hn="(?:"+["[\\u2700-\\u27bf]",an,sn].join("|")+")"+pn,fn="(?:"+["[^\\ud800-\\udfff]"+tn+"?",tn,an,sn,"[\\ud800-\\udfff]"].join("|")+")",gn=RegExp("['\u2019]","g"),mn=RegExp(tn,"g"),vn=RegExp(rn+"(?="+rn+")|"+fn+pn,"g"),yn=RegExp([ln+"?"+nn+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[en,ln,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[en,ln+un,"$"].join("|")+")",ln+"?"+un+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",ln+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",hn].join("|"),"g"),Cn=RegExp("[\\u200d\\ud800-\\udfff"+Zt+"\\ufe0e\\ufe0f]"),bn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_n=-1,En={};En[ut]=En[ct]=En[dt]=En[pt]=En[ht]=En[ft]=En[gt]=En[mt]=En[vt]=!0,En[je]=En[Ge]=En[st]=En[Ve]=En[lt]=En[Ue]=En[$e]=En[qe]=En[Ye]=En[Xe]=En[Ze]=En[et]=En[tt]=En[nt]=En[it]=!1;var xn={};xn[je]=xn[Ge]=xn[st]=xn[lt]=xn[Ve]=xn[Ue]=xn[ut]=xn[ct]=xn[dt]=xn[pt]=xn[ht]=xn[Ye]=xn[Xe]=xn[Ze]=xn[et]=xn[tt]=xn[nt]=xn[ot]=xn[ft]=xn[gt]=xn[mt]=xn[vt]=!0,xn[$e]=xn[qe]=xn[it]=!1;var Sn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},An={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Rn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},On=parseFloat,kn=parseInt,Pn="object"==typeof e&&e&&e.Object===Object&&e,Dn="object"==typeof self&&self&&self.Object===Object&&self,Fn=Pn||Dn||Function("return this")(),Mn="object"==typeof t&&t&&!t.nodeType&&t,Ln=Mn&&"object"==typeof o&&o&&!o.nodeType&&o,In=Ln&&Ln.exports===Mn,Nn=In&&Pn.process,Bn=function(){try{return Nn&&Nn.binding&&Nn.binding("util")}catch(e){}}(),Wn=Bn&&Bn.isArrayBuffer,jn=Bn&&Bn.isDate,Gn=Bn&&Bn.isMap,Hn=Bn&&Bn.isRegExp,Vn=Bn&&Bn.isSet,Un=Bn&&Bn.isTypedArray,zn=T("length"),$n=O(Sn),qn=O(An),Kn=O(Rn),Yn=function e(t){function n(e){if(il(e)&&!mp(e)&&!(e instanceof b)){if(e instanceof r)return e;if(mc.call(e,"__wrapped__"))return na(e)}return new r(e)}function o(){}function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=re}function b(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ie,this.__views__=[]}function O(){var e=new b(this.__wrapped__);return e.__actions__=Br(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Br(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Br(this.__views__),e}function Q(){if(this.__filtered__){var e=new b(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function te(){var e=this.__wrapped__.value(),t=this.__dir__,n=mp(e),o=t<0,r=n?e.length:0,i=Ri(0,r,this.__views__),a=i.start,s=i.end,l=s-a,u=o?s:a-1,c=this.__iteratees__,d=c.length,p=0,h=$c(l,this.__takeCount__);if(!n||!o&&r==l&&h==l)return Cr(e,this.__actions__);var f=[];e:for(;l--&&p<h;){u+=t;for(var g=-1,m=e[u];++g<d;){var v=c[g],y=v.iteratee,C=v.type,b=y(m);if(C==Pe)m=b;else if(!b){if(C==ke)continue e;break e}}f[p++]=m}return f}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function jt(){this.__data__=nd?nd(null):{},this.size=0}function Zt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Jt(e){var t=this.__data__;if(nd){var n=t[e];return n===le?re:n}return mc.call(t,e)?t[e]:re}function en(e){var t=this.__data__;return nd?t[e]!==re:mc.call(t,e)}function tn(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nd&&t===re?le:t,this}function nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function on(){this.__data__=[],this.size=0}function rn(e){var t=this.__data__,n=Xn(t,e);return!(n<0)&&(n==t.length-1?t.pop():kc.call(t,n,1),--this.size,!0)}function an(e){var t=this.__data__,n=Xn(t,e);return n<0?re:t[n][1]}function sn(e){return Xn(this.__data__,e)>-1}function ln(e,t){var n=this.__data__,o=Xn(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function cn(){this.size=0,this.__data__={hash:new ne,map:new(Zc||nn),string:new ne}}function dn(e){var t=Ei(this,e).delete(e);return this.size-=t?1:0,t}function pn(e){return Ei(this,e).get(e)}function hn(e){return Ei(this,e).has(e)}function fn(e,t){var n=Ei(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new un;++t<n;)this.add(e[t])}function yn(e){return this.__data__.set(e,le),this}function Cn(e){return this.__data__.has(e)}function bn(e){var t=this.__data__=new nn(e);this.size=t.size}function Sn(){this.__data__=new nn,this.size=0}function An(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Rn(e){return this.__data__.get(e)}function Tn(e){return this.__data__.has(e)}function Pn(e,t){var n=this.__data__;if(n instanceof nn){var o=n.__data__;if(!Zc||o.length<ie-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new un(o)}return n.set(e,t),this.size=n.size,this}function Dn(e,t){var n=mp(e),o=!n&&gp(e),r=!n&&!o&&yp(e),i=!n&&!o&&!r&&Ep(e),a=n||o||r||i,s=a?F(e.length,uc):[],l=s.length;for(var u in e)!t&&!mc.call(e,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Li(u,l))||s.push(u);return s}function Mn(e){var t=e.length;return t?e[er(0,t-1)]:re}function Ln(e,t){return Zi(Br(e),no(t,0,e.length))}function Nn(e){return Zi(Br(e))}function Bn(e,t,n){(n===re||zs(e[t],n))&&(n!==re||t in e)||eo(e,t,n)}function zn(e,t,n){var o=e[t];mc.call(e,t)&&zs(o,n)&&(n!==re||t in e)||eo(e,t,n)}function Xn(e,t){for(var n=e.length;n--;)if(zs(e[n][0],t))return n;return-1}function Qn(e,t,n,o){return fd(e,function(e,r,i){t(o,e,n(e),i)}),o}function Zn(e,t){return e&&Wr(t,jl(t),e)}function Jn(e,t){return e&&Wr(t,Gl(t),e)}function eo(e,t,n){"__proto__"==t&&Mc?Mc(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function to(e,t){for(var n=-1,o=t.length,r=nc(o),i=null==e;++n<o;)r[n]=i?re:Nl(e,t[n]);return r}function no(e,t,n){return e===e&&(n!==re&&(e=e<=n?e:n),t!==re&&(e=e>=t?e:t)),e}function oo(e,t,n,o,r,i){var a,s=t&de,l=t&pe,c=t&he;if(n&&(a=r?n(e,o,r,i):n(e)),a!==re)return a;if(!rl(e))return e;var d=mp(e);if(d){if(a=ki(e),!s)return Br(e,a)}else{var p=Ad(e),h=p==qe||p==Ke;if(yp(e))return Ar(e,s);if(p==Ze||p==je||h&&!r){if(a=l||h?{}:Pi(e),!s)return l?Gr(e,Jn(a,e)):jr(e,Zn(a,e))}else{if(!xn[p])return r?e:{};a=Di(e,p,oo,s)}}i||(i=new bn);var f=i.get(e);if(f)return f;i.set(e,a);var g=c?l?Ci:yi:l?Gl:jl,m=d?re:g(e);return u(m||e,function(o,r){m&&(r=o,o=e[r]),zn(a,r,oo(o,t,n,r,e,i))}),a}function ro(e){var t=jl(e);return function(n){return io(n,e,t)}}function io(e,t,n){var o=n.length;if(null==e)return!o;for(e=sc(e);o--;){var r=n[o],i=t[r],a=e[r];if(a===re&&!(r in e)||!i(a))return!1}return!0}function ao(e,t,n){if("function"!=typeof e)throw new cc(se);return Od(function(){e.apply(re,n)},t)}function so(e,t,n,o){var r=-1,i=h,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=g(t,L(n))),o?(i=f,a=!1):t.length>=ie&&(i=N,a=!1,t=new vn(t));e:for(;++r<s;){var c=e[r],d=null==n?c:n(c);if(c=o||0!==c?c:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(c)}else i(t,d,o)||l.push(c)}return l}function lo(e,t){var n=!0;return fd(e,function(e,o,r){return n=!!t(e,o,r)}),n}function uo(e,t,n){for(var o=-1,r=e.length;++o<r;){var i=e[o],a=t(i);if(null!=a&&(s===re?a===a&&!ml(a):n(a,s)))var s=a,l=i}return l}function co(e,t,n,o){var r=e.length;for(n=_l(n),n<0&&(n=-n>r?0:r+n),o=o===re||o>r?r:_l(o),o<0&&(o+=r),o=n>o?0:El(o);n<o;)e[n++]=t;return e}function po(e,t){var n=[];return fd(e,function(e,o,r){t(e,o,r)&&n.push(e)}),n}function ho(e,t,n,o,r){var i=-1,a=e.length;for(n||(n=Mi),r||(r=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?ho(s,t-1,n,o,r):m(r,s):o||(r[r.length]=s)}return r}function fo(e,t){return e&&md(e,t,jl)}function go(e,t){return e&&vd(e,t,jl)}function mo(e,t){return p(t,function(t){return tl(e[t])})}function vo(e,t){t=xr(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[Ji(t[n++])];return n&&n==o?e:re}function yo(e,t,n){var o=t(e);return mp(e)?o:m(o,n(e))}function Co(e){return null==e?e===re?rt:Qe:Fc&&Fc in sc(e)?Ai(e):$i(e)}function bo(e,t){return e>t}function wo(e,t){return null!=e&&mc.call(e,t)}function _o(e,t){return null!=e&&t in sc(e)}function Eo(e,t,n){return e>=$c(t,n)&&e<zc(t,n)}function xo(e,t,n){for(var o=n?f:h,r=e[0].length,i=e.length,a=i,s=nc(i),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=g(c,L(t))),l=$c(c.length,l),s[a]=!n&&(t||r>=120&&c.length>=120)?new vn(a&&c):re}c=e[0];var d=-1,p=s[0];e:for(;++d<r&&u.length<l;){var m=c[d],v=t?t(m):m;if(m=n||0!==m?m:0,!(p?N(p,v):o(u,v,n))){for(a=i;--a;){var y=s[a];if(!(y?N(y,v):o(e[a],v,n)))continue e}p&&p.push(v),u.push(m)}}return u}function So(e,t,n,o){return fo(e,function(e,r,i){t(o,n(e),r,i)}),o}function Ao(e,t,n){t=xr(t,e),e=Ki(e,t);var o=null==e?e:e[Ji(wa(t))];return null==o?re:s(o,e,n)}function Ro(e){return il(e)&&Co(e)==je}function To(e){return il(e)&&Co(e)==st}function Oo(e){return il(e)&&Co(e)==Ue}function ko(e,t,n,o,r){return e===t||(null==e||null==t||!il(e)&&!il(t)?e!==e&&t!==t:Po(e,t,n,o,ko,r))}function Po(e,t,n,o,r,i){var a=mp(e),s=mp(t),l=a?Ge:Ad(e),u=s?Ge:Ad(t);l=l==je?Ze:l,u=u==je?Ze:u;var c=l==Ze,d=u==Ze,p=l==u;if(p&&yp(e)){if(!yp(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new bn),a||Ep(e)?fi(e,t,n,o,r,i):gi(e,t,l,n,o,r,i);if(!(n&fe)){var h=c&&mc.call(e,"__wrapped__"),f=d&&mc.call(t,"__wrapped__");if(h||f){var g=h?e.value():e,m=f?t.value():t;return i||(i=new bn),r(g,m,n,o,i)}}return!!p&&(i||(i=new bn),mi(e,t,n,o,r,i))}function Do(e){return il(e)&&Ad(e)==Ye}function Fo(e,t,n,o){var r=n.length,i=r,a=!o;if(null==e)return!i;for(e=sc(e);r--;){var s=n[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<i;){s=n[r];var l=s[0],u=e[l],c=s[1];if(a&&s[2]){if(u===re&&!(l in e))return!1}else{var d=new bn;if(o)var p=o(u,c,l,e,t,d);if(!(p===re?ko(c,u,fe|ge,o,d):p))return!1}}return!0}function Mo(e){return!(!rl(e)||ji(e))&&(tl(e)?_c:$t).test(ea(e))}function Lo(e){return il(e)&&Co(e)==et}function Io(e){return il(e)&&Ad(e)==tt}function No(e){return il(e)&&ol(e.length)&&!!En[Co(e)]}function Bo(e){return"function"==typeof e?e:null==e?ku:"object"==typeof e?mp(e)?Uo(e[0],e[1]):Vo(e):Bu(e)}function Wo(e){if(!Gi(e))return Uc(e);var t=[];for(var n in sc(e))mc.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jo(e){if(!rl(e))return zi(e);var t=Gi(e),n=[];for(var o in e)("constructor"!=o||!t&&mc.call(e,o))&&n.push(o);return n}function Go(e,t){return e<t}function Ho(e,t){var n=-1,o=$s(e)?nc(e.length):[];return fd(e,function(e,r,i){o[++n]=t(e,r,i)}),o}function Vo(e){var t=xi(e);return 1==t.length&&t[0][2]?Vi(t[0][0],t[0][1]):function(n){return n===e||Fo(n,e,t)}}function Uo(e,t){return Ni(e)&&Hi(t)?Vi(Ji(e),t):function(n){var o=Nl(n,e);return o===re&&o===t?Wl(n,e):ko(t,o,fe|ge)}}function zo(e,t,n,o,r){e!==t&&md(t,function(i,a){if(rl(i))r||(r=new bn),$o(e,t,a,n,zo,o,r);else{var s=o?o(e[a],i,a+"",e,t,r):re;s===re&&(s=i),Bn(e,a,s)}},Gl)}function $o(e,t,n,o,r,i,a){var s=e[n],l=t[n],u=a.get(l);if(u)return void Bn(e,n,u);var c=i?i(s,l,n+"",e,t,a):re,d=c===re;if(d){var p=mp(l),h=!p&&yp(l),f=!p&&!h&&Ep(l);c=l,p||h||f?mp(s)?c=s:qs(s)?c=Br(s):h?(d=!1,c=Ar(l,!0)):f?(d=!1,c=Fr(l,!0)):c=[]:hl(l)||gp(l)?(c=s,gp(s)?c=Sl(s):(!rl(s)||o&&tl(s))&&(c=Pi(l))):d=!1}d&&(a.set(l,c),r(c,l,o,i,a),a.delete(l)),Bn(e,n,c)}function qo(e,t){var n=e.length;if(n)return t+=t<0?n:0,Li(t,n)?e[t]:re}function Ko(e,t,n){var o=-1;return t=g(t.length?t:[ku],L(_i())),P(Ho(e,function(e,n,r){return{criteria:g(t,function(t){return t(e)}),index:++o,value:e}}),function(e,t){return Lr(e,t,n)})}function Yo(e,t){return Xo(e,t,function(t,n){return Wl(e,n)})}function Xo(e,t,n){for(var o=-1,r=t.length,i={};++o<r;){var a=t[o],s=vo(e,a);n(s,a)&&ar(i,xr(a,e),s)}return i}function Qo(e){return function(t){return vo(t,e)}}function Zo(e,t,n,o){var r=o?S:x,i=-1,a=t.length,s=e;for(e===t&&(t=Br(t)),n&&(s=g(e,L(n)));++i<a;)for(var l=0,u=t[i],c=n?n(u):u;(l=r(s,c,l,o))>-1;)s!==e&&kc.call(s,l,1),kc.call(e,l,1);return e}function Jo(e,t){for(var n=e?t.length:0,o=n-1;n--;){var r=t[n];if(n==o||r!==i){var i=r;Li(r)?kc.call(e,r,1):mr(e,r)}}return e}function er(e,t){return e+Wc(Yc()*(t-e+1))}function tr(e,t,n,o){for(var r=-1,i=zc(Bc((t-e)/(n||1)),0),a=nc(i);i--;)a[o?i:++r]=e,e+=n;return a}function nr(e,t){var n="";if(!e||t<1||t>Fe)return n;do{t%2&&(n+=e),(t=Wc(t/2))&&(e+=e)}while(t);return n}function or(e,t){return kd(qi(e,t,ku),e+"")}function rr(e){return Mn(Jl(e))}function ir(e,t){var n=Jl(e);return Zi(n,no(t,0,n.length))}function ar(e,t,n,o){if(!rl(e))return e;t=xr(t,e);for(var r=-1,i=t.length,a=i-1,s=e;null!=s&&++r<i;){var l=Ji(t[r]),u=n;if(r!=a){var c=s[l];u=o?o(c,l,s):re,u===re&&(u=rl(c)?c:Li(t[r+1])?[]:{})}zn(s,l,u),s=s[l]}return e}function sr(e){return Zi(Jl(e))}function lr(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=nc(r);++o<r;)i[o]=e[o+t];return i}function ur(e,t){var n;return fd(e,function(e,o,r){return!(n=t(e,o,r))}),!!n}function cr(e,t,n){var o=0,r=null==e?o:e.length;if("number"==typeof t&&t===t&&r<=Be){for(;o<r;){var i=o+r>>>1,a=e[i];null!==a&&!ml(a)&&(n?a<=t:a<t)?o=i+1:r=i}return r}return dr(e,t,ku,n)}function dr(e,t,n,o){t=n(t);for(var r=0,i=null==e?0:e.length,a=t!==t,s=null===t,l=ml(t),u=t===re;r<i;){var c=Wc((r+i)/2),d=n(e[c]),p=d!==re,h=null===d,f=d===d,g=ml(d);if(a)var m=o||f;else m=u?f&&(o||p):s?f&&p&&(o||!h):l?f&&p&&!h&&(o||!g):!h&&!g&&(o?d<=t:d<t);m?r=c+1:i=c}return $c(i,Ne)}function pr(e,t){for(var n=-1,o=e.length,r=0,i=[];++n<o;){var a=e[n],s=t?t(a):a;if(!n||!zs(s,l)){var l=s;i[r++]=0===a?0:a}}return i}function hr(e){return"number"==typeof e?e:ml(e)?Le:+e}function fr(e){if("string"==typeof e)return e;if(mp(e))return g(e,fr)+"";if(ml(e))return pd?pd.call(e):"";var t=e+"";return"0"==t&&1/e==-De?"-0":t}function gr(e,t,n){var o=-1,r=h,i=e.length,a=!0,s=[],l=s;if(n)a=!1,r=f;else if(i>=ie){var u=t?null:_d(e);if(u)return Y(u);a=!1,r=N,l=new vn}else l=t?[]:s;e:for(;++o<i;){var c=e[o],d=t?t(c):c;if(c=n||0!==c?c:0,a&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(c)}else r(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}function mr(e,t){return t=xr(t,e),null==(e=Ki(e,t))||delete e[Ji(wa(t))]}function vr(e,t,n,o){return ar(e,t,n(vo(e,t)),o)}function yr(e,t,n,o){for(var r=e.length,i=o?r:-1;(o?i--:++i<r)&&t(e[i],i,e););return n?lr(e,o?0:i,o?i+1:r):lr(e,o?i+1:0,o?r:i)}function Cr(e,t){var n=e;return n instanceof b&&(n=n.value()),v(t,function(e,t){return t.func.apply(t.thisArg,m([e],t.args))},n)}function br(e,t,n){var o=e.length;if(o<2)return o?gr(e[0]):[];for(var r=-1,i=nc(o);++r<o;)for(var a=e[r],s=-1;++s<o;)s!=r&&(i[r]=so(i[r]||a,e[s],t,n));return gr(ho(i,1),t,n)}function wr(e,t,n){for(var o=-1,r=e.length,i=t.length,a={};++o<r;){var s=o<i?t[o]:re;n(a,e[o],s)}return a}function _r(e){return qs(e)?e:[]}function Er(e){return"function"==typeof e?e:ku}function xr(e,t){return mp(e)?e:Ni(e,t)?[e]:Pd(Rl(e))}function Sr(e,t,n){var o=e.length;return n=n===re?o:n,!t&&n>=o?e:lr(e,t,n)}function Ar(e,t){if(t)return e.slice();var n=e.length,o=Ac?Ac(n):new e.constructor(n);return e.copy(o),o}function Rr(e){var t=new e.constructor(e.byteLength);return new Sc(t).set(new Sc(e)),t}function Tr(e,t){var n=t?Rr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Or(e,t,n){return v(t?n($(e),de):$(e),i,new e.constructor)}function kr(e){var t=new e.constructor(e.source,Vt.exec(e));return t.lastIndex=e.lastIndex,t}function Pr(e,t,n){return v(t?n(Y(e),de):Y(e),a,new e.constructor)}function Dr(e){return dd?sc(dd.call(e)):{}}function Fr(e,t){var n=t?Rr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Mr(e,t){if(e!==t){var n=e!==re,o=null===e,r=e===e,i=ml(e),a=t!==re,s=null===t,l=t===t,u=ml(t);if(!s&&!u&&!i&&e>t||i&&a&&l&&!s&&!u||o&&a&&l||!n&&l||!r)return 1;if(!o&&!i&&!u&&e<t||u&&n&&r&&!o&&!i||s&&n&&r||!a&&r||!l)return-1}return 0}function Lr(e,t,n){for(var o=-1,r=e.criteria,i=t.criteria,a=r.length,s=n.length;++o<a;){var l=Mr(r[o],i[o]);if(l){if(o>=s)return l;return l*("desc"==n[o]?-1:1)}}return e.index-t.index}function Ir(e,t,n,o){for(var r=-1,i=e.length,a=n.length,s=-1,l=t.length,u=zc(i-a,0),c=nc(l+u),d=!o;++s<l;)c[s]=t[s];for(;++r<a;)(d||r<i)&&(c[n[r]]=e[r]);for(;u--;)c[s++]=e[r++];return c}function Nr(e,t,n,o){for(var r=-1,i=e.length,a=-1,s=n.length,l=-1,u=t.length,c=zc(i-s,0),d=nc(c+u),p=!o;++r<c;)d[r]=e[r];for(var h=r;++l<u;)d[h+l]=t[l];for(;++a<s;)(p||r<i)&&(d[h+n[a]]=e[r++]);return d}function Br(e,t){var n=-1,o=e.length;for(t||(t=nc(o));++n<o;)t[n]=e[n];return t}function Wr(e,t,n,o){var r=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=o?o(n[s],e[s],s,n,e):re;l===re&&(l=e[s]),r?eo(n,s,l):zn(n,s,l)}return n}function jr(e,t){return Wr(e,xd(e),t)}function Gr(e,t){return Wr(e,Sd(e),t)}function Hr(e,t){return function(n,o){var r=mp(n)?l:Qn,i=t?t():{};return r(n,e,_i(o,2),i)}}function Vr(e){return or(function(t,n){var o=-1,r=n.length,i=r>1?n[r-1]:re,a=r>2?n[2]:re;for(i=e.length>3&&"function"==typeof i?(r--,i):re,a&&Ii(n[0],n[1],a)&&(i=r<3?re:i,r=1),t=sc(t);++o<r;){var s=n[o];s&&e(t,s,o,i)}return t})}function Ur(e,t){return function(n,o){if(null==n)return n;if(!$s(n))return e(n,o);for(var r=n.length,i=t?r:-1,a=sc(n);(t?i--:++i<r)&&!1!==o(a[i],i,a););return n}}function zr(e){return function(t,n,o){for(var r=-1,i=sc(t),a=o(t),s=a.length;s--;){var l=a[e?s:++r];if(!1===n(i[l],l,i))break}return t}}function $r(e,t,n){function o(){return(this&&this!==Fn&&this instanceof o?i:e).apply(r?n:this,arguments)}var r=t&me,i=Yr(e);return o}function qr(e){return function(t){t=Rl(t);var n=V(t)?ee(t):re,o=n?n[0]:t.charAt(0),r=n?Sr(n,1).join(""):t.slice(1);return o[e]()+r}}function Kr(e){return function(t){return v(Su(iu(t).replace(gn,"")),e,"")}}function Yr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=hd(e.prototype),o=e.apply(n,t);return rl(o)?o:n}}function Xr(e,t,n){function o(){for(var i=arguments.length,a=nc(i),l=i,u=wi(o);l--;)a[l]=arguments[l];var c=i<3&&a[0]!==u&&a[i-1]!==u?[]:K(a,u);return(i-=c.length)<n?si(e,t,Jr,o.placeholder,re,a,c,re,re,n-i):s(this&&this!==Fn&&this instanceof o?r:e,this,a)}var r=Yr(e);return o}function Qr(e){return function(t,n,o){var r=sc(t);if(!$s(t)){var i=_i(n,3);t=jl(t),n=function(e){return i(r[e],e,r)}}var a=e(t,n,o);return a>-1?r[i?t[a]:a]:re}}function Zr(e){return vi(function(t){var n=t.length,o=n,i=r.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new cc(se);if(i&&!s&&"wrapper"==bi(a))var s=new r([],!0)}for(o=s?o:n;++o<n;){a=t[o];var l=bi(a),u="wrapper"==l?Ed(a):re;s=u&&Wi(u[0])&&u[1]==(Ee|Ce|we|xe)&&!u[4].length&&1==u[9]?s[bi(u[0])].apply(s,u[3]):1==a.length&&Wi(a)?s[l]():s.thru(a)}return function(){var e=arguments,o=e[0];if(s&&1==e.length&&mp(o))return s.plant(o).value();for(var r=0,i=n?t[r].apply(this,e):o;++r<n;)i=t[r].call(this,i);return i}})}function Jr(e,t,n,o,r,i,a,s,l,u){function c(){for(var v=arguments.length,y=nc(v),C=v;C--;)y[C]=arguments[C];if(f)var b=wi(c),w=j(y,b);if(o&&(y=Ir(y,o,r,f)),i&&(y=Nr(y,i,a,f)),v-=w,f&&v<u){var _=K(y,b);return si(e,t,Jr,c.placeholder,n,y,_,s,l,u-v)}var E=p?n:this,x=h?E[e]:e;return v=y.length,s?y=Yi(y,s):g&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==Fn&&this instanceof c&&(x=m||Yr(x)),x.apply(E,y)}var d=t&Ee,p=t&me,h=t&ve,f=t&(Ce|be),g=t&Se,m=h?re:Yr(e);return c}function ei(e,t){return function(n,o){return So(n,e,t(o),{})}}function ti(e,t){return function(n,o){var r;if(n===re&&o===re)return t;if(n!==re&&(r=n),o!==re){if(r===re)return o;"string"==typeof n||"string"==typeof o?(n=fr(n),o=fr(o)):(n=hr(n),o=hr(o)),r=e(n,o)}return r}}function ni(e){return vi(function(t){return t=g(t,L(_i())),or(function(n){var o=this;return e(t,function(e){return s(e,o,n)})})})}function oi(e,t){t=t===re?" ":fr(t);var n=t.length;if(n<2)return n?nr(t,e):t;var o=nr(t,Bc(e/J(t)));return V(t)?Sr(ee(o),0,e).join(""):o.slice(0,e)}function ri(e,t,n,o){function r(){for(var t=-1,l=arguments.length,u=-1,c=o.length,d=nc(c+l),p=this&&this!==Fn&&this instanceof r?a:e;++u<c;)d[u]=o[u];for(;l--;)d[u++]=arguments[++t];return s(p,i?n:this,d)}var i=t&me,a=Yr(e);return r}function ii(e){return function(t,n,o){return o&&"number"!=typeof o&&Ii(t,n,o)&&(n=o=re),t=wl(t),n===re?(n=t,t=0):n=wl(n),o=o===re?t<n?1:-1:wl(o),tr(t,n,o,e)}}function ai(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=xl(t),n=xl(n)),e(t,n)}}function si(e,t,n,o,r,i,a,s,l,u){var c=t&Ce,d=c?a:re,p=c?re:a,h=c?i:re,f=c?re:i;t|=c?we:_e,(t&=~(c?_e:we))&ye||(t&=~(me|ve));var g=[e,t,r,h,d,f,p,s,l,u],m=n.apply(re,g);return Wi(e)&&Td(m,g),m.placeholder=o,Xi(m,e,t)}function li(e){var t=ac[e];return function(e,n){if(e=xl(e),n=null==n?0:$c(_l(n),292)){var o=(Rl(e)+"e").split("e");return o=(Rl(t(o[0]+"e"+(+o[1]+n)))+"e").split("e"),+(o[0]+"e"+(+o[1]-n))}return t(e)}}function ui(e){return function(t){var n=Ad(t);return n==Ye?$(t):n==tt?X(t):M(t,e(t))}}function ci(e,t,n,o,r,i,a,s){var l=t&ve;if(!l&&"function"!=typeof e)throw new cc(se);var u=o?o.length:0;if(u||(t&=~(we|_e),o=r=re),a=a===re?a:zc(_l(a),0),s=s===re?s:_l(s),u-=r?r.length:0,t&_e){var c=o,d=r;o=r=re}var p=l?re:Ed(e),h=[e,t,n,o,r,c,d,i,a,s];if(p&&Ui(h,p),e=h[0],t=h[1],n=h[2],o=h[3],r=h[4],s=h[9]=h[9]===re?l?0:e.length:zc(h[9]-u,0),!s&&t&(Ce|be)&&(t&=~(Ce|be)),t&&t!=me)f=t==Ce||t==be?Xr(e,t,s):t!=we&&t!=(me|we)||r.length?Jr.apply(re,h):ri(e,t,n,o);else var f=$r(e,t,n);return Xi((p?yd:Td)(f,h),e,t)}function di(e,t,n,o){return e===re||zs(e,hc[n])&&!mc.call(o,n)?t:e}function pi(e,t,n,o,r,i){return rl(e)&&rl(t)&&(i.set(t,e),zo(e,t,re,pi,i),i.delete(t)),e}function hi(e){return hl(e)?re:e}function fi(e,t,n,o,r,i){var a=n&fe,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var c=-1,d=!0,p=n&ge?new vn:re;for(i.set(e,t),i.set(t,e);++c<s;){var h=e[c],f=t[c];if(o)var g=a?o(f,h,c,t,e,i):o(h,f,c,e,t,i);if(g!==re){if(g)continue;d=!1;break}if(p){if(!C(t,function(e,t){if(!N(p,t)&&(h===e||r(h,e,n,o,i)))return p.push(t)})){d=!1;break}}else if(h!==f&&!r(h,f,n,o,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function gi(e,t,n,o,r,i,a){switch(n){case lt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case st:return!(e.byteLength!=t.byteLength||!i(new Sc(e),new Sc(t)));case Ve:case Ue:case Xe:return zs(+e,+t);case $e:return e.name==t.name&&e.message==t.message;case et:case nt:return e==t+"";case Ye:var s=$;case tt:var l=o&fe;if(s||(s=Y),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;o|=ge,a.set(e,t);var c=fi(s(e),s(t),o,r,i,a);return a.delete(e),c;case ot:if(dd)return dd.call(e)==dd.call(t)}return!1}function mi(e,t,n,o,r,i){var a=n&fe,s=yi(e),l=s.length;if(l!=yi(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:mc.call(t,c)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){c=s[u];var f=e[c],g=t[c];if(o)var m=a?o(g,f,c,t,e,i):o(f,g,c,e,t,i);if(!(m===re?f===g||r(f,g,n,o,i):m)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(p=!1)}return i.delete(e),i.delete(t),p}function vi(e){return kd(qi(e,re,ha),e+"")}function yi(e){return yo(e,jl,xd)}function Ci(e){return yo(e,Gl,Sd)}function bi(e){for(var t=e.name+"",n=rd[t],o=mc.call(rd,t)?n.length:0;o--;){var r=n[o],i=r.func;if(null==i||i==e)return r.name}return t}function wi(e){return(mc.call(n,"placeholder")?n:e).placeholder}function _i(){var e=n.iteratee||Pu;return e=e===Pu?Bo:e,arguments.length?e(arguments[0],arguments[1]):e}function Ei(e,t){var n=e.__data__;return Bi(t)?n["string"==typeof t?"string":"hash"]:n.map}function xi(e){for(var t=jl(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,Hi(r)]}return t}function Si(e,t){var n=H(e,t);return Mo(n)?n:re}function Ai(e){var t=mc.call(e,Fc),n=e[Fc];try{e[Fc]=re;var o=!0}catch(e){}var r=Cc.call(e);return o&&(t?e[Fc]=n:delete e[Fc]),r}function Ri(e,t,n){for(var o=-1,r=n.length;++o<r;){var i=n[o],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=$c(t,e+a);break;case"takeRight":e=zc(e,t-a)}}return{start:e,end:t}}function Ti(e){var t=e.match(Bt);return t?t[1].split(Wt):[]}function Oi(e,t,n){t=xr(t,e);for(var o=-1,r=t.length,i=!1;++o<r;){var a=Ji(t[o]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++o!=r?i:!!(r=null==e?0:e.length)&&ol(r)&&Li(a,r)&&(mp(e)||gp(e))}function ki(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&mc.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Pi(e){return"function"!=typeof e.constructor||Gi(e)?{}:hd(Rc(e))}function Di(e,t,n,o){var r=e.constructor;switch(t){case st:return Rr(e);case Ve:case Ue:return new r(+e);case lt:return Tr(e,o);case ut:case ct:case dt:case pt:case ht:case ft:case gt:case mt:case vt:return Fr(e,o);case Ye:return Or(e,o,n);case Xe:case nt:return new r(e);case et:return kr(e);case tt:return Pr(e,o,n);case ot:return Dr(e)}}function Fi(e,t){var n=t.length;if(!n)return e;var o=n-1;return t[o]=(n>1?"& ":"")+t[o],t=t.join(n>2?", ":" "),e.replace(Nt,"{\n/* [wrapped with "+t+"] */\n")}function Mi(e){return mp(e)||gp(e)||!!(Pc&&e&&e[Pc])}function Li(e,t){return!!(t=null==t?Fe:t)&&("number"==typeof e||Kt.test(e))&&e>-1&&e%1==0&&e<t}function Ii(e,t,n){if(!rl(n))return!1;var o=typeof t;return!!("number"==o?$s(n)&&Li(t,n.length):"string"==o&&t in n)&&zs(n[t],e)}function Ni(e,t){if(mp(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ml(e))||(Ot.test(e)||!Tt.test(e)||null!=t&&e in sc(t))}function Bi(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Wi(e){var t=bi(e),o=n[t];if("function"!=typeof o||!(t in b.prototype))return!1;if(e===o)return!0;var r=Ed(o);return!!r&&e===r[0]}function ji(e){return!!yc&&yc in e}function Gi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||hc)}function Hi(e){return e===e&&!rl(e)}function Vi(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==re||e in sc(n)))}}function Ui(e,t){var n=e[1],o=t[1],r=n|o,i=r<(me|ve|Ee),a=o==Ee&&n==Ce||o==Ee&&n==xe&&e[7].length<=t[8]||o==(Ee|xe)&&t[7].length<=t[8]&&n==Ce;if(!i&&!a)return e;o&me&&(e[2]=t[2],r|=n&me?0:ye);var s=t[3];if(s){var l=e[3];e[3]=l?Ir(l,s,t[4]):s,e[4]=l?K(e[3],ce):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?Nr(l,s,t[6]):s,e[6]=l?K(e[5],ce):t[6]),s=t[7],s&&(e[7]=s),o&Ee&&(e[8]=null==e[8]?t[8]:$c(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}function zi(e){var t=[];if(null!=e)for(var n in sc(e))t.push(n);return t}function $i(e){return Cc.call(e)}function qi(e,t,n){return t=zc(t===re?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=zc(o.length-t,0),a=nc(i);++r<i;)a[r]=o[t+r];r=-1;for(var l=nc(t+1);++r<t;)l[r]=o[r];return l[t]=n(a),s(e,this,l)}}function Ki(e,t){return t.length<2?e:vo(e,lr(t,0,-1))}function Yi(e,t){for(var n=e.length,o=$c(t.length,n),r=Br(e);o--;){var i=t[o];e[o]=Li(i,n)?r[i]:re}return e}function Xi(e,t,n){var o=t+"";return kd(e,Fi(o,ta(Ti(o),n)))}function Qi(e){var t=0,n=0;return function(){var o=qc(),r=Oe-(o-n);if(n=o,r>0){if(++t>=Te)return arguments[0]}else t=0;return e.apply(re,arguments)}}function Zi(e,t){var n=-1,o=e.length,r=o-1;for(t=t===re?o:t;++n<t;){var i=er(n,r),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function Ji(e){if("string"==typeof e||ml(e))return e;var t=e+"";return"0"==t&&1/e==-De?"-0":t}function ea(e){if(null!=e){try{return gc.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ta(e,t){return u(We,function(n){var o="_."+n[0];t&n[1]&&!h(e,o)&&e.push(o)}),e.sort()}function na(e){if(e instanceof b)return e.clone();var t=new r(e.__wrapped__,e.__chain__);return t.__actions__=Br(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function oa(e,t,n){t=(n?Ii(e,t,n):t===re)?1:zc(_l(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var r=0,i=0,a=nc(Bc(o/t));r<o;)a[i++]=lr(e,r,r+=t);return a}function ra(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}function ia(){var e=arguments.length;if(!e)return[];for(var t=nc(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return m(mp(n)?Br(n):[n],ho(t,1))}function aa(e,t,n){var o=null==e?0:e.length;return o?(t=n||t===re?1:_l(t),lr(e,t<0?0:t,o)):[]}function sa(e,t,n){var o=null==e?0:e.length;return o?(t=n||t===re?1:_l(t),t=o-t,lr(e,0,t<0?0:t)):[]}function la(e,t){return e&&e.length?yr(e,_i(t,3),!0,!0):[]}function ua(e,t){return e&&e.length?yr(e,_i(t,3),!0):[]}function ca(e,t,n,o){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ii(e,t,n)&&(n=0,o=r),co(e,t,n,o)):[]}function da(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var r=null==n?0:_l(n);return r<0&&(r=zc(o+r,0)),E(e,_i(t,3),r)}function pa(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var r=o-1;return n!==re&&(r=_l(n),r=n<0?zc(o+r,0):$c(r,o-1)),E(e,_i(t,3),r,!0)}function ha(e){return(null==e?0:e.length)?ho(e,1):[]}function fa(e){return(null==e?0:e.length)?ho(e,De):[]}function ga(e,t){return(null==e?0:e.length)?(t=t===re?1:_l(t),ho(e,t)):[]}function ma(e){for(var t=-1,n=null==e?0:e.length,o={};++t<n;){var r=e[t];o[r[0]]=r[1]}return o}function va(e){return e&&e.length?e[0]:re}function ya(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var r=null==n?0:_l(n);return r<0&&(r=zc(o+r,0)),x(e,t,r)}function Ca(e){return(null==e?0:e.length)?lr(e,0,-1):[]}function ba(e,t){return null==e?"":Vc.call(e,t)}function wa(e){var t=null==e?0:e.length;return t?e[t-1]:re}function _a(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var r=o;return n!==re&&(r=_l(n),r=r<0?zc(o+r,0):$c(r,o-1)),t===t?Z(e,t,r):E(e,A,r,!0)}function Ea(e,t){return e&&e.length?qo(e,_l(t)):re}function xa(e,t){return e&&e.length&&t&&t.length?Zo(e,t):e}function Sa(e,t,n){return e&&e.length&&t&&t.length?Zo(e,t,_i(n,2)):e}function Aa(e,t,n){return e&&e.length&&t&&t.length?Zo(e,t,re,n):e}function Ra(e,t){var n=[];if(!e||!e.length)return n;var o=-1,r=[],i=e.length;for(t=_i(t,3);++o<i;){var a=e[o];t(a,o,e)&&(n.push(a),r.push(o))}return Jo(e,r),n}function Ta(e){return null==e?e:Xc.call(e)}function Oa(e,t,n){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Ii(e,t,n)?(t=0,n=o):(t=null==t?0:_l(t),n=n===re?o:_l(n)),lr(e,t,n)):[]}function ka(e,t){return cr(e,t)}function Pa(e,t,n){return dr(e,t,_i(n,2))}function Da(e,t){var n=null==e?0:e.length;if(n){var o=cr(e,t);if(o<n&&zs(e[o],t))return o}return-1}function Fa(e,t){return cr(e,t,!0)}function Ma(e,t,n){return dr(e,t,_i(n,2),!0)}function La(e,t){if(null==e?0:e.length){var n=cr(e,t,!0)-1;if(zs(e[n],t))return n}return-1}function Ia(e){return e&&e.length?pr(e):[]}function Na(e,t){return e&&e.length?pr(e,_i(t,2)):[]}function Ba(e){var t=null==e?0:e.length;return t?lr(e,1,t):[]}function Wa(e,t,n){return e&&e.length?(t=n||t===re?1:_l(t),lr(e,0,t<0?0:t)):[]}function ja(e,t,n){var o=null==e?0:e.length;return o?(t=n||t===re?1:_l(t),t=o-t,lr(e,t<0?0:t,o)):[]}function Ga(e,t){return e&&e.length?yr(e,_i(t,3),!1,!0):[]}function Ha(e,t){return e&&e.length?yr(e,_i(t,3)):[]}function Va(e){return e&&e.length?gr(e):[]}function Ua(e,t){return e&&e.length?gr(e,_i(t,2)):[]}function za(e,t){return t="function"==typeof t?t:re,e&&e.length?gr(e,re,t):[]}function $a(e){if(!e||!e.length)return[];var t=0;return e=p(e,function(e){if(qs(e))return t=zc(e.length,t),!0}),F(t,function(t){return g(e,T(t))})}function qa(e,t){if(!e||!e.length)return[];var n=$a(e);return null==t?n:g(n,function(e){return s(t,re,e)})}function Ka(e,t){return wr(e||[],t||[],zn)}function Ya(e,t){return wr(e||[],t||[],ar)}function Xa(e){var t=n(e);return t.__chain__=!0,t}function Qa(e,t){return t(e),e}function Za(e,t){return t(e)}function Ja(){return Xa(this)}function es(){return new r(this.value(),this.__chain__)}function ts(){this.__values__===re&&(this.__values__=bl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?re:this.__values__[this.__index__++]}}function ns(){return this}function os(e){for(var t,n=this;n instanceof o;){var r=na(n);r.__index__=0,r.__values__=re,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function rs(){var e=this.__wrapped__;if(e instanceof b){var t=e;return this.__actions__.length&&(t=new b(this)),t=t.reverse(),t.__actions__.push({func:Za,args:[Ta],thisArg:re}),new r(t,this.__chain__)}return this.thru(Ta)}function is(){return Cr(this.__wrapped__,this.__actions__)}function as(e,t,n){var o=mp(e)?d:lo;return n&&Ii(e,t,n)&&(t=re),o(e,_i(t,3))}function ss(e,t){return(mp(e)?p:po)(e,_i(t,3))}function ls(e,t){return ho(fs(e,t),1)}function us(e,t){return ho(fs(e,t),De)}function cs(e,t,n){return n=n===re?1:_l(n),ho(fs(e,t),n)}function ds(e,t){return(mp(e)?u:fd)(e,_i(t,3))}function ps(e,t){return(mp(e)?c:gd)(e,_i(t,3))}function hs(e,t,n,o){e=$s(e)?e:Jl(e),n=n&&!o?_l(n):0;var r=e.length;return n<0&&(n=zc(r+n,0)),gl(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&x(e,t,n)>-1}function fs(e,t){return(mp(e)?g:Ho)(e,_i(t,3))}function gs(e,t,n,o){return null==e?[]:(mp(t)||(t=null==t?[]:[t]),n=o?re:n,mp(n)||(n=null==n?[]:[n]),Ko(e,t,n))}function ms(e,t,n){var o=mp(e)?v:k,r=arguments.length<3;return o(e,_i(t,4),n,r,fd)}function vs(e,t,n){var o=mp(e)?y:k,r=arguments.length<3;return o(e,_i(t,4),n,r,gd)}function ys(e,t){return(mp(e)?p:po)(e,Ds(_i(t,3)))}function Cs(e){return(mp(e)?Mn:rr)(e)}function bs(e,t,n){return t=(n?Ii(e,t,n):t===re)?1:_l(t),(mp(e)?Ln:ir)(e,t)}function ws(e){return(mp(e)?Nn:sr)(e)}function _s(e){if(null==e)return 0;if($s(e))return gl(e)?J(e):e.length;var t=Ad(e);return t==Ye||t==tt?e.size:Wo(e).length}function Es(e,t,n){var o=mp(e)?C:ur;return n&&Ii(e,t,n)&&(t=re),o(e,_i(t,3))}function xs(e,t){if("function"!=typeof t)throw new cc(se);return e=_l(e),function(){if(--e<1)return t.apply(this,arguments)}}function Ss(e,t,n){return t=n?re:t,t=e&&null==t?e.length:t,ci(e,Ee,re,re,re,re,t)}function As(e,t){var n;if("function"!=typeof t)throw new cc(se);return e=_l(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=re),n}}function Rs(e,t,n){t=n?re:t;var o=ci(e,Ce,re,re,re,re,re,t);return o.placeholder=Rs.placeholder,o}function Ts(e,t,n){t=n?re:t;var o=ci(e,be,re,re,re,re,re,t);return o.placeholder=Ts.placeholder,o}function Os(e,t,n){function o(t){var n=p,o=h;return p=h=re,y=t,g=e.apply(o,n)}function r(e){return y=e,m=Od(s,t),C?o(e):g}function i(e){var n=e-v,o=e-y,r=t-n;return b?$c(r,f-o):r}function a(e){var n=e-v,o=e-y;return v===re||n>=t||n<0||b&&o>=f}function s(){var e=rp();if(a(e))return l(e);m=Od(s,i(e))}function l(e){return m=re,w&&p?o(e):(p=h=re,g)}function u(){m!==re&&wd(m),y=0,p=v=h=m=re}function c(){return m===re?g:l(rp())}function d(){var e=rp(),n=a(e);if(p=arguments,h=this,v=e,n){if(m===re)return r(v);if(b)return m=Od(s,t),o(v)}return m===re&&(m=Od(s,t)),g}var p,h,f,g,m,v,y=0,C=!1,b=!1,w=!0;if("function"!=typeof e)throw new cc(se);return t=xl(t)||0,rl(n)&&(C=!!n.leading,b="maxWait"in n,f=b?zc(xl(n.maxWait)||0,t):f,w="trailing"in n?!!n.trailing:w),d.cancel=u,d.flush=c,d}function ks(e){return ci(e,Se)}function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new cc(se);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var a=e.apply(this,o);return n.cache=i.set(r,a)||i,a};return n.cache=new(Ps.Cache||un),n}function Ds(e){if("function"!=typeof e)throw new cc(se);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Fs(e){return As(2,e)}function Ms(e,t){if("function"!=typeof e)throw new cc(se);return t=t===re?t:_l(t),or(e,t)}function Ls(e,t){if("function"!=typeof e)throw new cc(se);return t=null==t?0:zc(_l(t),0),or(function(n){var o=n[t],r=Sr(n,0,t);return o&&m(r,o),s(e,this,r)})}function Is(e,t,n){var o=!0,r=!0;if("function"!=typeof e)throw new cc(se);return rl(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Os(e,t,{leading:o,maxWait:t,trailing:r})}function Ns(e){return Ss(e,1)}function Bs(e,t){return cp(Er(t),e)}function Ws(){if(!arguments.length)return[];var e=arguments[0];return mp(e)?e:[e]}function js(e){return oo(e,he)}function Gs(e,t){return t="function"==typeof t?t:re,oo(e,he,t)}function Hs(e){return oo(e,de|he)}function Vs(e,t){return t="function"==typeof t?t:re,oo(e,de|he,t)}function Us(e,t){return null==t||io(e,t,jl(t))}function zs(e,t){return e===t||e!==e&&t!==t}function $s(e){return null!=e&&ol(e.length)&&!tl(e)}function qs(e){return il(e)&&$s(e)}function Ks(e){return!0===e||!1===e||il(e)&&Co(e)==Ve}function Ys(e){return il(e)&&1===e.nodeType&&!hl(e)}function Xs(e){if(null==e)return!0;if($s(e)&&(mp(e)||"string"==typeof e||"function"==typeof e.splice||yp(e)||Ep(e)||gp(e)))return!e.length;var t=Ad(e);if(t==Ye||t==tt)return!e.size;if(Gi(e))return!Wo(e).length;for(var n in e)if(mc.call(e,n))return!1;return!0}function Qs(e,t){return ko(e,t)}function Zs(e,t,n){n="function"==typeof n?n:re;var o=n?n(e,t):re;return o===re?ko(e,t,re,n):!!o}function Js(e){if(!il(e))return!1;var t=Co(e);return t==$e||t==ze||"string"==typeof e.message&&"string"==typeof e.name&&!hl(e)}function el(e){return"number"==typeof e&&Hc(e)}function tl(e){if(!rl(e))return!1;var t=Co(e);return t==qe||t==Ke||t==He||t==Je}function nl(e){return"number"==typeof e&&e==_l(e)}function ol(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Fe}function rl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function il(e){return null!=e&&"object"==typeof e}function al(e,t){return e===t||Fo(e,t,xi(t))}function sl(e,t,n){return n="function"==typeof n?n:re,Fo(e,t,xi(t),n)}function ll(e){return pl(e)&&e!=+e}function ul(e){if(Rd(e))throw new rc(ae);return Mo(e)}function cl(e){return null===e}function dl(e){return null==e}function pl(e){return"number"==typeof e||il(e)&&Co(e)==Xe}function hl(e){if(!il(e)||Co(e)!=Ze)return!1;var t=Rc(e);if(null===t)return!0;var n=mc.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&gc.call(n)==bc}function fl(e){return nl(e)&&e>=-Fe&&e<=Fe}function gl(e){return"string"==typeof e||!mp(e)&&il(e)&&Co(e)==nt}function ml(e){return"symbol"==typeof e||il(e)&&Co(e)==ot}function vl(e){return e===re}function yl(e){return il(e)&&Ad(e)==it}function Cl(e){return il(e)&&Co(e)==at}function bl(e){if(!e)return[];if($s(e))return gl(e)?ee(e):Br(e);if(Dc&&e[Dc])return z(e[Dc]());var t=Ad(e);return(t==Ye?$:t==tt?Y:Jl)(e)}function wl(e){if(!e)return 0===e?e:0;if((e=xl(e))===De||e===-De){return(e<0?-1:1)*Me}return e===e?e:0}function _l(e){var t=wl(e),n=t%1;return t===t?n?t-n:t:0}function El(e){return e?no(_l(e),0,Ie):0}function xl(e){if("number"==typeof e)return e;if(ml(e))return Le;if(rl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Mt,"");var n=zt.test(e);return n||qt.test(e)?kn(e.slice(2),n?2:8):Ut.test(e)?Le:+e}function Sl(e){return Wr(e,Gl(e))}function Al(e){return e?no(_l(e),-Fe,Fe):0===e?e:0}function Rl(e){return null==e?"":fr(e)}function Tl(e,t){var n=hd(e);return null==t?n:Zn(n,t)}function Ol(e,t){return _(e,_i(t,3),fo)}function kl(e,t){return _(e,_i(t,3),go)}function Pl(e,t){return null==e?e:md(e,_i(t,3),Gl)}function Dl(e,t){return null==e?e:vd(e,_i(t,3),Gl)}function Fl(e,t){return e&&fo(e,_i(t,3))}function Ml(e,t){return e&&go(e,_i(t,3))}function Ll(e){return null==e?[]:mo(e,jl(e))}function Il(e){return null==e?[]:mo(e,Gl(e))}function Nl(e,t,n){var o=null==e?re:vo(e,t);return o===re?n:o}function Bl(e,t){return null!=e&&Oi(e,t,wo)}function Wl(e,t){return null!=e&&Oi(e,t,_o)}function jl(e){return $s(e)?Dn(e):Wo(e)}function Gl(e){return $s(e)?Dn(e,!0):jo(e)}function Hl(e,t){var n={};return t=_i(t,3),fo(e,function(e,o,r){eo(n,t(e,o,r),e)}),n}function Vl(e,t){var n={};return t=_i(t,3),fo(e,function(e,o,r){eo(n,o,t(e,o,r))}),n}function Ul(e,t){return zl(e,Ds(_i(t)))}function zl(e,t){if(null==e)return{};var n=g(Ci(e),function(e){return[e]});return t=_i(t),Xo(e,n,function(e,n){return t(e,n[0])})}function $l(e,t,n){t=xr(t,e);var o=-1,r=t.length;for(r||(r=1,e=re);++o<r;){var i=null==e?re:e[Ji(t[o])];i===re&&(o=r,i=n),e=tl(i)?i.call(e):i}return e}function ql(e,t,n){return null==e?e:ar(e,t,n)}function Kl(e,t,n,o){return o="function"==typeof o?o:re,null==e?e:ar(e,t,n,o)}function Yl(e,t,n){var o=mp(e),r=o||yp(e)||Ep(e);if(t=_i(t,4),null==n){var i=e&&e.constructor;n=r?o?new i:[]:rl(e)&&tl(i)?hd(Rc(e)):{}}return(r?u:fo)(e,function(e,o,r){return t(n,e,o,r)}),n}function Xl(e,t){return null==e||mr(e,t)}function Ql(e,t,n){return null==e?e:vr(e,t,Er(n))}function Zl(e,t,n,o){return o="function"==typeof o?o:re,null==e?e:vr(e,t,Er(n),o)}function Jl(e){return null==e?[]:I(e,jl(e))}function eu(e){return null==e?[]:I(e,Gl(e))}function tu(e,t,n){return n===re&&(n=t,t=re),n!==re&&(n=xl(n),n=n===n?n:0),t!==re&&(t=xl(t),t=t===t?t:0),no(xl(e),t,n)}function nu(e,t,n){return t=wl(t),n===re?(n=t,t=0):n=wl(n),e=xl(e),Eo(e,t,n)}function ou(e,t,n){if(n&&"boolean"!=typeof n&&Ii(e,t,n)&&(t=n=re),n===re&&("boolean"==typeof t?(n=t,t=re):"boolean"==typeof e&&(n=e,e=re)),e===re&&t===re?(e=0,t=1):(e=wl(e),t===re?(t=e,e=0):t=wl(t)),e>t){var o=e;e=t,t=o}if(n||e%1||t%1){var r=Yc();return $c(e+r*(t-e+On("1e-"+((r+"").length-1))),t)}return er(e,t)}function ru(e){return Yp(Rl(e).toLowerCase())}function iu(e){return(e=Rl(e))&&e.replace(Yt,$n).replace(mn,"")}function au(e,t,n){e=Rl(e),t=fr(t);var o=e.length;n=n===re?o:no(_l(n),0,o);var r=n;return(n-=t.length)>=0&&e.slice(n,r)==t}function su(e){return e=Rl(e),e&&xt.test(e)?e.replace(_t,qn):e}function lu(e){return e=Rl(e),e&&Ft.test(e)?e.replace(Dt,"\\$&"):e}function uu(e,t,n){e=Rl(e),t=_l(t);var o=t?J(e):0;if(!t||o>=t)return e;var r=(t-o)/2;return oi(Wc(r),n)+e+oi(Bc(r),n)}function cu(e,t,n){e=Rl(e),t=_l(t);var o=t?J(e):0;return t&&o<t?e+oi(t-o,n):e}function du(e,t,n){e=Rl(e),t=_l(t);var o=t?J(e):0;return t&&o<t?oi(t-o,n)+e:e}function pu(e,t,n){return n||null==t?t=0:t&&(t=+t),Kc(Rl(e).replace(Lt,""),t||0)}function hu(e,t,n){return t=(n?Ii(e,t,n):t===re)?1:_l(t),nr(Rl(e),t)}function fu(){var e=arguments,t=Rl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function gu(e,t,n){return n&&"number"!=typeof n&&Ii(e,t,n)&&(t=n=re),(n=n===re?Ie:n>>>0)?(e=Rl(e),e&&("string"==typeof t||null!=t&&!wp(t))&&!(t=fr(t))&&V(e)?Sr(ee(e),0,n):e.split(t,n)):[]}function mu(e,t,n){return e=Rl(e),n=null==n?0:no(_l(n),0,e.length),t=fr(t),e.slice(n,n+t.length)==t}function vu(e,t,o){var r=n.templateSettings;o&&Ii(e,t,o)&&(t=re),e=Rl(e),t=Tp({},t,r,di);var i,a,s=Tp({},t.imports,r.imports,di),l=jl(s),u=I(s,l),c=0,d=t.interpolate||Xt,p="__p += '",h=lc((t.escape||Xt).source+"|"+d.source+"|"+(d===Rt?Ht:Xt).source+"|"+(t.evaluate||Xt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++_n+"]")+"\n";e.replace(h,function(t,n,o,r,s,l){return o||(o=r),p+=e.slice(c,l).replace(Qt,G),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),o&&(p+="' +\n((__t = ("+o+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),p+="';\n";var g=t.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(yt,""):p).replace(Ct,"$1").replace(bt,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Xp(function(){return ic(l,f+"return "+p).apply(re,u)});if(m.source=p,Js(m))throw m;return m}function yu(e){return Rl(e).toLowerCase()}function Cu(e){return Rl(e).toUpperCase()}function bu(e,t,n){if((e=Rl(e))&&(n||t===re))return e.replace(Mt,"");if(!e||!(t=fr(t)))return e;var o=ee(e),r=ee(t);return Sr(o,B(o,r),W(o,r)+1).join("")}function wu(e,t,n){if((e=Rl(e))&&(n||t===re))return e.replace(It,"");if(!e||!(t=fr(t)))return e;var o=ee(e);return Sr(o,0,W(o,ee(t))+1).join("")}function _u(e,t,n){if((e=Rl(e))&&(n||t===re))return e.replace(Lt,"");if(!e||!(t=fr(t)))return e;var o=ee(e);return Sr(o,B(o,ee(t))).join("")}function Eu(e,t){var n=Ae,o=Re;if(rl(t)){var r="separator"in t?t.separator:r;n="length"in t?_l(t.length):n,o="omission"in t?fr(t.omission):o}e=Rl(e);var i=e.length;if(V(e)){var a=ee(e);i=a.length}if(n>=i)return e;var s=n-J(o);if(s<1)return o;var l=a?Sr(a,0,s).join(""):e.slice(0,s);if(r===re)return l+o;if(a&&(s+=l.length-s),wp(r)){if(e.slice(s).search(r)){var u,c=l;for(r.global||(r=lc(r.source,Rl(Vt.exec(r))+"g")),r.lastIndex=0;u=r.exec(c);)var d=u.index;l=l.slice(0,d===re?s:d)}}else if(e.indexOf(fr(r),s)!=s){var p=l.lastIndexOf(r);p>-1&&(l=l.slice(0,p))}return l+o}function xu(e){return e=Rl(e),e&&Et.test(e)?e.replace(wt,Kn):e}function Su(e,t,n){return e=Rl(e),t=n?re:t,t===re?U(e)?oe(e):w(e):e.match(t)||[]}function Au(e){var t=null==e?0:e.length,n=_i();return e=t?g(e,function(e){if("function"!=typeof e[1])throw new cc(se);return[n(e[0]),e[1]]}):[],or(function(n){for(var o=-1;++o<t;){var r=e[o];if(s(r[0],this,n))return s(r[1],this,n)}})}function Ru(e){return ro(oo(e,de))}function Tu(e){return function(){return e}}function Ou(e,t){return null==e||e!==e?t:e}function ku(e){return e}function Pu(e){return Bo("function"==typeof e?e:oo(e,de))}function Du(e){return Vo(oo(e,de))}function Fu(e,t){return Uo(e,oo(t,de))}function Mu(e,t,n){var o=jl(t),r=mo(t,o);null!=n||rl(t)&&(r.length||!o.length)||(n=t,t=e,e=this,r=mo(t,jl(t)));var i=!(rl(n)&&"chain"in n)||!!n.chain,a=tl(e);return u(r,function(n){var o=t[n];e[n]=o,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Br(this.__actions__)).push({func:o,args:arguments,thisArg:e}),n.__chain__=t,n}return o.apply(e,m([this.value()],arguments))})}),e}function Lu(){return Fn._===this&&(Fn._=wc),this}function Iu(){}function Nu(e){return e=_l(e),or(function(t){return qo(t,e)})}function Bu(e){return Ni(e)?T(Ji(e)):Qo(e)}function Wu(e){return function(t){return null==e?re:vo(e,t)}}function ju(){return[]}function Gu(){return!1}function Hu(){return{}}function Vu(){return""}function Uu(){return!0}function zu(e,t){if((e=_l(e))<1||e>Fe)return[];var n=Ie,o=$c(e,Ie);t=_i(t),e-=Ie;for(var r=F(o,t);++n<e;)t(n);return r}function $u(e){return mp(e)?g(e,Ji):ml(e)?[e]:Br(Pd(Rl(e)))}function qu(e){var t=++vc;return Rl(e)+t}function Ku(e){return e&&e.length?uo(e,ku,bo):re}function Yu(e,t){return e&&e.length?uo(e,_i(t,2),bo):re}function Xu(e){return R(e,ku)}function Qu(e,t){return R(e,_i(t,2))}function Zu(e){return e&&e.length?uo(e,ku,Go):re}function Ju(e,t){return e&&e.length?uo(e,_i(t,2),Go):re}function ec(e){return e&&e.length?D(e,ku):0}function tc(e,t){return e&&e.length?D(e,_i(t,2)):0}t=null==t?Fn:Yn.defaults(Fn.Object(),t,Yn.pick(Fn,wn));var nc=t.Array,oc=t.Date,rc=t.Error,ic=t.Function,ac=t.Math,sc=t.Object,lc=t.RegExp,uc=t.String,cc=t.TypeError,dc=nc.prototype,pc=ic.prototype,hc=sc.prototype,fc=t["__core-js_shared__"],gc=pc.toString,mc=hc.hasOwnProperty,vc=0,yc=function(){var e=/[^.]+$/.exec(fc&&fc.keys&&fc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Cc=hc.toString,bc=gc.call(sc),wc=Fn._,_c=lc("^"+gc.call(mc).replace(Dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ec=In?t.Buffer:re,xc=t.Symbol,Sc=t.Uint8Array,Ac=Ec?Ec.allocUnsafe:re,Rc=q(sc.getPrototypeOf,sc),Tc=sc.create,Oc=hc.propertyIsEnumerable,kc=dc.splice,Pc=xc?xc.isConcatSpreadable:re,Dc=xc?xc.iterator:re,Fc=xc?xc.toStringTag:re,Mc=function(){try{var e=Si(sc,"defineProperty");return e({},"",{}),e}catch(e){}}(),Lc=t.clearTimeout!==Fn.clearTimeout&&t.clearTimeout,Ic=oc&&oc.now!==Fn.Date.now&&oc.now,Nc=t.setTimeout!==Fn.setTimeout&&t.setTimeout,Bc=ac.ceil,Wc=ac.floor,jc=sc.getOwnPropertySymbols,Gc=Ec?Ec.isBuffer:re,Hc=t.isFinite,Vc=dc.join,Uc=q(sc.keys,sc),zc=ac.max,$c=ac.min,qc=oc.now,Kc=t.parseInt,Yc=ac.random,Xc=dc.reverse,Qc=Si(t,"DataView"),Zc=Si(t,"Map"),Jc=Si(t,"Promise"),ed=Si(t,"Set"),td=Si(t,"WeakMap"),nd=Si(sc,"create"),od=td&&new td,rd={},id=ea(Qc),ad=ea(Zc),sd=ea(Jc),ld=ea(ed),ud=ea(td),cd=xc?xc.prototype:re,dd=cd?cd.valueOf:re,pd=cd?cd.toString:re,hd=function(){function e(){}return function(t){if(!rl(t))return{};if(Tc)return Tc(t);e.prototype=t;var n=new e;return e.prototype=re,n}}();n.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:n}},n.prototype=o.prototype,n.prototype.constructor=n,r.prototype=hd(o.prototype),r.prototype.constructor=r,b.prototype=hd(o.prototype),b.prototype.constructor=b,ne.prototype.clear=jt,ne.prototype.delete=Zt,ne.prototype.get=Jt,ne.prototype.has=en,ne.prototype.set=tn,nn.prototype.clear=on,nn.prototype.delete=rn,nn.prototype.get=an,nn.prototype.has=sn,nn.prototype.set=ln,un.prototype.clear=cn,un.prototype.delete=dn,un.prototype.get=pn,un.prototype.has=hn,un.prototype.set=fn,vn.prototype.add=vn.prototype.push=yn,vn.prototype.has=Cn,bn.prototype.clear=Sn,bn.prototype.delete=An,bn.prototype.get=Rn,bn.prototype.has=Tn,bn.prototype.set=Pn;var fd=Ur(fo),gd=Ur(go,!0),md=zr(),vd=zr(!0),yd=od?function(e,t){return od.set(e,t),e}:ku,Cd=Mc?function(e,t){return Mc(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:ku,bd=or,wd=Lc||function(e){return Fn.clearTimeout(e)},_d=ed&&1/Y(new ed([,-0]))[1]==De?function(e){return new ed(e)}:Iu,Ed=od?function(e){return od.get(e)}:Iu,xd=jc?function(e){return null==e?[]:(e=sc(e),p(jc(e),function(t){return Oc.call(e,t)}))}:ju,Sd=jc?function(e){for(var t=[];e;)m(t,xd(e)),e=Rc(e);return t}:ju,Ad=Co;(Qc&&Ad(new Qc(new ArrayBuffer(1)))!=lt||Zc&&Ad(new Zc)!=Ye||Jc&&"[object Promise]"!=Ad(Jc.resolve())||ed&&Ad(new ed)!=tt||td&&Ad(new td)!=it)&&(Ad=function(e){var t=Co(e),n=t==Ze?e.constructor:re,o=n?ea(n):"";if(o)switch(o){case id:return lt;case ad:return Ye;case sd:return"[object Promise]";case ld:return tt;case ud:return it}return t});var Rd=fc?tl:Gu,Td=Qi(yd),Od=Nc||function(e,t){return Fn.setTimeout(e,t)},kd=Qi(Cd),Pd=function(e){var t=Ps(e,function(e){return n.size===ue&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return kt.test(e)&&t.push(""),e.replace(Pt,function(e,n,o,r){t.push(o?r.replace(Gt,"$1"):n||e)}),t}),Dd=or(function(e,t){return qs(e)?so(e,ho(t,1,qs,!0)):[]}),Fd=or(function(e,t){var n=wa(t);return qs(n)&&(n=re),qs(e)?so(e,ho(t,1,qs,!0),_i(n,2)):[]}),Md=or(function(e,t){var n=wa(t);return qs(n)&&(n=re),qs(e)?so(e,ho(t,1,qs,!0),re,n):[]}),Ld=or(function(e){var t=g(e,_r);return t.length&&t[0]===e[0]?xo(t):[]}),Id=or(function(e){var t=wa(e),n=g(e,_r);return t===wa(n)?t=re:n.pop(),n.length&&n[0]===e[0]?xo(n,_i(t,2)):[]}),Nd=or(function(e){var t=wa(e),n=g(e,_r);return t="function"==typeof t?t:re,t&&n.pop(),n.length&&n[0]===e[0]?xo(n,re,t):[]}),Bd=or(xa),Wd=vi(function(e,t){var n=null==e?0:e.length,o=to(e,t);return Jo(e,g(t,function(e){return Li(e,n)?+e:e}).sort(Mr)),o}),jd=or(function(e){return gr(ho(e,1,qs,!0))}),Gd=or(function(e){var t=wa(e);return qs(t)&&(t=re),gr(ho(e,1,qs,!0),_i(t,2))}),Hd=or(function(e){var t=wa(e);return t="function"==typeof t?t:re,gr(ho(e,1,qs,!0),re,t)}),Vd=or(function(e,t){return qs(e)?so(e,t):[]}),Ud=or(function(e){return br(p(e,qs))}),zd=or(function(e){var t=wa(e);return qs(t)&&(t=re),br(p(e,qs),_i(t,2))}),$d=or(function(e){var t=wa(e);return t="function"==typeof t?t:re,br(p(e,qs),re,t)}),qd=or($a),Kd=or(function(e){var t=e.length,n=t>1?e[t-1]:re;return n="function"==typeof n?(e.pop(),n):re,qa(e,n)}),Yd=vi(function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return to(t,e)};return!(t>1||this.__actions__.length)&&o instanceof b&&Li(n)?(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:Za,args:[i],thisArg:re}),new r(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(re),e})):this.thru(i)}),Xd=Hr(function(e,t,n){mc.call(e,n)?++e[n]:eo(e,n,1)}),Qd=Qr(da),Zd=Qr(pa),Jd=Hr(function(e,t,n){mc.call(e,n)?e[n].push(t):eo(e,n,[t])}),ep=or(function(e,t,n){var o=-1,r="function"==typeof t,i=$s(e)?nc(e.length):[];return fd(e,function(e){i[++o]=r?s(t,e,n):Ao(e,t,n)}),i}),tp=Hr(function(e,t,n){eo(e,n,t)}),np=Hr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),op=or(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ii(e,t[0],t[1])?t=[]:n>2&&Ii(t[0],t[1],t[2])&&(t=[t[0]]),Ko(e,ho(t,1),[])}),rp=Ic||function(){return Fn.Date.now()},ip=or(function(e,t,n){var o=me;if(n.length){var r=K(n,wi(ip));o|=we}return ci(e,o,t,n,r)}),ap=or(function(e,t,n){var o=me|ve;if(n.length){var r=K(n,wi(ap));o|=we}return ci(t,o,e,n,r)}),sp=or(function(e,t){return ao(e,1,t)}),lp=or(function(e,t,n){return ao(e,xl(t)||0,n)});Ps.Cache=un;var up=bd(function(e,t){t=1==t.length&&mp(t[0])?g(t[0],L(_i())):g(ho(t,1),L(_i()));var n=t.length;return or(function(o){for(var r=-1,i=$c(o.length,n);++r<i;)o[r]=t[r].call(this,o[r]);return s(e,this,o)})}),cp=or(function(e,t){var n=K(t,wi(cp));return ci(e,we,re,t,n)}),dp=or(function(e,t){var n=K(t,wi(dp));return ci(e,_e,re,t,n)}),pp=vi(function(e,t){return ci(e,xe,re,re,re,t)}),hp=ai(bo),fp=ai(function(e,t){return e>=t}),gp=Ro(function(){return arguments}())?Ro:function(e){return il(e)&&mc.call(e,"callee")&&!Oc.call(e,"callee")},mp=nc.isArray,vp=Wn?L(Wn):To,yp=Gc||Gu,Cp=jn?L(jn):Oo,bp=Gn?L(Gn):Do,wp=Hn?L(Hn):Lo,_p=Vn?L(Vn):Io,Ep=Un?L(Un):No,xp=ai(Go),Sp=ai(function(e,t){return e<=t}),Ap=Vr(function(e,t){if(Gi(t)||$s(t))return void Wr(t,jl(t),e);for(var n in t)mc.call(t,n)&&zn(e,n,t[n])}),Rp=Vr(function(e,t){Wr(t,Gl(t),e)}),Tp=Vr(function(e,t,n,o){Wr(t,Gl(t),e,o)}),Op=Vr(function(e,t,n,o){Wr(t,jl(t),e,o)}),kp=vi(to),Pp=or(function(e){return e.push(re,di),s(Tp,re,e)}),Dp=or(function(e){return e.push(re,pi),s(Np,re,e)}),Fp=ei(function(e,t,n){e[t]=n},Tu(ku)),Mp=ei(function(e,t,n){mc.call(e,t)?e[t].push(n):e[t]=[n]},_i),Lp=or(Ao),Ip=Vr(function(e,t,n){zo(e,t,n)}),Np=Vr(function(e,t,n,o){zo(e,t,n,o)}),Bp=vi(function(e,t){var n={};if(null==e)return n;var o=!1;t=g(t,function(t){return t=xr(t,e),o||(o=t.length>1),t}),Wr(e,Ci(e),n),o&&(n=oo(n,de|pe|he,hi));for(var r=t.length;r--;)mr(n,t[r]);return n}),Wp=vi(function(e,t){return null==e?{}:Yo(e,t)}),jp=ui(jl),Gp=ui(Gl),Hp=Kr(function(e,t,n){return t=t.toLowerCase(),e+(n?ru(t):t)}),Vp=Kr(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Up=Kr(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),zp=qr("toLowerCase"),$p=Kr(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),qp=Kr(function(e,t,n){return e+(n?" ":"")+Yp(t)}),Kp=Kr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Yp=qr("toUpperCase"),Xp=or(function(e,t){try{return s(e,re,t)}catch(e){return Js(e)?e:new rc(e)}}),Qp=vi(function(e,t){return u(t,function(t){t=Ji(t),eo(e,t,ip(e[t],e))}),e}),Zp=Zr(),Jp=Zr(!0),eh=or(function(e,t){return function(n){return Ao(n,e,t)}}),th=or(function(e,t){return function(n){return Ao(e,n,t)}}),nh=ni(g),oh=ni(d),rh=ni(C),ih=ii(),ah=ii(!0),sh=ti(function(e,t){return e+t},0),lh=li("ceil"),uh=ti(function(e,t){return e/t},1),ch=li("floor"),dh=ti(function(e,t){return e*t},1),ph=li("round"),hh=ti(function(e,t){return e-t},0);return n.after=xs,n.ary=Ss,n.assign=Ap,n.assignIn=Rp,n.assignInWith=Tp,n.assignWith=Op,n.at=kp,n.before=As,n.bind=ip,n.bindAll=Qp,n.bindKey=ap,n.castArray=Ws,n.chain=Xa,n.chunk=oa,n.compact=ra,n.concat=ia,n.cond=Au,n.conforms=Ru,n.constant=Tu,n.countBy=Xd,n.create=Tl,n.curry=Rs,n.curryRight=Ts,n.debounce=Os,n.defaults=Pp,n.defaultsDeep=Dp,n.defer=sp,n.delay=lp,n.difference=Dd,n.differenceBy=Fd,n.differenceWith=Md,n.drop=aa,n.dropRight=sa,n.dropRightWhile=la,n.dropWhile=ua,n.fill=ca,n.filter=ss,n.flatMap=ls,n.flatMapDeep=us,n.flatMapDepth=cs,n.flatten=ha,n.flattenDeep=fa,n.flattenDepth=ga,n.flip=ks,n.flow=Zp,n.flowRight=Jp,n.fromPairs=ma,n.functions=Ll,n.functionsIn=Il,n.groupBy=Jd,n.initial=Ca,n.intersection=Ld,n.intersectionBy=Id,n.intersectionWith=Nd,n.invert=Fp,n.invertBy=Mp,n.invokeMap=ep,n.iteratee=Pu,n.keyBy=tp,n.keys=jl,n.keysIn=Gl,n.map=fs,n.mapKeys=Hl,n.mapValues=Vl,n.matches=Du,n.matchesProperty=Fu,n.memoize=Ps,n.merge=Ip,n.mergeWith=Np,n.method=eh,n.methodOf=th,n.mixin=Mu,n.negate=Ds,n.nthArg=Nu,n.omit=Bp,n.omitBy=Ul,n.once=Fs,n.orderBy=gs,n.over=nh,n.overArgs=up,n.overEvery=oh,n.overSome=rh,n.partial=cp,n.partialRight=dp,n.partition=np,n.pick=Wp,n.pickBy=zl,n.property=Bu,n.propertyOf=Wu,n.pull=Bd,n.pullAll=xa,n.pullAllBy=Sa,n.pullAllWith=Aa,n.pullAt=Wd,n.range=ih,n.rangeRight=ah,n.rearg=pp,n.reject=ys,n.remove=Ra,n.rest=Ms,n.reverse=Ta,n.sampleSize=bs,n.set=ql,n.setWith=Kl,n.shuffle=ws,n.slice=Oa,n.sortBy=op,n.sortedUniq=Ia,n.sortedUniqBy=Na,n.split=gu,n.spread=Ls,n.tail=Ba,n.take=Wa,n.takeRight=ja,n.takeRightWhile=Ga,n.takeWhile=Ha,n.tap=Qa,n.throttle=Is,n.thru=Za,n.toArray=bl,n.toPairs=jp,n.toPairsIn=Gp,n.toPath=$u,n.toPlainObject=Sl,n.transform=Yl,n.unary=Ns,n.union=jd,n.unionBy=Gd,n.unionWith=Hd,n.uniq=Va,n.uniqBy=Ua,n.uniqWith=za,n.unset=Xl,n.unzip=$a,n.unzipWith=qa,n.update=Ql,n.updateWith=Zl,n.values=Jl,n.valuesIn=eu,n.without=Vd,n.words=Su,n.wrap=Bs,n.xor=Ud,n.xorBy=zd,n.xorWith=$d,n.zip=qd,n.zipObject=Ka,n.zipObjectDeep=Ya,n.zipWith=Kd,n.entries=jp,n.entriesIn=Gp,n.extend=Rp,n.extendWith=Tp,Mu(n,n),n.add=sh,n.attempt=Xp,n.camelCase=Hp,n.capitalize=ru,n.ceil=lh,n.clamp=tu,n.clone=js,n.cloneDeep=Hs,n.cloneDeepWith=Vs,n.cloneWith=Gs,n.conformsTo=Us,n.deburr=iu,n.defaultTo=Ou,n.divide=uh,n.endsWith=au,n.eq=zs,n.escape=su,n.escapeRegExp=lu,n.every=as,n.find=Qd,n.findIndex=da,n.findKey=Ol,n.findLast=Zd,n.findLastIndex=pa,n.findLastKey=kl,n.floor=ch,n.forEach=ds,n.forEachRight=ps,n.forIn=Pl,n.forInRight=Dl,n.forOwn=Fl,n.forOwnRight=Ml,n.get=Nl,n.gt=hp,n.gte=fp,n.has=Bl,n.hasIn=Wl,n.head=va,n.identity=ku,n.includes=hs,n.indexOf=ya,n.inRange=nu,n.invoke=Lp,n.isArguments=gp,n.isArray=mp,n.isArrayBuffer=vp,n.isArrayLike=$s,n.isArrayLikeObject=qs,n.isBoolean=Ks,n.isBuffer=yp,n.isDate=Cp,n.isElement=Ys,n.isEmpty=Xs,n.isEqual=Qs,n.isEqualWith=Zs,n.isError=Js,n.isFinite=el,n.isFunction=tl,n.isInteger=nl,n.isLength=ol,n.isMap=bp,n.isMatch=al,n.isMatchWith=sl,n.isNaN=ll,n.isNative=ul,n.isNil=dl,n.isNull=cl,n.isNumber=pl,n.isObject=rl,n.isObjectLike=il,n.isPlainObject=hl,n.isRegExp=wp,n.isSafeInteger=fl,n.isSet=_p,n.isString=gl,n.isSymbol=ml,n.isTypedArray=Ep,n.isUndefined=vl,n.isWeakMap=yl,n.isWeakSet=Cl,n.join=ba,n.kebabCase=Vp,n.last=wa,n.lastIndexOf=_a,n.lowerCase=Up,n.lowerFirst=zp,n.lt=xp,n.lte=Sp,n.max=Ku,n.maxBy=Yu,n.mean=Xu,n.meanBy=Qu,n.min=Zu,n.minBy=Ju,n.stubArray=ju,n.stubFalse=Gu,n.stubObject=Hu,n.stubString=Vu,n.stubTrue=Uu,n.multiply=dh,n.nth=Ea,n.noConflict=Lu,n.noop=Iu,n.now=rp,n.pad=uu,n.padEnd=cu,n.padStart=du,n.parseInt=pu,n.random=ou,n.reduce=ms,n.reduceRight=vs,n.repeat=hu,n.replace=fu,n.result=$l,n.round=ph,n.runInContext=e,n.sample=Cs,n.size=_s,n.snakeCase=$p,n.some=Es,n.sortedIndex=ka,n.sortedIndexBy=Pa,n.sortedIndexOf=Da,n.sortedLastIndex=Fa,n.sortedLastIndexBy=Ma,n.sortedLastIndexOf=La,n.startCase=qp,n.startsWith=mu,n.subtract=hh,n.sum=ec,n.sumBy=tc,n.template=vu,n.times=zu,n.toFinite=wl,n.toInteger=_l,n.toLength=El,n.toLower=yu,n.toNumber=xl,n.toSafeInteger=Al,n.toString=Rl,n.toUpper=Cu,n.trim=bu,n.trimEnd=wu,n.trimStart=_u,n.truncate=Eu,n.unescape=xu,n.uniqueId=qu,n.upperCase=Kp,n.upperFirst=Yp,n.each=ds,n.eachRight=ps,n.first=va,Mu(n,function(){var e={};return fo(n,function(t,o){mc.call(n.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),n.VERSION="4.17.4",u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),u(["drop","take"],function(e,t){b.prototype[e]=function(n){n=n===re?1:zc(_l(n),0);var o=this.__filtered__&&!t?new b(this):this.clone();return o.__filtered__?o.__takeCount__=$c(n,o.__takeCount__):o.__views__.push({size:$c(n,Ie),type:e+(o.__dir__<0?"Right":"")}),o},b.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),u(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==ke||3==n;b.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:_i(e,3),type:n}),t.__filtered__=t.__filtered__||o,t}}),u(["head","last"],function(e,t){var n="take"+(t?"Right":"");b.prototype[e]=function(){return this[n](1).value()[0]}}),u(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");b.prototype[e]=function(){return this.__filtered__?new b(this):this[n](1)}}),b.prototype.compact=function(){return this.filter(ku)},b.prototype.find=function(e){return this.filter(e).head()},b.prototype.findLast=function(e){return this.reverse().find(e)},b.prototype.invokeMap=or(function(e,t){return"function"==typeof e?new b(this):this.map(function(n){return Ao(n,e,t)})}),b.prototype.reject=function(e){return this.filter(Ds(_i(e)))},b.prototype.slice=function(e,t){e=_l(e);var n=this;return n.__filtered__&&(e>0||t<0)?new b(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==re&&(t=_l(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},b.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},b.prototype.toArray=function(){return this.take(Ie)},fo(b.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=n[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);a&&(n.prototype[t]=function(){var t=this.__wrapped__,l=i?[1]:arguments,u=t instanceof b,c=l[0],d=u||mp(t),p=function(e){var t=a.apply(n,m([e],l));return i&&h?t[0]:t};d&&o&&"function"==typeof c&&1!=c.length&&(u=d=!1);var h=this.__chain__,f=!!this.__actions__.length,g=s&&!h,v=u&&!f;if(!s&&d){t=v?t:new b(this);var y=e.apply(t,l);return y.__actions__.push({func:Za,args:[p],thisArg:re}),new r(y,h)}return g&&v?e.apply(this,l):(y=this.thru(p),g?i?y.value()[0]:y.value():y)})}),u(["pop","push","shift","sort","splice","unshift"],function(e){var t=dc[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var n=this.value();return t.apply(mp(n)?n:[],e)}return this[o](function(n){return t.apply(mp(n)?n:[],e)})}}),fo(b.prototype,function(e,t){var o=n[t];if(o){var r=o.name+"";(rd[r]||(rd[r]=[])).push({name:t,func:o})}}),rd[Jr(re,ve).name]=[{name:"wrapper",func:re}],b.prototype.clone=O,b.prototype.reverse=Q,b.prototype.value=te,n.prototype.at=Yd,n.prototype.chain=Ja,n.prototype.commit=es,n.prototype.next=ts,n.prototype.plant=os,n.prototype.reverse=rs,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=is,n.prototype.first=n.prototype.head,Dc&&(n.prototype[Dc]=ns),n}();Fn._=Yn,(r=function(){return Yn}.call(t,n,t,o))!==re&&(o.exports=r)}).call(this)}).call(t,n(43),n(71)(e))},function(e,t,n){"use strict";function o(e,t){for(var n=0;n<e.length;n++)for(var o=e[n],i=0;i<o.bindings.length;i++){var a=o.bindings[i];if(r(a,t))return{trappedKeyboardBinding:a,trappedKeyboardBindingGroup:o}}return null}function r(e,t){var n=t.which||t.keyCode;return e.ctlRequired===t.ctrlKey&&e.keyCode===n&&e.altRequired===t.altKey}var i=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},l=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),c=n(6),d=n(13),p=n(61),h=n(272),f=n(33),g=n(2),m=n(14),v=n(17),y=n(184),C=n(22),b=n(53),w=n(182),_=n(185),E=n(93),x=n(116),S=n(48),A=n(905),R=n(117),T=n(275),O=n(186),k=n(94),P=n(21),D=n(187),F=n(188),M='<div class="ag-overlay-panel" role="presentation"><div class="ag-overlay-wrapper ag-overlay-[OVERLAY_NAME]-wrapper">[OVERLAY_TEMPLATE]</div></div>',L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollLeft=-1,t.nextScrollLeft=-1,t.scrollTop=-1,t.nextScrollTop=-1,t.verticalRedrawNeeded=!1,t}return i(t,e),t.prototype.agWire=function(e){this.logger=e.create("GridPanel"),this.forPrint=this.gridOptionsWrapper.isForPrint(),this.autoHeight=this.gridOptionsWrapper.isAutoHeight(),this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth(),this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.loadTemplate(),this.findElements()},t.prototype.getVerticalPixelRange=function(){var e=this.getPrimaryScrollViewport();return{top:e.scrollTop,bottom:e.scrollTop+e.offsetHeight}},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.onRowDataChanged=function(){this.showOrHideOverlay()},t.prototype.showOrHideOverlay=function(){this.paginationProxy.isEmpty()&&!this.gridOptionsWrapper.isSuppressNoRowsOverlay()?this.showNoRowsOverlay():this.hideOverlay()},t.prototype.getLayout=function(){return this.layout},t.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsWrapper.isSuppressAnimationFrame(),this.addEventListeners(),this.addDragListeners(),this.layout=new h.BorderLayout({overlays:{loading:u.Utils.loadTemplate(this.createLoadingOverlayTemplate()),noRows:u.Utils.loadTemplate(this.createNoRowsOverlayTemplate())},center:this.eRoot,dontFill:this.forPrint,fillHorizontalOnly:this.autoHeight,name:"eGridPanel"}),this.layout.addSizeChangeListener(this.setBodyAndHeaderHeights.bind(this)),this.layout.addSizeChangeListener(this.setLeftAndRightBounds.bind(this)),this.addScrollListener(),this.gridOptionsWrapper.isSuppressHorizontalScroll()&&(this.eBodyViewport.style.overflowX="hidden"),this.gridOptionsWrapper.isRowModelDefault()&&!this.gridOptionsWrapper.getRowData()&&this.showLoadingOverlay(),this.setPinnedContainersVisible(),this.setBodyAndHeaderHeights(),this.disableBrowserDragging(),this.addShortcutKeyListeners(),this.addMouseListeners(),this.addKeyboardEvents(),this.addBodyViewportListener(),this.addStopEditingWhenGridLosesFocus(),this.$scope&&this.addAngularApplyCheck(),this.onDisplayedColumnsWidthChanged()},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;this.gridOptionsWrapper.isStopEditingWhenGridLosesFocus()&&this.addDestroyableEventListener(this.eBody,"focusout",function(t){for(var n=t.relatedTarget,o=!1,r=n;u.Utils.exists(r)&&!o;){var i=!!e.gridOptionsWrapper.getDomData(r,T.PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER),a=e.eBody==r;o=i||a,r=r.parentNode}o||e.rowRenderer.stopEditing()})},t.prototype.addAngularApplyCheck=function(){var e=this,t=!1,n=function(){t||(t=!0,setTimeout(function(){t=!1,e.$scope.$apply()},0))};this.addDestroyableEventListener(this.eventService,v.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,n),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,n)},t.prototype.disableBrowserDragging=function(){this.eRoot.addEventListener("dragstart",function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})},t.prototype.addEventListeners=function(){this.addDestroyableEventListener(this.eventService,v.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.setBodyAndHeaderHeights.bind(this)),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_ROW_DATA_CHANGED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,v.Events.EVENT_ROW_DATA_UPDATED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,c.GridOptionsWrapper.PROP_HEADER_HEIGHT,this.setBodyAndHeaderHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,c.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,this.setBodyAndHeaderHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,c.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,this.setBodyAndHeaderHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,c.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.setBodyAndHeaderHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,c.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,this.setBodyAndHeaderHeights.bind(this))},t.prototype.addDragListeners=function(){var e=this;if(!this.forPrint&&this.gridOptionsWrapper.isEnableRangeSelection()&&!u.Utils.missing(this.rangeController)){[this.ePinnedLeftColsContainer,this.ePinnedRightColsContainer,this.eBodyContainer,this.eFloatingTop,this.eFloatingBottom].forEach(function(t){var n={dragStartPixels:0,eElement:t,onDragStart:e.rangeController.onDragStart.bind(e.rangeController),onDragStop:e.rangeController.onDragStop.bind(e.rangeController),onDragging:e.rangeController.onDragging.bind(e.rangeController)};e.dragService.addDragSource(n),e.addDestroyFunc(function(){return e.dragService.removeDragSource(n)})})}},t.prototype.addMouseListeners=function(){var e=this;["click","mousedown","dblclick","contextmenu","mouseover","mouseout"].forEach(function(t){var n=e.processMouseEvent.bind(e,t);e.eAllCellContainers.forEach(function(o){return e.addDestroyableEventListener(o,t,n)})})},t.prototype.addKeyboardEvents=function(){var e=this;["keydown","keypress"].forEach(function(t){var n=e.processKeyboardEvent.bind(e,t);e.eAllCellContainers.forEach(function(o){e.addDestroyableEventListener(o,t,n)})})},t.prototype.addBodyViewportListener=function(){var e=this;if(!this.gridOptionsWrapper.isForPrint()){var t=function(t){var n=u.Utils.getTarget(t);n!==e.eBodyViewport&&n!==e.ePinnedLeftColsViewport&&n!==e.ePinnedRightColsViewport||(e.onContextMenu(t),e.preventDefaultOnContextMenu(t))};this.addDestroyableEventListener(this.eBodyViewport,"contextmenu",t),this.addDestroyableEventListener(this.ePinnedRightColsViewport,"contextmenu",t),this.addDestroyableEventListener(this.ePinnedLeftColsViewport,"contextmenu",t)}},t.prototype.getRowForEvent=function(e){for(var t=u.Utils.getTarget(e);t;){var n=this.gridOptionsWrapper.getDomData(t,F.RowComp.DOM_DATA_KEY_RENDERED_ROW);if(n)return n;t=t.parentElement}return null},t.prototype.processKeyboardEvent=function(e,t){var n=this.mouseEventService.getRenderedCellForEvent(t);if(n)switch(e){case"keydown":var r=[C.Constants.DIAGONAL_SCROLL_KEYS,C.Constants.HORIZONTAL_SCROLL_KEYS,C.Constants.VERTICAL_SCROLL_KEYS],i=o(r,t);i?this.handlePageScrollingKey(i.trappedKeyboardBindingGroup.id,i.trappedKeyboardBinding.id,t):n.onKeyDown(t);break;case"keypress":n.onKeyPress(t)}},t.prototype.handlePageScrollingKey=function(e,t,n){switch(e){case C.Constants.DIAGONAL_SCROLL_KEYS_ID:this.pageDiagonally(t);break;case C.Constants.VERTICAL_SCROLL_KEYS_ID:this.pageVertically(t);break;case C.Constants.HORIZONTAL_SCROLL_KEYS_ID:this.pageHorizontally(t)}n.preventDefault()},t.prototype.pageHorizontally=function(e){var t=this.columnController.getAllDisplayedColumns(),n=e===C.Constants.KEY_CTRL_LEFT_NAME?t[0]:t[t.length-1],o={type:I.HORIZONTAL,columnToScrollTo:n,columnToFocus:n};this.performScroll(o)},t.prototype.pageDiagonally_new=function(e){var t=e===C.Constants.KEY_PAGE_HOME_NAME,n=this.columnController.getAllDisplayedColumns(),o=t?n[0]:n[n.length-1],r=t?0:this.paginationProxy.getPageLastRow();this.ensureColumnVisible(o),this.ensureIndexVisible(r),this.animationFrameService.flushAllFrames(),this.focusedCellController.setFocusedCell(r,o,null,!0)},t.prototype.pageDiagonally=function(e){var t=this.getPrimaryScrollViewport().offsetHeight,n=e===C.Constants.KEY_PAGE_HOME_NAME?0:t,o=e===C.Constants.KEY_PAGE_HOME_NAME?0:this.paginationProxy.getPageLastRow(),r=this.paginationProxy.getRow(o),i=this.columnController.getAllDisplayedColumns(),a=e===C.Constants.KEY_PAGE_HOME_NAME?i[0]:i[i.length-1],s={focusedRowTopDelta:n,type:I.DIAGONAL,rowToScrollTo:r,columnToScrollTo:a};this.performScroll(s)},t.prototype.pageVertically=function(e){if(e===C.Constants.KEY_CTRL_UP_NAME)return void this.performScroll({rowToScrollTo:this.paginationProxy.getRow(0),focusedRowTopDelta:0,type:I.VERTICAL});if(e===C.Constants.KEY_CTRL_DOWN_NAME)return void this.performScroll({rowToScrollTo:this.paginationProxy.getRow(this.paginationProxy.getPageLastRow()),focusedRowTopDelta:this.getPrimaryScrollViewport().offsetHeight,type:I.VERTICAL});var t=this.focusedCellController.getFocusedCell(),n=this.paginationProxy.getRow(t.rowIndex),o=n.rowTop,r=o-this.getPrimaryScrollViewport().scrollTop-this.paginationProxy.getPixelOffset(),i=this.getPrimaryScrollViewport().scrollTop,a=this.paginationProxy.getRowIndexAtPixel(i+this.paginationProxy.getPixelOffset()),s=this.paginationProxy.getRow(a),l=this.getPrimaryScrollViewport().offsetHeight,u=this.paginationProxy.getCurrentPageHeight(),c=u<l?u:l,d=s.rowTop+s.rowHeight,p=e==C.Constants.KEY_PAGE_DOWN_NAME?c+d:d-c,h=this.paginationProxy.getRow(this.paginationProxy.getRowIndexAtPixel(p)),f={rowToScrollTo:h,focusedRowTopDelta:r,type:I.VERTICAL};this.performScroll(f)},t.prototype.scrollToTop=function(){this.forPrint||(this.getPrimaryScrollViewport().scrollTop=0)},t.prototype.performScroll=function(e){var t,n,o,r,i=this.focusedCellController.getFocusedCell();switch(e.type){case I.VERTICAL:t=e,this.ensureIndexVisible(t.rowToScrollTo.rowIndex),r=t.rowToScrollTo.rowTop-this.paginationProxy.getPixelOffset(),this.getPrimaryScrollViewport().scrollTop=r;break;case I.DIAGONAL:n=e,this.ensureIndexVisible(n.rowToScrollTo.rowIndex),r=n.rowToScrollTo.rowTop-this.paginationProxy.getPixelOffset(),this.getPrimaryScrollViewport().scrollTop=r,this.getPrimaryScrollViewport().scrollLeft=n.columnToScrollTo.getLeft();break;case I.HORIZONTAL:o=e,this.getPrimaryScrollViewport().scrollLeft=o.columnToScrollTo.getLeft()}var a={onlyBody:!0,suppressKeepFocus:!0};this.rowRenderer.redrawAfterModelUpdate(a);var s,l;switch(e.type){case I.VERTICAL:s=this.paginationProxy.getRowIndexAtPixel(r+this.paginationProxy.getPixelOffset()+t.focusedRowTopDelta),l=i.column;break;case I.DIAGONAL:s=this.paginationProxy.getRowIndexAtPixel(r+this.paginationProxy.getPixelOffset()+n.focusedRowTopDelta),l=n.columnToScrollTo;break;case I.HORIZONTAL:s=i.rowIndex,l=o.columnToScrollTo}this.focusedCellController.setFocusedCell(s,l,null,!0)},t.prototype.processMouseEvent=function(e,t){var n=this.mouseEventService.getRenderedCellForEvent(t);n&&n.onMouseEvent(e,t);var o=this.getRowForEvent(t);o&&o.onMouseEvent(e,t),this.preventDefaultOnContextMenu(t)},t.prototype.onContextMenu=function(e){(this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e.ctrlKey&&!e.metaKey)&&this.contextMenuFactory&&!this.gridOptionsWrapper.isSuppressContextMenu()&&(this.contextMenuFactory.showMenu(null,null,null,e),e.preventDefault())},t.prototype.preventDefaultOnContextMenu=function(e){this.gridOptionsWrapper.isSuppressMiddleClickScrolls()&&2===e.which&&e.preventDefault()},t.prototype.addShortcutKeyListeners=function(){var e=this;this.eAllCellContainers.forEach(function(t){t.addEventListener("keydown",function(t){var n=e.mouseEventService.getRenderedCellForEvent(t);if((!n||!n.isEditing())&&e.mouseEventService.isEventFromThisGrid(t)&&(t.ctrlKey||t.metaKey))switch(t.which){case C.Constants.KEY_A:return e.onCtrlAndA(t);case C.Constants.KEY_C:return e.onCtrlAndC(t);case C.Constants.KEY_V:return e.onCtrlAndV(t);case C.Constants.KEY_D:return e.onCtrlAndD(t)}})})},t.prototype.onCtrlAndA=function(e){if(this.rangeController&&this.paginationProxy.isRowsToRender()){var t=void 0,n=void 0,o=void 0;n=this.pinnedRowModel.isEmpty(C.Constants.PINNED_TOP)?null:C.Constants.PINNED_TOP,this.pinnedRowModel.isEmpty(C.Constants.PINNED_BOTTOM)?(o=null,t=this.paginationProxy.getTotalRowCount()-1):(o=C.Constants.PINNED_BOTTOM,t=this.pinnedRowModel.getPinnedBottomRowData().length=1);var r=this.columnController.getAllDisplayedColumns();if(u.Utils.missingOrEmpty(r))return;this.rangeController.setRange({rowStart:0,floatingStart:n,rowEnd:t,floatingEnd:o,columnStart:r[0],columnEnd:r[r.length-1]})}return e.preventDefault(),!1},t.prototype.onCtrlAndC=function(e){if(this.clipboardService){var t=this.focusedCellController.getFocusedCell();return this.clipboardService.copyToClipboard(),e.preventDefault(),t&&this.focusedCellController.setFocusedCell(t.rowIndex,t.column,t.floating,!0),!1}},t.prototype.onCtrlAndV=function(e){if(this.rangeController)return this.clipboardService.pasteFromClipboard(),!1},t.prototype.onCtrlAndD=function(e){if(this.clipboardService)return this.clipboardService.copyRangeDown(),e.preventDefault(),!1},t.prototype.createOverlayTemplate=function(e,t,n){var o=M.replace("[OVERLAY_NAME]",e);return o=n?o.replace("[OVERLAY_TEMPLATE]",n):o.replace("[OVERLAY_TEMPLATE]",t)},t.prototype.createLoadingOverlayTemplate=function(){var e=this.gridOptionsWrapper.getOverlayLoadingTemplate(),t=this.createOverlayTemplate("loading",'<span class="ag-overlay-loading-center">[LOADING...]</span>',e),n=this.gridOptionsWrapper.getLocaleTextFunc();return t.replace("[LOADING...]",n("loadingOoo","Loading..."))},t.prototype.createNoRowsOverlayTemplate=function(){var e=this.gridOptionsWrapper.getOverlayNoRowsTemplate(),t=this.createOverlayTemplate("no-rows",'<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',e),n=this.gridOptionsWrapper.getLocaleTextFunc();return t.replace("[NO_ROWS_TO_SHOW]",n("noRowsToShow","No Rows To Show"))},t.prototype.ensureIndexVisible=function(e,t){if(!this.gridOptionsWrapper.isForPrint()){this.logger.log("ensureIndexVisible: "+e);var n=this.paginationProxy.getTotalRowCount();if("number"!==typeof e||e<0||e>=n)return void console.warn("invalid row index for ensureIndexVisible: "+e);this.paginationProxy.goToPageWithIndex(e);var o=this.paginationProxy.getRow(e),r=this.paginationProxy.getPixelOffset(),i=o.rowTop-r,a=i+o.rowHeight,s=this.getVerticalPixelRange(),l=s.top,u=s.bottom;this.isHorizontalScrollShowing()&&(u-=this.scrollWidth);var c,d=a-i,p=u-l,h=p/2+d/2,f=this.getPrimaryScrollViewport();switch(t){case"top":c=i;break;case"bottom":c=a-p;break;case"middle":c=i+h,c=c>i?i:c;break;default:c=i;var g=l>i,m=u<a;if(g)c=i;else if(m){var v=u-l;c=a-v}else c=null}null!==c&&(f.scrollTop=c,this.rowRenderer.redrawAfterScroll())}},t.prototype.getPrimaryScrollViewport=function(){return this.enableRtl&&this.columnController.isPinningLeft()?this.ePinnedLeftColsViewport:!this.enableRtl&&this.columnController.isPinningRight()?this.ePinnedRightColsViewport:this.eBodyViewport},t.prototype.getCenterWidth=function(){return this.eBodyViewport.clientWidth},t.prototype.isHorizontalScrollShowing=function(){return u.Utils.isHorizontalScrollShowing(this.eBodyViewport)},t.prototype.isVerticalScrollShowing=function(){return this.columnController.isPinningRight()?u.Utils.isVerticalScrollShowing(this.ePinnedRightColsViewport):u.Utils.isVerticalScrollShowing(this.eBodyViewport)},t.prototype.isBodyVerticalScrollShowing=function(){return!(!this.enableRtl&&this.columnController.isPinningRight())&&((!this.enableRtl||!this.columnController.isPinningLeft())&&u.Utils.isVerticalScrollShowing(this.eBodyViewport))},t.prototype.periodicallyCheck=function(){this.forPrint||(this.setBottomPaddingOnPinnedRight(),this.setMarginOnFullWidthCellContainer(),this.setScrollShowing())},t.prototype.setScrollShowing=function(){var e={vBody:!1,hBody:!1,vPinnedLeft:!1,vPinnedRight:!1};this.enableRtl?this.columnController.isPinningLeft()?e.vPinnedLeft=!this.forPrint&&u.Utils.isVerticalScrollShowing(this.ePinnedLeftColsViewport):e.vBody=u.Utils.isVerticalScrollShowing(this.eBodyViewport):this.columnController.isPinningRight()?e.vPinnedRight=!this.forPrint&&u.Utils.isVerticalScrollShowing(this.ePinnedRightColsViewport):e.vBody=u.Utils.isVerticalScrollShowing(this.eBodyViewport),e.hBody=u.Utils.isHorizontalScrollShowing(this.eBodyViewport),this.scrollVisibleService.setScrollsVisible(e)},t.prototype.setBottomPaddingOnPinnedRight=function(){if(!this.forPrint&&this.columnController.isPinningRight()){var e=this.eBodyViewport.clientWidth<this.eBodyViewport.scrollWidth;this.ePinnedRightColsContainer.style.marginBottom=e?this.scrollWidth+"px":""}},t.prototype.setMarginOnFullWidthCellContainer=function(){this.forPrint||(this.enableRtl?this.isVerticalScrollShowing()?this.eFullWidthCellViewport.style.borderLeft=this.scrollWidth+"px solid transparent":this.eFullWidthCellViewport.style.borderLeft="":this.isVerticalScrollShowing()?this.eFullWidthCellViewport.style.borderRight=this.scrollWidth+"px solid transparent":this.eFullWidthCellViewport.style.borderRight="",this.isHorizontalScrollShowing()?this.eFullWidthCellViewport.style.borderBottom=this.scrollWidth+"px solid transparent":this.eFullWidthCellViewport.style.borderBottom="")},t.prototype.ensureColumnVisible=function(e){if(!this.gridOptionsWrapper.isForPrint()){var t=this.columnController.getGridColumn(e);if(t){if(t.isPinned())return void console.warn("calling ensureIndexVisible on a "+t.getPinned()+" pinned column doesn't make sense for column "+t.getColId());if(!this.columnController.isColumnDisplayed(t))return void console.warn("column is not currently visible");var n,o,r=t.getLeft(),i=r+t.getActualWidth(),a=this.eBodyViewport.clientWidth,s=this.getBodyViewportScrollLeft(),l=this.columnController.getBodyContainerWidth();this.enableRtl?(n=l-s-a,o=l-s):(n=s,o=a+s);var u=n>r,c=o<i;if(u)if(this.enableRtl){var d=l-a-r;this.setBodyViewportScrollLeft(d)}else this.setBodyViewportScrollLeft(r);else if(c)if(this.enableRtl){var d=l-i;this.setBodyViewportScrollLeft(d)}else{var d=i-a;this.setBodyViewportScrollLeft(d)}this.setLeftAndRightBounds()}}},t.prototype.showLoadingOverlay=function(){this.gridOptionsWrapper.isSuppressLoadingOverlay()||this.layout.showOverlay("loading")},t.prototype.showNoRowsOverlay=function(){this.gridOptionsWrapper.isSuppressNoRowsOverlay()||this.layout.showOverlay("noRows")},t.prototype.hideOverlay=function(){this.layout.hideOverlay()},t.prototype.getWidthForSizeColsToFit=function(){var e=this.eBody.clientWidth;return this.isVerticalScrollShowing()&&(e-=this.scrollWidth),e},t.prototype.sizeColumnsToFit=function(e){var t=this,n=this.getWidthForSizeColsToFit();n>0?this.columnController.sizeColumnsToFit(n):void 0===e?setTimeout(function(){t.sizeColumnsToFit(100)},0):100===e?setTimeout(function(){t.sizeColumnsToFit(-1)},100):console.log("ag-Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.getBodyContainer=function(){return this.eBodyContainer},t.prototype.getDropTargetBodyContainers=function(){return this.forPrint?[this.eBodyContainer,this.eFloatingTopContainer,this.eFloatingBottomContainer]:[this.eBodyViewport,this.eFloatingTopViewport,this.eFloatingBottomViewport]},t.prototype.getBodyViewport=function(){return this.eBodyViewport},t.prototype.getDropTargetLeftContainers=function(){return this.forPrint?[]:[this.ePinnedLeftColsViewport,this.ePinnedLeftFloatingBottom,this.ePinnedLeftFloatingTop]},t.prototype.getDropTargetPinnedRightContainers=function(){return this.forPrint?[]:[this.ePinnedRightColsViewport,this.ePinnedRightFloatingBottom,this.ePinnedRightFloatingTop]},t.prototype.getHeaderContainer=function(){return this.eHeaderContainer},t.prototype.getHeaderOverlay=function(){return this.eHeaderOverlay},t.prototype.getRoot=function(){return this.eRoot},t.prototype.getPinnedLeftHeader=function(){return this.ePinnedLeftHeader},t.prototype.getPinnedRightHeader=function(){return this.ePinnedRightHeader},t.prototype.queryHtmlElement=function(e){return this.eRoot.querySelector(e)},t.prototype.loadTemplate=function(){var e;e=this.forPrint?'<div class="ag-root ag-font-style"><div class="ag-header-container"></div><div class="ag-floating-top-container"></div><div class="ag-body-container"></div><div class="ag-floating-bottom-container"></div></div>':this.autoHeight?'<div class="ag-root ag-font-style" role="grid"><div class="ag-header" role="row"><div class="ag-pinned-left-header" role="presentation"></div><div class="ag-pinned-right-header" role="presentation"></div><div class="ag-header-viewport" role="presentation"><div class="ag-header-container" role="presentation"></div></div><div class="ag-header-overlay" role="presentation"></div></div><div class="ag-floating-top" role="presentation"><div class="ag-pinned-left-floating-top" role="presentation"></div><div class="ag-pinned-right-floating-top" role="presentation"></div><div class="ag-floating-top-viewport" role="presentation"><div class="ag-floating-top-container" role="presentation"></div></div><div class="ag-floating-top-full-width-container" role="presentation"></div></div><div class="ag-body" role="presentation"><div class="ag-pinned-left-cols-viewport" role="presentation"><div class="ag-pinned-left-cols-container" role="presentation"></div></div><div class="ag-pinned-right-cols-viewport" role="presentation"><div class="ag-pinned-right-cols-container" role="presentation"></div></div><div class="ag-body-viewport-wrapper" role="presentation"><div class="ag-body-viewport" role="presentation"><div class="ag-body-container" role="presentation"></div></div></div><div class="ag-full-width-viewport" role="presentation"><div class="ag-full-width-container" role="presentation"></div></div></div><div class="ag-floating-bottom" role="presentation"><div class="ag-pinned-left-floating-bottom" role="presentation"></div><div class="ag-pinned-right-floating-bottom" role="presentation"></div><div class="ag-floating-bottom-viewport" role="presentation"><div class="ag-floating-bottom-container" role="presentation"></div></div><div class="ag-floating-bottom-full-width-container" role="presentation"></div></div></div>':'<div class="ag-root ag-font-style" role="grid"><div class="ag-header" role="row"><div class="ag-pinned-left-header" role="presentation"></div><div class="ag-pinned-right-header" role="presentation"></div><div class="ag-header-viewport" role="presentation"><div class="ag-header-container" role="presentation"></div></div><div class="ag-header-overlay" role="presentation"></div></div><div class="ag-floating-top" role="presentation"><div class="ag-pinned-left-floating-top" role="presentation"></div><div class="ag-pinned-right-floating-top" role="presentation"></div><div class="ag-floating-top-viewport" role="presentation"><div class="ag-floating-top-container" role="presentation"></div></div><div class="ag-floating-top-full-width-container" role="presentation"></div></div><div class="ag-floating-bottom" role="presentation"><div class="ag-pinned-left-floating-bottom" role="presentation"></div><div class="ag-pinned-right-floating-bottom" role="presentation"></div><div class="ag-floating-bottom-viewport" role="presentation"><div class="ag-floating-bottom-container" role="presentation"></div></div><div class="ag-floating-bottom-full-width-container" role="presentation"></div></div><div class="ag-body" role="presentation"><div class="ag-pinned-left-cols-viewport" role="presentation"><div class="ag-pinned-left-cols-container" role="presentation"></div></div><div class="ag-pinned-right-cols-viewport" role="presentation"><div class="ag-pinned-right-cols-container" role="presentation"></div></div><div class="ag-body-viewport-wrapper" role="presentation"><div class="ag-body-viewport" role="presentation"><div class="ag-body-container" role="presentation"></div></div></div><div class="ag-full-width-viewport" role="presentation"><div class="ag-full-width-container" role="presentation"></div></div></div></div>',this.eRoot=u.Utils.loadTemplate(e)},t.prototype.findElements=function(){var e=this;if(this.forPrint){this.eHeaderContainer=this.queryHtmlElement(".ag-header-container"),this.eBodyContainer=this.queryHtmlElement(".ag-body-container"),this.eFloatingTopContainer=this.queryHtmlElement(".ag-floating-top-container"),this.eFloatingBottomContainer=this.queryHtmlElement(".ag-floating-bottom-container"),this.eAllCellContainers=[this.eBodyContainer,this.eFloatingTopContainer,this.eFloatingBottomContainer];var t={body:new A.RowContainerComponent({eContainer:this.eBodyContainer}),fullWidth:null,pinnedLeft:null,pinnedRight:null,floatingTop:new A.RowContainerComponent({eContainer:this.eFloatingTopContainer}),floatingTopPinnedLeft:null,floatingTopPinnedRight:null,floatingTopFullWidth:null,floatingBottom:new A.RowContainerComponent({eContainer:this.eFloatingBottomContainer}),floatingBottomPinnedLeft:null,floatingBottomPinnedRight:null,floatingBottomFullWith:null};this.rowContainerComponents=t,t.fullWidth=t.body,t.floatingBottomFullWith=t.floatingBottom,t.floatingTopFullWidth=t.floatingTop}else this.eBody=this.queryHtmlElement(".ag-body"),this.eBodyContainer=this.queryHtmlElement(".ag-body-container"),this.eBodyViewport=this.queryHtmlElement(".ag-body-viewport"),this.eBodyViewportWrapper=this.queryHtmlElement(".ag-body-viewport-wrapper"),this.eFullWidthCellContainer=this.queryHtmlElement(".ag-full-width-container"),this.eFullWidthCellViewport=this.queryHtmlElement(".ag-full-width-viewport"),this.ePinnedLeftColsContainer=this.queryHtmlElement(".ag-pinned-left-cols-container"),this.ePinnedRightColsContainer=this.queryHtmlElement(".ag-pinned-right-cols-container"),this.ePinnedLeftColsViewport=this.queryHtmlElement(".ag-pinned-left-cols-viewport"),this.ePinnedRightColsViewport=this.queryHtmlElement(".ag-pinned-right-cols-viewport"),this.ePinnedLeftHeader=this.queryHtmlElement(".ag-pinned-left-header"),this.ePinnedRightHeader=this.queryHtmlElement(".ag-pinned-right-header"),this.eHeader=this.queryHtmlElement(".ag-header"),this.eHeaderContainer=this.queryHtmlElement(".ag-header-container"),this.eHeaderOverlay=this.queryHtmlElement(".ag-header-overlay"),this.eHeaderViewport=this.queryHtmlElement(".ag-header-viewport"),this.eFloatingTop=this.queryHtmlElement(".ag-floating-top"),this.ePinnedLeftFloatingTop=this.queryHtmlElement(".ag-pinned-left-floating-top"),this.ePinnedRightFloatingTop=this.queryHtmlElement(".ag-pinned-right-floating-top"),this.eFloatingTopContainer=this.queryHtmlElement(".ag-floating-top-container"),this.eFloatingTopViewport=this.queryHtmlElement(".ag-floating-top-viewport"),this.eFloatingTopFullWidthCellContainer=this.queryHtmlElement(".ag-floating-top-full-width-container"),this.eFloatingBottom=this.queryHtmlElement(".ag-floating-bottom"),this.ePinnedLeftFloatingBottom=this.queryHtmlElement(".ag-pinned-left-floating-bottom"),this.ePinnedRightFloatingBottom=this.queryHtmlElement(".ag-pinned-right-floating-bottom"),this.eFloatingBottomContainer=this.queryHtmlElement(".ag-floating-bottom-container"),this.eFloatingBottomViewport=this.queryHtmlElement(".ag-floating-bottom-viewport"),this.eFloatingBottomFullWidthCellContainer=this.queryHtmlElement(".ag-floating-bottom-full-width-container"),this.eAllCellContainers=[this.ePinnedLeftColsContainer,this.ePinnedRightColsContainer,this.eBodyContainer,this.eFloatingTop,this.eFloatingBottom,this.eFullWidthCellContainer],this.rowContainerComponents={body:new A.RowContainerComponent({eContainer:this.eBodyContainer,eViewport:this.eBodyViewport}),fullWidth:new A.RowContainerComponent({eContainer:this.eFullWidthCellContainer,hideWhenNoChildren:!0,eViewport:this.eFullWidthCellViewport}),pinnedLeft:new A.RowContainerComponent({eContainer:this.ePinnedLeftColsContainer,eViewport:this.ePinnedLeftColsViewport}),pinnedRight:new A.RowContainerComponent({eContainer:this.ePinnedRightColsContainer,eViewport:this.ePinnedRightColsViewport}),floatingTop:new A.RowContainerComponent({eContainer:this.eFloatingTopContainer}),floatingTopPinnedLeft:new A.RowContainerComponent({eContainer:this.ePinnedLeftFloatingTop}),floatingTopPinnedRight:new A.RowContainerComponent({eContainer:this.ePinnedRightFloatingTop}),floatingTopFullWidth:new A.RowContainerComponent({eContainer:this.eFloatingTopFullWidthCellContainer,hideWhenNoChildren:!0}),floatingBottom:new A.RowContainerComponent({eContainer:this.eFloatingBottomContainer}),floatingBottomPinnedLeft:new A.RowContainerComponent({eContainer:this.ePinnedLeftFloatingBottom}),floatingBottomPinnedRight:new A.RowContainerComponent({eContainer:this.ePinnedRightFloatingBottom}),floatingBottomFullWith:new A.RowContainerComponent({eContainer:this.eFloatingBottomFullWidthCellContainer,hideWhenNoChildren:!0})},this.addMouseWheelEventListeners();u.Utils.iterateObject(this.rowContainerComponents,function(t,n){n&&e.context.wireBean(n)})},t.prototype.getRowContainers=function(){return this.rowContainerComponents},t.prototype.addMouseWheelEventListeners=function(){this.addDestroyableEventListener(this.eBodyViewport,"mousewheel",this.centerMouseWheelListener.bind(this)),this.addDestroyableEventListener(this.eBodyViewport,"DOMMouseScroll",this.centerMouseWheelListener.bind(this)),this.enableRtl?(this.addDestroyableEventListener(this.ePinnedRightColsViewport,"mousewheel",this.genericMouseWheelListener.bind(this)),this.addDestroyableEventListener(this.ePinnedRightColsViewport,"DOMMouseScroll",this.genericMouseWheelListener.bind(this))):(this.addDestroyableEventListener(this.ePinnedLeftColsViewport,"mousewheel",this.genericMouseWheelListener.bind(this)),this.addDestroyableEventListener(this.ePinnedLeftColsViewport,"DOMMouseScroll",this.genericMouseWheelListener.bind(this)))},t.prototype.getHeaderViewport=function(){return this.eHeaderViewport},t.prototype.centerMouseWheelListener=function(e){if(!this.isBodyVerticalScrollActive()){var t=this.enableRtl?this.ePinnedLeftColsViewport:this.ePinnedRightColsViewport;return this.generalMouseWheelListener(e,t)}},t.prototype.genericMouseWheelListener=function(e){var t;return t=this.isBodyVerticalScrollActive()?this.eBodyViewport:this.enableRtl?this.ePinnedLeftColsViewport:this.ePinnedRightColsViewport,this.generalMouseWheelListener(e,t)},t.prototype.generalMouseWheelListener=function(e,t){var n=u.Utils.normalizeWheel(e);if(Math.abs(n.pixelX)>Math.abs(n.pixelY)){var o=this.eBodyViewport.scrollLeft+n.pixelX;this.eBodyViewport.scrollLeft=o}else{var r=t.scrollTop+n.pixelY;t.scrollTop=r}return this.gridOptionsWrapper.isSuppressPreventDefaultOnMouseWheel()||e.preventDefault(),!1},t.prototype.onDisplayedColumnsChanged=function(){this.setPinnedContainersVisible(),this.setBodyAndHeaderHeights(),this.setLeftAndRightBounds()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.setWidthsOfContainers(),this.setLeftAndRightBounds(),this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.onScrollVisibilityChanged=function(){this.setWidthsOfContainers()},t.prototype.setWidthsOfContainers=function(){var e=this.columnController.getBodyContainerWidth()+"px";this.eBodyContainer.style.width=e,this.forPrint||(this.eFloatingBottomContainer.style.width=e,this.eFloatingTopContainer.style.width=e,this.setPinnedLeftWidth(),this.setPinnedRightWidth())},t.prototype.setPinnedLeftWidth=function(){var e=this.scrollVisibleService.getPinnedLeftWidth()+"px",t=this.scrollVisibleService.getPinnedLeftWithScrollWidth()+"px";this.ePinnedLeftColsViewport.style.width=t,this.eBodyViewportWrapper.style.marginLeft=t,this.ePinnedLeftFloatingBottom.style.width=t,this.ePinnedLeftFloatingTop.style.width=t,this.ePinnedLeftColsContainer.style.width=e},t.prototype.setPinnedRightWidth=function(){var e=this.scrollVisibleService.getPinnedRightWidth()+"px",t=this.scrollVisibleService.getPinnedRightWithScrollWidth()+"px";this.ePinnedRightColsViewport.style.width=t,this.eBodyViewportWrapper.style.marginRight=t,this.ePinnedRightFloatingBottom.style.width=t,this.ePinnedRightFloatingTop.style.width=t,this.ePinnedRightColsContainer.style.width=e},t.prototype.setPinnedContainersVisible=function(){if(!this.forPrint){var e=!1,t=Math.max(this.eBodyViewport.scrollTop,this.ePinnedLeftColsViewport.scrollTop,this.ePinnedRightColsViewport.scrollTop),n=this.columnController.isPinningLeft();n!==this.pinningLeft&&(this.pinningLeft=n,this.ePinnedLeftHeader.style.display=n?"inline-block":"none",this.ePinnedLeftColsViewport.style.display=n?"inline":"none",e=!0);var o=this.columnController.isPinningRight();if(o!==this.pinningRight&&(this.pinningRight=o,this.ePinnedRightHeader.style.display=o?"inline-block":"none",this.ePinnedRightColsViewport.style.display=o?"inline":"none",e=!0),e){var r=this.isBodyVerticalScrollActive();this.eBodyViewport.style.overflowY=r?"auto":"hidden",r?this.setFakeScroll(this.eBodyContainer,0):this.eBodyViewport.scrollTop=0;this.getPrimaryScrollViewport().scrollTop=t,this.fakeVerticalScroll(t)}}},t.prototype.setBodyAndHeaderHeights=function(){if(!this.forPrint){var e=this.layout.getCentreHeight();if(e){var t,n,o,r=this.columnController.getHeaderRowCount(),i=0;this.columnController.isPivotMode()?(u.Utils.removeCssClass(this.eHeader,"ag-pivot-off"),u.Utils.addCssClass(this.eHeader,"ag-pivot-on"),i=0,n=this.gridOptionsWrapper.getPivotGroupHeaderHeight(),o=this.gridOptionsWrapper.getPivotHeaderHeight()):(u.Utils.removeCssClass(this.eHeader,"ag-pivot-on"),u.Utils.addCssClass(this.eHeader,"ag-pivot-off"),this.gridOptionsWrapper.isFloatingFilter()&&r++,i=this.gridOptionsWrapper.isFloatingFilter()?1:0,n=this.gridOptionsWrapper.getGroupHeaderHeight(),o=this.gridOptionsWrapper.getHeaderHeight());var a=1+i,s=r-a;if(t=i*this.gridOptionsWrapper.getFloatingFiltersHeight(),t+=s*n,t+=o,this.eHeader.style.height=t+"px",!this.autoHeight){var l=this.pinnedRowModel.getPinnedTopTotalHeight(),c=t+l,d=this.pinnedRowModel.getPinnedBottomTotalHeight(),p=e-d,h=e-t-d-l;if(this.eBody.style.top=c+"px",this.eBody.style.height=h+"px",this.eFloatingTop.style.top=t+"px",this.eFloatingTop.style.height=l+"px",this.eFloatingBottom.style.height=d+"px",this.eFloatingBottom.style.top=p+"px",this.ePinnedLeftColsViewport.style.height=h+"px",this.ePinnedRightColsViewport.style.height=h+"px",this.bodyHeight!==h){this.bodyHeight=h;var f={type:v.Events.EVENT_BODY_HEIGHT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(f)}}}}},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.setHorizontalScrollPosition=function(e){this.eBodyViewport.scrollLeft=e,this.nextScrollLeft!==e&&(this.nextScrollLeft=e,this.doHorizontalScroll())},t.prototype.scrollHorizontally=function(e){var t=this.eBodyViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.eBodyViewport.scrollLeft-t},t.prototype.addScrollListener=function(){var e=this;if(!this.forPrint){this.addDestroyableEventListener(this.eBodyViewport,"scroll",this.onBodyScroll.bind(this));var t=this.onVerticalScroll.bind(this,this.ePinnedLeftColsViewport),n=this.onVerticalScroll.bind(this,this.ePinnedRightColsViewport);if(this.enableRtl){this.addDestroyableEventListener(this.ePinnedLeftColsViewport,"scroll",t);var o=function(){return e.ePinnedRightColsViewport.scrollTop=0};this.addDestroyableEventListener(this.ePinnedRightColsViewport,"scroll",o)}else{this.addDestroyableEventListener(this.ePinnedRightColsViewport,"scroll",n);var r=function(){return e.ePinnedLeftColsViewport.scrollTop=0};this.addDestroyableEventListener(this.ePinnedLeftColsViewport,"scroll",r)}var i=function(){e.getPrimaryScrollViewport()!==e.eBodyViewport&&(e.eBodyViewport.scrollTop=0)};this.addDestroyableEventListener(this.eBodyViewport,"scroll",i),this.addIEPinFix(n,t)}},t.prototype.onBodyScroll=function(){this.onBodyHorizontalScroll(),this.onBodyVerticalScroll()},t.prototype.onBodyHorizontalScroll=function(){var e=this.eBodyViewport.scrollLeft;this.nextScrollLeft!==e&&(this.nextScrollLeft=e,this.useAnimationFrame?this.animationFrameService.schedule():this.doHorizontalScroll())},t.prototype.doHorizontalScroll=function(){this.scrollLeft=this.nextScrollLeft;var e={type:v.Events.EVENT_BODY_SCROLL,api:this.gridApi,columnApi:this.columnApi,direction:"horizontal",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(e),this.horizontallyScrollHeaderCenterAndFloatingCenter(),this.setLeftAndRightBounds()},t.prototype.onBodyVerticalScroll=function(){this.isBodyVerticalScrollActive()&&this.onVerticalScroll(this.eBodyViewport)},t.prototype.onVerticalScroll=function(e){var t=e.scrollTop;this.useAnimationFrame?this.nextScrollTop!==t&&(this.nextScrollTop=t,this.animationFrameService.schedule()):t!==this.scrollTop&&(this.scrollTop=t,this.fakeVerticalScroll(t),this.redrawRowsAfterScroll())},t.prototype.executeFrame=function(){return this.scrollLeft!==this.nextScrollLeft?(this.doHorizontalScroll(),!0):this.scrollTop!==this.nextScrollTop?(this.scrollTop=this.nextScrollTop,this.fakeVerticalScroll(this.scrollTop),this.verticalRedrawNeeded=!0,!0):!!this.verticalRedrawNeeded&&(this.redrawRowsAfterScroll(),this.verticalRedrawNeeded=!1,!0)},t.prototype.redrawRowsAfterScroll=function(){var e={type:v.Events.EVENT_BODY_SCROLL,direction:"vertical",api:this.gridApi,columnApi:this.columnApi,left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(e),this.rowRenderer.redrawAfterScroll()},t.prototype.isBodyVerticalScrollActive=function(){var e=this.columnController.isPinningRight(),t=this.columnController.isPinningLeft();return this.enableRtl?!t:!e},t.prototype.addIEPinFix=function(e,t){var n=this,o=function(){n.columnController.isPinningRight()&&setTimeout(function(){n.enableRtl?t():e()},0)};this.addDestroyableEventListener(this.eventService,v.Events.EVENT_MODEL_UPDATED,o)},t.prototype.setLeftAndRightBounds=function(){if(!this.gridOptionsWrapper.isForPrint()){var e=this.eBodyViewport.clientWidth,t=this.getBodyViewportScrollLeft();this.columnController.setVirtualViewportPosition(e,t)}},t.prototype.getBodyViewportScrollLeft=function(){return this.forPrint?0:u.Utils.getScrollLeft(this.eBodyViewport,this.enableRtl)},t.prototype.setBodyViewportScrollLeft=function(e){this.forPrint||u.Utils.setScrollLeft(this.eBodyViewport,e,this.enableRtl)},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(){var e=this.getBodyViewportScrollLeft(),t=this.enableRtl?e:-e;this.eHeaderContainer.style.left=t+"px",this.eFloatingBottomContainer.style.left=t+"px",this.eFloatingTopContainer.style.left=t+"px"},t.prototype.fakeVerticalScroll=function(e){if(this.enableRtl){this.columnController.isPinningLeft()&&this.setFakeScroll(this.eBodyContainer,e),this.setFakeScroll(this.ePinnedRightColsContainer,e)}else{this.columnController.isPinningRight()&&this.setFakeScroll(this.eBodyContainer,e),this.setFakeScroll(this.ePinnedLeftColsContainer,e)}this.setFakeScroll(this.eFullWidthCellContainer,e)},t.prototype.setFakeScroll=function(e,t){e.style.top=-t+"px"},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e)},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},a([g.Autowired("alignedGridsService"),s("design:type",O.AlignedGridsService)],t.prototype,"alignedGridsService",void 0),a([g.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),a([g.Autowired("columnController"),s("design:type",d.ColumnController)],t.prototype,"columnController",void 0),a([g.Autowired("rowRenderer"),s("design:type",p.RowRenderer)],t.prototype,"rowRenderer",void 0),a([g.Autowired("pinnedRowModel"),s("design:type",k.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),a([g.Autowired("eventService"),s("design:type",m.EventService)],t.prototype,"eventService",void 0),a([g.Autowired("context"),s("design:type",g.Context)],t.prototype,"context",void 0),a([g.Autowired("animationFrameService"),s("design:type",D.AnimationFrameService)],t.prototype,"animationFrameService",void 0),a([g.Autowired("paginationProxy"),s("design:type",R.PaginationProxy)],t.prototype,"paginationProxy",void 0),a([g.Autowired("columnApi"),s("design:type",d.ColumnApi)],t.prototype,"columnApi",void 0),a([g.Autowired("gridApi"),s("design:type",P.GridApi)],t.prototype,"gridApi",void 0),a([g.Optional("rangeController"),s("design:type",Object)],t.prototype,"rangeController",void 0),a([g.Autowired("dragService"),s("design:type",y.DragService)],t.prototype,"dragService",void 0),a([g.Autowired("selectionController"),s("design:type",b.SelectionController)],t.prototype,"selectionController",void 0),a([g.Optional("clipboardService"),s("design:type",Object)],t.prototype,"clipboardService",void 0),a([g.Autowired("csvCreator"),s("design:type",w.CsvCreator)],t.prototype,"csvCreator",void 0),a([g.Autowired("mouseEventService"),s("design:type",_.MouseEventService)],t.prototype,"mouseEventService",void 0),a([g.Autowired("focusedCellController"),s("design:type",E.FocusedCellController)],t.prototype,"focusedCellController",void 0),a([g.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),a([g.Autowired("scrollVisibleService"),s("design:type",x.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),a([g.Optional("contextMenuFactory"),s("design:type",Object)],t.prototype,"contextMenuFactory",void 0),a([g.Autowired("frameworkFactory"),s("design:type",Object)],t.prototype,"frameworkFactory",void 0),a([l(0,g.Qualifier("loggerFactory")),s("design:type",Function),s("design:paramtypes",[f.LoggerFactory]),s("design:returntype",void 0)],t.prototype,"agWire",null),a([g.PreDestroy,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"destroy",null),a([g.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t=a([g.Bean("gridPanel")],t)}(S.BeanStub);t.GridPanel=L;var I;!function(e){e[e.HORIZONTAL=0]="HORIZONTAL",e[e.VERTICAL=1]="VERTICAL",e[e.DIAGONAL=2]="DIAGONAL"}(I||(I={}))},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),r={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=r},function(e,t,n){"use strict";function o(e){return e.replace(x,"-$1").toLowerCase()}function r(e){return A(e).replace(R,"-ms-")}function i(e){return"string"===typeof e}function a(e){return"function"===typeof e&&"string"===typeof e.styledComponentId}function s(e){return e.displayName||e.name||"Component"}function l(e,t){for(var n=1540483477,o=t^e.length,r=e.length,i=0;r>=4;){var a=u(e,i);a=d(a,n),a^=a>>>24,a=d(a,n),o=d(o,n),o^=a,i+=4,r-=4}switch(r){case 3:o^=c(e,i),o^=e.charCodeAt(i+2)<<16,o=d(o,n);break;case 2:o^=c(e,i),o=d(o,n);break;case 1:o^=e.charCodeAt(i),o=d(o,n)}return o^=o>>>13,o=d(o,n),(o^=o>>>15)>>>0}function u(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)+(e.charCodeAt(t++)<<16)+(e.charCodeAt(t)<<24)}function c(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)}function d(e,t){return e|=0,t|=0,(65535&e)*t+(((e>>>16)*t&65535)<<16)|0}var p,h=n(660),f=n.n(h),g=n(662),m=n.n(g),v=n(1),y=n.n(v),C=n(0),b=n.n(C),w=n(663),_=n.n(w),E=n(664),x=(n.n(E),/([A-Z])/g),S=o,A=S,R=/^ms-/,T=r,O=function e(t,n){var o=Object.keys(t).filter(function(e){var n=t[e];return void 0!==n&&null!==n&&!1!==n&&""!==n}).map(function(n){return f()(t[n])?e(t[n],n):T(n)+": "+t[n]+";"}).join(" ");return n?n+" {\n "+o+"\n}":o},k=function e(t,n){return t.reduce(function(t,o){return void 0===o||null===o||!1===o||""===o?t:Array.isArray(o)?[].concat(t,e(o,n)):o.hasOwnProperty("styledComponentId")?[].concat(t,["."+o.styledComponentId]):"function"===typeof o?n?t.concat.apply(t,e([o(n)],n)):t.concat(o):t.concat(f()(o)?O(o):o.toString())},[])},P=new m.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!0}),D=function(e,t,n){var o=e.join("").replace(/^\s*\/\/.*$/gm,""),r=t&&n?n+" "+t+" { "+o+" }":o;return P(n||!t?"":t,r)},F="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),M=F.length,L=function(e){var t="",n=void 0;for(n=e;n>M;n=Math.floor(n/M))t=F[n%M]+t;return F[n%M]+t},I=function(e,t){return t.reduce(function(t,n,o){return t.concat(n,e[o+1])},[e[0]])},N=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return k(I(e,n))},B=/^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//gm,W=function(e){var t=""+(e||""),n=[];return t.replace(B,function(e,t,o){return n.push({componentId:t,matchIndex:o}),e}),n.map(function(e,o){var r=e.componentId,i=e.matchIndex,a=n[o+1];return{componentId:r,cssFromDOM:a?t.slice(i,a.matchIndex):t.slice(i)}})},j=function(){return n.nc},G=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},H=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},U=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},z=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},$=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},q=function(){function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";G(this,e),this.el=t,this.isLocal=n,this.ready=!1;var r=W(o);this.size=r.length,this.components=r.reduce(function(e,t){return e[t.componentId]=t,e},{})}return e.prototype.isFull=function(){return this.size>=40},e.prototype.addComponent=function(e){if(this.ready||this.replaceElement(),this.components[e])throw new Error("Trying to add Component '"+e+"' twice!");var t={componentId:e,textNode:document.createTextNode("")};this.el.appendChild(t.textNode),this.size+=1,this.components[e]=t},e.prototype.inject=function(e,t,n){this.ready||this.replaceElement();var o=this.components[e];if(!o)throw new Error("Must add a new component before you can inject css into it");if(""===o.textNode.data&&o.textNode.appendData("\n/* sc-component-id: "+e+" */\n"),o.textNode.appendData(t),n){var r=this.el.getAttribute(Y);this.el.setAttribute(Y,r?r+" "+n:n)}var i=j();i&&this.el.setAttribute("nonce",i)},e.prototype.toHTML=function(){return this.el.outerHTML},e.prototype.toReactElement=function(){throw new Error("BrowserTag doesn't implement toReactElement!")},e.prototype.clone=function(){throw new Error("BrowserTag cannot be cloned!")},e.prototype.replaceElement=function(){var e=this;if(this.ready=!0,0!==this.size){var t=this.el.cloneNode();if(t.appendChild(document.createTextNode("\n")),Object.keys(this.components).forEach(function(n){var o=e.components[n];o.textNode=document.createTextNode(o.cssFromDOM),t.appendChild(o.textNode)}),!this.el.parentNode)throw new Error("Trying to replace an element that wasn't mounted!");this.el.parentNode.replaceChild(t,this.el),this.el=t}},e}(),K={create:function(){for(var e=[],t={},n=document.querySelectorAll("["+Y+"]"),o=n.length,r=0;r<o;r+=1){var i=n[r];e.push(new q(i,"true"===i.getAttribute(X),i.innerHTML));var a=i.getAttribute(Y);a&&a.trim().split(/\s+/).forEach(function(e){t[e]=!0})}return new ee(function(e){var t=document.createElement("style");if(t.type="text/css",t.setAttribute(Y,""),t.setAttribute(X,e?"true":"false"),!document.head)throw new Error("Missing document <head>");return document.head.appendChild(t),new q(t,e)},e,t)}},Y="data-styled-components",X="data-styled-components-is-local",Q="__styled-components-stylesheet__",Z=null,J=[],ee=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};G(this,e),this.hashes={},this.deferredInjections={},this.stylesCacheable="undefined"!==typeof document,this.tagConstructor=t,this.tags=n,this.names=o,this.constructComponentTagMap()}return e.prototype.constructComponentTagMap=function(){var e=this;this.componentTags={},this.tags.forEach(function(t){Object.keys(t.components).forEach(function(n){e.componentTags[n]=t})})},e.prototype.getName=function(e){return this.hashes[e.toString()]},e.prototype.alreadyInjected=function(e,t){return!!this.names[t]&&(this.hashes[e.toString()]=t,!0)},e.prototype.hasInjectedComponent=function(e){return!!this.componentTags[e]},e.prototype.deferredInject=function(e,t,n){this===Z&&J.forEach(function(o){o.deferredInject(e,t,n)}),this.getOrCreateTag(e,t),this.deferredInjections[e]=n},e.prototype.inject=function(e,t,n,o,r){this===Z&&J.forEach(function(o){o.inject(e,t,n)});var i=this.getOrCreateTag(e,t),a=this.deferredInjections[e];a&&(i.inject(e,a),delete this.deferredInjections[e]),i.inject(e,n,r),o&&r&&(this.hashes[o.toString()]=r)},e.prototype.toHTML=function(){return this.tags.map(function(e){return e.toHTML()}).join("")},e.prototype.toReactElements=function(){return this.tags.map(function(e,t){return e.toReactElement("sc-"+t)})},e.prototype.getOrCreateTag=function(e,t){var n=this.componentTags[e];if(n)return n;var o=this.tags[this.tags.length-1],r=!o||o.isFull()||o.isLocal!==t?this.createNewTag(t):o;return this.componentTags[e]=r,r.addComponent(e),r},e.prototype.createNewTag=function(e){var t=this.tagConstructor(e);return this.tags.push(t),t},e.reset=function(t){Z=e.create(t)},e.create=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"===typeof document)?ie:K).create()},e.clone=function(t){var n=new e(t.tagConstructor,t.tags.map(function(e){return e.clone()}),V({},t.names));return n.hashes=V({},t.hashes),n.deferredInjections=V({},t.deferredInjections),J.push(n),n},H(e,null,[{key:"instance",get:function(){return Z||(Z=e.create())}}]),e}(),te=function(e){function t(){return G(this,t),$(this,e.apply(this,arguments))}return U(t,e),t.prototype.getChildContext=function(){var e;return e={},e[Q]=this.props.sheet,e},t.prototype.render=function(){return y.a.Children.only(this.props.children)},t}(v.Component);te.childContextTypes=(p={},p[Q]=b.a.oneOfType([b.a.instanceOf(ee),b.a.instanceOf(ie)]).isRequired,p),te.propTypes={sheet:b.a.oneOfType([b.a.instanceOf(ee),b.a.instanceOf(ie)]).isRequired};var ne,oe,re=function(){function e(t){G(this,e),this.isLocal=t,this.components={},this.size=0,this.names=[]}return e.prototype.isFull=function(){return!1},e.prototype.addComponent=function(e){if(this.components[e])throw new Error("Trying to add Component '"+e+"' twice!");this.components[e]={componentId:e,css:""},this.size+=1},e.prototype.concatenateCSS=function(){var e=this;return Object.keys(this.components).reduce(function(t,n){return t+e.components[n].css},"")},e.prototype.inject=function(e,t,n){var o=this.components[e];if(!o)throw new Error("Must add a new component before you can inject css into it");""===o.css&&(o.css="/* sc-component-id: "+e+" */\n"),o.css+=t.replace(/\n*$/,"\n"),n&&this.names.push(n)},e.prototype.toHTML=function(){var e=['type="text/css"',Y+'="'+this.names.join(" ")+'"',X+'="'+(this.isLocal?"true":"false")+'"'],t=j();return t&&e.push('nonce="'+t+'"'),"<style "+e.join(" ")+">"+this.concatenateCSS()+"</style>"},e.prototype.toReactElement=function(e){var t,n=(t={},t[Y]=this.names.join(" "),t[X]=this.isLocal.toString(),t),o=j();return o&&(n.nonce=o),y.a.createElement("style",V({key:e,type:"text/css"},n,{dangerouslySetInnerHTML:{__html:this.concatenateCSS()}}))},e.prototype.clone=function(){var t=this,n=new e(this.isLocal);return n.names=[].concat(this.names),n.size=this.size,n.components=Object.keys(this.components).reduce(function(e,n){return e[n]=V({},t.components[n]),e},{}),n},e}(),ie=function(){function e(){G(this,e),this.instance=ee.clone(ee.instance)}return e.prototype.collectStyles=function(e){if(this.closed)throw new Error("Can't collect styles once you've called getStyleTags!");return y.a.createElement(te,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.closed||(J.splice(J.indexOf(this.instance),1),this.closed=!0),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.closed||(J.splice(J.indexOf(this.instance),1),this.closed=!0),this.instance.toReactElements()},e.create=function(){return new ee(function(e){return new re(e)})},e}(),ae={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,valueLink:!0,defaultChecked:!0,checkedLink:!0,innerHTML:!0,suppressContentEditableWarning:!0,onFocusIn:!0,onFocusOut:!0,className:!0,onCopy:!0,onCut:!0,onPaste:!0,onCompositionEnd:!0,onCompositionStart:!0,onCompositionUpdate:!0,onKeyDown:!0,onKeyPress:!0,onKeyUp:!0,onFocus:!0,onBlur:!0,onChange:!0,onInput:!0,onSubmit:!0,onReset:!0,onClick:!0,onContextMenu:!0,onDoubleClick:!0,onDrag:!0,onDragEnd:!0,onDragEnter:!0,onDragExit:!0,onDragLeave:!0,onDragOver:!0,onDragStart:!0,onDrop:!0,onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOut:!0,onMouseOver:!0,onMouseUp:!0,onSelect:!0,onTouchCancel:!0,onTouchEnd:!0,onTouchMove:!0,onTouchStart:!0,onScroll:!0,onWheel:!0,onAbort:!0,onCanPlay:!0,onCanPlayThrough:!0,onDurationChange:!0,onEmptied:!0,onEncrypted:!0,onEnded:!0,onError:!0,onLoadedData:!0,onLoadedMetadata:!0,onLoadStart:!0,onPause:!0,onPlay:!0,onPlaying:!0,onProgress:!0,onRateChange:!0,onSeeked:!0,onSeeking:!0,onStalled:!0,onSuspend:!0,onTimeUpdate:!0,onVolumeChange:!0,onWaiting:!0,onLoad:!0,onAnimationStart:!0,onAnimationEnd:!0,onAnimationIteration:!0,onTransitionEnd:!0,onCopyCapture:!0,onCutCapture:!0,onPasteCapture:!0,onCompositionEndCapture:!0,onCompositionStartCapture:!0,onCompositionUpdateCapture:!0,onKeyDownCapture:!0,onKeyPressCapture:!0,onKeyUpCapture:!0,onFocusCapture:!0,onBlurCapture:!0,onChangeCapture:!0,onInputCapture:!0,onSubmitCapture:!0,onResetCapture:!0,onClickCapture:!0,onContextMenuCapture:!0,onDoubleClickCapture:!0,onDragCapture:!0,onDragEndCapture:!0,onDragEnterCapture:!0,onDragExitCapture:!0,onDragLeaveCapture:!0,onDragOverCapture:!0,onDragStartCapture:!0,onDropCapture:!0,onMouseDownCapture:!0,onMouseEnterCapture:!0,onMouseLeaveCapture:!0,onMouseMoveCapture:!0,onMouseOutCapture:!0,onMouseOverCapture:!0,onMouseUpCapture:!0,onSelectCapture:!0,onTouchCancelCapture:!0,onTouchEndCapture:!0,onTouchMoveCapture:!0,onTouchStartCapture:!0,onScrollCapture:!0,onWheelCapture:!0,onAbortCapture:!0,onCanPlayCapture:!0,onCanPlayThroughCapture:!0,onDurationChangeCapture:!0,onEmptiedCapture:!0,onEncryptedCapture:!0,onEndedCapture:!0,onErrorCapture:!0,onLoadedDataCapture:!0,onLoadedMetadataCapture:!0,onLoadStartCapture:!0,onPauseCapture:!0,onPlayCapture:!0,onPlayingCapture:!0,onProgressCapture:!0,onRateChangeCapture:!0,onSeekedCapture:!0,onSeekingCapture:!0,onStalledCapture:!0,onSuspendCapture:!0,onTimeUpdateCapture:!0,onVolumeChangeCapture:!0,onWaitingCapture:!0,onLoadCapture:!0,onAnimationStartCapture:!0,onAnimationEndCapture:!0,onAnimationIterationCapture:!0,onTransitionEndCapture:!0},se={accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allowFullScreen:!0,allowTransparency:!0,alt:!0,as:!0,async:!0,autoComplete:!0,autoPlay:!0,capture:!0,cellPadding:!0,cellSpacing:!0,charSet:!0,challenge:!0,checked:!0,cite:!0,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:!0,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,default:!0,defer:!0,dir:!0,disabled:!0,download:!0,draggable:!0,encType:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:!0,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:!0,high:!0,href:!0,hrefLang:!0,htmlFor:!0,httpEquiv:!0,icon:!0,id:!0,inputMode:!0,integrity:!0,is:!0,keyParams:!0,keyType:!0,kind:!0,label:!0,lang:!0,list:!0,loop:!0,low:!0,manifest:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,minLength:!0,multiple:!0,muted:!0,name:!0,nonce:!0,noValidate:!0,open:!0,optimum:!0,pattern:!0,placeholder:!0,playsInline:!0,poster:!0,preload:!0,profile:!0,radioGroup:!0,readOnly:!0,referrerPolicy:!0,rel:!0,required:!0,reversed:!0,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scoped:!0,scrolling:!0,seamless:!0,selected:!0,shape:!0,size:!0,sizes:!0,span:!0,spellCheck:!0,src:!0,srcDoc:!0,srcLang:!0,srcSet:!0,start:!0,step:!0,style:!0,summary:!0,tabIndex:!0,target:!0,title:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,wrap:!0,about:!0,datatype:!0,inlist:!0,prefix:!0,property:!0,resource:!0,typeof:!0,vocab:!0,autoCapitalize:!0,autoCorrect:!0,autoSave:!0,color:!0,itemProp:!0,itemScope:!0,itemType:!0,itemID:!0,itemRef:!0,results:!0,security:!0,unselectable:0},le={accentHeight:!0,accumulate:!0,additive:!0,alignmentBaseline:!0,allowReorder:!0,alphabetic:!0,amplitude:!0,arabicForm:!0,ascent:!0,attributeName:!0,attributeType:!0,autoReverse:!0,azimuth:!0,baseFrequency:!0,baseProfile:!0,baselineShift:!0,bbox:!0,begin:!0,bias:!0,by:!0,calcMode:!0,capHeight:!0,clip:!0,clipPath:!0,clipRule:!0,clipPathUnits:!0,colorInterpolation:!0,colorInterpolationFilters:!0,colorProfile:!0,colorRendering:!0,contentScriptType:!0,contentStyleType:!0,cursor:!0,cx:!0,cy:!0,d:!0,decelerate:!0,descent:!0,diffuseConstant:!0,direction:!0,display:!0,divisor:!0,dominantBaseline:!0,dur:!0,dx:!0,dy:!0,edgeMode:!0,elevation:!0,enableBackground:!0,end:!0,exponent:!0,externalResourcesRequired:!0,fill:!0,fillOpacity:!0,fillRule:!0,filter:!0,filterRes:!0,filterUnits:!0,floodColor:!0,floodOpacity:!0,focusable:!0,fontFamily:!0,fontSize:!0,fontSizeAdjust:!0,fontStretch:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,format:!0,from:!0,fx:!0,fy:!0,g1:!0,g2:!0,glyphName:!0,glyphOrientationHorizontal:!0,glyphOrientationVertical:!0,glyphRef:!0,gradientTransform:!0,gradientUnits:!0,hanging:!0,horizAdvX:!0,horizOriginX:!0,ideographic:!0,imageRendering:!0,in:!0,in2:!0,intercept:!0,k:!0,k1:!0,k2:!0,k3:!0,k4:!0,kernelMatrix:!0,kernelUnitLength:!0,kerning:!0,keyPoints:!0,keySplines:!0,keyTimes:!0,lengthAdjust:!0,letterSpacing:!0,lightingColor:!0,limitingConeAngle:!0,local:!0,markerEnd:!0,markerMid:!0,markerStart:!0,markerHeight:!0,markerUnits:!0,markerWidth:!0,mask:!0,maskContentUnits:!0,maskUnits:!0,mathematical:!0,mode:!0,numOctaves:!0,offset:!0,opacity:!0,operator:!0,order:!0,orient:!0,orientation:!0,origin:!0,overflow:!0,overlinePosition:!0,overlineThickness:!0,paintOrder:!0,panose1:!0,pathLength:!0,patternContentUnits:!0,patternTransform:!0,patternUnits:!0,pointerEvents:!0,points:!0,pointsAtX:!0,pointsAtY:!0,pointsAtZ:!0,preserveAlpha:!0,preserveAspectRatio:!0,primitiveUnits:!0,r:!0,radius:!0,refX:!0,refY:!0,renderingIntent:!0,repeatCount:!0,repeatDur:!0,requiredExtensions:!0,requiredFeatures:!0,restart:!0,result:!0,rotate:!0,rx:!0,ry:!0,scale:!0,seed:!0,shapeRendering:!0,slope:!0,spacing:!0,specularConstant:!0,specularExponent:!0,speed:!0,spreadMethod:!0,startOffset:!0,stdDeviation:!0,stemh:!0,stemv:!0,stitchTiles:!0,stopColor:!0,stopOpacity:!0,strikethroughPosition:!0,strikethroughThickness:!0,string:!0,stroke:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeLinecap:!0,strokeLinejoin:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,surfaceScale:!0,systemLanguage:!0,tableValues:!0,targetX:!0,targetY:!0,textAnchor:!0,textDecoration:!0,textRendering:!0,textLength:!0,to:!0,transform:!0,u1:!0,u2:!0,underlinePosition:!0,underlineThickness:!0,unicode:!0,unicodeBidi:!0,unicodeRange:!0,unitsPerEm:!0,vAlphabetic:!0,vHanging:!0,vIdeographic:!0,vMathematical:!0,values:!0,vectorEffect:!0,version:!0,vertAdvY:!0,vertOriginX:!0,vertOriginY:!0,viewBox:!0,viewTarget:!0,visibility:!0,widths:!0,wordSpacing:!0,writingMode:!0,x:!0,xHeight:!0,x1:!0,x2:!0,xChannelSelector:!0,xlinkActuate:!0,xlinkArcrole:!0,xlinkHref:!0,xlinkRole:!0,xlinkShow:!0,xlinkTitle:!0,xlinkType:!0,xmlBase:!0,xmlns:!0,xmlnsXlink:!0,xmlLang:!0,xmlSpace:!0,y:!0,y1:!0,y2:!0,yChannelSelector:!0,z:!0,zoomAndPan:!0},ue=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),ce={}.hasOwnProperty,de=function(e){return ce.call(se,e)||ce.call(le,e)||ue(e.toLowerCase())||ce.call(ae,e)},pe=function(e,t,n){var o=n&&e.theme===n.theme;return e.theme&&!o?e.theme:t},he=function(e){function t(e){a=e;for(var t in r){var n=r[t];void 0!==n&&n(a)}}function n(e){var t=i;return r[t]=e,i+=1,e(a),t}function o(e){r[e]=void 0}var r={},i=0,a=e;return{publish:t,subscribe:n,unsubscribe:o}},fe="__styled-components__",ge=fe+"next__",me=b.a.shape({getTheme:b.a.func,subscribe:b.a.func,unsubscribe:b.a.func}),ve=function(e){var t=!1;return function(){t||(t=!0,e())}}(function(){console.error("Warning: Usage of `context."+fe+"` as a function is deprecated. It will be replaced with the object on `.context."+ge+"` in a future version.")}),ye=function(e){function t(){G(this,t);var n=$(this,e.call(this));return n.unsubscribeToOuterId=-1,n.getTheme=n.getTheme.bind(n),n}return U(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.context[ge];void 0!==t&&(this.unsubscribeToOuterId=t.subscribe(function(t){e.outerTheme=t})),this.broadcast=he(this.getTheme())},t.prototype.getChildContext=function(){var e,t=this;return V({},this.context,(e={},e[ge]={getTheme:this.getTheme,subscribe:this.broadcast.subscribe,unsubscribe:this.broadcast.unsubscribe},e[fe]=function(e){ve();var n=t.broadcast.subscribe(e);return function(){return t.broadcast.unsubscribe(n)}},e))},t.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.broadcast.publish(this.getTheme(e.theme))},t.prototype.componentWillUnmount=function(){-1!==this.unsubscribeToOuterId&&this.context[ge].unsubscribe(this.unsubscribeToOuterId)},t.prototype.getTheme=function(e){var t=e||this.props.theme;if(_()(t)){var n=t(this.outerTheme);if(!f()(n))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return n}if(!f()(t))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return V({},this.outerTheme,t)},t.prototype.render=function(){return this.props.children?y.a.Children.only(this.props.children):null},t}(v.Component);ye.childContextTypes=(ne={},ne[fe]=b.a.func,ne[ge]=me,ne),ye.contextTypes=(oe={},oe[ge]=me,oe);var Ce=/[[\].#*$><+~=|^:(),"'`]/g,be=/--+/g,we={},_e=function e(t,n){for(var o=0;o<t.length;o+=1){var r=t[o];if(Array.isArray(r)&&!e(r))return!1;if("function"===typeof r&&!a(r))return!1}if(void 0!==n)for(var i in n){var s=n[i];if("function"===typeof s)return!1}return!0},Ee=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],xe=function(e){return e.replace(/\s|\\n/g,"")},Se=function(e,t,n){return function(){function o(e,t,n){if(G(this,o),this.rules=e,this.isStatic=_e(e,t),this.componentId=n,!ee.instance.hasInjectedComponent(this.componentId)){ee.instance.deferredInject(n,!0,"")}}return o.prototype.generateAndInjectStyles=function(o,r){var i=this.isStatic,a=this.lastClassName;if(i&&void 0!==a)return a;var s=t(this.rules,o),u=l(this.componentId+s.join("")),c=r.getName(u);if(void 0!==c)return r.stylesCacheable&&(this.lastClassName=c),c;var d=e(u);if(r.stylesCacheable&&(this.lastClassName=c),r.alreadyInjected(u,d))return d;var p="\n"+n(s,"."+d);return r.inject(this.componentId,!0,p,u,d),d},o.generateName=function(t){return e(l(t))},o}()}(L,k,D),Ae=function(e){return function t(n,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!==typeof o&&"function"!==typeof o)throw new Error("Cannot create styled-component for component: "+o);var i=function(t){for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return n(o,r,e.apply(void 0,[t].concat(a)))};return i.withConfig=function(e){return t(n,o,V({},r,e))},i.attrs=function(e){return t(n,o,V({},r,{attrs:V({},r.attrs||{},e)}))},i}}(N),Re=function(e,t){var n={},o=function(t,o){var r="string"!==typeof t?"sc":t.replace(Ce,"-").replace(be,"-"),i=(n[r]||0)+1;n[r]=i;var a=e.generateName(r+i),s=r+"-"+a;return void 0!==o?o+"-"+s:s},r=function(e){function t(){var n,o,r;G(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=o=$(this,e.call.apply(e,[this].concat(a))),o.attrs={},o.state={theme:null,generatedClassName:""},o.unsubscribeId=-1,r=n,$(o,r)}return U(t,e),t.prototype.unsubscribeFromContext=function(){-1!==this.unsubscribeId&&this.context[ge].unsubscribe(this.unsubscribeId)},t.prototype.buildExecutionContext=function(e,t){var n=this.constructor.attrs,o=V({},t,{theme:e});return void 0===n?o:(this.attrs=Object.keys(n).reduce(function(e,t){var r=n[t];return e[t]="function"===typeof r?r(o):r,e},{}),V({},o,this.attrs))},t.prototype.generateAndInjectStyles=function(e,t){var n=this.constructor,o=n.attrs,r=n.componentStyle,i=n.warnTooManyClasses,a=this.context[Q]||ee.instance;if(r.isStatic&&void 0===o)return r.generateAndInjectStyles(we,a);var s=this.buildExecutionContext(e,t),l=r.generateAndInjectStyles(s,a);return void 0!==i&&i(l),l},t.prototype.componentWillMount=function(){var e=this,t=this.constructor.componentStyle,n=this.context[ge];if(t.isStatic){var o=this.generateAndInjectStyles(we,this.props);this.setState({generatedClassName:o})}else if(void 0!==n){var r=n.subscribe;this.unsubscribeId=r(function(t){var n=pe(e.props,t,e.constructor.defaultProps),o=e.generateAndInjectStyles(n,e.props);e.setState({theme:n,generatedClassName:o})})}else{var i=this.props.theme||{},a=this.generateAndInjectStyles(i,this.props);this.setState({theme:i,generatedClassName:a})}},t.prototype.componentWillReceiveProps=function(e){var t=this;this.constructor.componentStyle.isStatic||this.setState(function(n){var o=pe(e,n.theme,t.constructor.defaultProps);return{theme:o,generatedClassName:t.generateAndInjectStyles(o,e)}})},t.prototype.componentWillUnmount=function(){this.unsubscribeFromContext()},t.prototype.render=function(){var e=this,t=this.props.innerRef,n=this.state.generatedClassName,o=this.constructor,r=o.styledComponentId,s=o.target,l=i(s),u=[this.props.className,r,this.attrs.className,n].filter(Boolean).join(" "),c=V({},this.attrs,{className:u});a(s)?c.innerRef=t:c.ref=t;var d=Object.keys(this.props).reduce(function(t,n){return"innerRef"===n||"className"===n||l&&!de(n)||(t[n]=e.props[n]),t},c);return Object(v.createElement)(s,d)},t}(v.Component);return function n(a,l,u){var c,d=l.displayName,p=void 0===d?i(a)?"styled."+a:"Styled("+s(a)+")":d,h=l.componentId,f=void 0===h?o(l.displayName,l.parentComponentId):h,g=l.ParentComponent,m=void 0===g?r:g,v=l.rules,y=l.attrs,C=l.displayName&&l.componentId?l.displayName+"-"+l.componentId:f,w=void 0,_=new e(void 0===v?u:v.concat(u),y,C),E=function(e){function o(){return G(this,o),$(this,e.apply(this,arguments))}return U(o,e),o.withComponent=function(e){var t=l.componentId,r=z(l,["componentId"]),a=t&&t+"-"+(i(e)?e:s(e)),c=V({},r,{componentId:a,ParentComponent:o});return n(e,c,u)},H(o,null,[{key:"extend",get:function(){var e=l.rules,r=l.componentId,i=z(l,["rules","componentId"]),s=void 0===e?u:e.concat(u),c=V({},i,{rules:s,parentComponentId:r,ParentComponent:o});return t(n,a,c)}}]),o}(m);return E.contextTypes=(c={},c[fe]=b.a.func,c[ge]=me,c[Q]=b.a.oneOfType([b.a.instanceOf(ee),b.a.instanceOf(ie)]),c),E.displayName=p,E.styledComponentId=C,E.attrs=y,E.componentStyle=_,E.warnTooManyClasses=w,E.target=a,E}}(Se,Ae),Te=(function(e,t,n){}(L,D,N),function(e,t){}(D,N),function(e,t){var n=function(n){return t(e,n)};return Ee.forEach(function(e){n[e]=n(e)}),n}(Re,Ae));t.a=Te},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(387);n.d(t,"default",function(){return o.a}),n.d(t,"Grid",function(){return o.a});var r=n(746);n.d(t,"accessibilityOverscanIndicesGetter",function(){return r.a});var i=n(389);n.d(t,"defaultCellRangeRenderer",function(){return i.a});var a=n(388);n.d(t,"defaultOverscanIndicesGetter",function(){return a.c})},function(e,t,n){"use strict";function o(e){return i.bind(this,e)}function r(e){return i.bind(this,"[ref="+e+"]")}function i(e,t,n,o){if(null===e)return void console.error("ag-Grid: QuerySelector selector should not be null");if("number"===typeof o)return void console.error("ag-Grid: QuerySelector should be on an attribute");var r=l(t,t.constructor.name);r.querySelectors||(r.querySelectors=[]),r.querySelectors.push({attributeName:n,querySelector:e})}function a(e){return s.bind(this,e)}function s(e,t,n,o){if(null===e)return void console.error("ag-Grid: EventListener eventName should not be null");var r=l(t,t.constructor.name);r.listenerMethods||(r.listenerMethods=[]),r.listenerMethods.push({methodName:n,eventName:e})}function l(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySelector=o,t.RefSelector=r,t.Listener=a},function(e,t,n){"use strict";var o=function(){};e.exports=o},function(e,t,n){"use strict";var o=function(e,t,n,o,r,i,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=o},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){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function o(e){return"[object Array]"===x.call(e)}function r(e){return"[object ArrayBuffer]"===x.call(e)}function i(e){return"undefined"!==typeof FormData&&e instanceof FormData}function a(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"===typeof e}function l(e){return"number"===typeof e}function u(e){return"undefined"===typeof e}function c(e){return null!==e&&"object"===typeof e}function d(e){return"[object Date]"===x.call(e)}function p(e){return"[object File]"===x.call(e)}function h(e){return"[object Blob]"===x.call(e)}function f(e){return"[object Function]"===x.call(e)}function g(e){return c(e)&&f(e.pipe)}function m(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function v(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function C(e,t){if(null!==e&&"undefined"!==typeof e)if("object"===typeof e||o(e)||(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function b(){function e(e,n){"object"===typeof t[n]&&"object"===typeof e?t[n]=b(t[n],e):t[n]=e}for(var t={},n=0,o=arguments.length;n<o;n++)C(arguments[n],e);return t}function w(e,t,n){return C(t,function(t,o){e[o]=n&&"function"===typeof t?_(t,n):t}),e}var _=n(362),E=n(666),x=Object.prototype.toString;e.exports={isArray:o,isArrayBuffer:r,isBuffer:E,isFormData:i,isArrayBufferView:a,isString:s,isNumber:l,isObject:c,isUndefined:u,isDate:d,isFile:p,isBlob:h,isFunction:f,isStream:g,isURLSearchParams:m,isStandardBrowserEnv:y,forEach:C,merge:b,extend:w,trim:v}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=function(e){return e&&e.__esModule?e:{default:e}}(o),i=r.default.oneOf(["left","middle","right"]),a=r.default.oneOf(["top","center","bottom"]);t.default={corners:r.default.oneOf(["bottom-left","bottom-right","top-left","top-right"]),horizontal:i,vertical:a,origin:r.default.shape({horizontal:i,vertical:a}),cornersAndCenter:r.default.oneOf(["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"]),stringOrNumber:r.default.oneOfType([r.default.string,r.default.number]),zDepth:r.default.oneOf([0,1,2,3,4,5])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(703),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),r=n(6),i=n(3),a=function(){function e(){this.destroyFunctions=[]}return e.prototype.destroy=function(){this.destroyFunctions.forEach(function(e){return e()}),this.destroyFunctions.length=0},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new o.EventService),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;setTimeout(function(){return t.dispatchEvent(e)},0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addDestroyableEventListener=function(e,t,n){e instanceof HTMLElement?i._.addSafePassiveEventListener(e,t,n):(r.GridOptionsWrapper,e.addEventListener(t,n)),this.destroyFunctions.push(function(){e instanceof HTMLElement?e.removeEventListener(t,n):(r.GridOptionsWrapper,e.removeEventListener(t,n))})},e.prototype.addDestroyFunc=function(e){this.destroyFunctions.push(e)},e}();t.BeanStub=a},function(e,t,n){"use strict";var o=null;e.exports={debugTool:o}},function(e,t,n){var o=n(223)("wks"),r=n(156),i=n(68).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){var o=n(403),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=n(2),l=n(2),u=n(33),c=n(14),d=n(17),p=n(2),h=n(6),f=n(2),g=n(22),m=n(13),v=n(21),y=function(){function e(){}return e.prototype.setBeans=function(e){this.logger=e.create("SelectionController"),this.reset(),this.gridOptionsWrapper.isRowModelDefault()?this.eventService.addEventListener(d.Events.EVENT_ROW_DATA_CHANGED,this.reset.bind(this)):this.logger.log("dont know what to do here")},e.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.eventService.addEventListener(d.Events.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},e.prototype.setLastSelectedNode=function(e){this.lastSelectedNode=e},e.prototype.getLastSelectedNode=function(){return this.lastSelectedNode},e.prototype.getSelectedNodes=function(){var e=[];return a.Utils.iterateObject(this.selectedNodes,function(t,n){n&&e.push(n)}),e},e.prototype.getSelectedRows=function(){var e=[];return a.Utils.iterateObject(this.selectedNodes,function(t,n){n&&e.push(n.data)}),e},e.prototype.removeGroupsFromSelection=function(){var e=this;a.Utils.iterateObject(this.selectedNodes,function(t,n){n&&n.group&&(e.selectedNodes[n.id]=void 0)})},e.prototype.updateGroupsFromChildrenSelections=function(){this.rowModel.getType()!==g.Constants.ROW_MODEL_TYPE_IN_MEMORY&&console.warn("updateGroupsFromChildrenSelections not available when rowModel is not normal"),this.rowModel.getTopLevelNodes().forEach(function(e){e.depthFirstSearch(function(e){e.group&&e.calculateSelectedFromChildren()})})},e.prototype.getNodeForIdIfSelected=function(e){return this.selectedNodes[e]},e.prototype.clearOtherNodes=function(e){var t=this,n={},o=0;return a.Utils.iterateObject(this.selectedNodes,function(r,i){if(i&&i.id!==e.id){var a=t.selectedNodes[i.id];o+=a.setSelectedParams({newValue:!1,clearSelection:!1,tailingNodeInSequence:!0}),t.groupSelectsChildren&&i.parent&&(n[i.parent.id]=i.parent)}}),a.Utils.iterateObject(n,function(e,t){t.calculateSelectedFromChildren()}),o},e.prototype.onRowSelected=function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes[t.id]=t:this.selectedNodes[t.id]=void 0)},e.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},e.prototype.syncInOldRowNode=function(e,t){a.Utils.exists(t)&&e.id!==t.id&&(a.Utils.exists(this.selectedNodes[t.id])&&(this.selectedNodes[t.id]=t))},e.prototype.syncInNewRowNode=function(e){a.Utils.exists(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)},e.prototype.reset=function(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null},e.prototype.getBestCostNodeSelection=function(){function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];i.isSelected()?o.push(i):i.group&&i.children&&e(i.children)}}this.rowModel.getType()!==g.Constants.ROW_MODEL_TYPE_IN_MEMORY&&console.warn("getBestCostNodeSelection is only avilable when using normal row model");var t=this.rowModel,n=t.getTopLevelNodes();if(null===n)return void console.warn("selectAll not available doing rowModel=virtual");var o=[];return e(n),o},e.prototype.setRowModel=function(e){this.rowModel=e},e.prototype.isEmpty=function(){var e=0;return a.Utils.iterateObject(this.selectedNodes,function(t,n){n&&e++}),0===e},e.prototype.deselectAllRowNodes=function(e){void 0===e&&(e=!1);var t=function(e){return e.selectThisNode(!1)},n=this.rowModel.getType()===g.Constants.ROW_MODEL_TYPE_IN_MEMORY;if(e){if(!n)return void console.error("ag-Grid: selecting just filtered only works with In Memory Row Model");this.rowModel.forEachNodeAfterFilter(t)}else a.Utils.iterateObject(this.selectedNodes,function(e,n){n&&t(n)});this.reset(),n&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var o={type:d.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.selectAllRowNodes=function(e){if(void 0===e&&(e=!1),this.rowModel.getType()!==g.Constants.ROW_MODEL_TYPE_IN_MEMORY)throw"selectAll only available with normal row model, ie not "+this.rowModel.getType();var t=this.rowModel,n=function(e){return e.selectThisNode(!0)};e?t.forEachNodeAfterFilter(n):t.forEachNode(n),this.rowModel.getType()===g.Constants.ROW_MODEL_TYPE_IN_MEMORY&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var o={type:d.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.selectNode=function(e,t){e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectIndex=function(e){var t=this.rowModel.getRow(e);this.deselectNode(t)},e.prototype.deselectNode=function(e){e.setSelectedParams({newValue:!1,clearSelection:!1})},e.prototype.selectIndex=function(e,t){var n=this.rowModel.getRow(e);this.selectNode(n,t)},o([p.Autowired("eventService"),r("design:type",c.EventService)],e.prototype,"eventService",void 0),o([p.Autowired("rowModel"),r("design:type",Object)],e.prototype,"rowModel",void 0),o([p.Autowired("gridOptionsWrapper"),r("design:type",h.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([p.Autowired("columnApi"),r("design:type",m.ColumnApi)],e.prototype,"columnApi",void 0),o([p.Autowired("gridApi"),r("design:type",v.GridApi)],e.prototype,"gridApi",void 0),o([i(0,l.Qualifier("loggerFactory")),r("design:type",Function),r("design:paramtypes",[u.LoggerFactory]),r("design:returntype",void 0)],e.prototype,"setBeans",null),o([f.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([s.Bean("selectionController")],e)}();t.SelectionController=y},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),a=n(17),s=n(6),l=n(53),u=n(62),c=n(13),d=n(2),p=n(22),h=n(3),f=n(115),g=n(21),m=function(){function e(){this.childrenMapped={},this.selected=!1}return e.prototype.setData=function(e){var t=this.data;this.data=e,this.valueCache.onDataChanged();var n=this.createDataChangedEvent(e,t,!1);this.dispatchLocalEvent(n)},e.prototype.createDataChangedEvent=function(t,n,o){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:n,newData:t,update:o}},e.prototype.createLocalRowEvent=function(e){return{type:e,node:this}},e.prototype.updateData=function(e){var t=this.data;this.data=e;var n=this.createDataChangedEvent(e,t,!0);this.dispatchLocalEvent(n)},e.prototype.getRowIndexString=function(){return this.rowPinned===p.Constants.PINNED_TOP?"t-"+this.rowIndex:this.rowPinned===p.Constants.PINNED_BOTTOM?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var t=new e;return this.context.wireBean(t),t.id=this.id,t.data=this.data,t.daemon=!0,t.selected=this.selected,t.level=this.level,t},e.prototype.setDataAndId=function(e,t){var n=h.Utils.exists(this.id)?this.createDaemonNode():null,o=this.data;this.data=e,this.setId(t),this.selectionController.syncInRowNode(this,n);var r=this.createDataChangedEvent(e,o,!1);this.dispatchLocalEvent(r)},e.prototype.setId=function(e){var t=this.gridOptionsWrapper.getRowNodeIdFunc();t?this.data?this.id=t(this.data):this.id=void 0:this.id=e},e.prototype.isPixelInRange=function(e){return e>=this.rowTop&&e<this.rowTop+this.rowHeight},e.prototype.clearRowTop=function(){this.oldRowTop=this.rowTop,this.setRowTop(null)},e.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))},e.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))},e.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))},e.prototype.setRowTop=function(t){this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)))},e.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CELL_CHANGED)))},e.prototype.setRowHeight=function(t){this.rowHeight=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))},e.prototype.setRowIndex=function(t){this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var n=this.createGlobalRowEvent(a.Events.EVENT_ROW_GROUP_OPENED);this.mainEventService.dispatchEvent(n)}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t){var n=this.columnController.getPrimaryColumn(e);this.valueService.setValue(this,n,t),this.dispatchCellChangedEvent(n,t)},e.prototype.setGroupValue=function(e,t){var n=this.columnController.getGridColumn(e);h.Utils.missing(this.groupData)&&(this.groupData={}),this.groupData[n.getColId()]=t,this.dispatchCellChangedEvent(n,t)},e.prototype.setAggData=function(e){var t=this,n=h.Utils.getAllKeysInObjects([this.aggData,e]);this.aggData=e,this.eventService&&n.forEach(function(e){var n=t.columnController.getGridColumn(e),o=t.data?t.data[e]:void 0;t.dispatchCellChangedEvent(n,o)})},e.prototype.dispatchCellChangedEvent=function(t,n){var o={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:n};this.dispatchLocalEvent(o)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return this.group||this.canFlower},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(function(t){return t.depthFirstSearch(e)}),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,n=!1,o=!1;if(this.childrenAfterGroup)for(var r=0;r<this.childrenAfterGroup.length;r++){var i=this.childrenAfterGroup[r].isSelected();switch(i){case!0:t=!0;break;case!1:n=!0;break;default:o=!0}}e=o?void 0:!(!t||n)||!(!t&&n)&&void 0,this.selectThisNode(e)},e.prototype.calculateSelectedFromChildrenBubbleUp=function(){this.calculateSelectedFromChildren(),this.parent&&this.parent.calculateSelectedFromChildrenBubbleUp()},e.prototype.setSelectedInitialValue=function(e){this.selected=e},e.prototype.setSelected=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.setSelectedParams({newValue:e,clearSelection:t,tailingNodeInSequence:n,rangeSelect:!1})},e.prototype.isRowPinned=function(){return this.rowPinned===p.Constants.PINNED_TOP||this.rowPinned===p.Constants.PINNED_BOTTOM},e.prototype.setSelectedParams=function(e){var t=this.gridOptionsWrapper.isGroupSelectsChildren(),n=!0===e.newValue,o=!0===e.clearSelection,r=!0===e.tailingNodeInSequence,i=!0===e.rangeSelect,s=t&&!0===e.groupSelectsFiltered;if(void 0===this.id)return console.warn("ag-Grid: cannot select node until id for node is known"),0;if(this.rowPinned)return console.log("ag-Grid: cannot select pinned rows"),0;if(this.footer){return this.sibling.setSelectedParams(e)}if(i){var l=this.selectionController.getLastSelectedNode()!==this,u=this.gridOptionsWrapper.isRowSelectionMulti();if(l&&u)return this.doRowRangeSelection()}var c=0;s&&this.group||this.selectThisNode(n)&&c++;if(t&&this.group&&(c+=this.selectChildNodes(n,s)),!r){if(!n||!o&&this.gridOptionsWrapper.isRowSelectionMulti()||(c+=this.selectionController.clearOtherNodes(this)),c>0){s?this.calculatedSelectedForAllGroupNodes():t&&this.parent&&this.parent.calculateSelectedFromChildrenBubbleUp();var d={type:a.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.mainEventService.dispatchEvent(d)}n&&this.selectionController.setLastSelectedNode(this)}return c},e.prototype.doRowRangeSelection=function(){var e=0,t=this.gridOptionsWrapper.isGroupSelectsChildren(),n=this.selectionController.getLastSelectedNode();this.rowModel.getNodesInRangeForSelection(n,this).forEach(function(n){n.group&&t||n.selectThisNode(!0)&&e++}),t&&this.calculatedSelectedForAllGroupNodes();var o={type:a.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};return this.mainEventService.dispatchEvent(o),e},e.prototype.isParentOfNode=function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},e.prototype.calculatedSelectedForAllGroupNodes=function(){this.rowModel.getTopLevelNodes().forEach(function(e){e.group&&(e.depthFirstSearch(function(e){e.group&&e.calculateSelectedFromChildren()}),e.calculateSelectedFromChildren())})},e.prototype.selectThisNode=function(t){if(this.selected===t)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var n=this.createGlobalRowEvent(a.Events.EVENT_ROW_SELECTED);return this.mainEventService.dispatchEvent(n),!0},e.prototype.selectChildNodes=function(e,t){var n=t?this.childrenAfterFilter:this.childrenAfterGroup,o=0;if(!h.Utils.missing(n)){for(var r=0;r<n.length;r++)o+=n[r].setSelectedParams({newValue:e,clearSelection:!1,tailingNodeInSequence:!0});return o}},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new i.EventService),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))},e.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))},e.prototype.getFirstChildOfFirstChild=function(e){for(var t,n=this,o=!0,r=!1;o&&!r;){var i=n.parent;h.Utils.exists(i)&&n.firstChild?i.rowGroupColumn===e&&(r=!0,t=i):o=!1,n=i}return r?t:null},e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CELL_CHANGED="allChildrenCountChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",o([d.Autowired("eventService"),r("design:type",i.EventService)],e.prototype,"mainEventService",void 0),o([d.Autowired("gridOptionsWrapper"),r("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([d.Autowired("selectionController"),r("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),o([d.Autowired("columnController"),r("design:type",c.ColumnController)],e.prototype,"columnController",void 0),o([d.Autowired("valueService"),r("design:type",u.ValueService)],e.prototype,"valueService",void 0),o([d.Autowired("rowModel"),r("design:type",Object)],e.prototype,"rowModel",void 0),o([d.Autowired("context"),r("design:type",d.Context)],e.prototype,"context",void 0),o([d.Autowired("valueCache"),r("design:type",f.ValueCache)],e.prototype,"valueCache",void 0),o([d.Autowired("columnApi"),r("design:type",c.ColumnApi)],e.prototype,"columnApi",void 0),o([d.Autowired("gridApi"),r("design:type",g.GridApi)],e.prototype,"gridApi",void 0),e}();t.RowNode=m},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),a=n(6),s=n(119),l=n(62),u=n(13),c=n(432),d=n(433),p=n(2),h=n(14),f=n(17),g=n(191),m=n(21),v=function(){function e(){this.allFilters={},this.quickFilter=null,this.availableFilters={text:c.TextFilter,number:d.NumberFilter,date:g.DateFilter}}return t=e,e.prototype.init=function(){this.eventService.addEventListener(f.Events.EVENT_ROW_DATA_CHANGED,this.onNewRowsLoaded.bind(this)),this.eventService.addEventListener(f.Events.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.quickFilter=this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText()),this.checkExternalFilter()},e.prototype.registerFilter=function(e,t){this.availableFilters[e]=t},e.prototype.setFilterModel=function(e){var t=this;if(e){var n=Object.keys(e);i.Utils.iterateObject(this.allFilters,function(o,r){i.Utils.removeFromArray(n,o);var a=e[o];t.setModelOnFilterWrapper(r.filter,a)}),i.Utils.iterateArray(n,function(n){var o=t.columnController.getPrimaryColumn(n);if(!o)return void console.warn("Warning ag-grid setFilterModel - no column found for colId "+n);var r=t.getOrCreateFilterWrapper(o);t.setModelOnFilterWrapper(r.filter,e[n])})}else i.Utils.iterateObject(this.allFilters,function(e,n){t.setModelOnFilterWrapper(n.filter,null)});this.onFilterChanged()},e.prototype.setModelOnFilterWrapper=function(e,t){if("function"!==typeof e.setModel)return void console.warn("Warning ag-grid - filter missing setModel method, which is needed for setFilterModel");e.setModel(t)},e.prototype.getFilterModel=function(){var e={};return i.Utils.iterateObject(this.allFilters,function(t,n){var o=n.filter;if("function"!==typeof o.getModel)return void console.warn("Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel");var r=o.getModel();i.Utils.exists(r)&&(e[t]=r)}),e},e.prototype.isAdvancedFilterPresent=function(){return this.advancedFilterPresent},e.prototype.setAdvancedFilterPresent=function(){var e=!1;i.Utils.iterateObject(this.allFilters,function(t,n){n.filter.isFilterActive()&&(e=!0)}),this.advancedFilterPresent=e},e.prototype.updateFilterFlagInColumns=function(){i.Utils.iterateObject(this.allFilters,function(e,t){var n=t.filter.isFilterActive();t.column.setFilterActive(n)})},e.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.advancedFilterPresent||this.externalFilterPresent},e.prototype.doesFilterPass=function(e,t){for(var n=e.data,o=Object.keys(this.allFilters),r=0,i=o.length;r<i;r++){var a=o[r],s=this.allFilters[a];if(void 0!==s&&(s.filter!==t&&s.filter.isFilterActive())){s.filter.doesFilterPass||console.error("Filter is missing method doesFilterPass");var l={node:e,data:n};if(!s.filter.doesFilterPass(l))return!1}}return!0},e.prototype.parseQuickFilter=function(e){return i.Utils.missing(e)||""===e?null:this.gridOptionsWrapper.isRowModelInfinite()?(console.warn("ag-grid: cannot do quick filtering when doing virtual paging"),null):e.toUpperCase()},e.prototype.setQuickFilter=function(e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.onFilterChanged())},e.prototype.checkExternalFilter=function(){this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent()},e.prototype.onFilterChanged=function(){this.setAdvancedFilterPresent(),this.updateFilterFlagInColumns(),this.checkExternalFilter(),i.Utils.iterateObject(this.allFilters,function(e,t){t.filter.onAnyFilterChanged&&t.filter.onAnyFilterChanged()});var e={type:f.Events.EVENT_FILTER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},e.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter(t,e)},e.prototype.doesRowPassQuickFilterNoCache=function(e){var t=this,n=this.columnController.getAllPrimaryColumns(),o=!1;return n.forEach(function(n){if(!o){var r=t.getQuickFilterTextForColumn(n,e);i.Utils.exists(r)&&r.indexOf(t.quickFilter)>=0&&(o=!0)}}),o},e.prototype.doesRowPassQuickFilterCache=function(e){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(this.quickFilter)>=0},e.prototype.doesRowPassQuickFilter=function(e){return this.gridOptionsWrapper.isCacheQuickFilter()?this.doesRowPassQuickFilterCache(e):this.doesRowPassQuickFilterNoCache(e)},e.prototype.doesRowPassFilter=function(e,t){return!(this.isQuickFilterPresent()&&!this.doesRowPassQuickFilter(e))&&(!(this.externalFilterPresent&&!this.gridOptionsWrapper.doesExternalFilterPass(e))&&!(this.advancedFilterPresent&&!this.doesFilterPass(e,t)))},e.prototype.getQuickFilterTextForColumn=function(e,t){var n,o=this.valueService.getValue(e,t),r=e.getColDef();if(e.getColDef().getQuickFilterText){var i={value:o,node:t,data:t.data,column:e,colDef:r};n=e.getColDef().getQuickFilterText(i)}else n=o;return n&&""!==n?n.toString().toUpperCase():null},e.prototype.aggregateRowForQuickFilter=function(e){var n=this,o=[];this.columnController.getAllPrimaryColumns().forEach(function(t){var r=n.getQuickFilterTextForColumn(t,e);i.Utils.exists(r)&&o.push(r)}),e.quickFilterAggregateText=o.join(t.QUICK_FILTER_SEPARATOR)},e.prototype.onNewRowsLoaded=function(){i.Utils.iterateObject(this.allFilters,function(e,t){t.filter.onNewRowsLoaded&&t.filter.onNewRowsLoaded()}),this.updateFilterFlagInColumns(),this.setAdvancedFilterPresent()},e.prototype.createValueGetter=function(e){var t=this;return function(n){return t.valueService.getValue(e,n)}},e.prototype.getFilterComponent=function(e){return this.getOrCreateFilterWrapper(e).filter},e.prototype.getOrCreateFilterWrapper=function(e){var t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.allFilters[e.getColId()]=t),t},e.prototype.cachedFilter=function(e){return this.allFilters[e.getColId()]},e.prototype.createFilterInstance=function(e){var t,n=e.getFilter(),o="function"===typeof n,r=i.Utils.missing(n)||"string"===typeof n;if(o)t=n,this.assertMethodHasNoParameters(t);else{if(!r)return console.error("ag-Grid: colDef.filter should be function or a string"),null;var a=n;t=this.getFilterFromCache(a)}var s=new t;return this.checkFilterHasAllMandatoryMethods(s,e),this.context.wireBean(s),s},e.prototype.checkFilterHasAllMandatoryMethods=function(e,t){["getGui","isFilterActive","doesFilterPass","getModel","setModel"].forEach(function(n){if(!e[n])throw"Filter for column "+t.getColId()+" is missing method "+n})},e.prototype.createParams=function(e){var t=this,n=this.onFilterChanged.bind(this),o={type:f.Events.EVENT_FILTER_MODIFIED,api:this.gridApi,columnApi:this.columnApi},r=function(){return t.eventService.dispatchEvent(o)},a=this.doesRowPassOtherFilters.bind(this,e.filter),s=e.column.getColDef(),l={column:e.column,colDef:s,rowModel:this.rowModel,filterChangedCallback:n,filterModifiedCallback:r,valueGetter:this.createValueGetter(e.column),doesRowPassOtherFilter:a,context:this.gridOptionsWrapper.getContext(),$scope:e.scope};return s.filterParams&&i.Utils.assign(l,s.filterParams),l},e.prototype.createFilterWrapper=function(e){var t={column:e,filter:null,scope:null,gui:null};return t.filter=this.createFilterInstance(e),this.initialiseFilterAndPutIntoGui(t),t},e.prototype.initialiseFilterAndPutIntoGui=function(e){this.gridOptionsWrapper.isAngularCompileFilters()&&(e.scope=this.$scope.$new(),e.scope.context=this.gridOptionsWrapper.getContext());var t=this.createParams(e);e.filter.init(t);var n=document.createElement("div");n.className="ag-filter";var o=e.filter.getGui();"string"===typeof o&&(o=i.Utils.loadTemplate(o)),n.appendChild(o),e.scope?e.gui=this.$compile(n)(e.scope)[0]:e.gui=n},e.prototype.getFilterFromCache=function(e){var t=this.enterprise?"set":"text",n=this.availableFilters[t];return i.Utils.missing(e)?n:(this.enterprise||"set"!==e||(console.warn("ag-Grid: Set filter is only available in Enterprise ag-Grid"),e="text"),this.availableFilters[e]?this.availableFilters[e]:(console.error("ag-Grid: Could not find filter type "+e),this.availableFilters[n]))},e.prototype.onNewColumnsLoaded=function(){this.destroy()},e.prototype.destroyFilter=function(e){var t=this.allFilters[e.getColId()];t&&(this.disposeFilterWrapper(t),this.onFilterChanged())},e.prototype.disposeFilterWrapper=function(e){e.filter.setModel(null),e.filter.destroy&&e.filter.destroy(),e.column.setFilterActive(!1),delete this.allFilters[e.column.getColId()]},e.prototype.destroy=function(){var e=this;i.Utils.iterateObject(this.allFilters,function(t,n){e.disposeFilterWrapper(n)})},e.prototype.assertMethodHasNoParameters=function(e){i.Utils.getFunctionParameters(e).length>0&&(console.warn("ag-grid: It looks like your filter is of the old type and expecting parameters in the constructor."),console.warn("ag-grid: From ag-grid 1.14, the constructor should take no parameters and init() used instead."))},e.QUICK_FILTER_SEPARATOR="\n",o([p.Autowired("$compile"),r("design:type",Object)],e.prototype,"$compile",void 0),o([p.Autowired("$scope"),r("design:type",Object)],e.prototype,"$scope",void 0),o([p.Autowired("gridOptionsWrapper"),r("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([p.Autowired("gridCore"),r("design:type",Object)],e.prototype,"gridCore",void 0),o([p.Autowired("popupService"),r("design:type",s.PopupService)],e.prototype,"popupService",void 0),o([p.Autowired("valueService"),r("design:type",l.ValueService)],e.prototype,"valueService",void 0),o([p.Autowired("columnController"),r("design:type",u.ColumnController)],e.prototype,"columnController",void 0),o([p.Autowired("rowModel"),r("design:type",Object)],e.prototype,"rowModel",void 0),o([p.Autowired("eventService"),r("design:type",h.EventService)],e.prototype,"eventService",void 0),o([p.Autowired("enterprise"),r("design:type",Boolean)],e.prototype,"enterprise",void 0),o([p.Autowired("context"),r("design:type",p.Context)],e.prototype,"context",void 0),o([p.Autowired("columnApi"),r("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),o([p.Autowired("gridApi"),r("design:type",m.GridApi)],e.prototype,"gridApi",void 0),o([p.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),o([p.PreDestroy,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"destroy",null),e=t=o([p.Bean("filterManager")],e);var t}();t.FilterManager=v},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=n(1066),i=o(r),a=n(1068),s=o(a);t.default={simpleCheckForValidColor:function(e){var t=["r","g","b","a","h","s","l","v"],n=0,o=0;return(0,i.default)(t,function(t){if(e[t]&&(n+=1,isNaN(e[t])||(o+=1),"s"===t||"l"===t)){/^\d+%$/.test(e[t])&&(o+=1)}}),n===o&&e},toState:function(e,t){var n=e.hex?(0,s.default)(e.hex):(0,s.default)(e),o=n.toHsl(),r=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===o.s&&(o.h=t||0,r.h=t||0),{hsl:o,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:r,oldHue:e.h||t||o.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,s.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}};t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t,n){"use strict";function o(){T.ReactReconcileTransaction&&_||c("123")}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,r,i,a){return o(),_.batchedUpdates(e,t,n,r,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length&&c("124",t,y.length),y.sort(a),C++;for(var n=0;n<t;n++){var o=y[n],r=o._pendingCallbacks;o._pendingCallbacks=null;var i;if(f.logTopLevelRenders){var s=o;o._currentElement.type.isReactTopLevelWrapper&&(s=o._renderedComponent),i="React update: "+s.getName(),console.time(i)}if(g.performUpdateIfNecessary(o,e.reconcileTransaction,C),i&&console.timeEnd(i),r)for(var l=0;l<r.length;l++)e.callbackQueue.enqueue(r[l],o.getPublicInstance())}}function l(e){if(o(),!_.isBatchingUpdates)return void _.batchedUpdates(l,e);y.push(e),null==e._updateBatchNumber&&(e._updateBatchNumber=C+1)}function u(e,t){v(_.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."),b.enqueue(e,t),w=!0}var c=n(20),d=n(23),p=n(321),h=n(80),f=n(322),g=n(100),m=n(150),v=n(16),y=[],C=0,b=p.getPooled(),w=!1,_=null,E={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),A()):y.length=0}},x={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},S=[E,x];d(r.prototype,m,{getTransactionWrappers:function(){return S},destructor:function(){this.dirtyComponentsLength=null,p.release(this.callbackQueue),this.callbackQueue=null,T.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return m.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),h.addPoolingTo(r);var A=function(){for(;y.length||w;){if(y.length){var e=r.getPooled();e.perform(s,null,e),r.release(e)}if(w){w=!1;var t=b;b=p.getPooled(),t.notifyAll(),p.release(t)}}},R={injectReconcileTransaction:function(e){e||c("126"),T.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||c("127"),"function"!==typeof e.batchedUpdates&&c("128"),"boolean"!==typeof e.isBatchingUpdates&&c("129"),_=e}},T={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:l,flushBatchedUpdates:A,injection:R,asap:u};e.exports=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(693),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(894),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),s=n(2),l=n(2),u=function(){function e(){this.expressionToFunctionCache={}}return e.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},e.prototype.evaluate=function(e,t){if("function"===typeof e){return e(t)}if("string"===typeof e){var n=e;return this.evaluateExpression(n,t)}console.error("ag-Grid: value should be either a string or a function",e)},e.prototype.evaluateExpression=function(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(t){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Exception = "+t),null}},e.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=n,n},e.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},o([i(0,l.Qualifier("loggerFactory")),r("design:type",Function),r("design:paramtypes",[a.LoggerFactory]),r("design:returntype",void 0)],e.prototype,"setBeans",null),e=o([s.Bean("expressionService")],e)}();t.ExpressionService=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),l=n(6),u=n(35),c=n(60),d=n(189),p=n(62),h=n(14),f=n(188),g=n(17),m=n(22),v=n(140),y=n(2),C=n(118),b=n(13),w=n(33),_=n(93),E=n(286),x=n(92),S=n(48),A=n(117),R=n(21),T=n(94),O=n(120),k=n(187),P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rowCompsByIndex={},t.floatingTopRowComps=[],t.floatingBottomRowComps=[],t.refreshInProgress=!1,t}return o(t,e),t.prototype.agWire=function(e){this.logger=e.create("RowRenderer")},t.prototype.init=function(){this.forPrint=this.gridOptionsWrapper.isForPrint(),this.autoHeight=this.gridOptionsWrapper.isAutoHeight(),this.rowContainers=this.gridPanel.getRowContainers(),this.addDestroyableEventListener(this.eventService,g.Events.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addDestroyableEventListener(this.eventService,g.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,g.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.redrawAfterModelUpdate()},t.prototype.onPageLoaded=function(e){s.Utils.missing(e)&&(e={type:g.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1}),this.onModelUpdated(e)},t.prototype.getAllCellsForColumn=function(e){function t(t,o){var r=o.getCellForCol(e);r&&n.push(r)}var n=[];return s.Utils.iterateObject(this.rowCompsByIndex,t),s.Utils.iterateObject(this.floatingBottomRowComps,t),s.Utils.iterateObject(this.floatingTopRowComps,t),n},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.floatingTopRowComps,this.pinnedRowModel.getPinnedTopRowData(),this.rowContainers.floatingTopPinnedLeft,this.rowContainers.floatingTopPinnedRight,this.rowContainers.floatingTop,this.rowContainers.floatingTopFullWidth),this.refreshFloatingRows(this.floatingBottomRowComps,this.pinnedRowModel.getPinnedBottomRowData(),this.rowContainers.floatingBottomPinnedLeft,this.rowContainers.floatingBottomPinnedRight,this.rowContainers.floatingBottom,this.rowContainers.floatingBottomFullWith)},t.prototype.refreshFloatingRows=function(e,t,n,o,r,i){var a=this;e.forEach(function(e){e.destroy()}),e.length=0;var l=this.columnController.getAllDisplayedColumns();s.Utils.missingOrEmpty(l)||(t&&t.forEach(function(t){var s=new f.RowComp(a.$scope,r,n,o,i,t,a.beans,!1,!1);s.init(),e.push(s)}),this.flushContainers(e))},t.prototype.onPinnedRowDataChanged=function(){this.redrawAfterModelUpdate()},t.prototype.onModelUpdated=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage};this.redrawAfterModelUpdate(t)},t.prototype.getRenderedIndexesForRowNodes=function(e){var t=[];return s.Utils.missing(e)?t:(s.Utils.iterateObject(this.rowCompsByIndex,function(n,o){var r=o.getRowNode();e.indexOf(r)>=0&&t.push(n)}),t)},t.prototype.redrawRows=function(e){if(e&&0!=e.length){var t=this.getRenderedIndexesForRowNodes(e);this.removeRowComps(t),this.redrawAfterModelUpdate({recycleRows:!0})}},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t=e.suppressKeepFocus?null:this.focusedCellController.getFocusCellToUseAfterRefresh();if(s.Utils.missing(t))return null;var n=document.activeElement,o=this.gridOptionsWrapper.getDomData(n,v.CellComp.DOM_DATA_KEY_CELL_COMP);return s.Utils.missing(o)?null:t},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.forPrint||this.sizeContainerToPageHeight(),this.scrollToTopIfNewData(e);var n=this.forPrint||this.autoHeight,o=!n&&e.recycleRows,r=!n&&e.animate,i=this.binRowComps(o);this.redraw(i,r),e.onlyBody||this.refreshFloatingRowComps(),this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,n=this.gridOptionsWrapper.isSuppressScrollOnNewData();t&&!n&&this.gridPanel.scrollToTop()},t.prototype.sizeContainerToPageHeight=function(){var e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainers.body.setHeight(e),this.rowContainers.fullWidth.setHeight(e),this.rowContainers.pinnedLeft.setHeight(e),this.rowContainers.pinnedRight.setHeight(e)},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw"ag-Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, eg instead of api.refreshView(), call setTimeout(function(){api.refreshView(),0}). To see what part of your code that caused the refresh check this stacktrace.";this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.restoreFocusedCell=function(e){e&&this.focusedCellController.setFocusedCell(e.rowIndex,e.column,e.floating,!0)},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.forEachRowComp(function(t,n){n.stopEditing(e)})},t.prototype.forEachCellComp=function(e){s.Utils.iterateObject(this.rowCompsByIndex,function(t,n){n.forEachCellComp(e)})},t.prototype.forEachRowComp=function(e){s.Utils.iterateObject(this.rowCompsByIndex,e),s.Utils.iterateObject(this.floatingTopRowComps,e),s.Utils.iterateObject(this.floatingBottomRowComps,e)},t.prototype.addRenderedRowListener=function(e,t,n){this.rowCompsByIndex[t].addEventListener(e,n)},t.prototype.refreshCells=function(e){var t=this;void 0===e&&(e={});var n;s.Utils.exists(e.rowNodes)&&(n={top:{},bottom:{},normal:{}},e.rowNodes.forEach(function(e){e.rowPinned===m.Constants.PINNED_TOP?n.top[e.id]=!0:e.rowPinned===m.Constants.PINNED_BOTTOM?n.bottom[e.id]=!0:n.normal[e.id]=!0}));var o;s.Utils.exists(e.columns)&&(o={},e.columns.forEach(function(e){var n=t.columnController.getGridColumn(e);o[n.getId()]=!0}));var r=function(t){var r=t.getRowNode(),i=r.id,a=r.rowPinned;if(s.Utils.exists(n))if(a===m.Constants.PINNED_BOTTOM){if(!n.bottom[i])return}else if(a===m.Constants.PINNED_TOP){if(!n.top[i])return}else if(!n.normal[i])return;t.forEachCellComp(function(t){var n=t.getColumn().getId();o&&!o[n]||t.refreshCell({forceRefresh:e.force,volatile:e.volatile,newData:!1})})};s.Utils.iterateObject(this.rowCompsByIndex,function(e,t){r(t)}),this.floatingTopRowComps&&this.floatingTopRowComps.forEach(r),this.floatingBottomRowComps&&this.floatingBottomRowComps.forEach(r)},t.prototype.destroy=function(){e.prototype.destroy.call(this);var t=Object.keys(this.rowCompsByIndex);this.removeRowComps(t)},t.prototype.binRowComps=function(e){var t,n=this,o={};return e?(t=[],s.Utils.iterateObject(this.rowCompsByIndex,function(e,r){var i=r.getRowNode();s.Utils.exists(i.id)?(o[i.id]=r,delete n.rowCompsByIndex[e]):t.push(e)})):t=Object.keys(this.rowCompsByIndex),this.removeRowComps(t),o},t.prototype.removeRowComps=function(e){var t=this;e.forEach(function(e){t.rowCompsByIndex[e].destroy(),delete t.rowCompsByIndex[e]})},t.prototype.redrawAfterScroll=function(){this.getLockOnRefresh(),this.redraw(null,!1,!0),this.releaseLockOnRefresh()},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach(function(e){return t[e]=!0});var n=Object.keys(this.rowCompsByIndex),o=s.Utils.filter(n,function(e){return!t[e]});this.removeRowComps(o)},t.prototype.calculateIndexesToDraw=function(){var e=this,t=s.Utils.createArrayOfNumbers(this.firstRenderedRow,this.lastRenderedRow);return s.Utils.iterateObject(this.rowCompsByIndex,function(n,o){var r=Number(n);(r<e.firstRenderedRow||r>e.lastRenderedRow)&&e.keepRowBecauseEditing(o)&&t.push(r)}),t.sort(function(e,t){return e-t}),t},t.prototype.redraw=function(e,t,n){var o=this;void 0===t&&(t=!1),void 0===n&&(n=!1),this.workOutFirstAndLastRowsToRender();var r=this.calculateIndexesToDraw();this.removeRowCompsNotToDraw(r);var i=[],a=[];r.forEach(function(r){var l=o.createOrUpdateRowComp(r,e,t,n);s.Utils.exists(l)&&(a.push(l),s.Utils.pushAll(i,l.getAndClearNextVMTurnFunctions()))}),this.flushContainers(a),s.Utils.executeNextVMTurn(i),n&&!this.gridOptionsWrapper.isSuppressAnimationFrame()?this.beans.taskQueue.addP2Task(this.destroyRowComps.bind(this,e,t)):this.destroyRowComps(e,t),this.checkAngularCompile()},t.prototype.flushContainers=function(e){s.Utils.iterateObject(this.rowContainers,function(e,t){t&&t.flushRowTemplates()}),e.forEach(function(e){return e.afterFlush()})},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnController.isPinningLeft(),t=this.columnController.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.gridOptionsWrapper.isEmbedFullWidthRows()&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];this.forEachRowComp(function(t,n){if(n.isFullWidth()){var o=n.getRowNode().rowIndex;e.push(o.toString())}}),this.removeRowComps(e),this.redrawAfterScroll()},t.prototype.createOrUpdateRowComp=function(e,t,n,o){var r,i=this.rowCompsByIndex[e];if(i||(r=this.paginationProxy.getRow(e),s.Utils.exists(r)&&s.Utils.exists(t)&&t[r.id]&&(i=t[r.id],t[r.id]=null)),i)i.ensureDomOrder();else{if(r||(r=this.paginationProxy.getRow(e)),!s.Utils.exists(r))return;i=this.createRowComp(r,n,o)}return this.rowCompsByIndex[e]=i,i},t.prototype.destroyRowComps=function(e,t){var n=[];s.Utils.iterateObject(e,function(e,o){o&&(o.destroy(t),s.Utils.pushAll(n,o.getAndClearDelayedDestroyFunctions()))}),s.Utils.executeInAWhile(n)},t.prototype.checkAngularCompile=function(){var e=this;this.gridOptionsWrapper.isAngularCompileRows()&&setTimeout(function(){e.$scope.$apply()},0)},t.prototype.workOutFirstAndLastRowsToRender=function(){var e,t;if(this.paginationProxy.isRowsToRender()){var n=this.paginationProxy.getPageFirstRow(),o=this.paginationProxy.getPageLastRow();if(this.forPrint)e=n,t=o;else{var r=this.paginationProxy?this.paginationProxy.getPixelOffset():0,i=this.gridPanel.getVerticalPixelRange(),a=i.top,s=i.bottom,l=this.paginationProxy.getRowIndexAtPixel(a+r),u=this.paginationProxy.getRowIndexAtPixel(s+r),c=this.gridOptionsWrapper.getRowBuffer();l-=c,u+=c,l<n&&(l=n),u>o&&(u=o),e=l,t=u}}else e=0,t=-1;var d=e!==this.firstRenderedRow,p=t!==this.lastRenderedRow;if(d||p){this.firstRenderedRow=e,this.lastRenderedRow=t;var h={type:g.Events.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(h)}},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.keepRowBecauseEditing=function(e){var t=e.getRowNode(),n=this.focusedCellController.isRowNodeFocused(t),o=e.isEditing();return!(!n&&!o)&&!!this.paginationProxy.isRowPresent(t)},t.prototype.createRowComp=function(e,t,n){var o=n&&!this.gridOptionsWrapper.isSuppressAnimationFrame(),r=new f.RowComp(this.$scope,this.rowContainers.body,this.rowContainers.pinnedLeft,this.rowContainers.pinnedRight,this.rowContainers.fullWidth,e,this.beans,t,o);return r.init(),r},t.prototype.getRenderedNodes=function(){var e=this.rowCompsByIndex;return Object.keys(e).map(function(t){return e[t].getRowNode()})},t.prototype.navigateToNextCell=function(e,t,n,o,r){for(var i=new x.GridCell({rowIndex:n,floating:r,column:o}),a=i;;){if(a=this.cellNavigationService.getNextCellToFocus(t,a),s.Utils.missing(a))break;if(!this.gridOptionsWrapper.isGroupUseEntireRow())break;if(!this.paginationProxy.getRow(a.rowIndex).group)break}var l=this.gridOptionsWrapper.getNavigateToNextCellFunc();if(s.Utils.exists(l)){var u={key:t,previousCellDef:i,nextCellDef:a?a.getGridCellDef():null,event:e},c=l(u);a=s.Utils.exists(c)?new x.GridCell(c):null}if(a&&(s.Utils.missing(a.floating)&&this.gridPanel.ensureIndexVisible(a.rowIndex),a.column.isPinned()||this.gridPanel.ensureColumnVisible(a.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames(),this.focusedCellController.setFocusedCell(a.rowIndex,a.column,a.floating,!0),this.rangeController)){var d=new x.GridCell({rowIndex:a.rowIndex,floating:a.floating,column:a.column});this.rangeController.setRangeToCell(d)}},t.prototype.startEditingCell=function(e,t,n){var o=this.getComponentForCell(e);o&&o.startRowOrCellEdit(t,n)},t.prototype.getComponentForCell=function(e){var t;switch(e.floating){case m.Constants.PINNED_TOP:t=this.floatingTopRowComps[e.rowIndex];break;case m.Constants.PINNED_BOTTOM:t=this.floatingBottomRowComps[e.rowIndex];break;default:t=this.rowCompsByIndex[e.rowIndex]}return t?t.getRenderedCellForColumn(e.column):null},t.prototype.onTabKeyDown=function(e,t){var n=t.shiftKey;this.moveToCellAfter(e,n)&&t.preventDefault()},t.prototype.tabToNextCell=function(e){var t=this.focusedCellController.getFocusedCell();if(s.Utils.missing(t))return!1;var n=this.getComponentForCell(t);return!s.Utils.missing(n)&&this.moveToCellAfter(n,e)},t.prototype.moveToCellAfter=function(e,t){var n=e.isEditing(),o=e.getGridCell(),r=this.findNextCellToFocusOn(o,t,n);return!!s.Utils.exists(r)&&(n?this.gridOptionsWrapper.isFullRowEdit()?this.moveEditToNextRow(e,r):this.moveEditToNextCell(e,r):r.focusCell(!0),!0)},t.prototype.moveEditToNextCell=function(e,t){e.stopEditing(),t.startEditingIfEnabled(null,null,!0),t.focusCell(!1)},t.prototype.moveEditToNextRow=function(e,t){var n=e.getGridCell(),o=t.getGridCell();if(n.rowIndex===o.rowIndex&&n.floating===o.floating)e.setFocusOutOnEditor(),t.setFocusInOnEditor();else{var r=e.getRenderedRow(),i=t.getRenderedRow();e.setFocusOutOnEditor(),r.stopEditing(),i.startRowEditing(),t.setFocusInOnEditor()}t.focusCell()},t.prototype.findNextCellToFocusOn=function(e,t,n){for(var o=e;;){o=this.cellNavigationService.getNextTabbedCell(o,t);var r=this.gridOptionsWrapper.getTabToNextCellFunc();if(s.Utils.exists(r)){var i={backwards:t,editing:n,previousCellDef:e.getGridCellDef(),nextCellDef:o?o.getGridCellDef():null},a=r(i);o=s.Utils.exists(a)?new x.GridCell(a):null}if(!o)return null;s.Utils.missing(o.floating)&&this.gridPanel.ensureIndexVisible(o.rowIndex),o.column.isPinned()||this.gridPanel.ensureColumnVisible(o.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames();var l=this.getComponentForCell(o);if(!s.Utils.missing(l)&&((!n||l.isCellEditable())&&!l.isSuppressNavigable())){if(this.rangeController){var u=new x.GridCell({rowIndex:o.rowIndex,floating:o.floating,column:o.column});this.rangeController.setRangeToCell(u)}return l}}},r([y.Autowired("paginationProxy"),i("design:type",A.PaginationProxy)],t.prototype,"paginationProxy",void 0),r([y.Autowired("columnController"),i("design:type",b.ColumnController)],t.prototype,"columnController",void 0),r([y.Autowired("gridOptionsWrapper"),i("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),r([y.Autowired("gridCore"),i("design:type",C.GridCore)],t.prototype,"gridCore",void 0),r([y.Autowired("gridPanel"),i("design:type",u.GridPanel)],t.prototype,"gridPanel",void 0),r([y.Autowired("$scope"),i("design:type",Object)],t.prototype,"$scope",void 0),r([y.Autowired("expressionService"),i("design:type",c.ExpressionService)],t.prototype,"expressionService",void 0),r([y.Autowired("templateService"),i("design:type",d.TemplateService)],t.prototype,"templateService",void 0),r([y.Autowired("valueService"),i("design:type",p.ValueService)],t.prototype,"valueService",void 0),r([y.Autowired("eventService"),i("design:type",h.EventService)],t.prototype,"eventService",void 0),r([y.Autowired("pinnedRowModel"),i("design:type",T.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),r([y.Autowired("context"),i("design:type",y.Context)],t.prototype,"context",void 0),r([y.Autowired("loggerFactory"),i("design:type",w.LoggerFactory)],t.prototype,"loggerFactory",void 0),r([y.Autowired("focusedCellController"),i("design:type",_.FocusedCellController)],t.prototype,"focusedCellController",void 0),r([y.Autowired("cellNavigationService"),i("design:type",E.CellNavigationService)],t.prototype,"cellNavigationService",void 0),r([y.Autowired("columnApi"),i("design:type",b.ColumnApi)],t.prototype,"columnApi",void 0),r([y.Autowired("gridApi"),i("design:type",R.GridApi)],t.prototype,"gridApi",void 0),r([y.Autowired("beans"),i("design:type",O.Beans)],t.prototype,"beans",void 0),r([y.Autowired("animationFrameService"),i("design:type",k.AnimationFrameService)],t.prototype,"animationFrameService",void 0),r([y.Optional("rangeController"),i("design:type",Object)],t.prototype,"rangeController",void 0),r([a(0,y.Qualifier("loggerFactory")),i("design:type",Function),i("design:paramtypes",[w.LoggerFactory]),i("design:returntype",void 0)],t.prototype,"agWire",null),r([y.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"init",null),r([y.PreDestroy,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"destroy",null),t=r([y.Bean("rowRenderer")],t)}(S.BeanStub);t.RowRenderer=P},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(60),s=n(13),l=n(2),u=n(3),c=n(17),d=n(14),p=n(115),h=function(){function e(){this.initialised=!1}return e.prototype.init=function(){this.cellExpressions=this.gridOptionsWrapper.isEnableCellExpressions(),this.initialised=!0},e.prototype.getValue=function(e,t,n){void 0===n&&(n=!1),this.initialised||this.init();var o,r=e.getColDef(),i=r.field,a=e.getId(),s=t.data,l=t.groupData&&void 0!==t.groupData[a],c=!n&&t.aggData&&void 0!==t.aggData[a];if(o=l?t.groupData[a]:c?t.aggData[a]:r.valueGetter?this.executeValueGetter(r.valueGetter,s,e,t):i&&s?u._.getValueUsingField(s,i,e.isFieldContainsDots()):void 0,this.cellExpressions&&"string"===typeof o&&0===o.indexOf("=")){var d=o.substring(1);o=this.executeValueGetter(d,s,e,t)}return o},e.prototype.setValue=function(e,t,n){var o=this.columnController.getPrimaryColumn(t);if(e&&o){var r=e.data;u._.missing(r)&&(e.data={});var i=o.getColDef(),a=i.field,s=i.newValueHandler,l=i.valueSetter;if(u._.missing(a)&&u._.missing(s)&&u._.missing(l))return void console.warn("ag-Grid: you need either field or valueSetter set on colDef for editing to work");var d={node:e,data:e.data,oldValue:this.getValue(o,e),newValue:n,colDef:o.getColDef(),column:o,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};d.newValue=n;var p;if(p=u._.exists(s)?s(d):u._.exists(l)?this.expressionService.evaluate(l,d):this.setValueUsingField(r,a,n,o.isFieldContainsDots()),void 0===p&&(p=!0),p){e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),d.newValue=this.getValue(o,e),"function"===typeof o.getColDef().onCellValueChanged&&o.getColDef().onCellValueChanged(d);var h={type:c.Events.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:d.column,api:d.api,colDef:d.colDef,columnApi:d.columnApi,context:d.context,data:e.data,node:e,oldValue:d.oldValue,newValue:d.newValue,value:d.newValue};this.eventService.dispatchEvent(h)}}},e.prototype.setValueUsingField=function(e,t,n,o){if(o)for(var r=t.split("."),i=e;r.length>0&&i;){var a=r.shift();0===r.length?i[a]=n:i=i[a]}else e[t]=n;return!0},e.prototype.executeValueGetter=function(e,t,n,o){var r=n.getId(),i=this.valueCache.getValue(o,r);if(void 0!==i)return i;var a={data:t,node:o,column:n,colDef:n.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,o)},s=this.expressionService.evaluate(e,a);return this.valueCache.setValue(o,r,s),s},e.prototype.getValueCallback=function(e,t){var n=this.columnController.getPrimaryColumn(t);return n?this.getValue(n,e):null},o([l.Autowired("gridOptionsWrapper"),r("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([l.Autowired("expressionService"),r("design:type",a.ExpressionService)],e.prototype,"expressionService",void 0),o([l.Autowired("columnController"),r("design:type",s.ColumnController)],e.prototype,"columnController",void 0),o([l.Autowired("eventService"),r("design:type",d.EventService)],e.prototype,"eventService",void 0),o([l.Autowired("valueCache"),r("design:type",p.ValueCache)],e.prototype,"valueCache",void 0),o([l.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([l.Bean("valueService")],e)}();t.ValueService=h},function(e,t,n){"use strict";var o={current:null};e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];s?this[i]=s(n):"target"===i?this.target=o:this[i]=n[i]}var l=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=l?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var r=n(23),i=n(80),a=n(44),s=(n(19),["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};r(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<s.length;n++)this[s[n]]=null}}),o.Interface=l,o.augmentClass=function(e,t){var n=this,o=function(){};o.prototype=n.prototype;var a=new o;r(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=r({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(o,i.fourArgumentPooler),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){return e<t?t:e>n?n:e}function r(e){var t=e.type,n=e.values;if(t.indexOf("rgb")>-1)for(var o=0;o<3;o++)n[o]=parseInt(n[o]);var r=void 0;return r=t.indexOf("hsl")>-1?e.type+"("+n[0]+", "+n[1]+"%, "+n[2]+"%":e.type+"("+n[0]+", "+n[1]+", "+n[2],4===n.length?r+=", "+e.values[3]+")":r+=")",r}function i(e){if(4===e.length){for(var t="#",n=1;n<e.length;n++)t+=e.charAt(n)+e.charAt(n);e=t}var o={r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16)};return"rgb("+o.r+", "+o.g+", "+o.b+")"}function a(e){if("#"===e.charAt(0))return a(i(e));var t=e.indexOf("("),n=e.substring(0,t),o=e.substring(t+1,e.length-1).split(",");return o=o.map(function(e){return parseFloat(e)}),{type:n,values:o}}function s(e,t){var n=l(e),o=l(t),r=(Math.max(n,o)+.05)/(Math.min(n,o)+.05);return Number(r.toFixed(2))}function l(e){if(e=a(e),e.type.indexOf("rgb")>-1){var t=e.values.map(function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}if(e.type.indexOf("hsl")>-1)return e.values[2]/100}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return l(e)>.5?d(e,t):p(e,t)}function c(e,t){return e=a(e),t=o(t,0,1),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,r(e)}function d(e,t){if(e=a(e),t=o(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")>-1)for(var n=0;n<3;n++)e.values[n]*=1-t;return r(e)}function p(e,t){if(e=a(e),t=o(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")>-1)for(var n=0;n<3;n++)e.values[n]+=(255-e.values[n])*t;return r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.convertColorToString=r,t.convertHexToRGB=i,t.decomposeColor=a,t.getContrastRatio=s,t.getLuminance=l,t.emphasize=u,t.fade=c,t.darken=d,t.lighten=p;var h=n(41);!function(e){e&&e.__esModule}(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(702),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),s=n(2),l=n(3),u=n(6),c=n(184),d=n(13),p=n(198);!function(e){e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell"}(t.DragSourceType||(t.DragSourceType={}));var h;!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(h=t.VDirection||(t.VDirection={}));var f;!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(f=t.HDirection||(t.HDirection={}));var g=function(){function e(){this.dragSourceAndParamsList=[],this.dropTargets=[]}return t=e,e.prototype.init=function(){this.ePinnedIcon=l.Utils.createIcon("columnMovePin",this.gridOptionsWrapper,null),this.ePlusIcon=l.Utils.createIcon("columnMoveAdd",this.gridOptionsWrapper,null),this.eHiddenIcon=l.Utils.createIcon("columnMoveHide",this.gridOptionsWrapper,null),this.eMoveIcon=l.Utils.createIcon("columnMoveMove",this.gridOptionsWrapper,null),this.eLeftIcon=l.Utils.createIcon("columnMoveLeft",this.gridOptionsWrapper,null),this.eRightIcon=l.Utils.createIcon("columnMoveRight",this.gridOptionsWrapper,null),this.eGroupIcon=l.Utils.createIcon("columnMoveGroup",this.gridOptionsWrapper,null),this.eAggregateIcon=l.Utils.createIcon("columnMoveValue",this.gridOptionsWrapper,null),this.ePivotIcon=l.Utils.createIcon("columnMovePivot",this.gridOptionsWrapper,null),this.eDropNotAllowedIcon=l.Utils.createIcon("dropNotAllowed",this.gridOptionsWrapper,null)},e.prototype.setBeans=function(e){this.logger=e.create("OldToolPanelDragAndDropService")},e.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var n={eElement:e.eElement,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this)};this.dragSourceAndParamsList.push({params:n,dragSource:e}),this.dragService.addDragSource(n,t)},e.prototype.removeDragSource=function(e){var t=l.Utils.find(this.dragSourceAndParamsList,function(t){return t.dragSource===e});t&&(this.dragService.removeDragSource(t.params),l.Utils.removeFromArray(this.dragSourceAndParamsList,t))},e.prototype.destroy=function(){var e=this;this.dragSourceAndParamsList.forEach(function(t){e.dragService.removeDragSource(t.params)}),this.dragSourceAndParamsList.length=0},e.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},e.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.dragItemCallback(),this.dragItem.columns.forEach(function(e){return e.setMoving(!0)}),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.createGhost()},e.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragItem.columns.forEach(function(e){return e.setMoving(!1)}),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},e.prototype.onDragging=function(e,t){var n=this.workOutHDirection(e),o=this.workOutVDirection(e);this.eventLastTime=e,this.positionGhost(e);var r=l.Utils.find(this.dropTargets,this.isMouseOnDropTarget.bind(this,e));if(r!==this.lastDropTarget)this.leaveLastTargetIfExists(e,n,o,t),this.enterDragTargetIfExists(r,e,n,o,t),this.lastDropTarget=r;else if(r){var i=this.createDropTargetEvent(r,e,n,o,t);r.onDragging(i)}},e.prototype.enterDragTargetIfExists=function(e,t,n,o,r){if(e){var i=this.createDropTargetEvent(e,t,n,o,r);e.onDragEnter(i),this.setGhostIcon(e.getIconName?e.getIconName():null)}},e.prototype.leaveLastTargetIfExists=function(e,t,n,o){if(this.lastDropTarget){var r=this.createDropTargetEvent(this.lastDropTarget,e,t,n,o);this.lastDropTarget.onDragLeave(r),this.setGhostIcon(null)}},e.prototype.getAllContainersFromDropTarget=function(e){var t=[e.getContainer()],n=e.getSecondaryContainers?e.getSecondaryContainers():null;return n&&(t=t.concat(n)),t},e.prototype.isMouseOnDropTarget=function(e,t){var n=this.getAllContainersFromDropTarget(t),o=!1;return n.forEach(function(t){if(t){var n=t.getBoundingClientRect();if(0!==n.width&&0!==n.height){var r=e.clientX>=n.left&&e.clientX<=n.right,i=e.clientY>=n.top&&e.clientY<=n.bottom;r&&i&&(o=!0)}}}),o},e.prototype.addDropTarget=function(e){this.dropTargets.push(e)},e.prototype.workOutHDirection=function(e){return this.eventLastTime.clientX>e.clientX?f.Left:this.eventLastTime.clientX<e.clientX?f.Right:null},e.prototype.workOutVDirection=function(e){return this.eventLastTime.clientY>e.clientY?h.Up:this.eventLastTime.clientY<e.clientY?h.Down:null},e.prototype.createDropTargetEvent=function(e,t,n,o,r){var i=e.getContainer().getBoundingClientRect();return{event:t,x:t.clientX-i.left,y:t.clientY-i.top,vDirection:o,hDirection:n,dragSource:this.dragSource,fromNudge:r,dragItem:this.dragItem}},e.prototype.positionGhost=function(e){var t=this.eGhost.getBoundingClientRect(),n=t.height,o=l.Utils.getBodyWidth()-2,r=l.Utils.getBodyHeight()-2,i=e.pageY-n/2,a=e.pageX-30,s=this.gridOptionsWrapper.getDocument(),u=window.pageYOffset||s.documentElement.scrollTop,c=window.pageXOffset||s.documentElement.scrollLeft;o>0&&a+this.eGhost.clientWidth>o+c&&(a=o+c-this.eGhost.clientWidth),a<0&&(a=0),r>0&&i+this.eGhost.clientHeight>r+u&&(i=r+u-this.eGhost.clientHeight),i<0&&(i=0),this.eGhost.style.left=a+"px",this.eGhost.style.top=i+"px"},e.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},e.prototype.createGhost=function(){this.eGhost=l.Utils.loadTemplate(t.GHOST_TEMPLATE),this.eGhost.classList.add(this.environment.getTheme()),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null),this.eGhost.querySelector(".ag-dnd-ghost-label").innerHTML=this.dragSource.dragItemName,this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var e=this.gridOptionsWrapper.getDocument();this.eGhostParent=e.querySelector("body"),this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("ag-Grid: could not find document body, it is needed for dragging columns")},e.prototype.setGhostIcon=function(e,n){void 0===n&&(n=!1),l.Utils.removeAllChildren(this.eGhostIcon);var o;switch(e){case t.ICON_ADD:o=this.ePlusIcon;break;case t.ICON_PINNED:o=this.ePinnedIcon;break;case t.ICON_MOVE:o=this.eMoveIcon;break;case t.ICON_LEFT:o=this.eLeftIcon;break;case t.ICON_RIGHT:o=this.eRightIcon;break;case t.ICON_GROUP:o=this.eGroupIcon;break;case t.ICON_AGGREGATE:o=this.eAggregateIcon;break;case t.ICON_PIVOT:o=this.ePivotIcon;break;case t.ICON_NOT_ALLOWED:o=this.eDropNotAllowedIcon;break;default:o=this.eHiddenIcon}this.eGhostIcon.appendChild(o),l.Utils.addOrRemoveCssClass(this.eGhostIcon,"ag-shake-left-to-right",n)},e.ICON_PINNED="pinned",e.ICON_ADD="add",e.ICON_MOVE="move",e.ICON_LEFT="left",e.ICON_RIGHT="right",e.ICON_GROUP="group",e.ICON_AGGREGATE="aggregate",e.ICON_PIVOT="pivot",e.ICON_NOT_ALLOWED="notAllowed",e.GHOST_TEMPLATE='<div class="ag-dnd-ghost"> <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span> <div class="ag-dnd-ghost-label"> </div></div>',o([s.Autowired("gridOptionsWrapper"),r("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([s.Autowired("dragService"),r("design:type",c.DragService)],e.prototype,"dragService",void 0),o([s.Autowired("environment"),r("design:type",p.Environment)],e.prototype,"environment",void 0),o([s.Autowired("columnController"),r("design:type",d.ColumnController)],e.prototype,"columnController",void 0),o([s.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),o([i(0,s.Qualifier("loggerFactory")),r("design:type",Function),r("design:paramtypes",[a.LoggerFactory]),r("design:returntype",void 0)],e.prototype,"setBeans",null),o([s.PreDestroy,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"destroy",null),e=t=o([s.Bean("dragAndDropService")],e);var t}();t.DragAndDropService=g},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var o=n(68),r=n(36),i=n(225),a=n(102),s=function(e,t,n){var l,u,c,d=e&s.F,p=e&s.G,h=e&s.S,f=e&s.P,g=e&s.B,m=e&s.W,v=p?r:r[t]||(r[t]={}),y=v.prototype,C=p?o:h?o[t]:(o[t]||{}).prototype;p&&(n=t);for(l in n)(u=!d&&C&&void 0!==C[l])&&l in v||(c=u?C[l]:n[l],v[l]=p&&"function"!=typeof C[l]?n[l]:g&&u?i(c,o):m&&C[l]==c?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):f&&"function"==typeof c?i(Function.call,c):c,f&&((v.virtual||(v.virtual={}))[l]=c,e&s.R&&y&&!y[l]&&a(y,l,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var o=n(82),r=n(343),i=n(226),a=Object.defineProperty;t.f=n(83)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){e.exports=n(665)},function(e,t){t=e.exports=function(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeof e)return i[e];var r=String(e),a=n[r.toLowerCase()];if(a)return a;var a=o[r.toLowerCase()];return a||(1===r.length?r.charCodeAt(0):void 0)};var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)n[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)n[r-48]=r;for(r=1;r<13;r++)n["f"+r]=r+111;for(r=0;r<10;r++)n["numpad "+r]=r+96;var i=t.names=t.title={};for(r in n)i[n[r]]=r;for(var a in o)n[a]=o[a]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(246),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){function o(e){if(!a(e)||r(e)!=s)return!1;var t=i(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}var r=n(89),i=n(251),a=n(76),s="[object Object]",l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,p=c.call(Object);e.exports=o},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(898),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(29),a=n(2),s=n(6),l=n(13),u=n(14),c=n(17),d=n(2),p=n(3),h=n(21),f=function(){function e(){}return t=e,e.prototype.progressSort=function(e,t){var n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t)},e.prototype.setSortForColumn=function(e,t,n){if(t!==i.Column.SORT_ASC&&t!==i.Column.SORT_DESC&&(t=null),e.setSort(t),e.getSort()){var o=Number((new Date).valueOf());e.setSortedAt(o)}else e.setSortedAt(null);n&&!this.gridOptionsWrapper.isSuppressMultiSort()||this.clearSortBarThisColumn(e),this.dispatchSortChangedEvents()},e.prototype.onSortChanged=function(){this.dispatchSortChangedEvents()},e.prototype.dispatchSortChangedEvents=function(){var e={type:c.Events.EVENT_SORT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.clearSortBarThisColumn=function(e){this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach(function(t){t!==e&&t.setSort(null)})},e.prototype.getNextSortDirection=function(e){var n;if(n=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():t.DEFAULT_SORTING_ORDER,!Array.isArray(n)||n.length<=0)return void console.warn("ag-grid: sortingOrder must be an array with at least one element, currently it's "+n);var o,r=n.indexOf(e.getSort()),i=r<0,a=r==n.length-1;return o=i||a?n[0]:n[r+1],t.DEFAULT_SORTING_ORDER.indexOf(o)<0?(console.warn("ag-grid: invalid sort type "+o),null):o},e.prototype.getSortModel=function(){var e=this.getColumnsWithSortingOrdered();return p.Utils.map(e,function(e){return{colId:e.getColId(),sort:e.getSort()}})},e.prototype.setSortModel=function(e){var t=this;if(!this.gridOptionsWrapper.isEnableSorting())return void console.warn("ag-grid: You are setting the sort model on a grid that does not have sorting enabled");var n=e&&e.length>0;this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach(function(o){var r=null,i=-1;if(n&&!o.getColDef().suppressSorting)for(var a=0;a<e.length;a++){var s=e[a];"string"===typeof s.colId&&"string"===typeof o.getColId()&&t.compareColIds(s,o)&&(r=s.sort,i=a)}r?(o.setSort(r),o.setSortedAt(i)):(o.setSort(null),o.setSortedAt(null))}),this.dispatchSortChangedEvents()},e.prototype.compareColIds=function(e,t){return e.colId===t.getColId()},e.prototype.getColumnsWithSortingOrdered=function(){var e=this.columnController.getPrimaryAndSecondaryAndAutoColumns(),t=p.Utils.filter(e,function(e){return!!e.getSort()});return t.sort(function(e,t){return e.sortedAt-t.sortedAt}),t},e.prototype.getSortForRowController=function(){var e=this.getColumnsWithSortingOrdered();return p.Utils.map(e,function(e){return{inverter:e.getSort()===i.Column.SORT_ASC?1:-1,column:e}})},e.DEFAULT_SORTING_ORDER=[i.Column.SORT_ASC,i.Column.SORT_DESC,null],o([a.Autowired("gridOptionsWrapper"),r("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([a.Autowired("columnController"),r("design:type",l.ColumnController)],e.prototype,"columnController",void 0),o([a.Autowired("eventService"),r("design:type",u.EventService)],e.prototype,"eventService",void 0),o([a.Autowired("columnApi"),r("design:type",l.ColumnApi)],e.prototype,"columnApi",void 0),o([a.Autowired("gridApi"),r("design:type",h.GridApi)],e.prototype,"gridApi",void 0),e=t=o([d.Bean("sortController")],e);var t}();t.SortController=f},function(e,t,n){function o(e,t){return(s(e)?r:a)(e,i(t,3))}var r=n(137),i=n(998),a=n(1026),s=n(32);e.exports=o},function(e,t,n){"use strict";var o=n(20),r=(n(16),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},a=function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},s=function(e,t,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n,o),i}return new r(e,t,n,o)},l=function(e){var t=this;e instanceof t||o("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=r,c=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||u,n.poolSize||(n.poolSize=10),n.release=l,n},d={addPoolingTo:c,oneArgumentPooler:r,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};e.exports=d},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(128);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(103)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(348),r=n(221);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){if(!M){var e=document.createElement("style");e.innerHTML="\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n ",document.body.appendChild(e),M=!0}}function i(){L||(R.default.on(window,"keydown",function(e){I="tab"===(0,O.default)(e)}),L=!0)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),s=o(a),l=n(12),u=o(l),c=n(7),d=o(c),p=n(4),h=o(p),f=n(5),g=o(f),m=n(8),v=o(m),y=n(9),C=o(y),b=n(10),w=o(b),_=n(1),E=o(_),x=n(0),S=o(x),A=n(162),R=o(A),T=n(73),O=o(T),k=n(243),P=o(k),D=n(372),F=o(D),M=!1,L=!1,I=!1,N=function(e){function t(){var e,n,o,r;(0,h.default)(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=o=(0,v.default)(this,(e=t.__proto__||(0,d.default)(t)).call.apply(e,[this].concat(a))),o.state={isKeyboardFocused:!1},o.handleKeyDown=function(e){o.props.disabled||o.props.disableKeyboardFocus||("enter"===(0,O.default)(e)&&o.state.isKeyboardFocused&&o.handleTouchTap(e),"esc"===(0,O.default)(e)&&o.state.isKeyboardFocused&&o.removeKeyboardFocus(e)),o.props.onKeyDown(e)},o.handleKeyUp=function(e){o.props.disabled||o.props.disableKeyboardFocus||"space"===(0,O.default)(e)&&o.state.isKeyboardFocused&&o.handleTouchTap(e),o.props.onKeyUp(e)},o.handleBlur=function(e){o.cancelFocusTimeout(),o.removeKeyboardFocus(e),o.props.onBlur(e)},o.handleFocus=function(e){e&&e.persist(),o.props.disabled||o.props.disableKeyboardFocus||(o.focusTimeout=setTimeout(function(){I&&(o.setKeyboardFocus(e),I=!1)},150),o.props.onFocus(e))},o.handleTouchTap=function(e){o.cancelFocusTimeout(),o.props.disabled||(I=!1,o.removeKeyboardFocus(e),o.props.onClick(e))},r=n,(0,v.default)(o,r)}return(0,C.default)(t,e),(0,g.default)(t,[{key:"componentWillMount",value:function(){var e=this.props,t=e.disabled,n=e.disableKeyboardFocus,o=e.keyboardFocused;t||!o||n||this.setState({isKeyboardFocused:!0})}},{key:"componentDidMount",value:function(){r(),i(),this.state.isKeyboardFocused&&(this.button.focus(),this.props.onKeyboardFocus(null,!0))}},{key:"componentWillReceiveProps",value:function(e){(e.disabled||e.disableKeyboardFocus)&&this.state.isKeyboardFocused&&(this.setState({isKeyboardFocused:!1}),e.onKeyboardFocus&&e.onKeyboardFocus(null,!1))}},{key:"componentWillUnmount",value:function(){this.focusTimeout&&clearTimeout(this.focusTimeout)}},{key:"isKeyboardFocused",value:function(){return this.state.isKeyboardFocused}},{key:"removeKeyboardFocus",value:function(e){this.state.isKeyboardFocused&&(this.setState({isKeyboardFocused:!1}),this.props.onKeyboardFocus(e,!1))}},{key:"setKeyboardFocus",value:function(e){this.state.isKeyboardFocused||(this.setState({isKeyboardFocused:!0}),this.props.onKeyboardFocus(e,!0))}},{key:"cancelFocusTimeout",value:function(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)}},{key:"createButtonChildren",value:function(){var e=this.props,t=e.centerRipple,n=e.children,o=e.disabled,r=e.disableFocusRipple,i=e.disableKeyboardFocus,a=e.disableTouchRipple,s=e.focusRippleColor,l=e.focusRippleOpacity,u=e.touchRippleColor,c=e.touchRippleOpacity,d=this.state.isKeyboardFocused,p=!d||o||r||i?void 0:E.default.createElement(P.default,{color:s,opacity:l,show:d,style:{overflow:"hidden"},key:"focusRipple"}),h=o||a?void 0:E.default.createElement(F.default,{centerRipple:t,color:u,opacity:c,key:"touchRipple"},n);return[p,h,h?void 0:n]}},{key:"render",value:function(){var e=this,t=this.props,n=(t.centerRipple,t.children),o=t.containerElement,r=t.disabled,i=(t.disableFocusRipple,t.disableKeyboardFocus),a=(t.disableTouchRipple,t.focusRippleColor,t.focusRippleOpacity,t.href),l=(t.keyboardFocused,t.touchRippleColor,t.touchRippleOpacity,t.onBlur,t.onClick,t.onFocus,t.onKeyUp,t.onKeyDown,t.onKeyboardFocus,t.style),c=t.tabIndex,d=t.type,p=(0,u.default)(t,["centerRipple","children","containerElement","disabled","disableFocusRipple","disableKeyboardFocus","disableTouchRipple","focusRippleColor","focusRippleOpacity","href","keyboardFocused","touchRippleColor","touchRippleOpacity","onBlur","onClick","onFocus","onKeyUp","onKeyDown","onKeyboardFocus","style","tabIndex","type"]),h=this.context.muiTheme,f=h.prepareStyles,g=h.enhancedButton,m=(0,w.default)({border:10,boxSizing:"border-box",display:"inline-block",fontFamily:this.context.muiTheme.baseTheme.fontFamily,WebkitTapHighlightColor:g.tapHighlightColor,cursor:r?"default":"pointer",textDecoration:"none",margin:0,padding:0,outline:"none",fontSize:"inherit",fontWeight:"inherit",position:"relative",verticalAlign:a?"middle":null},l);if(m.backgroundColor||m.background||(m.background="none"),r&&a)return E.default.createElement("span",(0,s.default)({},p,{style:m}),n);var v=(0,s.default)({},p,{style:f(m),ref:function(t){return e.button=t},disabled:r,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown,onClick:this.handleTouchTap,tabIndex:r||i?-1:c});a&&(v.href=a);var y=this.createButtonChildren();return E.default.isValidElement(o)?E.default.cloneElement(o,v,y):(a||"button"!==o||(v.type=d),E.default.createElement(a?"a":o,v,y))}}]),t}(_.Component);N.defaultProps={containerElement:"button",onBlur:function(){},onClick:function(){},onFocus:function(){},onKeyDown:function(){},onKeyUp:function(){},onKeyboardFocus:function(){},tabIndex:0,type:"button"},N.contextTypes={muiTheme:S.default.object.isRequired},N.propTypes={},t.default=N},function(e,t,n){"use strict";t.__esModule=!0;var o=n(126),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t){t.domain="http://localhost:8000/api"},function(e,t,n){var o,r;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o))e.push(n.apply(null,o));else if("object"===r)for(var a in o)i.call(o,a)&&o[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?e.exports=n:(o=[],void 0!==(r=function(){return n}.apply(t,o))&&(e.exports=r))}()},function(e,t,n){function o(e){return null==e?void 0===e?l:s:u&&u in Object(e)?i(e):a(e)}var r=n(110),i=n(800),a=n(801),s="[object Null]",l="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){function o(e,t){var n=i(e,t);return r(n)?n:void 0}var r=n(810),i=n(813);e.exports=o},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(29),a=n(14),s=n(2),l=n(6),u=n(13),c=n(21),d=function(){function e(e,t,n){this.displayedChildren=[],this.localEventService=new a.EventService,this.groupId=t,this.instanceId=n,this.originalColumnGroup=e}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.instanceId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.checkLeft=function(){if(this.displayedChildren.forEach(function(t){t instanceof e&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsWrapper.isEnableRtl()){var t=this.displayedChildren[this.displayedChildren.length-1],n=t.getLeft();this.setLeft(n)}else{var o=this.displayedChildren[0].getLeft();this.setLeft(o)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.isChildInThisGroupDeepSearch=function(t){var n=!1;return this.children.forEach(function(o){t===o&&(n=!0),o instanceof e&&o.isChildInThisGroupDeepSearch(t)&&(n=!0)}),n},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach(function(t){e+=t.getActualWidth()}),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach(function(t){t.isResizable()&&(e=!0)}),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach(function(t){e+=t.getMinWidth()}),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.originalColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.originalColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.originalColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.originalColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach(function(n){n instanceof i.Column?t.push(n):n instanceof e&&n.addDisplayedLeafColumns(t)})},e.prototype.addLeafColumns=function(t){this.children.forEach(function(n){n instanceof i.Column?t.push(n):n instanceof e&&n.addLeafColumns(t)})},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.originalColumnGroup.getColumnGroupShow()},e.prototype.getOriginalColumnGroup=function(){return this.originalColumnGroup},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[],this.originalColumnGroup.isExpandable()?this.children.forEach(function(n){switch(n.getColumnGroupShow()){case e.HEADER_GROUP_SHOW_OPEN:t.originalColumnGroup.isExpanded()&&t.displayedChildren.push(n);break;case e.HEADER_GROUP_SHOW_CLOSED:t.originalColumnGroup.isExpanded()||t.displayedChildren.push(n);break;default:t.displayedChildren.push(n)}}):this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.HEADER_GROUP_SHOW_OPEN="open",e.HEADER_GROUP_SHOW_CLOSED="closed",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="leftChanged",o([s.Autowired("gridOptionsWrapper"),r("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([s.Autowired("columnApi"),r("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),o([s.Autowired("gridApi"),r("design:type",c.GridApi)],e.prototype,"gridApi",void 0),e}();t.ColumnGroup=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(273),i=function(){function e(e){this.rowIndex=e.rowIndex,this.column=e.column,this.floating=o.Utils.makeNull(e.floating)}return e.prototype.getGridCellDef=function(){return{rowIndex:this.rowIndex,column:this.column,floating:this.floating}},e.prototype.getGridRow=function(){return new r.GridRow(this.rowIndex,this.floating)},e.prototype.toString=function(){return"rowIndex = "+this.rowIndex+", floating = "+this.floating+", column = "+(this.column?this.column.getId():null)},e.prototype.createId=function(){return this.rowIndex+"."+this.floating+"."+this.column.getId()},e}();t.GridCell=i},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n(14),s=n(17),l=n(6),u=n(13),c=n(3),d=n(92),p=n(21),h=n(140),f=function(){function e(){}return e.prototype.init=function(){this.eventService.addEventListener(s.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_GROUP_OPENED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_MOVED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_PINNED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(s.Events.EVENT_COLUMN_VISIBLE,this.clearFocusedCell.bind(this))},e.prototype.clearFocusedCell=function(){this.focusedCell=null,this.onCellFocused(!1)},e.prototype.getFocusedCell=function(){return this.focusedCell},e.prototype.getFocusCellToUseAfterRefresh=function(){if(this.gridOptionsWrapper.isSuppressFocusAfterRefresh())return null;if(!this.focusedCell)return null;var e=this.getGridCellForDomElement(document.activeElement);return e&&this.focusedCell.createId()===e.createId()?this.focusedCell:null},e.prototype.getGridCellForDomElement=function(e){for(var t=e;t;){var n=this.gridOptionsWrapper.getDomData(t,h.CellComp.DOM_DATA_KEY_CELL_COMP);if(n)return n.getGridCell();t=t.parentNode}return null},e.prototype.setFocusedCell=function(e,t,n,o){if(void 0===o&&(o=!1),!this.gridOptionsWrapper.isSuppressCellSelection()){var r=c.Utils.makeNull(this.columnController.getGridColumn(t));this.focusedCell=new d.GridCell({rowIndex:e,floating:c.Utils.makeNull(n),column:r}),this.onCellFocused(o)}},e.prototype.isCellFocused=function(e){return!c.Utils.missing(this.focusedCell)&&(this.focusedCell.column===e.column&&this.isRowFocused(e.rowIndex,e.floating))},e.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},e.prototype.isAnyCellFocused=function(){return!!this.focusedCell},e.prototype.isRowFocused=function(e,t){if(c.Utils.missing(this.focusedCell))return!1;var n=c.Utils.makeNull(t);return this.focusedCell.rowIndex===e&&this.focusedCell.floating===n},e.prototype.onCellFocused=function(e){var t={type:s.Events.EVENT_CELL_FOCUSED,forceBrowserFocus:e,rowIndex:null,column:null,floating:null,api:this.gridApi,columnApi:this.columnApi,rowPinned:null};this.focusedCell&&(t.rowIndex=this.focusedCell.rowIndex,t.column=this.focusedCell.column,t.rowPinned=this.focusedCell.floating),this.eventService.dispatchEvent(t)},o([i.Autowired("eventService"),r("design:type",a.EventService)],e.prototype,"eventService",void 0),o([i.Autowired("gridOptionsWrapper"),r("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([i.Autowired("columnController"),r("design:type",u.ColumnController)],e.prototype,"columnController",void 0),o([i.Autowired("columnApi"),r("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),o([i.Autowired("gridApi"),r("design:type",p.GridApi)],e.prototype,"gridApi",void 0),o([i.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([i.Bean("focusedCellController")],e)}();t.FocusedCellController=f},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(54),s=n(2),l=n(14),u=n(2),c=n(17),d=n(2),p=n(22),h=n(3),f=n(13),g=n(21),m=function(){function e(){}return e.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData()),this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData())},e.prototype.isEmpty=function(e){var t=e===p.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;return h.Utils.missingOrEmpty(t)},e.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},e.prototype.getRowAtPixel=function(e,t){var n=t===p.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;if(h.Utils.missingOrEmpty(n))return 0;for(var o=0;o<n.length;o++){var r=n[o];if(r.rowTop+r.rowHeight-1>=e)return o}return n.length-1},e.prototype.setPinnedTopRowData=function(e){this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:c.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:c.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.createNodesFromData=function(e,t){var n=this,o=[];if(e){var r=0;e.forEach(function(e,i){var s=new a.RowNode;n.context.wireBean(s),s.data=e,s.rowPinned=t?p.Constants.PINNED_TOP:p.Constants.PINNED_BOTTOM,s.setRowTop(r),s.setRowHeight(n.gridOptionsWrapper.getRowHeightForNode(s)),s.setRowIndex(i),r+=s.rowHeight,o.push(s)})}return o},e.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},e.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},e.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},e.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},e.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},e.prototype.forEachPinnedTopRow=function(e){h.Utils.missingOrEmpty(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},e.prototype.forEachPinnedBottomRow=function(e){h.Utils.missingOrEmpty(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},e.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},e.prototype.getTotalHeight=function(e){if(e&&0!==e.length){var t=e[e.length-1];return t.rowTop+t.rowHeight}return 0},o([u.Autowired("gridOptionsWrapper"),r("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([u.Autowired("eventService"),r("design:type",l.EventService)],e.prototype,"eventService",void 0),o([u.Autowired("context"),r("design:type",s.Context)],e.prototype,"context",void 0),o([u.Autowired("columnApi"),r("design:type",f.ColumnApi)],e.prototype,"columnApi",void 0),o([u.Autowired("gridApi"),r("design:type",g.GridApi)],e.prototype,"gridApi",void 0),o([d.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([s.Bean("pinnedRowModel")],e)}();t.PinnedRowModel=m},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(2),s=n(6),l=n(55),u=n(96);!function(e){e[e.AG_GRID=0]="AG_GRID",e[e.FRAMEWORK=1]="FRAMEWORK"}(i||(i={}));var c=function(){function e(){}return e.prototype.newDateComponent=function(e){return this.componentResolver.createAgGridComponent(this.gridOptions,e,"dateComponent")},e.prototype.newHeaderComponent=function(e){return this.componentResolver.createAgGridComponent(e.column.getColDef(),e,"headerComponent")},e.prototype.newHeaderGroupComponent=function(e){return this.componentResolver.createAgGridComponent(e.columnGroup.getColGroupDef(),e,"headerGroupComponent")},e.prototype.newFloatingFilterComponent=function(e,t,n){var o=e+"FloatingFilterComponent";return this.componentResolver.createAgGridComponent(t,n,"floatingFilterComponent",o,!1)},e.prototype.newFloatingFilterWrapperComponent=function(e,t){var n=this,o=e.getColDef();if(o.suppressFilter)return this.newEmptyFloatingFilterWrapperComponent(e);var r;r="string"===typeof o.filter?o.filter:o.filter?"custom":this.gridOptionsWrapper.isEnterprise()?"set":"text";var i=this.newFloatingFilterComponent(r,o,t),a={column:e,floatingFilterComp:i,suppressFilterButton:this.componentResolver.mergeParams(o,"floatingFilterComponent",t).suppressFilterButton};if(!i){var s=this.getFilterComponentPrototype(o);if(s&&!s.component.prototype.getModelAsString)return this.newEmptyFloatingFilterWrapperComponent(e);var l=t.currentParentModel;t.currentParentModel=function(){return n.filterManager.getFilterComponent(e).getModelAsString(l())},a.floatingFilterComp=this.newFloatingFilterComponent("readModelAsString",o,t)}return this.componentResolver.createAgGridComponent(o,a,"floatingFilterWrapperComponent")},e.prototype.newFullWidthGroupRowInnerCellRenderer=function(e){return this.componentResolver.createAgGridComponent(this.gridOptions,e,"groupRowInnerRenderer","groupRowInnerRenderer",!1)},e.prototype.newCellRenderer=function(e,t){return this.componentResolver.createAgGridComponent(e,t,"cellRenderer","cellRenderer",!1)},e.prototype.newInnerCellRenderer=function(e,t){return this.componentResolver.createAgGridComponent(e,t,"innerRenderer")},e.prototype.newFullRowGroupRenderer=function(e){return this.componentResolver.createAgGridComponent(this.gridOptionsWrapper,e,"fullWidthCellRenderer")},e.prototype.getFilterComponentPrototype=function(e){return this.componentResolver.getComponentToUse(e,"filterComponent")},e.prototype.newEmptyFloatingFilterWrapperComponent=function(e){var t={column:e,floatingFilterComp:null};return this.componentResolver.createAgGridComponent(e.getColDef(),t,"floatingFilterWrapperComponent","emptyFloatingFilterWrapperComponent")},o([a.Autowired("componentResolver"),r("design:type",u.ComponentResolver)],e.prototype,"componentResolver",void 0),o([a.Autowired("gridOptions"),r("design:type",Object)],e.prototype,"gridOptions",void 0),o([a.Autowired("gridOptionsWrapper"),r("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([a.Autowired("filterManager"),r("design:type",l.FilterManager)],e.prototype,"filterManager",void 0),e=o([a.Bean("componentRecipes")],e)}();t.ComponentRecipes=c},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(2),s=n(6),l=n(3),u=n(434),c=n(196),d=n(285);!function(e){e[e.AG_GRID=0]="AG_GRID",e[e.FRAMEWORK=1]="FRAMEWORK"}(i=t.ComponentType||(t.ComponentType={}));var p;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REGISTERED_BY_NAME=1]="REGISTERED_BY_NAME",e[e.HARDCODED=2]="HARDCODED"}(p=t.ComponentSource||(t.ComponentSource={}));var h=function(){function e(){}return e.prototype.getComponentToUse=function(e,t,n){var o=null==n?t:n,r=null,a=null,s=null,l=null;if(null!=e){var u=e[t];null!=u&&("string"===typeof u?r=u:this.agComponentUtils.doesImplementIComponent(u)?a=u:s=u),l=e[t+"Framework"]}if(a&&l||r&&l||s&&l)throw Error("You are trying to specify: "+t+" twice as a component.");if(l&&!this.frameworkComponentWrapper)throw Error("You are specifying a framework component but you are not using a framework version of ag-grid for : "+t);if(l)return{type:i.FRAMEWORK,component:l,source:p.HARDCODED};if(a)return{type:i.AG_GRID,component:a,source:p.HARDCODED};if(s)return this.agComponentUtils.adaptFunction(t,s,i.AG_GRID,p.HARDCODED);var c;return c=r||o,this.namedComponentResolver.resolve(t,c)},e.prototype.mergeParams=function(e,t,n){var o=e?e[t+"Params"]:null,r={};return l._.mergeDeep(r,n),l._.mergeDeep(r,o),r.api||(r.api=this.gridOptions.api),r},e.prototype.createAgGridComponent=function(e,t,n,o,r){void 0===r&&(r=!0);var i=null==e?this.gridOptions:e,a=null==o?n:o,s=this.newAgGridComponent(i,n,a,r);if(!s)return null;var l=this.mergeParams(i,n,t);return this.context.wireBean(s),s.init(l),s},e.prototype.newAgGridComponent=function(e,t,n,o){void 0===o&&(o=!0);var r=this.getComponentToUse(e,t,n);if(!r||!r.component)return o&&console.error("Error creating component "+t+"=>"+n),null;if(r.type===i.AG_GRID)return new r.component;var a=r.component,s=this.componentMetadataProvider.retrieve(t);return this.frameworkComponentWrapper.wrap(a,s.mandatoryMethodList,s.optionalMethodList,n)},o([a.Autowired("gridOptions"),r("design:type",Object)],e.prototype,"gridOptions",void 0),o([a.Autowired("gridOptionsWrapper"),r("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([a.Autowired("context"),r("design:type",a.Context)],e.prototype,"context",void 0),o([a.Autowired("namedComponentResolver"),r("design:type",u.NamedComponentResolver)],e.prototype,"namedComponentResolver",void 0),o([a.Autowired("agComponentUtils"),r("design:type",c.AgComponentUtils)],e.prototype,"agComponentUtils",void 0),o([a.Autowired("componentMetadataProvider"),r("design:type",d.ComponentMetadataProvider)],e.prototype,"componentMetadataProvider",void 0),o([a.Optional("frameworkComponentWrapper"),r("design:type",Object)],e.prototype,"frameworkComponentWrapper",void 0),e=o([a.Bean("componentResolver")],e)}();t.ComponentResolver=h},function(e,t,n){"use strict";var o=n(23),r=n(310),i=n(497),a=n(502),s=n(98),l=n(503),u=n(506),c=n(507),d=n(508),p=s.createElement,h=s.createFactory,f=s.cloneElement,g=o,m=function(e){return e},v={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:d},Component:r.Component,PureComponent:r.PureComponent,createElement:p,cloneElement:f,isValidElement:s.isValidElement,PropTypes:l,createClass:c,createFactory:h,createMixin:m,DOM:a,version:u,__spread:g};e.exports=v},function(e,t,n){"use strict";function o(e){return void 0!==e.ref}function r(e){return void 0!==e.key}var i=n(23),a=n(63),s=(n(19),n(312),Object.prototype.hasOwnProperty),l=n(313),u={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,o,r,i,a){var s={$$typeof:l,type:e,key:t,ref:n,props:a,_owner:i};return s};c.createElement=function(e,t,n){var i,l={},d=null,p=null;if(null!=t){o(t)&&(p=t.ref),r(t)&&(d=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!u.hasOwnProperty(i)&&(l[i]=t[i])}var h=arguments.length-2;if(1===h)l.children=n;else if(h>1){for(var f=Array(h),g=0;g<h;g++)f[g]=arguments[g+2];l.children=f}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)void 0===l[i]&&(l[i]=m[i])}return c(e,d,p,0,0,a.current,l)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){return c(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},c.cloneElement=function(e,t,n){var l,d=i({},e.props),p=e.key,h=e.ref,f=(e._self,e._source,e._owner);if(null!=t){o(t)&&(h=t.ref,f=a.current),r(t)&&(p=""+t.key);var g;e.type&&e.type.defaultProps&&(g=e.type.defaultProps);for(l in t)s.call(t,l)&&!u.hasOwnProperty(l)&&(void 0===t[l]&&void 0!==g?d[l]=g[l]:d[l]=t[l])}var m=arguments.length-2;if(1===m)d.children=n;else if(m>1){for(var v=Array(m),y=0;y<m;y++)v[y]=arguments[y+2];d.children=v}return c(e.type,p,h,0,0,f,d)},c.isValidElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===l},e.exports=c},function(e,t,n){"use strict";function o(e,t){return(e&t)===t}var r=n(20),i=(n(16),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var d in n){s.properties.hasOwnProperty(d)&&r("48",d);var p=d.toLowerCase(),h=n[d],f={attributeName:p,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseProperty:o(h,t.MUST_USE_PROPERTY),hasBooleanValue:o(h,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(h,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(h,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(h,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(f.hasBooleanValue+f.hasNumericValue+f.hasOverloadedBooleanValue<=1||r("50",d),l.hasOwnProperty(d)){var g=l[d];f.attributeName=g}a.hasOwnProperty(d)&&(f.attributeNamespace=a[d]),u.hasOwnProperty(d)&&(f.propertyName=u[d]),c.hasOwnProperty(d)&&(f.mutationMethod=c[d]),s.properties[d]=f}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){if((0,s._isCustomAttributeFunctions[t])(e))return!0}return!1},injection:i};e.exports=s},function(e,t,n){"use strict";function o(){r.attachRefs(this,this._currentElement)}var r=n(517),i=(n(49),n(19),{mountComponent:function(e,t,n,r,i,a){var s=e.mountComponent(t,n,r,i,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(o,e),s},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){r.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=r.shouldUpdateRefs(a,t);s&&r.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(o,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});e.exports=i},function(e,t,n){"use strict";function o(e){if(f){var t=e.node,n=e.children;if(n.length)for(var o=0;o<n.length;o++)g(t,n[o],null);else null!=e.html?d(t,e.html):null!=e.text&&h(t,e.text)}}function r(e,t){e.parentNode.replaceChild(t.node,e),o(t)}function i(e,t){f?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){f?e.html=t:d(e.node,t)}function s(e,t){f?e.text=t:h(e.node,t)}function l(){return this.node.nodeName}function u(e){return{node:e,children:[],html:null,text:null,toString:l}}var c=n(212),d=n(152),p=n(213),h=n(326),f="undefined"!==typeof document&&"number"===typeof document.documentMode||"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),g=p(function(e,t,n){11===t.node.nodeType||1===t.node.nodeType&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===c.html)?(o(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),o(t))});u.insertTreeBefore=g,u.replaceChildWithTree=r,u.queueChild=i,u.queueHTML=a,u.queueText=s,e.exports=u},function(e,t,n){var o=n(70),r=n(129);e.exports=n(83)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.red50="#ffebee",t.red100="#ffcdd2",t.red200="#ef9a9a",t.red300="#e57373",t.red400="#ef5350",t.red500="#f44336",t.red600="#e53935",t.red700="#d32f2f",t.red800="#c62828",t.red900="#b71c1c",t.redA100="#ff8a80",t.redA200="#ff5252",t.redA400="#ff1744",t.redA700="#d50000",t.pink50="#fce4ec",t.pink100="#f8bbd0",t.pink200="#f48fb1",t.pink300="#f06292",t.pink400="#ec407a",t.pink500="#e91e63",t.pink600="#d81b60",t.pink700="#c2185b",t.pink800="#ad1457",t.pink900="#880e4f",t.pinkA100="#ff80ab",t.pinkA200="#ff4081",t.pinkA400="#f50057",t.pinkA700="#c51162",t.purple50="#f3e5f5",t.purple100="#e1bee7",t.purple200="#ce93d8",t.purple300="#ba68c8",t.purple400="#ab47bc",t.purple500="#9c27b0",t.purple600="#8e24aa",t.purple700="#7b1fa2",t.purple800="#6a1b9a",t.purple900="#4a148c",t.purpleA100="#ea80fc",t.purpleA200="#e040fb",t.purpleA400="#d500f9",t.purpleA700="#aa00ff",t.deepPurple50="#ede7f6",t.deepPurple100="#d1c4e9",t.deepPurple200="#b39ddb",t.deepPurple300="#9575cd",t.deepPurple400="#7e57c2",t.deepPurple500="#673ab7",t.deepPurple600="#5e35b1",t.deepPurple700="#512da8",t.deepPurple800="#4527a0",t.deepPurple900="#311b92",t.deepPurpleA100="#b388ff",t.deepPurpleA200="#7c4dff",t.deepPurpleA400="#651fff",t.deepPurpleA700="#6200ea",t.indigo50="#e8eaf6",t.indigo100="#c5cae9",t.indigo200="#9fa8da",t.indigo300="#7986cb",t.indigo400="#5c6bc0",t.indigo500="#3f51b5",t.indigo600="#3949ab",t.indigo700="#303f9f",t.indigo800="#283593",t.indigo900="#1a237e",t.indigoA100="#8c9eff",t.indigoA200="#536dfe",t.indigoA400="#3d5afe",t.indigoA700="#304ffe",t.blue50="#e3f2fd",t.blue100="#bbdefb",t.blue200="#90caf9",t.blue300="#64b5f6",t.blue400="#42a5f5",t.blue500="#2196f3",t.blue600="#1e88e5",t.blue700="#1976d2",t.blue800="#1565c0",t.blue900="#0d47a1",t.blueA100="#82b1ff",t.blueA200="#448aff",t.blueA400="#2979ff",t.blueA700="#2962ff",t.lightBlue50="#e1f5fe",t.lightBlue100="#b3e5fc",t.lightBlue200="#81d4fa",t.lightBlue300="#4fc3f7",t.lightBlue400="#29b6f6",t.lightBlue500="#03a9f4",t.lightBlue600="#039be5",t.lightBlue700="#0288d1",t.lightBlue800="#0277bd",t.lightBlue900="#01579b",t.lightBlueA100="#80d8ff",t.lightBlueA200="#40c4ff",t.lightBlueA400="#00b0ff",t.lightBlueA700="#0091ea",t.cyan50="#e0f7fa",t.cyan100="#b2ebf2",t.cyan200="#80deea",t.cyan300="#4dd0e1",t.cyan400="#26c6da",t.cyan500="#00bcd4",t.cyan600="#00acc1",t.cyan700="#0097a7",t.cyan800="#00838f",t.cyan900="#006064",t.cyanA100="#84ffff",t.cyanA200="#18ffff",t.cyanA400="#00e5ff",t.cyanA700="#00b8d4",t.teal50="#e0f2f1",t.teal100="#b2dfdb",t.teal200="#80cbc4",t.teal300="#4db6ac",t.teal400="#26a69a",t.teal500="#009688",t.teal600="#00897b",t.teal700="#00796b",t.teal800="#00695c",t.teal900="#004d40",t.tealA100="#a7ffeb",t.tealA200="#64ffda",t.tealA400="#1de9b6",t.tealA700="#00bfa5",t.green50="#e8f5e9",t.green100="#c8e6c9",t.green200="#a5d6a7",t.green300="#81c784",t.green400="#66bb6a",t.green500="#4caf50",t.green600="#43a047",t.green700="#388e3c",t.green800="#2e7d32",t.green900="#1b5e20",t.greenA100="#b9f6ca",t.greenA200="#69f0ae",t.greenA400="#00e676",t.greenA700="#00c853",t.lightGreen50="#f1f8e9",t.lightGreen100="#dcedc8",t.lightGreen200="#c5e1a5",t.lightGreen300="#aed581",t.lightGreen400="#9ccc65",t.lightGreen500="#8bc34a",t.lightGreen600="#7cb342",t.lightGreen700="#689f38",t.lightGreen800="#558b2f",t.lightGreen900="#33691e",t.lightGreenA100="#ccff90",t.lightGreenA200="#b2ff59",t.lightGreenA400="#76ff03",t.lightGreenA700="#64dd17",t.lime50="#f9fbe7",t.lime100="#f0f4c3",t.lime200="#e6ee9c",t.lime300="#dce775",t.lime400="#d4e157",t.lime500="#cddc39",t.lime600="#c0ca33",t.lime700="#afb42b",t.lime800="#9e9d24",t.lime900="#827717",t.limeA100="#f4ff81",t.limeA200="#eeff41",t.limeA400="#c6ff00",t.limeA700="#aeea00",t.yellow50="#fffde7",t.yellow100="#fff9c4",t.yellow200="#fff59d",t.yellow300="#fff176",t.yellow400="#ffee58",t.yellow500="#ffeb3b",t.yellow600="#fdd835",t.yellow700="#fbc02d",t.yellow800="#f9a825",t.yellow900="#f57f17",t.yellowA100="#ffff8d",t.yellowA200="#ffff00",t.yellowA400="#ffea00",t.yellowA700="#ffd600",t.amber50="#fff8e1",t.amber100="#ffecb3",t.amber200="#ffe082",t.amber300="#ffd54f",t.amber400="#ffca28",t.amber500="#ffc107",t.amber600="#ffb300",t.amber700="#ffa000",t.amber800="#ff8f00",t.amber900="#ff6f00",t.amberA100="#ffe57f",t.amberA200="#ffd740",t.amberA400="#ffc400",t.amberA700="#ffab00",t.orange50="#fff3e0",t.orange100="#ffe0b2",t.orange200="#ffcc80",t.orange300="#ffb74d",t.orange400="#ffa726",t.orange500="#ff9800",t.orange600="#fb8c00",t.orange700="#f57c00",t.orange800="#ef6c00",t.orange900="#e65100",t.orangeA100="#ffd180",t.orangeA200="#ffab40",t.orangeA400="#ff9100",t.orangeA700="#ff6d00",t.deepOrange50="#fbe9e7",t.deepOrange100="#ffccbc",t.deepOrange200="#ffab91",t.deepOrange300="#ff8a65",t.deepOrange400="#ff7043",t.deepOrange500="#ff5722",t.deepOrange600="#f4511e",t.deepOrange700="#e64a19",t.deepOrange800="#d84315",t.deepOrange900="#bf360c",t.deepOrangeA100="#ff9e80",t.deepOrangeA200="#ff6e40",t.deepOrangeA400="#ff3d00",t.deepOrangeA700="#dd2c00",t.brown50="#efebe9",t.brown100="#d7ccc8",t.brown200="#bcaaa4",t.brown300="#a1887f",t.brown400="#8d6e63",t.brown500="#795548",t.brown600="#6d4c41",t.brown700="#5d4037",t.brown800="#4e342e",t.brown900="#3e2723",t.blueGrey50="#eceff1",t.blueGrey100="#cfd8dc",t.blueGrey200="#b0bec5",t.blueGrey300="#90a4ae",t.blueGrey400="#78909c",t.blueGrey500="#607d8b",t.blueGrey600="#546e7a",t.blueGrey700="#455a64",t.blueGrey800="#37474f",t.blueGrey900="#263238",t.grey50="#fafafa",t.grey100="#f5f5f5",t.grey200="#eeeeee",t.grey300="#e0e0e0",t.grey400="#bdbdbd",t.grey500="#9e9e9e",t.grey600="#757575",t.grey700="#616161",t.grey800="#424242",t.grey900="#212121",t.black="#000000",t.white="#ffffff",t.transparent="rgba(0, 0, 0, 0)",t.fullBlack="rgba(0, 0, 0, 1)",t.darkBlack="rgba(0, 0, 0, 0.87)",t.lightBlack="rgba(0, 0, 0, 0.54)",t.minBlack="rgba(0, 0, 0, 0.26)",t.faintBlack="rgba(0, 0, 0, 0.12)",t.fullWhite="rgba(255, 255, 255, 1)",t.darkWhite="rgba(255, 255, 255, 0.87)",t.lightWhite="rgba(255, 255, 255, 0.54)"},function(e,t,n){"use strict";function o(e,t,n){return n?[e,t]:e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(690),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(724),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_Index",{value:{index:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_PositionInfo",{value:{x:n(0).number.isRequired,y:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_ScrollPosition",{value:{scrollLeft:n(0).number.isRequired,scrollTop:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_SizeAndPositionInfo",{value:{height:n(0).number.isRequired,width:n(0).number.isRequired,x:n(0).number.isRequired,y:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_SizeInfo",{value:{height:n(0).number.isRequired,width:n(0).number.isRequired},configurable:!0})},function(e,t,n){var o=n(51),r=o.Symbol;e.exports=r},function(e,t,n){function o(e,t){return a(i(e,t,r),e+"")}var r=n(175),i=n(834),a=n(835);e.exports=o},function(e,t,n){function o(e){return null!=e&&i(e.length)&&!r(e)}var r=n(409),i=n(257);e.exports=o},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(91),s=n(114),l=n(2),u=n(2),c=function(){function e(){}return e.prototype.calculateColInitialWidth=function(e){return e.width?e.width<this.gridOptionsWrapper.getMinColWidth()?this.gridOptionsWrapper.getMinColWidth():e.width:this.gridOptionsWrapper.getColWidth()},e.prototype.getOriginalPathForColumn=function(e,t){function n(t,i){for(var a=0;a<t.length;a++){if(r)return;var l=t[a];if(l instanceof s.OriginalColumnGroup){n(l.getChildren(),i+1),o[i]=l}else l===e&&(r=!0)}}var o=[],r=!1;return n(t,0),r?o:null},e.prototype.depthFirstOriginalTreeSearch=function(e,t){var n=this;e&&e.forEach(function(e){e instanceof s.OriginalColumnGroup&&n.depthFirstOriginalTreeSearch(e.getChildren(),t),t(e)})},e.prototype.depthFirstAllColumnTreeSearch=function(e,t){var n=this;e&&e.forEach(function(e){e instanceof a.ColumnGroup&&n.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)})},e.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var n=this;e&&e.forEach(function(e){e instanceof a.ColumnGroup&&n.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)})},o([u.Autowired("gridOptionsWrapper"),r("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),e=o([l.Bean("columnUtils")],e)}();t.ColumnUtils=c},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),a=n(29),s=n(14),l=n(2),u=n(13),c=n(21),d=function(){function e(e,t,n){this.localEventService=new s.EventService,this.expandable=!1,this.colGroupDef=e,this.groupId=t,this.expanded=e&&!!e.openByDefault,this.padding=n}return e.prototype.isVisible=function(){return!!this.children&&this.children.some(function(e){return e.isVisible()})},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=t;var n={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(n)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children.forEach(function(n){n instanceof a.Column?t.push(n):n instanceof e&&n.addLeafColumns(t)})},e.prototype.getColumnGroupShow=function(){return this.padding?this.children[0].getColumnGroupShow():this.colGroupDef.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.getLeafColumns().forEach(function(t){return t.addEventListener(a.Column.EVENT_VISIBLE_CHANGED,e.onColumnVisibilityChanged.bind(e))})},e.prototype.setExpandable=function(){for(var t=!1,n=!1,o=!1,r=0,a=this.children.length;r<a;r++){var s=this.children[r];if(s.isVisible()){var l=s.getColumnGroupShow();l===i.ColumnGroup.HEADER_GROUP_SHOW_OPEN?(t=!0,o=!0):l===i.ColumnGroup.HEADER_GROUP_SHOW_CLOSED?(n=!0,o=!0):(t=!0,n=!0)}}var u=t&&n&&o;if(this.expandable!==u){this.expandable=u;var c={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",o([l.Autowired("columnApi"),r("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),o([l.Autowired("gridApi"),r("design:type",c.GridApi)],e.prototype,"gridApi",void 0),e}();t.OriginalColumnGroup=d},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n(6),s=function(){function e(){this.cacheVersion=0}return e.prototype.init=function(){this.active=this.gridOptionsWrapper.isValueCache(),this.neverExpires=this.gridOptionsWrapper.isValueCacheNeverExpires()},e.prototype.onDataChanged=function(){this.neverExpires||this.expire()},e.prototype.expire=function(){this.cacheVersion++},e.prototype.setValue=function(e,t,n){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=n)},e.prototype.getValue=function(e,t){return this.active&&e.__cacheVersion===this.cacheVersion&&void 0!==e.__cacheData[t]?e.__cacheData[t]:void 0},o([i.Autowired("gridOptionsWrapper"),r("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([i.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),e=o([i.Bean("valueCache")],e)}();t.ValueCache=s},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n(3),s=n(14),l=n(17),u=n(13),c=n(21),d=function(){function e(){}return e.prototype.setScrollsVisible=function(e){if(this.vBody!==e.vBody||this.hBody!==e.hBody||this.vPinnedLeft!==e.vPinnedLeft||this.vPinnedRight!==e.vPinnedRight){this.vBody=e.vBody,this.hBody=e.hBody,this.vPinnedLeft=e.vPinnedLeft,this.vPinnedRight=e.vPinnedRight;var t={type:l.Events.EVENT_SCROLL_VISIBILITY_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},e.prototype.isVBodyShowing=function(){return this.vBody},e.prototype.isHBodyShowing=function(){return this.hBody},e.prototype.isVPinnedLeftShowing=function(){return this.vPinnedLeft},e.prototype.isVPinnedRightShowing=function(){return this.vPinnedRight},e.prototype.getPinnedLeftWidth=function(){return this.columnController.getPinnedLeftContainerWidth()},e.prototype.getPinnedLeftWithScrollWidth=function(){var e=this.getPinnedLeftWidth();return this.vPinnedLeft&&(e+=a.Utils.getScrollbarWidth()),e},e.prototype.getPinnedRightWidth=function(){return this.columnController.getPinnedRightContainerWidth()},e.prototype.getPinnedRightWithScrollWidth=function(){var e=this.getPinnedRightWidth();return this.vPinnedRight&&(e+=a.Utils.getScrollbarWidth()),e},o([i.Autowired("eventService"),r("design:type",s.EventService)],e.prototype,"eventService",void 0),o([i.Autowired("columnController"),r("design:type",u.ColumnController)],e.prototype,"columnController",void 0),o([i.Autowired("columnApi"),r("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),o([i.Autowired("gridApi"),r("design:type",c.GridApi)],e.prototype,"gridApi",void 0),e=o([i.Bean("scrollVisibleService")],e)}();t.ScrollVisibleService=d},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(48),s=n(14),l=n(17),u=n(3),c=n(2),d=n(6),p=n(35),h=n(116),f=n(53),g=n(13),m=n(21),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notActive=function(){return!this.gridOptionsWrapper.isPaginationAutoPageSize()},t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.eventService,l.Events.EVENT_BODY_HEIGHT_CHANGED,this.onBodyHeightChanged.bind(this)),this.addDestroyableEventListener(this.eventService,l.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.checkPageSize()},t.prototype.onScrollVisibilityChanged=function(){this.checkPageSize()},t.prototype.onBodyHeightChanged=function(){this.checkPageSize()},t.prototype.checkPageSize=function(){if(!this.notActive()){var e=this.gridOptionsWrapper.getRowHeightAsNumber(),t=this.gridPanel.getBodyHeight();if(this.scrollVisibleService.isHBodyShowing()&&(t-=this.gridOptionsWrapper.getScrollbarWidth()),t>0){var n=Math.floor(t/e);this.gridOptionsWrapper.setProperty("paginationPageSize",n)}}},r([c.Autowired("gridPanel"),i("design:type",p.GridPanel)],t.prototype,"gridPanel",void 0),r([c.Autowired("eventService"),i("design:type",s.EventService)],t.prototype,"eventService",void 0),r([c.Autowired("gridOptionsWrapper"),i("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("scrollVisibleService"),i("design:type",h.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),r([c.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"postConstruct",null),t=r([c.Bean("paginationAutoPageSizeService")],t)}(a.BeanStub);t.PaginationAutoPageSizeService=v;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topRowIndex=0,t.bottomRowIndex=0,t.pixelOffset=0,t}return o(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsWrapper.isPagination(),this.addDestroyableEventListener(this.eventService,l.Events.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,"paginationPageSize",this.onModelUpdated.bind(this)),this.onModelUpdated()},t.prototype.isLastRowFound=function(){return this.rowModel.isLastRowFound()},t.prototype.onModelUpdated=function(e){this.setIndexesAndBounds();var t={type:l.Events.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,keepRenderedRows:!!e&&e.keepRenderedRows,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e){this.currentPage=e;var t={type:l.Events.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,api:this.gridApi,columnApi:this.columnApi};this.onModelUpdated(t)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return u._.missing(this.topRowBounds)||u._.missing(this.bottomRowBounds)?0:this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop},t.prototype.isRowPresent=function(e){return!!this.rowModel.isRowPresent(e)&&(e.rowIndex>=this.topRowIndex&&e.rowIndex<=this.bottomRowIndex)},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.getNodesInRangeForSelection=function(e,t){return this.rowModel.getNodesInRangeForSelection(e,t)},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){return this.rowModel.getRowBounds(e)},t.prototype.getPageFirstRow=function(){return this.pageSize*this.currentPage},t.prototype.getPageLastRow=function(){var e=this.pageSize*(this.currentPage+1)-1,t=this.rowModel.getPageLastRow();return t>e?e:t},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=Math.floor(e/this.pageSize);this.goToPage(t)}},t.prototype.getTotalRowCount=function(){return this.rowModel.getPageLastRow()+1},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowFound()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getPageLastRow()+1,t=Math.floor(e/this.pageSize);this.goToPage(t)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPageSize=function(){this.pageSize=this.gridOptionsWrapper.getPaginationPageSize(),this.pageSize>=1||(this.pageSize=100)},t.prototype.setIndexesAndBounds=function(){if(this.active){this.setPageSize();var e=this.getTotalRowCount();this.totalPages=Math.floor((e-1)/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!u._.isNumeric(this.currentPage)||this.currentPage<0)&&(this.currentPage=0),this.topRowIndex=this.pageSize*this.currentPage,this.bottomRowIndex=this.pageSize*(this.currentPage+1)-1;var t=this.rowModel.getPageLastRow();this.bottomRowIndex>t&&(this.bottomRowIndex=t)}else this.pageSize=this.rowModel.getPageLastRow()+1,this.totalPages=1,this.currentPage=0,this.topRowIndex=0,this.bottomRowIndex=this.rowModel.getPageLastRow();this.topRowBounds=this.rowModel.getRowBounds(this.topRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomRowIndex),this.pixelOffset=u._.exists(this.topRowBounds)?this.topRowBounds.rowTop:0},r([c.Autowired("rowModel"),i("design:type",Object)],t.prototype,"rowModel",void 0),r([c.Autowired("gridPanel"),i("design:type",p.GridPanel)],t.prototype,"gridPanel",void 0),r([c.Autowired("eventService"),i("design:type",s.EventService)],t.prototype,"eventService",void 0),r([c.Autowired("gridOptionsWrapper"),i("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("selectionController"),i("design:type",f.SelectionController)],t.prototype,"selectionController",void 0),r([c.Autowired("columnApi"),i("design:type",g.ColumnApi)],t.prototype,"columnApi",void 0),r([c.Autowired("gridApi"),i("design:type",m.GridApi)],t.prototype,"gridApi",void 0),r([c.PostConstruct,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"postConstruct",null),t=r([c.Bean("paginationProxy")],t)}(a.BeanStub);t.PaginationProxy=y},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(13),l=n(61),u=n(55),c=n(14),d=n(35),p=n(33),h=n(22),f=n(119),g=n(17),m=n(3),v=n(272),y=n(2),C=n(93),b=n(25),w=n(911),_=n(21),E=function(){function e(e){this.destroyFunctions=[],this.logger=e.create("GridCore")}return e.prototype.init=function(){var e,t,n=this,o=this.createSouthPanel();this.toolPanel&&!this.gridOptionsWrapper.isForPrint()&&(this.gridOptionsWrapper.isEnableRtl()?t=this.toolPanel.getHtmlElement():e=this.toolPanel.getHtmlElement());var r=this.createNorthPanel();this.eRootPanel=new v.BorderLayout({center:this.gridPanel.getLayout(),east:e,west:t,north:r,south:o,dontFill:this.gridOptionsWrapper.isForPrint(),fillHorizontalOnly:this.gridOptionsWrapper.isAutoHeight(),name:"eRootPanel"}),this.gridOptionsWrapper.isForPrint()?(m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-layout-for-print"),m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-no-scrolls")):this.gridOptionsWrapper.isAutoHeight()?m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-layout-auto-height"):(m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-layout-normal"),m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-scrolls")),this.showToolPanel(this.gridOptionsWrapper.isShowToolPanel()),this.eGridDiv.appendChild(this.eRootPanel.getGui()),this.$scope&&this.$scope.$watch(this.quickFilterOnScope,function(e){return n.filterManager.setQuickFilter(e)}),this.gridOptionsWrapper.isForPrint()||this.addWindowResizeListener(),this.addRtlSupport(),this.doLayout(),this.finished=!1,this.periodicallyDoLayout(),this.eventService.addEventListener(g.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.eventService.addEventListener(g.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.onRowGroupChanged.bind(this)),this.onRowGroupChanged(),this.logger.log("ready")},e.prototype.addRtlSupport=function(){this.gridOptionsWrapper.isEnableRtl()?m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-rtl"):m.Utils.addCssClass(this.eRootPanel.getGui(),"ag-ltr")},e.prototype.createNorthPanel=function(){var e=this;if(!this.gridOptionsWrapper.isEnterprise())return null;var t=document.createElement("div"),n=this.onDropPanelVisible.bind(this);return this.rowGroupComp=this.rowGroupCompFactory.create(),this.pivotComp=this.pivotCompFactory.create(),t.appendChild(this.rowGroupComp.getHtmlElement()),t.appendChild(this.pivotComp.getHtmlElement()),this.rowGroupComp.addEventListener(b.Component.EVENT_VISIBLE_CHANGED,n),this.pivotComp.addEventListener(b.Component.EVENT_VISIBLE_CHANGED,n),this.destroyFunctions.push(function(){e.rowGroupComp.removeEventListener(b.Component.EVENT_VISIBLE_CHANGED,n),e.pivotComp.removeEventListener(b.Component.EVENT_VISIBLE_CHANGED,n)}),this.onDropPanelVisible(),t},e.prototype.onDropPanelVisible=function(){var e=this.rowGroupComp.isVisible()&&this.pivotComp.isVisible();this.rowGroupComp.addOrRemoveCssClass("ag-width-half",e),this.pivotComp.addOrRemoveCssClass("ag-width-half",e)},e.prototype.getRootGui=function(){return this.eRootPanel.getGui()},e.prototype.createSouthPanel=function(){!this.statusBar&&this.gridOptionsWrapper.isEnableStatusBar()&&console.warn("ag-Grid: status bar is only available in ag-Grid-Enterprise");var e=this.statusBar&&this.gridOptionsWrapper.isEnableStatusBar(),t=this.gridOptionsWrapper.isPagination(),n=t&&!this.gridOptionsWrapper.isForPrint()&&!this.gridOptionsWrapper.isSuppressPaginationPanel();if(!e&&!n)return null;var o=document.createElement("div");if(e&&o.appendChild(this.statusBar.getHtmlElement()),n){var r=new w.PaginationComp;this.context.wireBean(r),o.appendChild(r.getHtmlElement()),this.destroyFunctions.push(r.destroy.bind(r))}return o},e.prototype.onRowGroupChanged=function(){if(this.rowGroupComp){var e=this.gridOptionsWrapper.getRowGroupPanelShow();if(e===h.Constants.ALWAYS)this.rowGroupComp.setVisible(!0);else if(e===h.Constants.ONLY_WHEN_GROUPING){var t=!this.columnController.isRowGroupEmpty();this.rowGroupComp.setVisible(t)}else this.rowGroupComp.setVisible(!1);this.eRootPanel.doLayout()}},e.prototype.addWindowResizeListener=function(){var e=this.doLayout.bind(this);window.addEventListener("resize",e),this.destroyFunctions.push(function(){return window.removeEventListener("resize",e)})},e.prototype.periodicallyDoLayout=function(){var e=this;if(!this.finished){var t=this.gridOptionsWrapper.getLayoutInterval();t>0?this.frameworkFactory.setTimeout(function(){e.doLayout(),e.gridPanel.periodicallyCheck(),e.periodicallyDoLayout()},t):this.frameworkFactory.setTimeout(function(){e.periodicallyDoLayout()},5e3)}},e.prototype.showToolPanel=function(e){if(e&&!this.toolPanel)return console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise"),void(this.toolPanelShowing=!1);this.toolPanelShowing=e,this.toolPanel&&(this.toolPanel.setVisible(e),this.eRootPanel.doLayout())},e.prototype.isToolPanelShowing=function(){return this.toolPanelShowing},e.prototype.destroy=function(){this.finished=!0,this.eGridDiv.removeChild(this.eRootPanel.getGui()),this.logger.log("Grid DOM removed"),this.destroyFunctions.forEach(function(e){return e()})},e.prototype.ensureNodeVisible=function(e,t){if(void 0===t&&(t="top"),this.doingVirtualPaging)throw"Cannot use ensureNodeVisible when doing virtual paging, as we cannot check rows that are not in memory";for(var n=this.rowModel.getPageLastRow()+1,o="function"===typeof e,r=-1,i=0;i<n;i++){var a=this.rowModel.getRow(i);if(o){if(e(a)){r=i;break}}else if(e===a||e===a.data){r=i;break}}r>=0&&this.gridPanel.ensureIndexVisible(r,t)},e.prototype.doLayout=function(){var e=this.eRootPanel.doLayout();if(e&&this.eRootPanel.doLayout(),e){this.rowRenderer.redrawAfterScroll();var t={type:g.Events.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eRootPanel.getGui().clientWidth,clientHeight:this.eRootPanel.getGui().clientHeight,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},o([y.Autowired("gridOptions"),r("design:type",Object)],e.prototype,"gridOptions",void 0),o([y.Autowired("gridOptionsWrapper"),r("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([y.Autowired("rowModel"),r("design:type",Object)],e.prototype,"rowModel",void 0),o([y.Autowired("frameworkFactory"),r("design:type",Object)],e.prototype,"frameworkFactory",void 0),o([y.Autowired("columnController"),r("design:type",s.ColumnController)],e.prototype,"columnController",void 0),o([y.Autowired("rowRenderer"),r("design:type",l.RowRenderer)],e.prototype,"rowRenderer",void 0),o([y.Autowired("filterManager"),r("design:type",u.FilterManager)],e.prototype,"filterManager",void 0),o([y.Autowired("eventService"),r("design:type",c.EventService)],e.prototype,"eventService",void 0),o([y.Autowired("gridPanel"),r("design:type",d.GridPanel)],e.prototype,"gridPanel",void 0),o([y.Autowired("eGridDiv"),r("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),o([y.Autowired("$scope"),r("design:type",Object)],e.prototype,"$scope",void 0),o([y.Autowired("quickFilterOnScope"),r("design:type",String)],e.prototype,"quickFilterOnScope",void 0),o([y.Autowired("popupService"),r("design:type",f.PopupService)],e.prototype,"popupService",void 0),o([y.Autowired("focusedCellController"),r("design:type",C.FocusedCellController)],e.prototype,"focusedCellController",void 0),o([y.Autowired("context"),r("design:type",y.Context)],e.prototype,"context",void 0),o([y.Autowired("columnApi"),r("design:type",s.ColumnApi)],e.prototype,"columnApi",void 0),o([y.Autowired("gridApi"),r("design:type",_.GridApi)],e.prototype,"gridApi",void 0),o([y.Optional("rowGroupCompFactory"),r("design:type",Object)],e.prototype,"rowGroupCompFactory",void 0),o([y.Optional("pivotCompFactory"),r("design:type",Object)],e.prototype,"pivotCompFactory",void 0),o([y.Optional("toolPanel"),r("design:type",b.Component)],e.prototype,"toolPanel",void 0),o([y.Optional("statusBar"),r("design:type",b.Component)],e.prototype,"statusBar",void 0),o([y.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"init",null),o([y.PreDestroy,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"destroy",null),e=o([y.Bean("gridCore"),i(0,y.Qualifier("loggerFactory")),r("design:paramtypes",[p.LoggerFactory])],e)}();t.GridCore=E},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),a=n(22),s=n(2),l=n(118),u=n(6),c=function(){function e(){this.activePopupElements=[]}return e.prototype.getPopupParent=function(){return this.gridCore.getRootGui()},e.prototype.positionPopupForMenu=function(e){function t(){return o.right-r.left-2}function n(){return o.left-r.left-s}var o=e.eventSource.getBoundingClientRect(),r=this.getPopupParent().getBoundingClientRect(),i=o.top-r.top;i=this.keepYWithinBounds(e,i);var a,s=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200,l=r.right-r.left,u=l-s;this.gridOptionsWrapper.isEnableRtl()?(a=n(),a<0&&(a=t()),a>u&&(a=0)):(a=t(),a>u&&(a=n()),a<0&&(a=0)),e.ePopup.style.left=a+"px",e.ePopup.style.top=i+"px"},e.prototype.positionPopupUnderMouseEvent=function(e){var t=this.getPopupParent().getBoundingClientRect();this.positionPopup({ePopup:e.ePopup,x:e.mouseEvent.clientX-t.left,y:e.mouseEvent.clientY-t.top,keepWithinBounds:!0}),this.callPostProcessPopup(e.ePopup,null,e.mouseEvent,e.type,e.column,e.rowNode)},e.prototype.positionPopupUnderComponent=function(e){var t=e.eventSource.getBoundingClientRect(),n=this.getPopupParent().getBoundingClientRect();this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:t.left-n.left,y:t.top-n.top+t.height,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.callPostProcessPopup=function(e,t,n,o,r,i){var a=this.gridOptionsWrapper.getPostProcessPopupFunc();if(a){a({column:r,rowNode:i,ePopup:e,type:o,eventSource:t,mouseEvent:n})}},e.prototype.positionPopupOverComponent=function(e){var t=e.eventSource.getBoundingClientRect(),n=this.getPopupParent().getBoundingClientRect();this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:t.left-n.left,y:t.top-n.top,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.positionPopup=function(e){var t=e.x,n=e.y;e.nudgeX&&(t+=e.nudgeX),e.nudgeY&&(n+=e.nudgeY),e.keepWithinBounds&&(t=this.keepXWithinBounds(e,t),n=this.keepYWithinBounds(e,n)),e.ePopup.style.left=t+"px",e.ePopup.style.top=n+"px"},e.prototype.keepYWithinBounds=function(e,t){var n,o=this.getPopupParent().getBoundingClientRect();n=e.ePopup.clientHeight>0?e.ePopup.clientHeight:200;var r=o.bottom-o.top,i=r-n-5;return t>i?i:t<0?0:t},e.prototype.keepXWithinBounds=function(e,t){var n,o=this.getPopupParent().getBoundingClientRect();n=e.minWidth>0?e.minWidth:e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;var r=o.right-o.left,i=r-n-5;return t>i?i:t<0?0:t},e.prototype.addAsModalPopup=function(e,t,n){var o=this,r=this.gridOptionsWrapper.getDocument();if(!r)return void console.warn("ag-grid: could not find the body of the document, document.body is empty");if(e.style.top="0px",e.style.left="0px",!i.Utils.isVisible(e)){var s=this.getPopupParent();s.appendChild(e),this.activePopupElements.push(e);var l=!1,u=function(e){(e.which||e.keyCode)===a.Constants.KEY_ESCAPE&&c(null)},c=function(t){for(var a=o.activePopupElements.indexOf(e),d=a;d<o.activePopupElements.length;d++){var p=o.activePopupElements[d];if(i.Utils.isElementInEventPath(p,t))return}l||(l=!0,s.removeChild(e),i.Utils.removeFromArray(o.activePopupElements,e),r.removeEventListener("keydown",u),r.removeEventListener("click",c),r.removeEventListener("touchstart",c),r.removeEventListener("contextmenu",c),n&&n())};return setTimeout(function(){t&&r.addEventListener("keydown",u),r.addEventListener("click",c),r.addEventListener("touchstart",c),r.addEventListener("contextmenu",c)},0),c}},o([s.Autowired("gridCore"),r("design:type",l.GridCore)],e.prototype,"gridCore",void 0),o([s.Autowired("gridOptionsWrapper"),r("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),e=o([s.Bean("popupService")],e)}();t.PopupService=c},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n(13),s=n(21),l=n(6),u=n(60),c=n(61),d=n(189),p=n(62),h=n(14),f=n(278),g=n(93),m=n(193),v=n(194),y=n(119),C=n(195),b=n(142),w=n(282),_=n(283),E=n(35),x=n(117),S=n(187),A=n(96),R=function(){function e(){}return e.prototype.postConstruct=function(){this.forPrint=this.gridOptionsWrapper.isForPrint()},o([i.Autowired("paginationProxy"),r("design:type",x.PaginationProxy)],e.prototype,"paginationProxy",void 0),o([i.Autowired("gridPanel"),r("design:type",E.GridPanel)],e.prototype,"gridPanel",void 0),o([i.Autowired("context"),r("design:type",i.Context)],e.prototype,"context",void 0),o([i.Autowired("columnApi"),r("design:type",a.ColumnApi)],e.prototype,"columnApi",void 0),o([i.Autowired("gridApi"),r("design:type",s.GridApi)],e.prototype,"gridApi",void 0),o([i.Autowired("gridOptionsWrapper"),r("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([i.Autowired("expressionService"),r("design:type",u.ExpressionService)],e.prototype,"expressionService",void 0),o([i.Autowired("rowRenderer"),r("design:type",c.RowRenderer)],e.prototype,"rowRenderer",void 0),o([i.Autowired("$compile"),r("design:type",Object)],e.prototype,"$compile",void 0),o([i.Autowired("templateService"),r("design:type",d.TemplateService)],e.prototype,"templateService",void 0),o([i.Autowired("valueService"),r("design:type",p.ValueService)],e.prototype,"valueService",void 0),o([i.Autowired("eventService"),r("design:type",h.EventService)],e.prototype,"eventService",void 0),o([i.Autowired("columnController"),r("design:type",a.ColumnController)],e.prototype,"columnController",void 0),o([i.Autowired("columnAnimationService"),r("design:type",f.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),o([i.Optional("rangeController"),r("design:type",Object)],e.prototype,"rangeController",void 0),o([i.Autowired("focusedCellController"),r("design:type",g.FocusedCellController)],e.prototype,"focusedCellController",void 0),o([i.Optional("contextMenuFactory"),r("design:type",Object)],e.prototype,"contextMenuFactory",void 0),o([i.Autowired("cellEditorFactory"),r("design:type",m.CellEditorFactory)],e.prototype,"cellEditorFactory",void 0),o([i.Autowired("cellRendererFactory"),r("design:type",v.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),o([i.Autowired("popupService"),r("design:type",y.PopupService)],e.prototype,"popupService",void 0),o([i.Autowired("cellRendererService"),r("design:type",C.CellRendererService)],e.prototype,"cellRendererService",void 0),o([i.Autowired("valueFormatterService"),r("design:type",b.ValueFormatterService)],e.prototype,"valueFormatterService",void 0),o([i.Autowired("stylingService"),r("design:type",w.StylingService)],e.prototype,"stylingService",void 0),o([i.Autowired("columnHoverService"),r("design:type",_.ColumnHoverService)],e.prototype,"columnHoverService",void 0),o([i.Autowired("enterprise"),r("design:type",Boolean)],e.prototype,"enterprise",void 0),o([i.Autowired("componentResolver"),r("design:type",A.ComponentResolver)],e.prototype,"componentResolver",void 0),o([i.Autowired("animationFrameService"),r("design:type",S.AnimationFrameService)],e.prototype,"taskQueue",void 0),o([i.PostConstruct,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"postConstruct",null),e=o([i.Bean("beans")],e)}();t.Beans=R},function(e,t,n){"use strict";function o(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var r=new Error(n);throw r.name="Invariant Violation",r.framesToPop=1,r}e.exports=o},function(e,t,n){"use strict";function o(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return v(e,o)}function r(e,t,n){var r=o(e,n,t);r&&(n._dispatchListeners=g(n._dispatchListeners,r),n._dispatchInstances=g(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&f.traverseTwoPhase(e._targetInst,r,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?f.getParentInstance(t):null;f.traverseTwoPhase(n,r,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=v(e,o);r&&(n._dispatchListeners=g(n._dispatchListeners,r),n._dispatchInstances=g(n._dispatchInstances,e))}}function l(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function u(e){m(e,i)}function c(e){m(e,a)}function d(e,t,n,o){f.traverseEnterLeave(n,o,s,e,t)}function p(e){m(e,l)}var h=n(123),f=n(206),g=n(318),m=n(319),v=(n(19),h.getListener),y={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:p,accumulateEnterLeaveDispatches:d};e.exports=y},function(e,t,n){"use strict";function o(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function r(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(t));default:return!1}}var i=n(20),a=n(205),s=n(206),l=n(207),u=n(318),c=n(319),d=(n(16),{}),p=null,h=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return h(e,!0)},g=function(e){return h(e,!1)},m=function(e){return"."+e._rootNodeID},v={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!==typeof n&&i("94",t,typeof n);var o=m(e);(d[t]||(d[t]={}))[o]=n;var r=a.registrationNameModules[t];r&&r.didPutListener&&r.didPutListener(e,t,n)},getListener:function(e,t){var n=d[t];if(r(t,e._currentElement.type,e._currentElement.props))return null;var o=m(e);return n&&n[o]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=d[t];if(o){delete o[m(e)]}},deleteAllListeners:function(e){var t=m(e);for(var n in d)if(d.hasOwnProperty(n)&&d[n][t]){var o=a.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(e,n),delete d[n][t]}},extractEvents:function(e,t,n,o){for(var r,i=a.plugins,s=0;s<i.length;s++){var l=i[s];if(l){var c=l.extractEvents(e,t,n,o);c&&(r=u(r,c))}}return r},enqueueEvents:function(e){e&&(p=u(p,e))},processEventQueue:function(e){var t=p;p=null,e?c(t,f):c(t,g),p&&i("95"),l.rethrowCaughtError()},__purge:function(){d={}},__getListenerBank:function(){return d}};e.exports=v},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(64),i=n(208),a={view:function(e){if(e.view)return e.view;var t=i(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(o,a),e.exports=o},function(e,t,n){"use strict";var o={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=o},function(e,t,n){"use strict";function o(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function r(e,t){if(o(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){var o=n(221);e.exports=function(e){return Object(o(e))}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(347),r=n(232);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){e.exports={default:n(656),__esModule:!0}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){return(0,R.default)({},L,e)}function i(e,t,n){var o=[e,t];return o.push(M.passiveOption?n:n.capture),o}function a(e,t,n,o){M.addEventListener?e.addEventListener.apply(e,i(t,n,o)):M.attachEvent&&e.attachEvent("on"+t,function(){n.call(e)})}function s(e,t,n,o){M.removeEventListener?e.removeEventListener.apply(e,i(t,n,o)):M.detachEvent&&e.detachEvent("on"+t,n)}function l(e,t){var n=(e.children,e.target,(0,S.default)(e,["children","target"]));(0,E.default)(n).forEach(function(e){if("on"===e.substring(0,2)){var o=n[e],i="undefined"===typeof o?"undefined":(0,w.default)(o),a="object"===i,s="function"===i;if(a||s){var l="capture"===e.substr(-7).toLowerCase(),u=e.substring(2).toLowerCase();u=l?u.substring(0,u.length-7):u,a?t(u,o.handler,o.options):t(u,o,r({capture:l}))}}})}function u(e,t){return{handler:e,options:r(t)}}Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=o(c),p=n(4),h=o(p),f=n(5),g=o(f),m=n(8),v=o(m),y=n(9),C=o(y),b=n(157),w=o(b),_=n(131),E=o(_),x=n(12),S=o(x),A=n(371),R=o(A);t.withOptions=u;var T=n(1),O=n(0),k=(o(O),n(126)),P=o(k),D=n(41),F=(o(D),n(705)),M=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(F),L={capture:!1,passive:!1},I=function(e){function t(){return(0,h.default)(this,t),(0,v.default)(this,(t.__proto__||(0,d.default)(t)).apply(this,arguments))}return(0,C.default)(t,e),(0,g.default)(t,[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"shouldComponentUpdate",value:function(e){return!(0,P.default)(this.props,e)}},{key:"componentWillUpdate",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){this.applyListeners(a)}},{key:"removeListeners",value:function(){this.applyListeners(s)}},{key:"applyListeners",value:function(e){var t=this.props.target;if(t){var n=t;"string"===typeof t&&(n=window[t]),l(this.props,e.bind(null,n))}}},{key:"render",value:function(){return this.props.children||null}}]),t}(T.Component);I.propTypes={},t.default=I},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),l=n(38),u=n(34),c=n.n(u),d=n(384),p=(n.n(d),n(105)),h=(n.n(p),n(385)),f=n.n(h),g=n(732),m=(n.n(g),n(733)),v=n.n(m),y=n(47),C=n.n(y),b=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),w=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n width: 100%;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n overflow: auto;\n align-items: stretch;\n height: 100%;\n"],["\n width: 100%;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n overflow: auto;\n align-items: stretch;\n height: 100%;\n"]),_=l.a.div(w),E=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={components:e.data,filteredComponents:e.data,selectedComponent:void 0},n.filterList=n.filterList.bind(n),n}return i(t,e),b(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({components:e.data,filteredComponents:e.data})}},{key:"filterList",value:function(e,t){var n=c.a.filter(this.state.components,function(e){return-1!==e.name.toLowerCase().indexOf(t.toLowerCase())});this.setState({filteredComponents:n})}},{key:"render",value:function(){var e=this,t=this.state.filteredComponents,n=[];return t=c.a.sortBy(t,[function(e){return e.name.toLowerCase()}]),t&&(this.props.platform&&(t=t.filter(function(t){return t.platform===e.props.platform})),n=t.map(function(t){return s.a.createElement(d.ListItem,{innerDivStyle:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"42px",backgroundColor:t.name===e.state.selectedComponent?"rgba(91, 123, 155, 0.11)":null},style:{fontSize:"12px"},rightIcon:e.props.lockedComponents&&c.a.find(e.props.lockedComponents,{name:t.name,platform:t.platform})?s.a.createElement(f.a,{style:{width:"20px",height:"20px",margin:"6px 5px"},color:p.pinkA200}):null,key:t.name+t.platform,primaryText:s.a.createElement("span",null,s.a.createElement("span",{style:{display:"inline-block"}},t.name),s.a.createElement(v.a,{style:{display:"inline-block",marginLeft:4,backgroundColor:"PBI"===t.platform?p.blue300:p.grey300},labelStyle:{fontSize:10,paddingLeft:6,paddingRight:6,lineHeight:1}},t.platform)),onClick:function(){e.setState({selectedComponent:t.name}),e.props.onComponentClick(t)}})})),s.a.createElement(_,null,this.props.enableSearch?s.a.createElement(C.a,{style:{marginLeft:15,marginRight:15,width:"auto"},hintText:"Component Name",floatingLabelText:"Search for a component name",onChange:this.filterList}):null,s.a.createElement("br",null),s.a.createElement(d.List,{style:{height:"calc(100% - 80px)",overflowY:"auto"}},n))}}]),t}(s.a.Component);t.a=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"cancelAnimationTimeout",function(){return r}),n.d(t,"requestAnimationTimeout",function(){return i});var o=n(742);"undefined"!==typeof exports&&Object.defineProperty(exports,"babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId",{value:{id:n(0).number.isRequired},configurable:!0});var r=function(e){return Object(o.a)(e.id)},i=function(e,t){var n=Date.now(),r=function r(){Date.now()-n>=t?e.call():i.id=Object(o.b)(r)},i={id:Object(o.b)(r)};return i}},function(e,t,n){Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_CellDataGetterParams",{value:{columnData:n(0).any,dataKey:n(0).string.isRequired,rowData:n(0).any.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_CellRendererParams",{value:{cellData:n(0).any,columnData:n(0).any,dataKey:n(0).string.isRequired,rowData:n(0).any.isRequired,rowIndex:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams",{value:{className:n(0).string.isRequired,columns:n(0).arrayOf(n(0).any).isRequired,style:n(0).any.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_HeaderRendererParams",{value:{columnData:n(0).any,dataKey:n(0).string.isRequired,disableSort:n(0).bool,label:n(0).any,sortBy:n(0).string,sortDirection:n(0).string},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_RowRendererParams",{value:{className:n(0).string.isRequired,columns:n(0).arrayOf(n(0).any).isRequired,index:n(0).number.isRequired,isScrolling:n(0).bool.isRequired,onRowClick:n(0).func,onRowDoubleClick:n(0).func,onRowMouseOver:n(0).func,onRowMouseOut:n(0).func,rowData:n(0).any.isRequired,style:n(0).any.isRequired},configurable:!0})},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e,t){for(var n=-1,o=null==e?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}e.exports=n},function(e,t,n){function o(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?i(n,u,c):r(n,u,c)}return n}var r=n(424),i=n(425);e.exports=o},function(e,t,n){t.AgGridReact=n(431).AgGridReact,t.reactCellRendererFactory=n(458).reactCellRendererFactory,t.reactFilterFactory=n(459).reactFilterFactory},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(29),a=n(54),s=n(22),l=n(17),u=n(92),c=n(25),d=n(274),p=function(e){function t(t,n,o,r,i){var a=e.call(this)||this;return a.scope=t,a.beans=n,a.column=o,a.rowNode=r,a.rowComp=i,a.createGridCellVo(),a.rangeSelectionEnabled=n.enterprise&&n.gridOptionsWrapper.isEnableRangeSelection(),a.cellFocused=a.beans.focusedCellController.isCellFocused(a.gridCell),a.firstRightPinned=a.column.isFirstRightPinned(),a.lastLeftPinned=a.column.isLastLeftPinned(),a.rangeSelectionEnabled&&(a.rangeCount=a.beans.rangeController.getCellRangeCount(a.gridCell)),a.value=a.getValue(),a.setUsingWrapper(),a.chooseCellRenderer(),a.setupColSpan(),a}return o(t,e),t.prototype.getCreateTemplate=function(){var e,t,n=[],o=this.column,r=this.getCellWidth(),i=o.getLeft(),a=this.getInitialValueToRender(),s=this.getToolTip(),l=this.preProcessStylesFromColDef(),u=this.getInitialCssClasses();return this.usingWrapper&&(e='<span ref="eCellWrapper" class="ag-cell-wrapper"><span ref="eCellValue" class="ag-cell-value">',t="</span></span>"),n.push("<div"),n.push(' tabindex="-1"'),n.push(' role="gridcell"'),n.push(' comp-id="'+this.getCompId()+'" '),n.push(' col-id="'+o.getId()+'"'),n.push(' class="'+u.join(" ")+'"'),n.push(s?' title="'+s+'"':""),n.push(' style="width: '+r+"px; left: "+i+"px; "+l+'" >'),n.push(e),n.push(a),n.push(t),n.push("</div>"),n.join("")},t.prototype.afterAttached=function(){var e='[comp-id="'+this.getCompId()+'"]',t=this.eParentRow.querySelector(e);this.setHtmlElementNoHydrate(t),this.addDomData(),this.addSelectionCheckbox(),this.attachCellRenderer(),this.angular1Compile(),this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_FLASH_CELLS,this.onFlashCells.bind(this)),this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_CELL_CHANGED,this.onCellChanged.bind(this)),this.addDestroyableEventListener(this.column,i.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.addDestroyableEventListener(this.column,i.Column.EVENT_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.addDestroyableEventListener(this.column,i.Column.EVENT_FIRST_RIGHT_PINNED_CHANGED,this.onFirstRightPinnedChanged.bind(this)),this.addDestroyableEventListener(this.column,i.Column.EVENT_LAST_LEFT_PINNED_CHANGED,this.onLastLeftPinnedChanged.bind(this)),this.rangeSelectionEnabled&&this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this))},t.prototype.onColumnHover=function(){var e=this.beans.columnHoverService.isHovered(this.column);r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-column-hover",e)},t.prototype.onCellChanged=function(e){e.column===this.column&&this.refreshCell({})},t.prototype.getCellLeft=function(){var e;return e=this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.column,e.getLeft()},t.prototype.getCellWidth=function(){if(this.colsSpanning){var e=0;return this.colsSpanning.forEach(function(t){return e+=t.getActualWidth()}),e}return this.column.getActualWidth()},t.prototype.onFlashCells=function(e){var t=this.gridCell.createId();e.cells[t]&&this.animateCell("highlight")},t.prototype.setupColSpan=function(){r._.missing(this.column.getColDef().colSpan)||(this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,l.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.colsSpanning=this.getColSpanningList())},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var n=this.column,o=this.column.getPinned(),i=0;i<e&&(t.push(n),n=this.beans.columnController.getDisplayedColAfter(n),!r._.missing(n))&&o===n.getPinned();i++);return t},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();r._.compareArrays(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.getInitialCssClasses=function(){var e=["ag-cell","ag-cell-not-inline-editing"];return e.push(this.cellFocused?"ag-cell-focus":"ag-cell-no-focus"),this.firstRightPinned&&e.push("ag-cell-first-right-pinned"),this.lastLeftPinned&&e.push("ag-cell-last-left-pinned"),this.beans.columnHoverService.isHovered(this.column)&&e.push("ag-column-hover"),r._.pushAll(e,this.preProcessClassesFromColDef()),r._.pushAll(e,this.preProcessCellClassRules()),r._.pushAll(e,this.getRangeClasses()),this.usingWrapper||e.push("ag-cell-value"),e},t.prototype.getInitialValueToRender=function(){if(this.usingCellRenderer)return"string"===typeof this.cellRendererGui?this.cellRendererGui:"";var e=this.column.getColDef();if(e.template)return e.template;if(e.templateUrl){var t=this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0));return t||""}var n=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,null,this.value);return null!==n&&void 0!==n?n:this.value},t.prototype.getRenderedRow=function(){return this.rowComp},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.refreshCell=function(e){if(!this.editingCell){var t=e&&e.newData,n=e&&e.suppressFlash,o=e&&e.volatile,r=e&&e.forceRefresh;if(!o||this.isVolatile()){var i=this.value;this.value=this.getValue();if(!(!r&&this.valuesAreEqual(i,this.value))){var a;a=!t&&!n&&this.attemptCellRendererRefresh(),a||this.replaceContentsAfterRefresh(),n||this.flashCell(),this.postProcessStylesFromColDef(),this.postProcessClassesFromColDef(),this.postProcessCellClassRules()}}}},t.prototype.flashCell=function(){(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||this.column.getColDef().enableCellChangeFlash)&&this.animateCell("data-changed")},t.prototype.animateCell=function(e){var t="ag-cell-"+e,n="ag-cell-"+e+"-animation",o=this.getHtmlElement();r._.addCssClass(o,t),r._.removeCssClass(o,n),setTimeout(function(){r._.removeCssClass(o,t),r._.addCssClass(o,n),setTimeout(function(){r._.removeCssClass(o,n)},1e3)},500)},t.prototype.replaceContentsAfterRefresh=function(){r._.removeAllChildren(this.eParentOfValue),this.cellRenderer&&this.cellRenderer.destroy&&this.cellRenderer.destroy(),this.cellRenderer=null,this.cellRendererGui=null,this.putDataIntoCellAfterRefresh(),this.angular1Compile()},t.prototype.angular1Compile=function(){if(this.beans.gridOptionsWrapper.isAngularCompileRows()){var e=this.getGui();this.beans.$compile(e)(this.scope)}},t.prototype.postProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();e&&r._.addStylesToElement(this.getGui(),e)},t.prototype.preProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();return r._.cssStyleObjectToMarkup(e)},t.prototype.processStylesFromColDef=function(){var e=this.column.getColDef();if(e.cellStyle){var t=void 0;if("function"===typeof e.cellStyle){var n={value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()};t=(0,e.cellStyle)(n)}else t=e.cellStyle;return t}},t.prototype.postProcessClassesFromColDef=function(){var e=this;this.processClassesFromColDef(function(t){return r._.addCssClass(e.getHtmlElement(),t)})},t.prototype.preProcessClassesFromColDef=function(){var e=[];return this.processClassesFromColDef(function(t){return e.push(t)}),e},t.prototype.processClassesFromColDef=function(e){this.beans.stylingService.processStaticCellClasses(this.column.getColDef(),{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:this.column.getColDef(),rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext()},e)},t.prototype.putDataIntoCellAfterRefresh=function(){var e=this.column.getColDef();if(e.template)this.eParentOfValue.innerHTML=e.template;else if(e.templateUrl){var t=this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0));t&&(this.eParentOfValue.innerHTML=t)}else if(this.usingCellRenderer)this.attachCellRenderer();else{var n=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,this.value),o=null!==n&&void 0!==n,i=o?n:this.value;null!==i&&void 0!==i&&(this.eParentOfValue.innerText=i)}if(e.tooltipField){var a=this.rowNode.data;if(r._.exists(a)){var s=r._.getValueUsingField(a,e.tooltipField,this.column.isTooltipFieldContainsDots());r._.exists(s)&&this.eParentOfValue.setAttribute("title",s)}}},t.prototype.attemptCellRendererRefresh=function(){if(r._.missing(this.cellRenderer)||r._.missing(this.cellRenderer.refresh))return!1;var e=this.formatValue(this.value),t=this.createCellRendererParams(e),n=this.cellRenderer.refresh(t);return!0===n||void 0===n},t.prototype.isVolatile=function(){return this.column.getColDef().volatile},t.prototype.valuesAreEqual=function(e,t){var n=this.column.getColDef(),o=n?n.equals:null;return o?o(e,t):e===t},t.prototype.getToolTip=function(){var e=this.column.getColDef(),t=this.rowNode.data;return e.tooltipField&&r._.exists(t)?r._.getValueUsingField(t,e.tooltipField,this.column.isTooltipFieldContainsDots()):null},t.prototype.processCellClassRules=function(e,t){this.beans.stylingService.processClassRules(this.column.getColDef().cellClassRules,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:this.column.getColDef(),rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext()},e,t)},t.prototype.postProcessCellClassRules=function(){var e=this;this.processCellClassRules(function(t){r._.addCssClass(e.getHtmlElement(),t)},function(t){r._.removeCssClass(e.getHtmlElement(),t)})},t.prototype.preProcessCellClassRules=function(){var e=[];return this.processCellClassRules(function(t){e.push(t)},function(e){}),e},t.prototype.setUsingWrapper=function(){var e=this.column.getColDef();this.rowNode.rowPinned?this.usingWrapper=!1:"boolean"===typeof e.checkboxSelection?this.usingWrapper=e.checkboxSelection:"function"===typeof e.checkboxSelection?this.usingWrapper=!0:this.usingWrapper=!1},t.prototype.chooseCellRenderer=function(){var e=this.column.getColDef();if(e.template||e.templateUrl)return void(this.usingCellRenderer=!1);var t=this.beans.componentResolver.getComponentToUse(e,"cellRenderer");this.beans.componentResolver.getComponentToUse(e,"pinnedRowCellRenderer")&&this.rowNode.rowPinned?(this.cellRendererType="pinnedRowCellRenderer",this.usingCellRenderer=!0):t?(this.cellRendererType="cellRenderer",this.usingCellRenderer=!0):this.usingCellRenderer=!1},t.prototype.createCellRendererInstance=function(){var e=this.formatValue(this.value),t=this.createCellRendererParams(e);this.cellRenderer=this.beans.componentResolver.createAgGridComponent(this.column.getColDef(),t,this.cellRendererType),this.cellRendererGui=this.cellRenderer.getGui(),null!==this.cellRendererGui&&void 0!==this.cellRendererGui||console.warn("ag-Grid: cellRenderer should return back a string or a DOM object, but got "+this.cellRendererGui)},t.prototype.attachCellRenderer=function(){this.usingCellRenderer&&(this.createCellRendererInstance(),"object"!==typeof this.cellRendererGui?(this.eParentOfValue.innerHTML=this.cellRendererGui+"",this.cellRendererGui=this.eParentOfValue.firstChild):this.cellRendererGui instanceof Node?this.eParentOfValue.appendChild(this.cellRendererGui):this.cellRendererGui.toString&&(this.eParentOfValue.innerHTML=this.cellRendererGui.toString()+"",this.cellRendererGui=this.eParentOfValue.firstChild))},t.prototype.createCellRendererParams=function(e){var t=this;return{value:this.value,valueFormatted:e,getValue:this.getValue.bind(this),setValue:function(e){t.beans.valueService.setValue(t.rowNode,t.column,e)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,colDef:this.column.getColDef(),column:this.column,$scope:this.scope,rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.eParentOfValue,addRowCompListener:this.rowComp.addEventListener.bind(this.rowComp),addRenderedRowListener:function(e,n){console.warn("ag-Grid: since ag-Grid .v11, params.addRenderedRowListener() is now params.addRowCompListener()"),t.rowComp.addEventListener(e,n)}}},t.prototype.formatValue=function(e){var t=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,e);return null!==t&&void 0!==t?t:e},t.prototype.getValue=function(){var e=this.rowNode.leafGroup&&this.beans.columnController.isPivotMode();return this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!e&&this.beans.gridOptionsWrapper.isGroupIncludeFooter()?this.beans.valueService.getValue(this.column,this.rowNode,!0):this.beans.valueService.getValue(this.column,this.rowNode)},t.prototype.onMouseEvent=function(e,t){switch(e){case"click":this.onCellClicked(t);break;case"mousedown":this.onMouseDown();break;case"dblclick":this.onCellDoubleClicked(t);break;case"contextmenu":this.onContextMenu(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}},t.prototype.createEvent=function(e,t){var n={node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,type:t,rowIndex:this.rowNode.rowIndex};return this.scope&&(n.$scope=this.scope),n},t.prototype.onMouseOut=function(e){var t=this.createEvent(e,l.Events.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t)},t.prototype.onMouseOver=function(e){var t=this.createEvent(e,l.Events.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t)},t.prototype.onContextMenu=function(e){if(this.beans.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e.ctrlKey&&!e.metaKey){var t=this.column.getColDef(),n=this.createEvent(e,l.Events.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(n),t.onCellContextMenu&&t.onCellContextMenu(n),this.beans.contextMenuFactory&&!this.beans.gridOptionsWrapper.isSuppressContextMenu()&&(this.beans.contextMenuFactory.showMenu(this.rowNode,this.column,this.value,e),e.preventDefault())}},t.prototype.onCellDoubleClicked=function(e){var t=this.column.getColDef(),n=this.createEvent(e,l.Events.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(n),"function"===typeof t.onCellDoubleClicked&&t.onCellDoubleClicked(n),!this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit()},t.prototype.startRowOrCellEdit=function(e,t){this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.startRowEditing(e,t,this):this.startEditingIfEnabled(e,t,!0)},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.startEditingIfEnabled=function(e,t,n){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=!1),this.isCellEditable()&&!this.editingCell){var o=this.createCellEditor(e,t,n);if(o.isCancelBeforeStart&&o.isCancelBeforeStart())return o.destroy&&o.destroy(),!1;if(!o.getGui)return console.warn("ag-Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),o.render&&console.warn("ag-Grid: we found 'render' on the component, are you trying to set a React renderer but added it as colDef.cellEditor instead of colDef.cellEditorFmk?"),!1;this.cellEditor=o,this.editingCell=!0,this.cellEditorInPopup=this.cellEditor.isPopup&&this.cellEditor.isPopup(),this.setInlineEditingClass(),this.cellEditorInPopup?this.addPopupCellEditor():this.addInCellEditor(),o.afterGuiAttached&&o.afterGuiAttached();var r=this.createEvent(null,l.Events.EVENT_CELL_EDITING_STARTED);return this.beans.eventService.dispatchEvent(r),!0}},t.prototype.addInCellEditor=function(){r._.removeAllChildren(this.getHtmlElement()),this.getHtmlElement().appendChild(r._.assertHtmlElement(this.cellEditor.getGui())),this.angular1Compile()},t.prototype.addPopupCellEditor=function(){var e=this,t=this.cellEditor.getGui();this.hideEditorPopup=this.beans.popupService.addAsModalPopup(t,!0,function(){e.onPopupEditorClosed()}),this.beans.popupService.positionPopupOverComponent({column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getHtmlElement(),ePopup:r._.assertHtmlElement(t),keepWithinBounds:!0}),this.angular1Compile()},t.prototype.onPopupEditorClosed=function(){this.editingCell&&(this.stopRowOrCellEdit(),this.beans.focusedCellController.isCellFocused(this.gridCell)&&this.focusCell(!0))},t.prototype.setInlineEditingClass=function(){var e=this.editingCell&&!this.cellEditorInPopup;r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-inline-editing",e),r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-not-inline-editing",!e)},t.prototype.createCellEditor=function(e,t,n){var o=this.createCellEditorParams(e,t,n);return this.beans.cellEditorFactory.createCellEditor(this.column.getColDef(),o)},t.prototype.createCellEditorParams=function(e,t,n){var o={value:this.getValue(),keyPress:e,charPress:t,column:this.column,rowIndex:this.gridCell.rowIndex,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),cellStartedEdit:n,columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getHtmlElement(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)},i=this.column.getColDef();return i.cellEditorParams&&r._.assign(o,i.cellEditorParams),o},t.prototype.stopEditingAndFocus=function(){this.stopRowOrCellEdit(),this.focusCell(!0)},t.prototype.parseValue=function(e){var t={node:this.rowNode,data:this.rowNode.data,oldValue:this.value,newValue:e,colDef:this.column.getColDef(),column:this.column,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},n=this.column.getColDef().valueParser;return r._.exists(n)?this.beans.expressionService.evaluate(n,t):e},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusedCellController.setFocusedCell(this.gridCell.rowIndex,this.column,this.rowNode.rowPinned,e)},t.prototype.setFocusInOnEditor=function(){this.editingCell&&this.cellEditor&&this.cellEditor.focusIn&&this.cellEditor.focusIn()},t.prototype.isEditing=function(){return this.editingCell},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;if(!this.doesUserWantToCancelKeyboardEvent(e))switch(t){case s.Constants.KEY_ENTER:this.onEnterKeyDown();break;case s.Constants.KEY_F2:this.onF2KeyDown();break;case s.Constants.KEY_ESCAPE:this.onEscapeKeyDown();break;case s.Constants.KEY_TAB:this.onTabKeyDown(e);break;case s.Constants.KEY_BACKSPACE:case s.Constants.KEY_DELETE:this.onBackspaceOrDeleteKeyPressed(t);break;case s.Constants.KEY_DOWN:case s.Constants.KEY_UP:case s.Constants.KEY_RIGHT:case s.Constants.KEY_LEFT:this.onNavigationKeyPressed(e,t)}},t.prototype.doesUserWantToCancelKeyboardEvent=function(e){var t=this.column.getColDef().suppressKeyboardEvent;return!r._.missing(t)&&t({event:e,editing:!0===this.editingCell,column:this.column,api:this.beans.gridOptionsWrapper.getApi(),node:this.rowNode,colDef:this.column.getColDef(),context:this.beans.gridOptionsWrapper.getContext(),columnApi:this.beans.gridOptionsWrapper.getColumnApi()})},t.prototype.setFocusOutOnEditor=function(){this.editingCell&&this.cellEditor&&this.cellEditor.focusOut&&this.cellEditor.focusOut()},t.prototype.onNavigationKeyPressed=function(e,t){this.editingCell&&this.stopRowOrCellEdit(),this.beans.rowRenderer.navigateToNextCell(e,t,this.gridCell.rowIndex,this.column,this.rowNode.rowPinned),e.preventDefault()},t.prototype.onTabKeyDown=function(e){this.beans.gridOptionsWrapper.isSuppressTabbing()||this.beans.rowRenderer.onTabKeyDown(this,e)},t.prototype.onBackspaceOrDeleteKeyPressed=function(e){this.editingCell||this.startRowOrCellEdit(e)},t.prototype.onEnterKeyDown=function(){this.editingCell?(this.stopRowOrCellEdit(),this.focusCell(!0)):this.startRowOrCellEdit(s.Constants.KEY_ENTER)},t.prototype.onF2KeyDown=function(){this.editingCell||this.startRowOrCellEdit(s.Constants.KEY_F2)},t.prototype.onEscapeKeyDown=function(){this.editingCell&&(this.stopRowOrCellEdit(!0),this.focusCell(!0))},t.prototype.onKeyPress=function(e){if(r._.getTarget(e)===this.getGui()&&!this.editingCell){var t=String.fromCharCode(e.charCode);" "===t?this.onSpaceKeyPressed(e):r._.isEventFromPrintableCharacter(e)&&(this.startRowOrCellEdit(null,t),e.preventDefault())}},t.prototype.onSpaceKeyPressed=function(e){if(!this.editingCell&&this.beans.gridOptionsWrapper.isRowSelection()){var t=this.rowNode.isSelected();this.rowNode.setSelected(!t)}e.preventDefault()},t.prototype.onMouseDown=function(){if(this.focusCell(!1),this.beans.rangeController){var e=this.gridCell;this.beans.rangeController.isCellInAnyRange(e)||this.beans.rangeController.setRangeToCell(e)}},t.prototype.onCellClicked=function(e){var t=this.createEvent(e,l.Events.EVENT_CELL_CLICKED);this.beans.eventService.dispatchEvent(t);var n=this.column.getColDef();n.onCellClicked&&n.onCellClicked(t),this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit(),this.doIeFocusHack()},t.prototype.doIeFocusHack=function(){(r._.isBrowserIE()||r._.isBrowserEdge())&&(r._.missing(document.activeElement)||document.activeElement===document.body)&&this.getHtmlElement().focus()},t.prototype.createGridCellVo=function(){var e={rowIndex:this.rowNode.rowIndex,floating:this.rowNode.rowPinned,column:this.column};this.gridCell=new u.GridCell(e)},t.prototype.getGridCell=function(){return this.gridCell},t.prototype.getParentRow=function(){return this.eParentRow},t.prototype.setParentRow=function(e){this.eParentRow=e},t.prototype.getColumn=function(){return this.column},t.prototype.detach=function(){this.eParentRow.removeChild(this.getHtmlElement())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.cellEditor&&this.cellEditor.destroy&&this.cellEditor.destroy(),this.cellRenderer&&this.cellRenderer.destroy&&this.cellRenderer.destroy()},t.prototype.onLeftChanged=function(){var e=this.getCellLeft();this.getHtmlElement().style.left=e+"px"},t.prototype.onWidthChanged=function(){var e=this.getCellWidth();this.getHtmlElement().style.width=e+"px"},t.prototype.getRangeClasses=function(){var e=[];return this.rangeSelectionEnabled?(0!==this.rangeCount&&e.push("ag-cell-range-selected"),1===this.rangeCount&&e.push("ag-cell-range-selected-1"),2===this.rangeCount&&e.push("ag-cell-range-selected-2"),3===this.rangeCount&&e.push("ag-cell-range-selected-3"),this.rangeCount>=4&&e.push("ag-cell-range-selected-4"),e):e},t.prototype.onRowIndexChanged=function(){this.createGridCellVo(),this.onCellFocused(),this.onRangeSelectionChanged()},t.prototype.onRangeSelectionChanged=function(){if(this.beans.enterprise){var e=this.beans.rangeController.getCellRangeCount(this.gridCell),t=this.getHtmlElement();this.rangeCount!==e&&(r._.addOrRemoveCssClass(t,"ag-cell-range-selected",0!==e),r._.addOrRemoveCssClass(t,"ag-cell-range-selected-1",1===e),r._.addOrRemoveCssClass(t,"ag-cell-range-selected-2",2===e),r._.addOrRemoveCssClass(t,"ag-cell-range-selected-3",3===e),r._.addOrRemoveCssClass(t,"ag-cell-range-selected-4",e>=4),this.rangeCount=e)}},t.prototype.onFirstRightPinnedChanged=function(){var e=this.column.isFirstRightPinned();this.firstRightPinned!==e&&(this.firstRightPinned=e,r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-first-right-pinned",e))},t.prototype.onLastLeftPinnedChanged=function(){var e=this.column.isLastLeftPinned();this.lastLeftPinned!==e&&(this.lastLeftPinned=e,r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-last-left-pinned",e))},t.prototype.addSelectionCheckbox=function(){if(this.usingWrapper){this.eParentOfValue=this.getRefElement("eCellValue"),this.eCellWrapper=this.getRefElement("eCellWrapper");var e=new d.CheckboxSelectionComponent;this.beans.context.wireBean(e);var t=this.column.getColDef().checkboxSelection;t="function"===typeof t?t:null,e.init({rowNode:this.rowNode,column:this.column,visibleFunc:t}),this.addDestroyFunc(function(){return e.destroy()}),this.eCellWrapper.insertBefore(e.getHtmlElement(),this.eParentOfValue)}else this.eParentOfValue=this.getHtmlElement()},t.prototype.addDomData=function(){var e=this,n=this.getHtmlElement();this.beans.gridOptionsWrapper.setDomData(n,t.DOM_DATA_KEY_CELL_COMP,this),this.addDestroyFunc(function(){return e.beans.gridOptionsWrapper.setDomData(n,t.DOM_DATA_KEY_CELL_COMP,null)})},t.prototype.onCellFocused=function(e){var t=this.beans.focusedCellController.isCellFocused(this.gridCell);t!==this.cellFocused&&(r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-focus",t),r._.addOrRemoveCssClass(this.getHtmlElement(),"ag-cell-no-focus",!t),this.cellFocused=t),t&&e&&e.forceBrowserFocus&&this.getHtmlElement().focus();var n=this.beans.gridOptionsWrapper.isFullRowEdit();t||n||!this.editingCell||this.stopRowOrCellEdit()},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.stopRowEditing(e):this.stopEditing(e)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.editingCell){if(!e){if(!(this.cellEditor.isCancelAfterEnd&&this.cellEditor.isCancelAfterEnd())){var t=this.cellEditor.getValue();this.rowNode.setDataValue(this.column,t),this.value=this.getValue()}}if(this.editingCell=!1,this.cellEditor.destroy&&this.cellEditor.destroy(),this.cellEditorInPopup)this.hideEditorPopup(),this.hideEditorPopup=null;else if(r._.removeAllChildren(this.getHtmlElement()),this.usingWrapper)this.getHtmlElement().appendChild(this.eCellWrapper);else if(this.cellRenderer){var n=this.cellRendererGui;n&&this.getHtmlElement().appendChild(n)}this.setInlineEditingClass(),this.refreshCell({forceRefresh:!0,suppressFlash:!0});var o=this.createEvent(null,l.Events.EVENT_CELL_EDITING_STOPPED);this.beans.eventService.dispatchEvent(o)}},t.DOM_DATA_KEY_CELL_COMP="cellComp",t}(c.Component);t.CellComp=p},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var 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])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(29),a=n(48),s=function(e){function t(t,n,o,r){var i=e.call(this)||this;return i.columnOrGroup=t,i.eCell=n,i.colsSpanning=r,i.beans=o,i}return o(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.columnOrGroup},t.prototype.init=function(){this.addDestroyableEventListener(this.columnOrGroup,i.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime()},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation(),t=r.Utils.exists(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup().getLeft(),n=this.getColumnOrGroup().getOldLeft();this.setLeft(n),this.actualLeft=t,this.beans.columnAnimationService.executeNextVMTurn(function(){e.actualLeft===t&&e.setLeft(t)})},t.prototype.onLeftChanged=function(){this.actualLeft=this.getColumnOrGroup().getLeft(),this.setLeft(this.actualLeft)},t.prototype.setLeft=function(e){r.Utils.exists(e)&&(this.eCell.style.left=e+"px")},t}(a.BeanStub);t.SetLeftFeature=s},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=n(6),s=n(60),l=function(){function e(){}return e.prototype.formatValue=function(e,t,n,o){var r,i=e.getColDef();r=t&&t.rowPinned&&i.pinnedRowValueFormatter?i.pinnedRowValueFormatter:i.valueFormatter;var a=null;if(r){var s={value:o,node:t,data:t?t.data:null,colDef:e.getColDef(),column:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};s.$scope=n,a=this.expressionService.evaluate(r,s)}else if(i.refData)return i.refData[o];return a},o([i.Autowired("gridOptionsWrapper"),r("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),o([i.Autowired("expressionService"),r("design:type",s.ExpressionService)],e.prototype,"expressionService",void 0),e=o([i.Bean("valueFormatterService")],e)}();t.ValueFormatterService=l},function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(2),s=function(){function e(){}return e.prototype.addDragHandling=function(e){var t=this;e.eDraggableElement.addEventListener("mousedown",function(n){var o=t.gridOptionsWrapper.getDocument(),r=o.querySelector("body");new l(e,n,r)})},o([a.Autowired("gridOptionsWrapper"),r("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),e=o([a.Bean("horizontalDragService")],e)}();t.HorizontalDragService=s;var l=function(){function e(e,t,n){this.mouseMove=this.onMouseMove.bind(this),this.mouseUp=this.onMouseUp.bind(this),this.mouseLeave=this.onMouseLeave.bind(this),this.lastDelta=0,this.params=e,this.eDragParent=n,this.dragStartX=t.clientX,this.startEvent=t,this.eDragParent.addEventListener("mousemove",this.mouseMove),this.eDragParent.addEventListener("mouseup",this.mouseUp),this.eDragParent.addEventListener("mouseleave",this.mouseLeave),this.draggingStarted=!1,"number"===typeof e.startAfterPixels&&e.startAfterPixels>0||this.startDragging()}return e.prototype.startDragging=function(){this.draggingStarted=!0,this.oldBodyCursor=this.params.eBody.style.cursor,this.oldParentCursor=this.eDragParent.style.cursor,this.oldMsUserSelect=this.eDragParent.style.msUserSelect,this.oldWebkitUserSelect=this.eDragParent.style.webkitUserSelect,this.params.eBody.style.cursor=this.params.cursor,this.eDragParent.style.cursor=this.params.cursor,this.eDragParent.style.msUserSelect="none",this.eDragParent.style.webkitUserSelect="none",this.params.onDragStart(this.startEvent)},e.prototype.onMouseMove=function(e){var t=e.clientX;if(this.lastDelta=t-this.dragStartX,!this.draggingStarted){Math.abs(this.lastDelta)>=this.params.startAfterPixels&&this.startDragging()}this.draggingStarted&&this.params.onDragging(this.lastDelta,!1)},e.prototype.onMouseUp=function(){this.stopDragging()},e.prototype.onMouseLeave=function(){this.stopDragging()},e.prototype.stopDragging=function(){this.draggingStarted&&(this.params.eBody.style.cursor=this.oldBodyCursor,this.eDragParent.style.cursor=this.oldParentCursor,this.eDragParent.style.msUserSelect=this.oldMsUserSelect,this.eDragParent.style.webkitUserSelect=this.oldWebkitUserSelect,this.params.onDragging(this.lastDelta,!0)),this.eDragParent.removeEventListener("mousemove",this.mouseMove),this.eDragParent.removeEventListener("mouseup",this.mouseUp),this.eDragParent.removeEventListener("mouseleave",this.mouseLeave)},e}()},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(948),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function o(e,t,n,o){var r=document.createElement(e);if(n&&(r.className=n),o&&(r.style.cssText=o),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)r.appendChild(t[i]);return r}function r(e,t,n,r){var i=o(e,t,n,r);return i.setAttribute("role","presentation"),i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function a(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function s(t,n){var o=t.className;e(n).test(o)||(t.className+=(o?" ":"")+n)}function l(t,n){for(var o=t.split(" "),r=0;r<o.length;r++)o[r]&&!e(o[r]).test(n)&&(n+=" "+o[r]);return n}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,n){t||(t={});for(var o in e)!e.hasOwnProperty(o)||!1===n&&t.hasOwnProperty(o)||(t[o]=e[o]);return t}function d(e,t,n,o,r){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=o||0,a=r||0;;){var s=e.indexOf("\t",i);if(s<0||s>=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}function p(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function h(e,t,n){for(var o=0,r=0;;){var i=e.indexOf("\t",o);-1==i&&(i=e.length);var a=i-o;if(i==e.length||r+a>=t)return o+Math.min(a,t-r);if(r+=i-o,r+=n-r%n,o=i+1,r>=t)return o}}function f(e){for(;qa.length<=e;)qa.push(g(qa)+" ");return qa[e]}function g(e){return e[e.length-1]}function m(e,t){for(var n=[],o=0;o<e.length;o++)n[o]=t(e[o],o);return n}function v(e,t,n){for(var o=0,r=n(t);o<e.length&&n(e[o])<=r;)o++;e.splice(o,0,t)}function y(){}function C(e,t){var n;return Object.create?n=Object.create(e):(y.prototype=e,n=new y),t&&c(t,n),n}function b(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ka.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function _(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function E(e){return e.charCodeAt(0)>=768&&Ya.test(e)}function x(e,t,n){for(;(n<0?t>0:t<e.length)&&E(e.charAt(t));)t+=n;return t}function S(e,t,n){for(var o=t>n?-1:1;;){if(t==n)return t;var r=(t+n)/2,i=o<0?Math.ceil(r):Math.floor(r);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+o}}function A(e,t,n){var i=this;this.input=n,i.scrollbarFiller=o("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=o("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=r("div",null,"CodeMirror-code"),i.selectionDiv=o("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=o("div",null,"CodeMirror-cursors"),i.measure=o("div",null,"CodeMirror-measure"),i.lineMeasure=o("div",null,"CodeMirror-measure"),i.lineSpace=r("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=r("div",[i.lineSpace],"CodeMirror-lines");i.mover=o("div",[a],null,"position: relative"),i.sizer=o("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=o("div",null,null,"position: absolute; height: "+Ha+"px; width: 1px;"),i.gutters=o("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=o("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=o("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ya&&Ca<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),ba||fa&&Oa||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function R(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(t<i){n=r;break}t-=i}return n.lines[t]}function T(e,t,n){var o=[],r=t.line;return e.iter(t.line,n.line+1,function(e){var i=e.text;r==n.line&&(i=i.slice(0,n.ch)),r==t.line&&(i=i.slice(t.ch)),o.push(i),++r}),o}function O(e,t,n){var o=[];return e.iter(t,n,function(e){o.push(e.text)}),o}function k(e,t){var n=t-e.height;if(n)for(var o=e;o;o=o.parent)o.height+=n}function P(e){if(null==e.parent)return null;for(var t=e.parent,n=p(t.lines,e),o=t.parent;o;t=o,o=o.parent)for(var r=0;o.children[r]!=t;++r)n+=o.children[r].chunkSize();return n+t.first}function D(e,t){var n=e.first;e:do{for(var o=0;o<e.children.length;++o){var r=e.children[o],i=r.height;if(t<i){e=r;continue e}t-=i,n+=r.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a],l=s.height;if(t<l)break;t-=l}return n+a}function F(e,t){return t>=e.first&&t<e.first+e.size}function M(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e,t,n){if(void 0===n&&(n=null),!(this instanceof L))return new L(e,t,n);this.line=e,this.ch=t,this.sticky=n}function I(e,t){return e.line-t.line||e.ch-t.ch}function N(e,t){return e.sticky==t.sticky&&0==I(e,t)}function B(e){return L(e.line,e.ch)}function W(e,t){return I(e,t)<0?t:e}function j(e,t){return I(e,t)<0?e:t}function G(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function H(e,t){if(t.line<e.first)return L(e.first,0);var n=e.first+e.size-1;return t.line>n?L(n,R(e,n).text.length):V(t,R(e,t.line).text.length)}function V(e,t){var n=e.ch;return null==n||n>t?L(e.line,t):n<0?L(e.line,0):e}function U(e,t){for(var n=[],o=0;o<t.length;o++)n[o]=H(e,t[o]);return n}function z(){Xa=!0}function $(){Qa=!0}function q(e,t,n){this.marker=e,this.from=t,this.to=n}function K(e,t){if(e)for(var n=0;n<e.length;++n){var o=e[n];if(o.marker==t)return o}}function Y(e,t){for(var n,o=0;o<e.length;++o)e[o]!=t&&(n||(n=[])).push(e[o]);return n}function X(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Q(e,t,n){var o;if(e)for(var r=0;r<e.length;++r){var i=e[r],a=i.marker,s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);if(s||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(o||(o=[])).push(new q(a,i.from,l?null:i.to))}}return o}function Z(e,t,n){var o;if(e)for(var r=0;r<e.length;++r){var i=e[r],a=i.marker,s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(o||(o=[])).push(new q(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return o}function J(e,t){if(t.full)return null;var n=F(e,t.from.line)&&R(e,t.from.line).markedSpans,o=F(e,t.to.line)&&R(e,t.to.line).markedSpans;if(!n&&!o)return null;var r=t.from.ch,i=t.to.ch,a=0==I(t.from,t.to),s=Q(n,r,a),l=Z(o,i,a),u=1==t.text.length,c=g(t.text).length+(u?r:0);if(s)for(var d=0;d<s.length;++d){var p=s[d];if(null==p.to){var h=K(l,p.marker);h?u&&(p.to=null==h.to?null:h.to+c):p.to=r}}if(l)for(var f=0;f<l.length;++f){var m=l[f];if(null!=m.to&&(m.to+=c),null==m.from){var v=K(s,m.marker);v||(m.from=c,u&&(s||(s=[])).push(m))}else m.from+=c,u&&(s||(s=[])).push(m)}s&&(s=ee(s)),l&&l!=s&&(l=ee(l));var y=[s];if(!u){var C,b=t.text.length-2;if(b>0&&s)for(var w=0;w<s.length;++w)null==s[w].to&&(C||(C=[])).push(new q(s[w].marker,null,null));for(var _=0;_<b;++_)y.push(C);y.push(l)}return y}function ee(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function te(e,t,n){var o=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||o&&-1!=p(o,n)||(o||(o=[])).push(n)}}),!o)return null;for(var r=[{from:t,to:n}],i=0;i<o.length;++i)for(var a=o[i],s=a.find(0),l=0;l<r.length;++l){var u=r[l];if(!(I(u.to,s.from)<0||I(u.from,s.to)>0)){var c=[l,1],d=I(u.from,s.from),h=I(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),r.splice.apply(r,c),l+=c.length-3}}return r}function ne(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function oe(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function re(e){return e.inclusiveLeft?-1:0}function ie(e){return e.inclusiveRight?1:0}function ae(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var o=e.find(),r=t.find(),i=I(o.from,r.from)||re(e)-re(t);if(i)return-i;var a=I(o.to,r.to)||ie(e)-ie(t);return a||t.id-e.id}function se(e,t){var n,o=Qa&&e.markedSpans;if(o)for(var r=void 0,i=0;i<o.length;++i)r=o[i],r.marker.collapsed&&null==(t?r.from:r.to)&&(!n||ae(n,r.marker)<0)&&(n=r.marker);return n}function le(e){return se(e,!0)}function ue(e){return se(e,!1)}function ce(e,t,n,o,r){var i=R(e,t),a=Qa&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=I(u.from,n)||re(l.marker)-re(r),d=I(u.to,o)||ie(l.marker)-ie(r);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?I(u.to,n)>=0:I(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?I(u.from,o)<=0:I(u.from,o)<0)))return!0}}}function de(e){for(var t;t=le(e);)e=t.find(-1,!0).line;return e}function pe(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,n;t=ue(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function fe(e,t){var n=R(e,t),o=de(n);return n==o?t:P(o)}function ge(e,t){if(t>e.lastLine())return t;var n,o=R(e,t);if(!me(e,o))return t;for(;n=ue(o);)o=n.find(1,!0).line;return P(o)+1}function me(e,t){var n=Qa&&t.markedSpans;if(n)for(var o=void 0,r=0;r<n.length;++r)if(o=n[r],o.marker.collapsed){if(null==o.from)return!0;if(!o.marker.widgetNode&&0==o.from&&o.marker.inclusiveLeft&&ve(e,t,o))return!0}}function ve(e,t,n){if(null==n.to){var o=n.marker.find(1,!0);return ve(e,o.line,K(o.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var r=void 0,i=0;i<t.markedSpans.length;++i)if(r=t.markedSpans[i],r.marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&ve(e,t,r))return!0}function ye(e){e=de(e);for(var t=0,n=e.parent,o=0;o<n.lines.length;++o){var r=n.lines[o];if(r==e)break;t+=r.height}for(var i=n.parent;i;n=i,i=n.parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;t+=s.height}return t}function Ce(e){if(0==e.height)return 0;for(var t,n=e.text.length,o=e;t=le(o);){var r=t.find(0,!0);o=r.from.line,n+=r.from.ch-r.to.ch}for(o=e;t=ue(o);){var i=t.find(0,!0);n-=o.text.length-i.from.ch,o=i.to.line,n+=o.text.length-i.to.ch}return n}function be(e){var t=e.display,n=e.doc;t.maxLine=R(n,n.first),t.maxLineLength=Ce(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=Ce(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function we(e,t,n,o){if(!e)return o(t,n,"ltr",0);for(var r=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(o(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),r=!0)}r||o(t,n,"ltr")}function _e(e,t,n){var o;Za=null;for(var r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;i.to==t&&(i.from!=i.to&&"before"==n?o=r:Za=r),i.from==t&&(i.from!=i.to&&"before"!=n?o=r:Za=r)}return null!=o?o:Za}function Ee(e,t){var n=e.order;return null==n&&(n=e.order=Ja(e.text,t)),n}function xe(e,t){return e._handlers&&e._handlers[t]||es}function Se(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var o=e._handlers,r=o&&o[t];if(r){var i=p(r,n);i>-1&&(o[t]=r.slice(0,i).concat(r.slice(i+1)))}}}function Ae(e,t){var n=xe(e,t);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,o)}function Re(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ae(e,n||t.type,e,t),Fe(t)||t.codemirrorIgnore}function Te(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),o=0;o<t.length;++o)-1==p(n,t[o])&&n.push(t[o])}function Oe(e,t){return xe(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ts(this,e,t)},e.prototype.off=function(e,t){Se(this,e,t)}}function Pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Fe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Me(e){Pe(e),De(e)}function Le(e){return e.target||e.srcElement}function Ie(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ka&&e.ctrlKey&&1==t&&(t=3),t}function Ne(e){if(null==ja){var t=o("span","\u200b");n(e,o("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ja=t.offsetWidth<=1&&t.offsetHeight>2&&!(ya&&Ca<8))}var r=ja?o("span","\u200b"):o("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Be(e){if(null!=Ga)return Ga;var o=n(e,document.createTextNode("A\u062eA")),r=Ma(o,0,1).getBoundingClientRect(),i=Ma(o,1,2).getBoundingClientRect();return t(e),!(!r||r.left==r.right)&&(Ga=i.right-r.right<3)}function We(e){if(null!=as)return as;var t=n(e,o("span","x")),r=t.getBoundingClientRect(),i=Ma(t,0,1).getBoundingClientRect();return as=Math.abs(r.left-i.left)>1}function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ss[e]=t}function Ge(e,t){ls[e]=t}function He(e){if("string"==typeof e&&ls.hasOwnProperty(e))e=ls[e];else if(e&&"string"==typeof e.name&&ls.hasOwnProperty(e.name)){var t=ls[e.name];"string"==typeof t&&(t={name:t}),e=C(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=He(t);var n=ss[t.name];if(!n)return Ve(e,"text/plain");var o=n(e,t);if(us.hasOwnProperty(t.name)){var r=us[t.name];for(var i in r)r.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(o["_"+i]=o[i]),o[i]=r[i])}if(o.name=t.name,t.helperType&&(o.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)o[a]=t.modeProps[a];return o}function Ue(e,t){c(t,us.hasOwnProperty(e)?us[e]:us[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var o in t){var r=t[o];r instanceof Array&&(r=r.concat([])),n[o]=r}return n}function $e(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function qe(e,t,n){return!e.startState||e.startState(t,n)}function Ke(e,t,n,o){var r=[e.state.modeGen],i={};nt(e,t.text,e.doc.mode,n,function(e,t){return r.push(e,t)},i,o);for(var a=n.state,s=0;s<e.state.overlays.length;++s)!function(o){n.baseTokens=r;var s=e.state.overlays[o],l=1,u=0;n.state=!0,nt(e,t.text,s.mode,n,function(e,t){for(var n=l;u<e;){var o=r[l];o>e&&r.splice(l,1,e,r[l+1],o),l+=2,u=Math.min(e,o)}if(t)if(s.opaque)r.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var i=r[n+1];r[n+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=a,n.baseTokens=null,n.baseTokenPos=1}(s);return{styles:r,classes:i.bgClass||i.textClass?i:null}}function Ye(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var o=Xe(e,P(t)),r=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,o.state),i=Ke(e,t,o);r&&(o.state=r),t.stateAfter=o.save(!r),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Xe(e,t,n){var o=e.doc,r=e.display;if(!o.mode.startState)return new ps(o,!0,t);var i=ot(e,t,n),a=i>o.first&&R(o,i-1).stateAfter,s=a?ps.fromSaved(o,a,i):new ps(o,qe(o.mode),i);return o.iter(i,t,function(n){Qe(e,n.text,s);var o=s.line;n.stateAfter=o==t-1||o%5==0||o>=r.viewFrom&&o<r.viewTo?s.save():null,s.nextLine()}),n&&(o.modeFrontier=s.line),s}function Qe(e,t,n,o){var r=e.doc.mode,i=new cs(t,e.options.tabSize,n);for(i.start=i.pos=o||0,""==t&&Ze(r,n.state);!i.eol();)Je(r,i,n.state),i.start=i.pos}function Ze(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=$e(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Je(e,t,n,o){for(var r=0;r<10;r++){o&&(o[0]=$e(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,n,o){var r,i=e.doc,a=i.mode;t=H(i,t);var s,l=R(i,t.line),u=Xe(e,t.line,n),c=new cs(l.text,e.options.tabSize,u);for(o&&(s=[]);(o||c.pos<t.ch)&&!c.eol();)c.start=c.pos,r=Je(a,c,u.state),o&&s.push(new hs(c,r,ze(i.mode,u.state)));return o?s:new hs(c,r,u.state)}function tt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var o=n[1]?"bgClass":"textClass";null==t[o]?t[o]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[o])||(t[o]+=" "+n[2])}return e}function nt(e,t,n,o,r,i,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new cs(t,e.options.tabSize,o),p=e.options.addModeClass&&[null];for(""==t&&tt(Ze(n,o.state),i);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&Qe(e,t,o,d.pos),d.pos=t.length,l=null):l=tt(Je(n,d,o.state,p),i),p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;u<d.start;)u=Math.min(d.start,u+5e3),r(u,c);c=l}d.start=d.pos}for(;u<d.pos;){var f=Math.min(d.pos,u+5e3);r(f,c),u=f}}function ot(e,t,n){for(var o,r,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=R(i,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ds?u.lookAhead:0)<=i.modeFrontier))return s;var c=d(l.text,null,e.options.tabSize);(null==r||o>c)&&(r=s-1,o=c)}return r}function rt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,o=t-1;o>n;o--){var r=R(e,o).stateAfter;if(r&&(!(r instanceof ds)||o+r.lookAhead<t)){n=o+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}function it(e,t,n,o){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),ne(e),oe(e,n);var r=o?o(e):1;r!=e.height&&k(e,r)}function at(e){e.parent=null,ne(e)}function st(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?vs:ms;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function lt(e,t){var n=r("span",null,null,ba?"padding-right: .1px":null),o={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ya||ba)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,s=void 0;o.pos=0,o.addToken=ct,Be(e.display.measure)&&(s=Ee(a,e.doc.direction))&&(o.addToken=pt(o.addToken,s)),o.map=[];ft(a,o,Ye(e,a,t!=e.display.externalMeasured&&P(a))),a.styleClasses&&(a.styleClasses.bgClass&&(o.bgClass=l(a.styleClasses.bgClass,o.bgClass||"")),a.styleClasses.textClass&&(o.textClass=l(a.styleClasses.textClass,o.textClass||""))),0==o.map.length&&o.map.push(0,0,o.content.appendChild(Ne(e.display.measure))),0==i?(t.measure.map=o.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(o.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ba){var u=o.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,o.pre),o.pre.className&&(o.textClass=l(o.pre.className,o.textClass||"")),o}function ut(e){var t=o("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ct(e,t,n,r,i,a,s){if(t){var l,u=e.splitSpaces?dt(t,e.trailingSpace):t,c=e.cm.state.specialChars,d=!1;if(c.test(t)){l=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var h=c.exec(t),g=h?h.index-p:t.length-p;if(g){var m=document.createTextNode(u.slice(p,p+g));ya&&Ca<9?l.appendChild(o("span",[m])):l.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;p+=g+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,C=y-e.col%y;v=l.appendChild(o("span",f(C),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=C}else"\r"==h[0]||"\n"==h[0]?(v=l.appendChild(o("span","\r"==h[0]?"\u240d":"\u2424","cm-invalidchar")),v.setAttribute("cm-text",h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute("cm-text",h[0]),ya&&Ca<9?l.appendChild(o("span",[v])):l.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,l=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,l),ya&&Ca<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||s){var b=n||"";r&&(b+=r),i&&(b+=i);var w=o("span",[l],b,s);return a&&(w.title=a),e.content.appendChild(w)}e.content.appendChild(l)}}function dt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,o="",r=0;r<e.length;r++){var i=e.charAt(r);" "!=i||!n||r!=e.length-1&&32!=e.charCodeAt(r+1)||(i="\xa0"),o+=i,n=" "==i}return o}function pt(e,t){return function(n,o,r,i,a,s,l){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+o.length;;){for(var d=void 0,p=0;p<t.length&&(d=t[p],!(d.to>u&&d.from<=u));p++);if(d.to>=c)return e(n,o,r,i,a,s,l);e(n,o.slice(0,d.to-u),r,i,null,s,l),i=null,o=o.slice(d.to-u),u=d.to}}}function ht(e,t,n,o){var r=!o&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!o&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function ft(e,t,n){var o=e.markedSpans,r=e.text,i=0;if(o)for(var a,s,l,u,c,d,p,h=r.length,f=0,g=1,m="",v=0;;){if(v==f){l=u=c=d=s="",p=null,v=1/0;for(var y=[],C=void 0,b=0;b<o.length;++b){var w=o[b],_=w.marker;"bookmark"==_.type&&w.from==f&&_.widgetNode?y.push(_):w.from<=f&&(null==w.to||w.to>f||_.collapsed&&w.to==f&&w.from==f)?(null!=w.to&&w.to!=f&&v>w.to&&(v=w.to,u=""),_.className&&(l+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&w.from==f&&(c+=" "+_.startStyle),_.endStyle&&w.to==v&&(C||(C=[])).push(_.endStyle,w.to),_.title&&!d&&(d=_.title),_.collapsed&&(!p||ae(p.marker,_)<0)&&(p=w)):w.from>f&&v>w.from&&(v=w.from)}if(C)for(var E=0;E<C.length;E+=2)C[E+1]==v&&(u+=" "+C[E]);if(!p||p.from==f)for(var x=0;x<y.length;++x)ht(t,0,y[x]);if(p&&(p.from||0)==f){if(ht(t,(null==p.to?h+1:p.to)-f,p.marker,null==p.from),null==p.to)return;p.to==f&&(p=!1)}}if(f>=h)break;for(var S=Math.min(h,v);;){if(m){var A=f+m.length;if(!p){var R=A>S?m.slice(0,S-f):m;t.addToken(t,R,a?a+l:l,c,f+R.length==v?u:"",d,s)}if(A>=S){m=m.slice(S-f),f=S;break}f=A,c=""}m=r.slice(i,i=n[g++]),a=st(n[g++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,r.slice(i,i=n[T]),st(n[T+1],t.cm.options))}function gt(e,t,n){this.line=t,this.rest=he(t),this.size=this.rest?P(g(this.rest))-n+1:1,this.node=this.text=null,this.hidden=me(e,t)}function mt(e,t,n){for(var o,r=[],i=t;i<n;i=o){var a=new gt(e.doc,R(e.doc,i),i);o=i+a.size,r.push(a)}return r}function vt(e){ys?ys.ops.push(e):e.ownsGroup=ys={ops:[e],delayedCallbacks:[]}}function yt(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var o=0;o<e.ops.length;o++){var r=e.ops[o];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<t.length)}function Ct(e,t){var n=e.ownsGroup;if(n)try{yt(n)}finally{ys=null,t(n)}}function bt(e,t){var n=xe(e,t);if(n.length){var o,r=Array.prototype.slice.call(arguments,2);ys?o=ys.delayedCallbacks:Cs?o=Cs:(o=Cs=[],setTimeout(wt,0));for(var i=0;i<n.length;++i)!function(e){o.push(function(){return n[e].apply(null,r)})}(i)}}function wt(){var e=Cs;Cs=null;for(var t=0;t<e.length;++t)e[t]()}function _t(e,t,n,o){for(var r=0;r<t.changes.length;r++){var i=t.changes[r];"text"==i?At(e,t):"gutter"==i?Tt(e,t,n,o):"class"==i?Rt(e,t):"widget"==i&&Ot(e,t,o)}t.changes=null}function Et(e){return e.node==e.text&&(e.node=o("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ya&&Ca<8&&(e.node.style.zIndex=2)),e.node}function xt(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Et(t);t.background=r.insertBefore(o("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function St(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):lt(e,t)}function At(e,t){var n=t.text.className,o=St(e,t);t.text==t.node&&(t.node=o.pre),t.text.parentNode.replaceChild(o.pre,t.text),t.text=o.pre,o.bgClass!=t.bgClass||o.textClass!=t.textClass?(t.bgClass=o.bgClass,t.textClass=o.textClass,Rt(e,t)):n&&(t.text.className=n)}function Rt(e,t){xt(e,t),t.line.wrapClass?Et(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Tt(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Et(t);t.gutterBackground=o("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var s=Et(t),l=t.gutter=o("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),s.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(o("div",M(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],d=a.hasOwnProperty(c)&&a[c];d&&l.appendChild(o("div",[d],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Ot(e,t,n){t.alignable&&(t.alignable=null);for(var o=t.node.firstChild,r=void 0;o;o=r)r=o.nextSibling,"CodeMirror-linewidget"==o.className&&t.node.removeChild(o);Pt(e,t,n)}function kt(e,t,n,o){var r=St(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),Rt(e,t),Tt(e,t,n,o),Pt(e,t,o),t.node}function Pt(e,t,n){if(Dt(e,t.line,t,n,!0),t.rest)for(var o=0;o<t.rest.length;o++)Dt(e,t.rest[o],t,n,!1)}function Dt(e,t,n,r,i){if(t.widgets)for(var a=Et(n),s=0,l=t.widgets;s<l.length;++s){var u=l[s],c=o("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ft(u,c,n,r),e.display.input.setUneditable(c),i&&u.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),bt(u,"redraw")}}function Ft(e,t,n,o){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var r=o.wrapperWidth;t.style.left=o.fixedPos+"px",e.coverGutter||(r-=o.gutterTotalWidth,t.style.paddingLeft=o.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-o.gutterTotalWidth+"px"))}function Mt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!i(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,o("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Lt(e,t){for(var n=Le(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function It(e){return e.lineSpace.offsetTop}function Nt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Bt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,o("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Wt(e){return Ha-e.display.nativeBarWidth}function jt(e){return e.display.scroller.clientWidth-Wt(e)-e.display.barWidth}function Gt(e){return e.display.scroller.clientHeight-Wt(e)-e.display.barHeight}function Ht(e,t,n){var o=e.options.lineWrapping,r=o&&jt(e);if(!t.measure.heights||o&&t.measure.width!=r){var i=t.measure.heights=[];if(o){t.measure.width=r;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&i.push((l.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Vt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;o<e.rest.length;o++)if(e.rest[o]==t)return{map:e.measure.maps[o],cache:e.measure.caches[o]};for(var r=0;r<e.rest.length;r++)if(P(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ut(e,t){t=de(t);var o=P(t),r=e.display.externalMeasured=new gt(e.doc,t,o);r.lineN=o;var i=r.built=lt(e,r);return r.text=i.pre,n(e.display.lineMeasure,i.pre),r}function zt(e,t,n,o){return Kt(e,qt(e,t),n,o)}function $t(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[An(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function qt(e,t){var n=P(t),o=$t(e,n);o&&!o.text?o=null:o&&o.changes&&(_t(e,o,n,wn(e)),e.curOp.forceUpdate=!0),o||(o=Ut(e,t));var r=Vt(o,t,n);return{line:t,view:o,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Kt(e,t,n,o,r){t.before&&(n=-1);var i,a=n+(o||"");return t.cache.hasOwnProperty(a)?i=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ht(e,t.view,t.rect),t.hasHeights=!0),i=Qt(e,t,n,o),i.bogus||(t.cache[a]=i)),{left:i.left,right:i.right,top:r?i.rtop:i.top,bottom:r?i.rbottom:i.bottom}}function Yt(e,t,n){for(var o,r,i,a,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(r=0,i=1,a="left"):t<l?(r=t-s,i=r+1):(u==e.length-3||t==l&&e[u+3]>t)&&(i=l-s,r=i-1,t>=l&&(a="right")),null!=r){if(o=e[u+2],s==l&&n==(o.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)o=e[2+(u-=3)],a="left";if("right"==n&&r==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)o=e[(u+=3)+2],a="right";break}return{node:o,start:r,end:i,collapse:a,coverStart:s,coverEnd:l}}function Xt(e,t){var n=bs;if("left"==t)for(var o=0;o<e.length&&(n=e[o]).left==n.right;o++);else for(var r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function Qt(e,t,n,o){var r,i=Yt(t.map,n,o),a=i.node,s=i.start,l=i.end,u=i.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&E(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+l<i.coverEnd&&E(t.line.text.charAt(i.coverStart+l));)++l;if(r=ya&&Ca<9&&0==s&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():Xt(Ma(a,s,l).getClientRects(),o),r.left||r.right||0==s)break;l=s,s-=1,u="right"}ya&&Ca<11&&(r=Zt(e.display.measure,r))}else{s>0&&(u=o="right");var d;r=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==o?d.length-1:0]:a.getBoundingClientRect()}if(ya&&Ca<9&&!s&&(!r||!r.left&&!r.right)){var p=a.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+bn(e.display),top:p.top,bottom:p.bottom}:bs}for(var h=r.top-t.rect.top,f=r.bottom-t.rect.top,g=(h+f)/2,m=t.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,C=m[v],b={left:("right"==u?r.right:r.left)-t.rect.left,right:("left"==u?r.left:r.right)-t.rect.left,top:y,bottom:C};return r.left||r.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=h,b.rbottom=f),b}function Zt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!We(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*o,bottom:t.bottom*o}}function Jt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function en(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)Jt(e.display.view[n])}function tn(e){en(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function nn(){return _a&&Ta?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function on(){return _a&&Ta?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Mt(e.widgets[n]));return t}function an(e,t,n,o,r){if(!r){var i=rn(t);n.top+=i,n.bottom+=i}if("line"==o)return n;o||(o="local");var a=ye(t);if("local"==o?a+=It(e.display):a-=e.display.viewOffset,"page"==o||"window"==o){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==o?0:on());var l=s.left+("window"==o?0:nn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function sn(e,t,n){if("div"==n)return t;var o=t.left,r=t.top;if("page"==n)o-=nn(),r-=on();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();o+=i.left,r+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:o-a.left,top:r-a.top}}function ln(e,t,n,o,r){return o||(o=R(e.doc,t.line)),an(e,o,zt(e,o,t.ch,r),n)}function un(e,t,n,o,r,i){function a(t,a){var s=Kt(e,r,t,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,an(e,o,s,n)}function s(e,t,n){var o=l[t],r=1==o.level;return a(n?e-1:e,r!=n)}o=o||R(e.doc,t.line),r||(r=qt(e,o));var l=Ee(o,e.doc.direction),u=t.ch,c=t.sticky;if(u>=o.text.length?(u=o.text.length,c="before"):u<=0&&(u=0,c="after"),!l)return a("before"==c?u-1:u,"before"==c);var d=_e(l,u,c),p=Za,h=s(u,d,"before"==c);return null!=p&&(h.other=s(u,p,"before"!=c)),h}function cn(e,t){var n=0;t=H(e.doc,t),e.options.lineWrapping||(n=bn(e.display)*t.ch);var o=R(e.doc,t.line),r=ye(o)+It(e.display);return{left:n,right:n,top:r,bottom:r+o.height}}function dn(e,t,n,o,r){var i=L(e,t,n);return i.xRel=r,o&&(i.outside=!0),i}function pn(e,t,n){var o=e.doc;if((n+=e.display.viewOffset)<0)return dn(o.first,0,null,!0,-1);var r=D(o,n),i=o.first+o.size-1;if(r>i)return dn(o.first+o.size-1,R(o,i).text.length,null,!0,1);t<0&&(t=0);for(var a=R(o,r);;){var s=mn(e,a,r,t,n),l=ue(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;r=P(a=u.to.line)}}function hn(e,t,n,o){o-=rn(t);var r=t.text.length,i=S(function(t){return Kt(e,n,t-1).bottom<=o},r,0);return r=S(function(t){return Kt(e,n,t).top>o},i,r),{begin:i,end:r}}function fn(e,t,n,o){return n||(n=qt(e,t)),hn(e,t,n,an(e,t,Kt(e,n,o),"line").top)}function gn(e,t,n,o){return!(e.bottom<=n)&&(e.top>n||(o?e.left:e.right)>t)}function mn(e,t,n,o,r){r-=ye(t);var i=qt(e,t),a=rn(t),s=0,l=t.text.length,u=!0,c=Ee(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?yn:vn)(e,t,n,i,c,o,r);u=1!=d.level,s=u?d.from:d.to-1,l=u?d.to:d.from-1}var p,h,f=null,g=null,m=S(function(t){var n=Kt(e,i,t);return n.top+=a,n.bottom+=a,!!gn(n,o,r,!1)&&(n.top<=r&&n.left<=o&&(f=t,g=n),!0)},s,l),v=!1;if(g){var y=o-g.left<g.right-o,C=y==u;m=f+(C?0:1),h=C?"after":"before",p=y?g.left:g.right}else{u||m!=l&&m!=s||m++,h=0==m?"after":m==t.text.length?"before":Kt(e,i,m-(u?1:0)).bottom+a<=r==u?"after":"before";var b=un(e,L(n,m,h),"line",t,i);p=b.left,v=r<b.top||r>=b.bottom}return m=x(t.text,m,1),dn(n,m,h,v,o-p)}function vn(e,t,n,o,r,i,a){var s=S(function(s){var l=r[s],u=1!=l.level;return gn(un(e,L(n,u?l.to:l.from,u?"before":"after"),"line",t,o),i,a,!0)},0,r.length-1),l=r[s];if(s>0){var u=1!=l.level,c=un(e,L(n,u?l.from:l.to,u?"after":"before"),"line",t,o);gn(c,i,a,!0)&&c.top>a&&(l=r[s-1])}return l}function yn(e,t,n,o,r,i,a){var s=hn(e,t,o,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,p=0;p<r.length;p++){var h=r[p];if(!(h.from>=u||h.to<=l)){var f=1!=h.level,g=Kt(e,o,f?Math.min(u,h.to)-1:Math.max(l,h.from)).right,m=g<i?i-g+1e9:g-i;(!c||d>m)&&(c=h,d=m)}}return c||(c=r[r.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function Cn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==gs){gs=o("pre");for(var r=0;r<49;++r)gs.appendChild(document.createTextNode("x")),gs.appendChild(o("br"));gs.appendChild(document.createTextNode("x"))}n(e.measure,gs);var i=gs.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),t(e.measure),i||1}function bn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=o("span","xxxxxxxxxx"),r=o("pre",[t]);n(e.measure,r);var i=t.getBoundingClientRect(),a=(i.right-i.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function wn(e){for(var t=e.display,n={},o={},r=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a)n[e.options.gutters[a]]=i.offsetLeft+i.clientLeft+r,o[e.options.gutters[a]]=i.clientWidth;return{fixedPos:_n(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperWidth:t.wrapper.clientWidth}}function _n(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function En(e){var t=Cn(e.display),n=e.options.lineWrapping,o=n&&Math.max(5,e.display.scroller.clientWidth/bn(e.display)-3);return function(r){if(me(e.doc,r))return 0;var i=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(i+=r.widgets[a].height);return n?i+(Math.ceil(r.text.length/o)||1)*t:i+t}}function xn(e){var t=e.doc,n=En(e);t.iter(function(e){var t=n(e);t!=e.height&&k(e,t)})}function Sn(e,t,n,o){var r=e.display;if(!n&&"true"==Le(t).getAttribute("cm-not-content"))return null;var i,a,s=r.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=pn(e,i,a);if(o&&1==u.xRel&&(l=R(e.doc,u.line).text).length==u.ch){var c=d(l,l.length,e.options.tabSize)-l.length;u=L(u.line,Math.max(0,Math.round((i-Bt(e.display).left)/bn(e.display))-c))}return u}function An(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,o=0;o<n.length;o++)if((t-=n[o].size)<0)return o}function Rn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Tn(e,t){void 0===t&&(t=!0);for(var n=e.doc,o={},r=o.cursors=document.createDocumentFragment(),i=o.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&On(e,s.head,r),l||Pn(e,s,i)}}return o}function On(e,t,n){var r=un(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(o("div","\xa0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var a=n.appendChild(o("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function kn(e,t){return e.top-t.top||e.left-t.left}function Pn(e,t,n){function r(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),l.appendChild(o("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?d-e:n)+"px;\n height: "+(r-t)+"px"))}function i(t,n,o){function i(n,o){return ln(e,L(t,n),"div",h,o)}function a(t,n,o){var r=fn(e,h,null,t),a="ltr"==n==("after"==o)?"left":"right";return i("after"==o?r.begin:r.end-(/\s/.test(h.text.charAt(r.end-1))?2:1),a)[a]}var l,u,h=R(s,t),f=h.text.length,g=Ee(h,s.direction);return we(g,n||0,null==o?f:o,function(e,t,s,h){var m="ltr"==s,v=i(e,m?"left":"right"),y=i(t-1,m?"right":"left"),C=null==n&&0==e,b=null==o&&t==f,w=0==h,_=!g||h==g.length-1;if(y.top-v.top<=3){var E=(p?C:b)&&w,x=(p?b:C)&&_,S=E?c:(m?v:y).left,A=x?d:(m?y:v).right;r(S,v.top,A-S,v.bottom)}else{var R,T,O,k;m?(R=p&&C&&w?c:v.left,T=p?d:a(e,s,"before"),O=p?c:a(t,s,"after"),k=p&&b&&_?d:y.right):(R=p?a(e,s,"before"):c,T=!p&&C&&w?d:v.right,O=!p&&b&&_?c:y.left,k=p?a(t,s,"after"):d),r(R,v.top,T-R,v.bottom),v.bottom<y.top&&r(c,v.bottom,null,y.top),r(O,y.top,k-O,y.bottom)}(!l||kn(v,l)<0)&&(l=v),kn(y,l)<0&&(l=y),(!u||kn(v,u)<0)&&(u=v),kn(y,u)<0&&(u=y)}),{start:l,end:u}}var a=e.display,s=e.doc,l=document.createDocumentFragment(),u=Bt(e.display),c=u.left,d=Math.max(a.sizerWidth,jt(e)-a.sizer.offsetLeft)-u.right,p="ltr"==s.direction,h=t.from(),f=t.to();if(h.line==f.line)i(h.line,h.ch,f.ch);else{var g=R(s,h.line),m=R(s,f.line),v=de(g)==de(m),y=i(h.line,h.ch,v?g.text.length+1:null).end,C=i(f.line,v?0:null,f.ch).start;v&&(y.top<C.top-2?(r(y.right,y.top,null,y.bottom),r(c,C.top,C.left,C.bottom)):r(y.right,y.top,C.left-y.right,y.bottom)),y.bottom<C.top&&r(c,y.bottom,null,C.top)}n.appendChild(l)}function Dn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fn(e){e.state.focused||(e.display.input.focus(),Ln(e))}function Mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,In(e))},100)}function Ln(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ba&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Dn(e))}function In(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,Na(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Nn(e){for(var t=e.display,n=t.lineDiv.offsetTop,o=0;o<t.view.length;o++){var r=t.view[o],i=void 0;if(!r.hidden){if(ya&&Ca<8){var a=r.node.offsetTop+r.node.offsetHeight;i=a-n,n=a}else{var s=r.node.getBoundingClientRect();i=s.bottom-s.top}var l=r.line.height-i;if(i<2&&(i=Cn(t)),(l>.005||l<-.005)&&(k(r.line,i),Bn(r.line),r.rest))for(var u=0;u<r.rest.length;u++)Bn(r.rest[u])}}}function Bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],o=n.node.parentNode;o&&(n.height=o.offsetHeight)}}function Wn(e,t,n){var o=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;o=Math.floor(o-It(e));var r=n&&null!=n.bottom?n.bottom:o+e.wrapper.clientHeight,i=D(t,o),a=D(t,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=D(t,ye(R(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=D(t,ye(R(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function jn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var o=_n(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=o+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=o+r+"px")}}function Gn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=M(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(o("div",[o("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,s=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Fo(e),!0}return!1}function Hn(e,t){if(!Re(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Aa){var a=o("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-It(e.display))+"px;\n height: "+(t.bottom-t.top+Wt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function Vn(e,t,n,o){null==o&&(o=0);var r;e.options.lineWrapping||t!=n||(t=t.ch?L(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?L(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,s=un(e,t),l=n&&n!=t?un(e,n):s;r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-o,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+o};var u=zn(e,r),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Zn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(eo(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return r}function Un(e,t){var n=zn(e,t);null!=n.scrollTop&&Zn(e,n.scrollTop),null!=n.scrollLeft&&eo(e,n.scrollLeft)}function zn(e,t){var n=e.display,o=Cn(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Gt(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Nt(n),l=t.top<o,u=t.bottom>s-o;if(t.top<r)a.scrollTop=l?0:t.top;else if(t.bottom>r+i){var c=Math.min(t.top,(u?s:t.bottom)-i);c!=r&&(a.scrollTop=c)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=jt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>p+d-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function $n(e,t){null!=t&&(Xn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function qn(e){Xn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Kn(e,t,n){null==t&&null==n||Xn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Yn(e,t){Xn(e),e.curOp.scrollToPos=t}function Xn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Qn(e,cn(e,t.from),cn(e,t.to),t.margin)}}function Qn(e,t,n,o){var r=zn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-o,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+o});Kn(e,r.scrollLeft,r.scrollTop)}function Zn(e,t){Math.abs(e.doc.scrollTop-t)<2||(fa||Po(e,{top:t}),Jn(e,t,!0),fa&&Po(e),xo(e,100))}function Jn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function eo(e,t,n,o){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!o||(e.doc.scrollLeft=t,jn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function to(e){var t=e.display,n=t.gutters.offsetWidth,o=Math.round(e.doc.height+Nt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:o,scrollHeight:o+Wt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function no(e,t){t||(t=to(e));var n=e.display.barWidth,o=e.display.barHeight;oo(e,t);for(var r=0;r<4&&n!=e.display.barWidth||o!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&Nn(e),oo(e,to(e)),n=e.display.barWidth,o=e.display.barHeight}function oo(e,t){var n=e.display,o=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=o.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=o.bottom)+"px",n.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=o.bottom+"px",n.scrollbarFiller.style.width=o.right+"px"):n.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=o.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function ro(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Na(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Es[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ts(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?eo(e,t):Zn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function io(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xs},vt(e.curOp)}function ao(e){Ct(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;so(e)})}function so(e){for(var t=e.ops,n=0;n<t.length;n++)lo(t[n]);for(var o=0;o<t.length;o++)uo(t[o]);for(var r=0;r<t.length;r++)co(t[r]);for(var i=0;i<t.length;i++)po(t[i]);for(var a=0;a<t.length;a++)ho(t[a])}function lo(e){var t=e.cm,n=t.display;Ao(t),e.updateMaxLine&&be(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ss(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function uo(e){e.updatedDisplay=e.mustUpdate&&Oo(e.cm,e.update)}function co(e){var t=e.cm,n=t.display;e.updatedDisplay&&Nn(t),e.barMeasure=to(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=zt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Wt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-jt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function po(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&eo(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&no(t,e.barMeasure),e.updatedDisplay&&Mo(t,e.barMeasure),e.selectionChanged&&Dn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Fn(e.cm)}function ho(e){var t=e.cm,n=t.display,o=t.doc;if(e.updatedDisplay&&ko(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Jn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&eo(t,e.scrollLeft,!0,!0),e.scrollToPos){Hn(t,Vn(t,H(o,e.scrollToPos.from),H(o,e.scrollToPos.to),e.scrollToPos.margin))}var r=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(r)for(var a=0;a<r.length;++a)r[a].lines.length||Ae(r[a],"hide");if(i)for(var s=0;s<i.length;++s)i[s].lines.length&&Ae(i[s],"unhide");n.wrapper.offsetHeight&&(o.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ae(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function fo(e,t){if(e.curOp)return t();io(e);try{return t()}finally{ao(e)}}function go(e,t){return function(){if(e.curOp)return t.apply(e,arguments);io(e);try{return t.apply(e,arguments)}finally{ao(e)}}}function mo(e){return function(){if(this.curOp)return e.apply(this,arguments);io(this);try{return e.apply(this,arguments)}finally{ao(this)}}}function vo(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);io(t);try{return e.apply(this,arguments)}finally{ao(t)}}}function yo(e,t,n,o){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),o||(o=0);var r=e.display;if(o&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Qa&&fe(e.doc,t)<r.viewTo&&bo(e);else if(n<=r.viewFrom)Qa&&ge(e.doc,n+o)>r.viewFrom?bo(e):(r.viewFrom+=o,r.viewTo+=o);else if(t<=r.viewFrom&&n>=r.viewTo)bo(e);else if(t<=r.viewFrom){var i=wo(e,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):bo(e)}else if(n>=r.viewTo){var a=wo(e,t,t,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):bo(e)}else{var s=wo(e,t,t,-1),l=wo(e,n,n+o,1);s&&l?(r.view=r.view.slice(0,s.index).concat(mt(e,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=o):bo(e)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=o:t<u.lineN+u.size&&(r.externalMeasured=null))}function Co(e,t,n){e.curOp.viewChanged=!0;var o=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(o.externalMeasured=null),!(t<o.viewFrom||t>=o.viewTo)){var i=o.view[An(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==p(a,n)&&a.push(n)}}}function bo(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wo(e,t,n,o){var r,i=An(e,t),a=e.display.view;if(!Qa||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=t){if(o>0){if(i==a.length-1)return null;r=s+a[i].size-t,i++}else r=s-t;t+=r,n+=r}for(;fe(e.doc,n)!=n;){if(i==(o<0?0:a.length-1))return null;n+=o*a[i-(o<0?1:0)].size,i+=o}return{index:i,lineN:n}}function _o(e,t,n){var o=e.display;0==o.view.length||t>=o.viewTo||n<=o.viewFrom?(o.view=mt(e,t,n),o.viewFrom=t):(o.viewFrom>t?o.view=mt(e,t,o.viewFrom).concat(o.view):o.viewFrom<t&&(o.view=o.view.slice(An(e,t))),o.viewFrom=t,o.viewTo<n?o.view=o.view.concat(mt(e,o.viewTo,n)):o.viewTo>n&&(o.view=o.view.slice(0,An(e,n)))),o.viewTo=n}function Eo(e){for(var t=e.display.view,n=0,o=0;o<t.length;o++){var r=t[o];r.hidden||r.node&&!r.changes||++n}return n}function xo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(So,e))}function So(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,o=Xe(e,t.highlightFrontier),r=[];t.iter(o.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(o.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?ze(t.mode,o.state):null,l=Ke(e,i,o,!0);s&&(o.state=s),i.styles=l.styles;var u=i.styleClasses,c=l.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=i.styles[p];d&&r.push(o.line),i.stateAfter=o.save(),o.nextLine()}else i.text.length<=e.options.maxHighlightLength&&Qe(e,i.text,o),i.stateAfter=o.line%5==0?o.save():null,o.nextLine();if(+new Date>n)return xo(e,e.options.workDelay),!0}),t.highlightFrontier=o.line,t.modeFrontier=Math.max(t.modeFrontier,o.line),r.length&&fo(e,function(){for(var t=0;t<r.length;t++)Co(e,r[t],"text")})}}function Ao(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Wt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Wt(e)+"px",t.scrollbarsClipped=!0)}function Ro(e){if(e.hasFocus())return null;var t=a();if(!t||!i(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var o=window.getSelection();o.anchorNode&&o.extend&&i(e.display.lineDiv,o.anchorNode)&&(n.anchorNode=o.anchorNode,n.anchorOffset=o.anchorOffset,n.focusNode=o.focusNode,n.focusOffset=o.focusOffset)}return n}function To(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&i(document.body,e.anchorNode)&&i(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Oo(e,n){var o=e.display,r=e.doc;if(n.editorIsHidden)return bo(e),!1;if(!n.force&&n.visible.from>=o.viewFrom&&n.visible.to<=o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&0==Eo(e))return!1;Gn(e)&&(bo(e),n.dims=wn(e));var i=r.first+r.size,a=Math.max(n.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,n.visible.to+e.options.viewportMargin);o.viewFrom<a&&a-o.viewFrom<20&&(a=Math.max(r.first,o.viewFrom)),o.viewTo>s&&o.viewTo-s<20&&(s=Math.min(i,o.viewTo)),Qa&&(a=fe(e.doc,a),s=ge(e.doc,s));var l=a!=o.viewFrom||s!=o.viewTo||o.lastWrapHeight!=n.wrapperHeight||o.lastWrapWidth!=n.wrapperWidth;_o(e,a,s),o.viewOffset=ye(R(e.doc,o.viewFrom)),e.display.mover.style.top=o.viewOffset+"px";var u=Eo(e);if(!l&&0==u&&!n.force&&o.renderedView==o.view&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo))return!1;var c=Ro(e);return u>4&&(o.lineDiv.style.display="none"),Do(e,o.updateLineNumbers,n.dims),u>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,To(c),t(o.cursorDiv),t(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,l&&(o.lastWrapHeight=n.wrapperHeight,o.lastWrapWidth=n.wrapperWidth,xo(e,400)),o.updateLineNumbers=null,!0}function ko(e,t){for(var n=t.viewport,o=!0;(o&&e.options.lineWrapping&&t.oldDisplayWidth!=jt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Nt(e.display)-Gt(e),n.top)}),t.visible=Wn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Oo(e,t);o=!1){Nn(e);var r=to(e);Rn(e),no(e,r),Mo(e,r),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Po(e,t){var n=new Ss(e,t);if(Oo(e,n)){Nn(e),ko(e,n);var o=to(e);Rn(e),no(e,o),Mo(e,o),n.finish()}}function Do(e,n,o){function r(t){var n=t.nextSibling;return ba&&ka&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,a=e.options.lineNumbers,s=i.lineDiv,l=s.firstChild,u=i.view,c=i.viewFrom,d=0;d<u.length;d++){var h=u[d];if(h.hidden);else if(h.node&&h.node.parentNode==s){for(;l!=h.node;)l=r(l);var f=a&&null!=n&&n<=c&&h.lineNumber;h.changes&&(p(h.changes,"gutter")>-1&&(f=!1),_t(e,h,c,o)),f&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(M(e.options,c)))),l=h.node.nextSibling}else{var g=kt(e,h,c,o);s.insertBefore(g,l)}c+=h.size}for(;l;)l=r(l)}function Fo(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Wt(e)+"px"}function Lo(e){var n=e.display.gutters,r=e.options.gutters;t(n);for(var i=0;i<r.length;++i){var a=r[i],s=n.appendChild(o("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}n.style.display=i?"":"none",Fo(e)}function Io(e){var t=p(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function No(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Bo(e){var t=No(e);return t.x*=Rs,t.y*=Rs,t}function Wo(e,t){var n=No(t),o=n.x,r=n.y,i=e.display,a=i.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(o&&s||r&&l){if(r&&ka&&ba)e:for(var u=t.target,c=i.view;u!=a;u=u.parentNode)for(var d=0;d<c.length;d++)if(c[d].node==u){e.display.currentWheelTarget=u;break e}if(o&&!fa&&!Ea&&null!=Rs)return r&&l&&Zn(e,Math.max(0,a.scrollTop+r*Rs)),eo(e,Math.max(0,a.scrollLeft+o*Rs)),(!r||r&&l)&&Pe(t),void(i.wheelStartX=null);if(r&&null!=Rs){var p=r*Rs,h=e.doc.scrollTop,f=h+i.wrapper.clientHeight;p<0?h=Math.max(0,h+p-50):f=Math.min(e.doc.height,f+p+50),Po(e,{top:h,bottom:f})}As<20&&(null==i.wheelStartX?(i.wheelStartX=a.scrollLeft,i.wheelStartY=a.scrollTop,i.wheelDX=o,i.wheelDY=r,setTimeout(function(){if(null!=i.wheelStartX){var e=a.scrollLeft-i.wheelStartX,t=a.scrollTop-i.wheelStartY,n=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,n&&(Rs=(Rs*As+n)/(As+1),++As)}},200)):(i.wheelDX+=o,i.wheelDY+=r))}}function jo(e,t){var n=e[t];e.sort(function(e,t){return I(e.from(),t.from())}),t=p(e,n);for(var o=1;o<e.length;o++){var r=e[o],i=e[o-1];if(I(i.to(),r.from())>=0){var a=j(i.from(),r.from()),s=W(i.to(),r.to()),l=i.empty()?r.from()==r.head:i.from()==i.head;o<=t&&--t,e.splice(--o,2,new Os(l?s:a,l?a:s))}}return new Ts(e,t)}function Go(e,t){return new Ts([new Os(e,t||e)],0)}function Ho(e){return e.text?L(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Vo(e,t){if(I(e,t.from)<0)return e;if(I(e,t.to)<=0)return Ho(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,o=e.ch;return e.line==t.to.line&&(o+=Ho(t).ch-t.to.ch),L(n,o)}function Uo(e,t){for(var n=[],o=0;o<e.sel.ranges.length;o++){var r=e.sel.ranges[o];n.push(new Os(Vo(r.anchor,t),Vo(r.head,t)))}return jo(n,e.sel.primIndex)}function zo(e,t,n){return e.line==t.line?L(n.line,e.ch-t.ch+n.ch):L(n.line+(e.line-t.line),e.ch)}function $o(e,t,n){for(var o=[],r=L(e.first,0),i=r,a=0;a<t.length;a++){var s=t[a],l=zo(s.from,r,i),u=zo(Ho(s),r,i);if(r=s.to,i=u,"around"==n){var c=e.sel.ranges[a],d=I(c.head,c.anchor)<0;o[a]=new Os(d?u:l,d?l:u)}else o[a]=new Os(l,l)}return new Ts(o,e.sel.primIndex)}function qo(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Ko(e)}function Ko(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,xo(e,100),e.state.modeGen++,e.curOp&&yo(e)}function Yo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Xo(e,t,n,o){function r(e){return n?n[e]:null}function i(e,n,r){it(e,n,r,o),bt(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new fs(u[i],r(i),o));return n}var s=t.from,l=t.to,u=t.text,c=R(e,s.line),d=R(e,l.line),p=g(u),h=r(u.length-1),f=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Yo(e,t)){var m=a(0,u.length-1);i(d,d.text,h),f&&e.remove(s.line,f),m.length&&e.insert(s.line,m)}else if(c==d)if(1==u.length)i(c,c.text.slice(0,s.ch)+p+c.text.slice(l.ch),h);else{var v=a(1,u.length-1);v.push(new fs(p+c.text.slice(l.ch),h,o)),i(c,c.text.slice(0,s.ch)+u[0],r(0)),e.insert(s.line+1,v)}else if(1==u.length)i(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),r(0)),e.remove(s.line+1,f);else{i(c,c.text.slice(0,s.ch)+u[0],r(0)),i(d,p+d.text.slice(l.ch),h);var y=a(1,u.length-1);f>1&&e.remove(s.line+1,f-1),e.insert(s.line+1,y)}bt(e,"change",e,t)}function Qo(e,t,n){function o(e,r,i){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=r){var l=i&&s.sharedHist;n&&!l||(t(s.doc,l),o(s.doc,e,l))}}}o(e,null,!0)}function Zo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,xn(e),qo(e),Jo(e),e.options.lineWrapping||be(e),e.options.mode=t.modeOption,yo(e)}function Jo(e){("rtl"==e.doc.direction?s:Na)(e.display.lineDiv,"CodeMirror-rtl")}function er(e){fo(e,function(){Jo(e),yo(e)})}function tr(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function nr(e,t){var n={from:B(t.from),to:Ho(t),text:T(e,t.from,t.to)};return ur(e,n,t.from.line,t.to.line+1),Qo(e,function(e){return ur(e,n,t.from.line,t.to.line+1)},!0),n}function or(e){for(;e.length;){if(!g(e).ranges)break;e.pop()}}function rr(e,t){return t?(or(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ir(e,t,n,o){var r=e.history;r.undone.length=0;var i,a,s=+new Date;if((r.lastOp==o||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=rr(r,r.lastOp==o)))a=g(i.changes),0==I(t.from,t.to)&&0==I(t.from,a.to)?a.to=Ho(t):i.changes.push(nr(e,t));else{var l=g(r.done);for(l&&l.ranges||lr(e.sel,r.done),i={changes:[nr(e,t)],generation:r.generation},r.done.push(i);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=o,r.lastOrigin=r.lastSelOrigin=t.origin,a||Ae(e,"historyAdded")}function ar(e,t,n,o){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function sr(e,t,n,o){var r=e.history,i=o&&o.origin;n==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||ar(e,i,g(r.done),t))?r.done[r.done.length-1]=t:lr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=n,o&&!1!==o.clearRedo&&or(r.undone)}function lr(e,t){var n=g(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ur(e,t,n,o){var r=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,o),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[i]=n.markedSpans),++i})}function cr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function dr(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var o=[],r=0;r<t.text.length;++r)o.push(cr(n[r]));return o}function pr(e,t){var n=dr(e,t),o=J(e,t);if(!n)return o;if(!o)return n;for(var r=0;r<n.length;++r){var i=n[r],a=o[r];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<i.length;++u)if(i[u].marker==l.marker)continue e;i.push(l)}else a&&(n[r]=a)}return n}function hr(e,t,n){for(var o=[],r=0;r<e.length;++r){var i=e[r];if(i.ranges)o.push(n?Ts.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];o.push({changes:s});for(var l=0;l<a.length;++l){var u=a[l],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&p(t,Number(c[1]))>-1&&(g(s)[d]=u[d],delete u[d])}}}return o}function fr(e,t,n,o){if(o){var r=e.anchor;if(n){var i=I(t,r)<0;i!=I(n,r)<0?(r=t,t=n):i!=I(t,n)<0&&(t=n)}return new Os(r,t)}return new Os(n||t,t)}function gr(e,t,n,o,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),wr(e,new Ts([fr(e.sel.primary(),t,n,r)],0),o)}function mr(e,t,n){for(var o=[],r=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)o[i]=fr(e.sel.ranges[i],t[i],null,r);wr(e,jo(o,e.sel.primIndex),n)}function vr(e,t,n,o){var r=e.sel.ranges.slice(0);r[t]=n,wr(e,jo(r,e.sel.primIndex),o)}function yr(e,t,n,o){wr(e,Go(t,n),o)}function Cr(e,t,n){var o={ranges:t.ranges,update:function(t){var n=this;this.ranges=[];for(var o=0;o<t.length;o++)n.ranges[o]=new Os(H(e,t[o].anchor),H(e,t[o].head))},origin:n&&n.origin};return Ae(e,"beforeSelectionChange",e,o),e.cm&&Ae(e.cm,"beforeSelectionChange",e.cm,o),o.ranges!=t.ranges?jo(o.ranges,o.ranges.length-1):t}function br(e,t,n){var o=e.history.done,r=g(o);r&&r.ranges?(o[o.length-1]=t,_r(e,t,n)):wr(e,t,n)}function wr(e,t,n){_r(e,t,n),sr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function _r(e,t,n){(Oe(e,"beforeSelectionChange")||e.cm&&Oe(e.cm,"beforeSelectionChange"))&&(t=Cr(e,t,n)),Er(e,Sr(e,t,n&&n.bias||(I(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||qn(e.cm)}function Er(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Te(e.cm)),bt(e,"cursorActivity",e))}function xr(e){Er(e,Sr(e,e.sel,null,!1))}function Sr(e,t,n,o){for(var r,i=0;i<t.ranges.length;i++){var a=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=Rr(e,a.anchor,s&&s.anchor,n,o),u=Rr(e,a.head,s&&s.head,n,o);(r||l!=a.anchor||u!=a.head)&&(r||(r=t.ranges.slice(0,i)),r[i]=new Os(l,u))}return r?jo(r,t.primIndex):t}function Ar(e,t,n,o,r){var i=R(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(r&&(Ae(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u=l.find(o<0?1:-1),c=void 0;if((o<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Tr(e,u,-o,u&&u.line==t.line?i:null)),u&&u.line==t.line&&(c=I(u,n))&&(o<0?c<0:c>0))return Ar(e,u,t,o,r)}var d=l.find(o<0?-1:1);return(o<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Tr(e,d,o,d.line==t.line?i:null)),d?Ar(e,d,t,o,r):null}}return t}function Rr(e,t,n,o,r){var i=o||1,a=Ar(e,t,n,i,r)||!r&&Ar(e,t,n,i,!0)||Ar(e,t,n,-i,r)||!r&&Ar(e,t,n,-i,!0);return a||(e.cantEdit=!0,L(e.first,0))}function Tr(e,t,n,o){return n<0&&0==t.ch?t.line>e.first?H(e,L(t.line-1)):null:n>0&&t.ch==(o||R(e,t.line)).text.length?t.line<e.first+e.size-1?L(t.line+1,0):null:new L(t.line,t.ch+n)}function Or(e){e.setSelection(L(e.firstLine(),0),L(e.lastLine()),Ua)}function kr(e,t,n){var o={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return o.canceled=!0}};return n&&(o.update=function(t,n,r,i){t&&(o.from=H(e,t)),n&&(o.to=H(e,n)),r&&(o.text=r),void 0!==i&&(o.origin=i)}),Ae(e,"beforeChange",e,o),e.cm&&Ae(e.cm,"beforeChange",e.cm,o),o.canceled?null:{from:o.from,to:o.to,text:o.text,origin:o.origin}}function Pr(e,t,n){if(e.cm){if(!e.cm.curOp)return go(e.cm,Pr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"))||(t=kr(e,t,!0))){var o=Xa&&!n&&te(e,t.from,t.to);if(o)for(var r=o.length-1;r>=0;--r)Dr(e,{from:o[r].from,to:o[r].to,text:r?[""]:t.text,origin:t.origin});else Dr(e,t)}}function Dr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=I(t.from,t.to)){var n=Uo(e,t);ir(e,t,n,e.cm?e.cm.curOp.id:NaN),Lr(e,t,n,J(e,t));var o=[];Qo(e,function(e,n){n||-1!=p(o,e.history)||(jr(e.history,t),o.push(e.history)),Lr(e,t,null,J(e,t))})}}function Fr(e,t,n){var o=e.cm&&e.cm.state.suppressEdits;if(!o||n){for(var r,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,u=0;u<s.length&&(r=s[u],n?!r.ranges||r.equals(e.sel):r.ranges);u++);if(u!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(r=s.pop(),!r.ranges){if(o)return void s.push(r);break}if(lr(r,l),n&&!r.equals(e.sel))return void wr(e,r,{clearRedo:!1});a=r}var c=[];lr(a,l),l.push({changes:c,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var d=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),h=r.changes.length-1;h>=0;--h){var f=function(n){var o=r.changes[n];if(o.origin=t,d&&!kr(e,o,!1))return s.length=0,{};c.push(nr(e,o));var i=n?Uo(e,o):g(s);Lr(e,o,i,pr(e,o)),!n&&e.cm&&e.cm.scrollIntoView({from:o.from,to:Ho(o)});var a=[];Qo(e,function(e,t){t||-1!=p(a,e.history)||(jr(e.history,o),a.push(e.history)),Lr(e,o,null,pr(e,o))})}(h);if(f)return f.v}}}}function Mr(e,t){if(0!=t&&(e.first+=t,e.sel=new Ts(m(e.sel.ranges,function(e){return new Os(L(e.anchor.line+t,e.anchor.ch),L(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){yo(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,o=n.viewFrom;o<n.viewTo;o++)Co(e.cm,o,"gutter")}}function Lr(e,t,n,o){if(e.cm&&!e.cm.curOp)return go(e.cm,Lr)(e,t,n,o);if(t.to.line<e.first)return void Mr(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);Mr(e,r),t={from:L(e.first,0),to:L(t.to.line+r,t.to.ch),text:[g(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:L(i,R(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),n||(n=Uo(e,t)),e.cm?Ir(e.cm,t,o):Xo(e,t,o),_r(e,n,Ua)}}function Ir(e,t,n){var o=e.doc,r=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=P(de(R(o,i.line))),o.iter(l,a.line+1,function(e){if(e==r.maxLine)return s=!0,!0})),o.sel.contains(t.from,t.to)>-1&&Te(e),Xo(o,t,n,En(e)),e.options.lineWrapping||(o.iter(l,i.line+t.text.length,function(e){var t=Ce(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),rt(o,i.line),xo(e,400);var u=t.text.length-(a.line-i.line)-1;t.full?yo(e):i.line!=a.line||1!=t.text.length||Yo(e.doc,t)?yo(e,i.line,a.line+1,u):Co(e,i.line,"text");var c=Oe(e,"changes"),d=Oe(e,"change");if(d||c){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&bt(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Nr(e,t,n,o,r){if(o||(o=n),I(o,n)<0){var i;i=[o,n],n=i[0],o=i[1]}"string"==typeof t&&(t=e.splitLines(t)),Pr(e,{from:n,to:o,text:t,origin:r})}function Br(e,t,n,o){n<e.line?e.line+=o:t<e.line&&(e.line=t,e.ch=0)}function Wr(e,t,n,o){for(var r=0;r<e.length;++r){var i=e[r],a=!0;if(i.ranges){i.copied||(i=e[r]=i.deepCopy(),i.copied=!0);for(var s=0;s<i.ranges.length;s++)Br(i.ranges[s].anchor,t,n,o),Br(i.ranges[s].head,t,n,o)}else{for(var l=0;l<i.changes.length;++l){var u=i.changes[l];if(n<u.from.line)u.from=L(u.from.line+o,u.from.ch),u.to=L(u.to.line+o,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,r+1),r=0)}}}function jr(e,t){var n=t.from.line,o=t.to.line,r=t.text.length-(o-n)-1;Wr(e.done,n,o,r),Wr(e.undone,n,o,r)}function Gr(e,t,n,o){var r=t,i=t;return"number"==typeof t?i=R(e,G(e,t)):r=P(t),null==r?null:(o(i,r)&&e.cm&&Co(e.cm,r,n),i)}function Hr(e){var t=this;this.lines=e,this.parent=null;for(var n=0,o=0;o<e.length;++o)e[o].parent=t,n+=e[o].height;this.height=n}function Vr(e){var t=this;this.children=e;for(var n=0,o=0,r=0;r<e.length;++r){var i=e[r];n+=i.chunkSize(),o+=i.height,i.parent=t}this.size=n,this.height=o,this.parent=null}function Ur(e,t,n){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$n(e,n)}function zr(e,t,n,o){var r=new ks(e,n,o),i=e.cm;return i&&r.noHScroll&&(i.display.alignWidgets=!0),Gr(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=t,i&&!me(e,t)){var o=ye(t)<e.scrollTop;k(t,t.height+Mt(r)),o&&$n(i,r.height),i.curOp.forceUpdate=!0}return!0}),i&&bt(i,"lineWidgetAdded",i,r,"number"==typeof t?t:P(t)),r}function $r(e,t,n,o,i){if(o&&o.shared)return qr(e,t,n,o,i);if(e.cm&&!e.cm.curOp)return go(e.cm,$r)(e,t,n,o,i);var a=new Ds(e,i),s=I(t,n);if(o&&c(o,a,!1),s>0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=r("span",[a.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ce(e,t.line,t,n,a)||t.line!=n.line&&ce(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");$()}a.addToHistory&&ir(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,d=e.cm;if(e.iter(u,n.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&de(e)==d.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&k(e,0),X(e,new q(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){me(e,t)&&k(t,0)}),a.clearOnEnter&&ts(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(z(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ps,a.atomic=!0),d){if(l&&(d.curOp.updateMaxLine=!0),a.collapsed)yo(d,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)Co(d,p,"text");a.atomic&&xr(d.doc),bt(d,"markerAdded",d,a)}return a}function qr(e,t,n,o,r){o=c(o),o.shared=!1;var i=[$r(e,t,n,o,r)],a=i[0],s=o.widgetNode;return Qo(e,function(e){s&&(o.widgetNode=s.cloneNode(!0)),i.push($r(e,H(e,t),H(e,n),o,r));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=g(i)}),new Fs(i,a)}function Kr(e){return e.findMarks(L(e.first,0),e.clipPos(L(e.lastLine())),function(e){return e.parent})}function Yr(e,t){for(var n=0;n<t.length;n++){var o=t[n],r=o.find(),i=e.clipPos(r.from),a=e.clipPos(r.to);if(I(i,a)){var s=$r(e,i,a,o.primary,o.primary.type);o.markers.push(s),s.parent=o}}}function Xr(e){for(var t=0;t<e.length;t++)!function(t){var n=e[t],o=[n.primary.doc];Qo(n.primary.doc,function(e){return o.push(e)});for(var r=0;r<n.markers.length;r++){var i=n.markers[r];-1==p(o,i.doc)&&(i.parent=null,n.markers.splice(r--,1))}}(t)}function Qr(e){var t=this;if(ei(t),!Re(t,e)&&!Lt(t.display,e)){Pe(e),ya&&(Is=+new Date);var n=Sn(t,e,!0),o=e.dataTransfer.files;if(n&&!t.isReadOnly())if(o&&o.length&&window.FileReader&&window.File)for(var r=o.length,i=Array(r),a=0,s=0;s<r;++s)!function(e,o){if(!t.options.allowDropFileTypes||-1!=p(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=go(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),i[o]=e,++a==r){n=H(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(i.join(t.doc.lineSeparator())),origin:"paste"};Pr(t.doc,l),br(t.doc,Go(n,Ho(l)))}}),s.readAsText(e)}}(o[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var l=e.dataTransfer.getData("Text");if(l){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),_r(t.doc,Go(n,n)),u)for(var c=0;c<u.length;++c)Nr(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(l,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Zr(e,t){if(ya&&(!e.state.draggingText||+new Date-Is<100))return void Me(t);if(!Re(e,t)&&!Lt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!xa)){var n=o("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ea&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),Ea&&n.parentNode.removeChild(n)}}function Jr(e,t){var r=Sn(e,t);if(r){var i=document.createDocumentFragment();On(e,r,i),e.display.dragCursor||(e.display.dragCursor=o("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,i)}}function ei(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ti(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&e(o)}}function ni(){Ns||(oi(),Ns=!0)}function oi(){var e;ts(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,ti(ri)},100))}),ts(window,"blur",function(){return ti(In)})}function ri(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function ii(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,o,r,i,a=0;a<t.length-1;a++){var s=t[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))o=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return n&&(e="Alt-"+e),o&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function ai(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==o){delete e[n];continue}for(var r=m(n.split(" "),ii),i=0;i<r.length;i++){var a=void 0,s=void 0;i==r.length-1?(s=r.join(" "),a=o):(s=r.slice(0,i+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function si(e,t,n,o){t=di(t);var r=t.call?t.call(e,o):t[e];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return si(e,t.fallthrough,n,o);for(var i=0;i<t.fallthrough.length;i++){var a=si(e,t.fallthrough[i],n,o);if(a)return a}}}function li(e){var t="string"==typeof e?e:Bs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ui(e,t,n){var o=e;return t.altKey&&"Alt"!=o&&(e="Alt-"+e),(La?t.metaKey:t.ctrlKey)&&"Ctrl"!=o&&(e="Ctrl-"+e),(La?t.ctrlKey:t.metaKey)&&"Cmd"!=o&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=o&&(e="Shift-"+e),e}function ci(e,t){if(Ea&&34==e.keyCode&&e.char)return!1;var n=Bs[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),ui(n,e,t))}function di(e){return"string"==typeof e?Hs[e]:e}function pi(e,t){for(var n=e.doc.sel.ranges,o=[],r=0;r<n.length;r++){for(var i=t(n[r]);o.length&&I(i.from,g(o).to)<=0;){var a=o.pop();if(I(a.from,i.from)<0){i.from=a.from;break}}o.push(i)}fo(e,function(){for(var t=o.length-1;t>=0;t--)Nr(e.doc,"",o[t].from,o[t].to,"+delete");qn(e)})}function hi(e,t,n){var o=x(e.text,t+n,n);return o<0||o>e.text.length?null:o}function fi(e,t,n){var o=hi(e,t.ch,n);return null==o?null:new L(t.line,o,n<0?"after":"before")}function gi(e,t,n,o,r){if(e){var i=Ee(n,t.doc.direction);if(i){var a,s=r<0?g(i):i[0],l=r<0==(1==s.level),u=l?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=qt(t,n);a=r<0?n.text.length-1:0;var d=Kt(t,c,a).top;a=S(function(e){return Kt(t,c,e).top==d},r<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=hi(n,a,1))}else a=r<0?s.to:s.from;return new L(o,a,u)}}return new L(o,r<0?n.text.length:0,r<0?"before":"after")}function mi(e,t,n,o){var r=Ee(t,e.doc.direction);if(!r)return fi(t,n,o);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=_e(r,n.ch,n.sticky),a=r[i];if("ltr"==e.doc.direction&&a.level%2==0&&(o>0?a.to>n.ch:a.from<n.ch))return fi(t,n,o);var s,l=function(e,n){return hi(t,e instanceof L?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(s=s||qt(e,t),fn(e,t,s,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==o<0,p=l(n,d?1:-1);if(null!=p&&(d?p<=a.to&&p<=c.end:p>=a.from&&p>=c.begin)){var h=d?"before":"after";return new L(n.line,p,h)}}var f=function(e,t,o){for(var i=function(e,t){return t?new L(n.line,l(e,1),"before"):new L(n.line,e,"after")};e>=0&&e<r.length;e+=t){var a=r[e],s=t>0==(1!=a.level),u=s?o.begin:l(o.end,-1);if(a.from<=u&&u<a.to)return i(u,s);if(u=s?a.from:l(a.to,-1),o.begin<=u&&u<o.end)return i(u,s)}},g=f(i+o,o,c);if(g)return g;var m=o>0?c.end:l(c.begin,-1);return null==m||o>0&&m==t.text.length||!(g=f(o>0?0:r.length-1,o,u(m)))?null:g}function vi(e,t){var n=R(e.doc,t),o=de(n);return o!=n&&(t=P(o)),gi(!0,e,o,t,1)}function yi(e,t){var n=R(e.doc,t),o=pe(n);return o!=n&&(t=P(o)),gi(!0,e,n,t,-1)}function Ci(e,t){var n=vi(e,t.line),o=R(e.doc,n.line),r=Ee(o,e.doc.direction);if(!r||0==r[0].level){var i=Math.max(0,o.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return L(n.line,a?0:i,n.sticky)}return n}function bi(e,t,n){if("string"==typeof t&&!(t=Vs[t]))return!1;e.display.input.ensurePolled();var o=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=Va}finally{e.display.shift=o,e.state.suppressEdits=!1}return r}function wi(e,t,n){for(var o=0;o<e.state.keyMaps.length;o++){var r=si(t,e.state.keyMaps[o],n,e);if(r)return r}return e.options.extraKeys&&si(t,e.options.extraKeys,n,e)||si(t,e.options.keyMap,n,e)}function _i(e,t,n,o){var r=e.state.keySeq;if(r){if(li(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Us.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),Ei(e,r+" "+t,n,o))return!0}return Ei(e,t,n,o)}function Ei(e,t,n,o){var r=wi(e,t,o);return"multi"==r&&(e.state.keySeq=t),"handled"==r&&bt(e,"keyHandled",e,t,n),"handled"!=r&&"multi"!=r||(Pe(n),Dn(e)),!!r}function xi(e,t){var n=ci(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?_i(e,"Shift-"+n,t,function(t){return bi(e,t,!0)})||_i(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return bi(e,t)}):_i(e,n,t,function(t){return bi(e,t)}))}function Si(e,t,n){return _i(e,"'"+n+"'",t,function(t){return bi(e,t,!0)})}function Ai(e){var t=this;if(t.curOp.focus=a(),!Re(t,e)){ya&&Ca<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var o=xi(t,e);Ea&&(zs=o?n:null,!o&&88==n&&!is&&(ka?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||Ri(t)}}function Ri(e){function t(e){18!=e.keyCode&&e.altKey||(Na(n,"CodeMirror-crosshair"),Se(document,"keyup",t),Se(document,"mouseover",t))}var n=e.display.lineDiv;s(n,"CodeMirror-crosshair"),ts(document,"keyup",t),ts(document,"mouseover",t)}function Ti(e){16==e.keyCode&&(this.doc.sel.shift=!1),Re(this,e)}function Oi(e){var t=this;if(!(Lt(t.display,e)||Re(t,e)||e.ctrlKey&&!e.altKey||ka&&e.metaKey)){var n=e.keyCode,o=e.charCode;if(Ea&&n==zs)return zs=null,void Pe(e);if(!Ea||e.which&&!(e.which<10)||!xi(t,e)){var r=String.fromCharCode(null==o?n:o);"\b"!=r&&(Si(t,e,r)||t.display.input.onKeyPress(e))}}}function ki(e,t){var n=+new Date;return Ks&&Ks.compare(n,e,t)?(qs=Ks=null,"triple"):qs&&qs.compare(n,e,t)?(Ks=new $s(n,e,t),qs=null,"double"):(qs=new $s(n,e,t),Ks=null,"single")}function Pi(e){var t=this,n=t.display;if(!(Re(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Lt(n,e))return void(ba||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!ji(t,e)){var o=Sn(t,e),r=Ie(e),i=o?ki(o,r):"single";window.focus(),1==r&&t.state.selectingText&&t.state.selectingText(e),o&&Di(t,r,o,i,e)||(1==r?o?Mi(t,o,i,e):Le(e)==n.scroller&&Pe(e):2==r?(o&&gr(t.doc,o),setTimeout(function(){return n.input.focus()},20)):3==r&&(Ia?Gi(t,e):Mn(t)))}}}function Di(e,t,n,o,r){var i="Click";return"double"==o?i="Double"+i:"triple"==o&&(i="Triple"+i),i=(1==t?"Left":2==t?"Middle":"Right")+i,_i(e,ui(i,r),r,function(t){if("string"==typeof t&&(t=Vs[t]),!t)return!1;var o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),o=t(e,n)!=Va}finally{e.state.suppressEdits=!1}return o})}function Fi(e,t,n){var o=e.getOption("configureMouse"),r=o?o(e,t,n):{};if(null==r.unit){var i=Pa?n.shiftKey&&n.metaKey:n.altKey;r.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=ka?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(ka?n.altKey:n.ctrlKey)),r}function Mi(e,t,n,o){ya?setTimeout(u(Fn,e),0):e.curOp.focus=a();var r,i=Fi(e,n,o),s=e.doc.sel;e.options.dragDrop&&ns&&!e.isReadOnly()&&"single"==n&&(r=s.contains(t))>-1&&(I((r=s.ranges[r]).from(),t)<0||t.xRel>0)&&(I(r.to(),t)>0||t.xRel<0)?Li(e,o,t,i):Ni(e,o,t,i)}function Li(e,t,n,o){var r=e.display,i=!1,a=go(e,function(t){ba&&(r.scroller.draggable=!1),e.state.draggingText=!1,Se(r.wrapper.ownerDocument,"mouseup",a),Se(r.wrapper.ownerDocument,"mousemove",s),Se(r.scroller,"dragstart",l),Se(r.scroller,"drop",a),i||(Pe(t),o.addNew||gr(e.doc,n,null,null,o.extend),ba||ya&&9==Ca?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),s=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},l=function(){return i=!0};ba&&(r.scroller.draggable=!0),e.state.draggingText=a,a.copy=!o.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),ts(r.wrapper.ownerDocument,"mouseup",a),ts(r.wrapper.ownerDocument,"mousemove",s),ts(r.scroller,"dragstart",l),ts(r.scroller,"drop",a),Mn(e),setTimeout(function(){return r.input.focus()},20)}function Ii(e,t,n){if("char"==n)return new Os(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Os(L(t.line,0),H(e.doc,L(t.line+1,0)));var o=n(e,t);return new Os(o.from,o.to)}function Ni(e,t,n,o){function r(t){if(0!=I(v,t))if(v=t,"rectangle"==o.unit){for(var r=[],i=e.options.tabSize,a=d(R(u,n.line).text,n.ch,i),s=d(R(u,t.line).text,t.ch,i),l=Math.min(a,s),g=Math.max(a,s),m=Math.min(n.line,t.line),y=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=y;m++){var C=R(u,m).text,b=h(C,l,i);l==g?r.push(new Os(L(m,b),L(m,b))):C.length>b&&r.push(new Os(L(m,b),L(m,h(C,g,i))))}r.length||r.push(new Os(n,n)),wr(u,jo(f.ranges.slice(0,p).concat(r),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,_=c,E=Ii(e,t,o.unit),x=_.anchor;I(E.anchor,x)>0?(w=E.head,x=j(_.from(),E.anchor)):(w=E.anchor,x=W(_.to(),E.head));var S=f.ranges.slice(0);S[p]=Bi(e,new Os(H(u,x),w)),wr(u,jo(S,p),za)}}function i(t){var n=++C,s=Sn(e,t,!0,"rectangle"==o.unit);if(s)if(0!=I(s,v)){e.curOp.focus=a(),r(s);var c=Wn(l,u);(s.line>=c.to||s.line<c.from)&&setTimeout(go(e,function(){C==n&&i(t)}),150)}else{var d=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;d&&setTimeout(go(e,function(){C==n&&(l.scroller.scrollTop+=d,i(t))}),50)}}function s(t){e.state.selectingText=!1,C=1/0,Pe(t),l.input.focus(),Se(l.wrapper.ownerDocument,"mousemove",b),Se(l.wrapper.ownerDocument,"mouseup",w),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Pe(t);var c,p,f=u.sel,g=f.ranges;if(o.addNew&&!o.extend?(p=u.sel.contains(n),c=p>-1?g[p]:new Os(n,n)):(c=u.sel.primary(),p=u.sel.primIndex),"rectangle"==o.unit)o.addNew||(c=new Os(n,n)),n=Sn(e,t,!0,!0),p=-1;else{var m=Ii(e,n,o.unit);c=o.extend?fr(c,m.anchor,m.head,o.extend):m}o.addNew?-1==p?(p=g.length,wr(u,jo(g.concat([c]),p),{scroll:!1,origin:"*mouse"})):g.length>1&&g[p].empty()&&"char"==o.unit&&!o.extend?(wr(u,jo(g.slice(0,p).concat(g.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=u.sel):vr(u,p,c,za):(p=0,wr(u,new Ts([c],0),za),f=u.sel);var v=n,y=l.wrapper.getBoundingClientRect(),C=0,b=go(e,function(e){Ie(e)?i(e):s(e)}),w=go(e,s);e.state.selectingText=w,ts(l.wrapper.ownerDocument,"mousemove",b),ts(l.wrapper.ownerDocument,"mouseup",w)}function Bi(e,t){var n=t.anchor,o=t.head,r=R(e.doc,n.line);if(0==I(n,o)&&n.sticky==o.sticky)return t;var i=Ee(r);if(!i)return t;var a=_e(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==l||l==i.length)return t;var u;if(o.line!=n.line)u=(o.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=_e(i,o.ch,o.sticky),d=c-a||(o.ch-n.ch)*(1==s.level?-1:1);u=c==l-1||c==l?d<0:d>0}var p=i[l+(u?-1:0)],h=u==(1==p.level),f=h?p.from:p.to,g=h?"after":"before";return n.ch==f&&n.sticky==g?t:new Os(new L(n.line,f,g),o)}function Wi(e,t,n,o){var r,i;if(t.touches)r=t.touches[0].clientX,i=t.touches[0].clientY;else try{r=t.clientX,i=t.clientY}catch(t){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&Pe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!Oe(e,n))return Fe(t);i-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r){return Ae(e,n,e,D(e.doc,i),e.options.gutters[l],t),Fe(t)}}}function ji(e,t){return Wi(e,t,"gutterClick",!0)}function Gi(e,t){Lt(e.display,t)||Hi(e,t)||Re(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Hi(e,t){return!!Oe(e,"gutterContextMenu")&&Wi(e,t,"gutterContextMenu",!1)}function Vi(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tn(e)}function Ui(e){Lo(e),yo(e),jn(e)}function zi(e,t,n){if(!t!=!(n&&n!=Ys)){var o=e.display.dragFunctions,r=t?ts:Se;r(e.display.scroller,"dragstart",o.start),r(e.display.scroller,"dragenter",o.enter),r(e.display.scroller,"dragover",o.over),r(e.display.scroller,"dragleave",o.leave),r(e.display.scroller,"drop",o.drop)}}function $i(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Na(e.display.wrapper,"CodeMirror-wrap"),be(e)),xn(e),yo(e),tn(e),setTimeout(function(){return no(e)},100)}function qi(e,t){var n=this;if(!(this instanceof qi))return new qi(e,t);this.options=t=t?c(t):{},c(Xs,t,!1),Io(t);var o=t.value;"string"==typeof o&&(o=new Ls(o,t.mode,null,t.lineSeparator,t.direction)),this.doc=o;var r=new qi.inputStyles[t.inputStyle](this),i=this.display=new A(e,o,r);i.wrapper.CodeMirror=this,Lo(this),Vi(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ro(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Wa,keySeq:null,specialChars:null},t.autofocus&&!Oa&&i.input.focus(),ya&&Ca<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ki(this),ni(),io(this),this.curOp.forceUpdate=!0,Zo(this,o),t.autofocus&&!Oa||this.hasFocus()?setTimeout(u(Ln,this),20):In(this);for(var a in Qs)Qs.hasOwnProperty(a)&&Qs[a](n,t[a],Ys);Gn(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Zs.length;++s)Zs[s](n);ao(this),ba&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function Ki(e){function t(){r.activeTouch&&(i=setTimeout(function(){return r.activeTouch=null},1e3),a=r.activeTouch,a.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,o=t.top-e.top;return n*n+o*o>400}var r=e.display;ts(r.scroller,"mousedown",go(e,Pi)),ya&&Ca<11?ts(r.scroller,"dblclick",go(e,function(t){if(!Re(e,t)){var n=Sn(e,t);if(n&&!ji(e,t)&&!Lt(e.display,t)){Pe(t);var o=e.findWordAt(n);gr(e.doc,o.anchor,o.head)}}})):ts(r.scroller,"dblclick",function(t){return Re(e,t)||Pe(t)}),Ia||ts(r.scroller,"contextmenu",function(t){return Gi(e,t)});var i,a={end:0};ts(r.scroller,"touchstart",function(t){if(!Re(e,t)&&!n(t)&&!ji(e,t)){r.input.ensurePolled(),clearTimeout(i);var o=+new Date;r.activeTouch={start:o,moved:!1,prev:o-a.end<=300?a:null},1==t.touches.length&&(r.activeTouch.left=t.touches[0].pageX,r.activeTouch.top=t.touches[0].pageY)}}),ts(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),ts(r.scroller,"touchend",function(n){var i=r.activeTouch;if(i&&!Lt(r,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(r.activeTouch,"page");a=!i.prev||o(i,i.prev)?new Os(s,s):!i.prev.prev||o(i,i.prev.prev)?e.findWordAt(s):new Os(L(s.line,0),H(e.doc,L(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Pe(n)}t()}),ts(r.scroller,"touchcancel",t),ts(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Zn(e,r.scroller.scrollTop),eo(e,r.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),ts(r.scroller,"mousewheel",function(t){return Wo(e,t)}),ts(r.scroller,"DOMMouseScroll",function(t){return Wo(e,t)}),ts(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(t){Re(e,t)||Me(t)},over:function(t){Re(e,t)||(Jr(e,t),Me(t))},start:function(t){return Zr(e,t)},drop:go(e,Qr),leave:function(t){Re(e,t)||ei(e)}};var s=r.input.getField();ts(s,"keyup",function(t){return Ti.call(e,t)}),ts(s,"keydown",go(e,Ai)),ts(s,"keypress",go(e,Oi)),ts(s,"focus",function(t){return Ln(e,t)}),ts(s,"blur",function(t){return In(e,t)})}function Yi(e,t,n,o){var r,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?r=Xe(e,t).state:n="prev");var a=e.options.tabSize,s=R(i,t),l=d(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(o||/\S/.test(s.text)){if("smart"==n&&((u=i.mode.indent(r,s.text.slice(c.length),s.text))==Va||u>150)){if(!o)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?d(R(i,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",h=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)h+=a,p+="\t";if(h<u&&(p+=f(u-h)),p!=c)return Nr(i,p,L(t,0),L(t,c.length),"+input"),s.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var v=i.sel.ranges[m];if(v.head.line==t&&v.head.ch<c.length){var y=L(t,c.length);vr(i,m,new Os(y,y));break}}}function Xi(e){Js=e}function Qi(e,t,n,o,r){var i=e.doc;e.display.shift=!1,o||(o=i.sel);var a=e.state.pasteIncoming||"paste"==r,s=os(t),l=null;if(a&&o.ranges.length>1)if(Js&&Js.text.join("\n")==t){if(o.ranges.length%Js.text.length==0){l=[];for(var u=0;u<Js.text.length;u++)l.push(i.splitLines(Js.text[u]))}}else s.length==o.ranges.length&&e.options.pasteLinesPerSelection&&(l=m(s,function(e){return[e]}));for(var c,d=o.ranges.length-1;d>=0;d--){var p=o.ranges[d],h=p.from(),f=p.to();p.empty()&&(n&&n>0?h=L(h.line,h.ch-n):e.state.overwrite&&!a?f=L(f.line,Math.min(R(i,f.line).text.length,f.ch+g(s).length)):Js&&Js.lineWise&&Js.text.join("\n")==t&&(h=f=L(h.line,0))),c=e.curOp.updateInput;var v={from:h,to:f,text:l?l[d%l.length]:s,origin:r||(a?"paste":e.state.cutIncoming?"cut":"+input")};Pr(e.doc,v),bt(e,"inputRead",e,v)}t&&!a&&Ji(e,t),qn(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Zi(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fo(t,function(){return Qi(t,n,0,null,"paste")}),!0}function Ji(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,o=n.ranges.length-1;o>=0;o--){var r=n.ranges[o];if(!(r.head.ch>100||o&&n.ranges[o-1].head.line==r.head.line)){var i=e.getModeAt(r.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){a=Yi(e,r.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(R(e.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Yi(e,r.head.line,"smart"));a&&bt(e,"electricInput",e,r.head.line)}}}function ea(e){for(var t=[],n=[],o=0;o<e.doc.sel.ranges.length;o++){var r=e.doc.sel.ranges[o].head.line,i={anchor:L(r,0),head:L(r+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function ta(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function na(){var e=o("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=o("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ba?e.style.width="1000px":e.setAttribute("wrap","off"),Ra&&(e.style.border="1px solid black"),ta(e),t}function oa(e,t,n,o,r){function i(){var o=t.line+n;return!(o<e.first||o>=e.first+e.size)&&(t=new L(o,t.ch,t.sticky),u=R(e,o))}function a(o){var a;if(null==(a=r?mi(e.cm,u,t,n):fi(u,t,n))){if(o||!i())return!1;t=gi(r,e.cm,u,t.line,n)}else t=a;return!0}var s=t,l=n,u=R(e,t.line);if("char"==o)a();else if("column"==o)a(!0);else if("word"==o||"group"==o)for(var c=null,d="group"==o,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var f=u.text.charAt(t.ch)||"\n",g=w(f,p)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||h||g||(g="s"),c&&c!=g){n<0&&(n=1,a(),t.sticky="after");break}if(g&&(c=g),n>0&&!a(!h))break}var m=Rr(e,t,s,l,!0);return N(s,m)&&(m.hitSide=!0),m}function ra(e,t,n,o){var r,i=e.doc,a=t.left;if("page"==o){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Cn(e.display),3);r=(n>0?t.bottom:t.top)+n*l}else"line"==o&&(r=n>0?t.bottom+3:t.top-3);for(var u;u=pn(e,a,r),u.outside;){if(n<0?r<=0:r>=i.height){u.hitSide=!0;break}r+=5*n}return u}function ia(e,t){var n=$t(e,t.line);if(!n||n.hidden)return null;var o=R(e.doc,t.line),r=Vt(n,o,t.line),i=Ee(o,e.doc.direction),a="left";if(i){a=_e(i,t.ch)%2?"right":"left"}var s=Yt(r.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function aa(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sa(e,t){return t&&(e.bad=!0),e}function la(e,t,n,o,r){function i(e){return function(t){return t.id==e}}function a(){c&&(u+=d,c=!1)}function s(e){e&&(a(),u+=e)}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void s(n||t.textContent.replace(/\u200b/g,""));var u,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(L(o,0),L(r+1,0),i(+p));return void(h.length&&(u=h[0].find(0))&&s(T(e.doc,u.from,u.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p)$/i.test(t.nodeName);f&&a();for(var g=0;g<t.childNodes.length;g++)l(t.childNodes[g]);f&&(c=!0)}else 3==t.nodeType&&s(t.nodeValue)}for(var u="",c=!1,d=e.doc.lineSeparator();l(t),t!=n;)t=t.nextSibling;return u}function ua(e,t,n){var o;if(t==e.display.lineDiv){if(!(o=e.display.lineDiv.childNodes[n]))return sa(e.clipPos(L(e.display.viewTo-1)),!0);t=null,n=0}else for(o=t;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var i=e.display.view[r];if(i.node==o)return ca(i,t,n)}}function ca(e,t,n){function o(t,n,o){for(var r=-1;r<(d?d.length:0);r++)for(var i=r<0?c.map:d[r],a=0;a<i.length;a+=3){var s=i[a+2];if(s==t||s==n){var l=P(r<0?e.line:e.rest[r]),u=i[a]+o;return(o<0||s!=t)&&(u=i[a+(o?1:0)]),L(l,u)}}}var r=e.text.firstChild,a=!1;if(!t||!i(r,t))return sa(L(P(e.line),0),!0);if(t==r&&(a=!0,t=r.childNodes[n],n=0,!t)){var s=e.rest?g(e.rest):e.line;return sa(L(P(s),s.text.length),a)}var l=3==t.nodeType?t:null,u=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));u.parentNode!=r;)u=u.parentNode;var c=e.measure,d=c.maps,p=o(l,u,n);if(p)return sa(p,a);for(var h=u.nextSibling,f=l?l.nodeValue.length-n:0;h;h=h.nextSibling){if(p=o(h,h.firstChild,0))return sa(L(p.line,p.ch-f),a);f+=h.textContent.length}for(var m=u.previousSibling,v=n;m;m=m.previousSibling){if(p=o(m,m.firstChild,-1))return sa(L(p.line,p.ch+v),a);v+=m.textContent.length}}function da(e,t){function n(){e.value=l.getValue()}if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var o=a();t.autofocus=o==e||null!=e.getAttribute("autofocus")&&o==document.body}var r;if(e.form&&(ts(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;r=i.submit;try{var s=i.submit=function(){n(),i.submit=r,i.submit(),i.submit=s}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Se(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=r))}},e.style.display="none";var l=qi(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l}var pa=navigator.userAgent,ha=navigator.platform,fa=/gecko\/\d/i.test(pa),ga=/MSIE \d/.test(pa),ma=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pa),va=/Edge\/(\d+)/.exec(pa),ya=ga||ma||va,Ca=ya&&(ga?document.documentMode||6:+(va||ma)[1]),ba=!va&&/WebKit\//.test(pa),wa=ba&&/Qt\/\d+\.\d+/.test(pa),_a=!va&&/Chrome\//.test(pa),Ea=/Opera\//.test(pa),xa=/Apple Computer/.test(navigator.vendor),Sa=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(pa),Aa=/PhantomJS/.test(pa),Ra=!va&&/AppleWebKit/.test(pa)&&/Mobile\/\w+/.test(pa),Ta=/Android/.test(pa),Oa=Ra||Ta||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(pa),ka=Ra||/Mac/.test(ha),Pa=/\bCrOS\b/.test(pa),Da=/win/i.test(ha),Fa=Ea&&pa.match(/Version\/(\d*\.\d*)/);Fa&&(Fa=Number(Fa[1])),Fa&&Fa>=15&&(Ea=!1,ba=!0);var Ma,La=ka&&(wa||Ea&&(null==Fa||Fa<12.11)),Ia=fa||ya&&Ca>=9,Na=function(t,n){var o=t.className,r=e(n).exec(o);if(r){var i=o.slice(r.index+r[0].length);t.className=o.slice(0,r.index)+(i?r[1]+i:"")}};Ma=document.createRange?function(e,t,n,o){var r=document.createRange();return r.setEnd(o||e,n),r.setStart(e,t),r}:function(e,t,n){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(e){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",t),o};var Ba=function(e){e.select()};Ra?Ba=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ya&&(Ba=function(e){try{e.select()}catch(e){}});var Wa=function(){this.id=null};Wa.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ja,Ga,Ha=30,Va={toString:function(){return"CodeMirror.Pass"}},Ua={scroll:!1},za={origin:"*mouse"},$a={origin:"+move"},qa=[""],Ka=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ya=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Xa=!1,Qa=!1,Za=null,Ja=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?o.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/;return function(n,o){var u="ltr"==o?"L":"R";if(0==n.length||"ltr"==o&&!r.test(n))return!1;for(var c=n.length,d=[],p=0;p<c;++p)d.push(e(n.charCodeAt(p)));for(var h=0,f=u;h<c;++h){var m=d[h];"m"==m?d[h]=f:f=m}for(var v=0,y=u;v<c;++v){var C=d[v];"1"==C&&"r"==y?d[v]="n":a.test(C)&&(y=C,"r"==C&&(d[v]="R"))}for(var b=1,w=d[0];b<c-1;++b){var _=d[b];"+"==_&&"1"==w&&"1"==d[b+1]?d[b]="1":","!=_||w!=d[b+1]||"1"!=w&&"n"!=w||(d[b]=w),w=_}for(var E=0;E<c;++E){var x=d[E];if(","==x)d[E]="N";else if("%"==x){var S=void 0;for(S=E+1;S<c&&"%"==d[S];++S);for(var A=E&&"!"==d[E-1]||S<c&&"1"==d[S]?"1":"N",R=E;R<S;++R)d[R]=A;E=S-1}}for(var T=0,O=u;T<c;++T){var k=d[T];"L"==O&&"1"==k?d[T]="L":a.test(k)&&(O=k)}for(var P=0;P<c;++P)if(i.test(d[P])){var D=void 0;for(D=P+1;D<c&&i.test(d[D]);++D);for(var F="L"==(P?d[P-1]:u),M="L"==(D<c?d[D]:u),L=F==M?F?"L":"R":u,I=P;I<D;++I)d[I]=L;P=D-1}for(var N,B=[],W=0;W<c;)if(s.test(d[W])){var j=W;for(++W;W<c&&s.test(d[W]);++W);B.push(new t(0,j,W))}else{var G=W,H=B.length;for(++W;W<c&&"L"!=d[W];++W);for(var V=G;V<W;)if(l.test(d[V])){G<V&&B.splice(H,0,new t(1,G,V));var U=V;for(++V;V<W&&l.test(d[V]);++V);B.splice(H,0,new t(2,U,V)),G=V}else++V;G<W&&B.splice(H,0,new t(1,G,W))}return"ltr"==o&&(1==B[0].level&&(N=n.match(/^\s+/))&&(B[0].from=N[0].length,B.unshift(new t(0,0,N[0].length))),1==g(B).level&&(N=n.match(/\s+$/))&&(g(B).to-=N[0].length,B.push(new t(0,c-N[0].length,c)))),"rtl"==o?B.reverse():B}}(),es=[],ts=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var o=e._handlers||(e._handlers={});o[t]=(o[t]||es).concat(n)}},ns=function(){if(ya&&Ca<9)return!1;var e=o("div");return"draggable"in e||"dragDrop"in e}(),os=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],o=e.length;t<=o;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var i=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},rs=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},is=function(){var e=o("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),as=null,ss={},ls={},us={},cs=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};cs.prototype.eol=function(){return this.pos>=this.string.length},cs.prototype.sol=function(){return this.pos==this.lineStart},cs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cs.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},cs.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},cs.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},cs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},cs.prototype.skipToEnd=function(){this.pos=this.string.length},cs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cs.prototype.backUp=function(e){this.pos-=e},cs.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},cs.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},cs.prototype.match=function(e,t,n){if("string"!=typeof e){var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&!1!==t&&(this.pos+=o[0].length),o)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},cs.prototype.current=function(){return this.string.slice(this.start,this.pos)},cs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ds=function(e,t){this.state=e,this.lookAhead=t},ps=function(e,t,n,o){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};ps.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ps.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ps.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ps.fromSaved=function(e,t,n){return t instanceof ds?new ps(e,ze(e.mode,t.state),n,t.lookAhead):new ps(e,ze(e.mode,t),n)},ps.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ds(t,this.maxLookAhead):t};var hs=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},fs=function(e,t,n){this.text=e,oe(this,t),this.height=n?n(this):1};fs.prototype.lineNo=function(){return P(this)},ke(fs);var gs,ms={},vs={},ys=null,Cs=null,bs={left:0,right:0,top:0,bottom:0},ws=function(e,t,n){this.cm=n;var r=this.vert=o("div",[o("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=o("div",[o("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),ts(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ts(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ya&&Ca<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ws.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?o+"px":"0";var r=e.viewHeight-(t?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:t?o:0}},ws.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ws.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ws.prototype.zeroWidthHack=function(){var e=ka&&!Sa?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Wa,this.disableVert=new Wa},ws.prototype.enableZeroWidthBar=function(e,t,n){function o(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,o)}e.style.pointerEvents="auto",t.set(1e3,o)},ws.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _s=function(){};_s.prototype.update=function(){return{bottom:0,right:0}},_s.prototype.setScrollLeft=function(){},_s.prototype.setScrollTop=function(){},_s.prototype.clear=function(){};var Es={native:ws,null:_s},xs=0,Ss=function(e,t,n){var o=e.display;this.viewport=t,this.visible=Wn(o,e.doc,t),this.editorIsHidden=!o.wrapper.offsetWidth,this.wrapperHeight=o.wrapper.clientHeight,this.wrapperWidth=o.wrapper.clientWidth,this.oldDisplayWidth=jt(e),this.force=n,this.dims=wn(e),this.events=[]};Ss.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},Ss.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Ae.apply(null,e.events[t])};var As=0,Rs=null;ya?Rs=-.53:fa?Rs=15:_a?Rs=-.7:xa&&(Rs=-1/3);var Ts=function(e,t){this.ranges=e,this.primIndex=t};Ts.prototype.primary=function(){return this.ranges[this.primIndex]},Ts.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var o=t.ranges[n],r=e.ranges[n];if(!N(o.anchor,r.anchor)||!N(o.head,r.head))return!1}return!0},Ts.prototype.deepCopy=function(){for(var e=this,t=[],n=0;n<this.ranges.length;n++)t[n]=new Os(B(e.ranges[n].anchor),B(e.ranges[n].head));return new Ts(t,this.primIndex)},Ts.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},Ts.prototype.contains=function(e,t){var n=this;t||(t=e);for(var o=0;o<this.ranges.length;o++){var r=n.ranges[o];if(I(t,r.from())>=0&&I(e,r.to())<=0)return o}return-1};var Os=function(e,t){this.anchor=e,this.head=t};Os.prototype.from=function(){return j(this.anchor,this.head)},Os.prototype.to=function(){return W(this.anchor,this.head)},Os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,o=e,r=e+t;o<r;++o){var i=n.lines[o];n.height-=i.height,at(i),bt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){var o=this;this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=o},iterN:function(e,t,n){for(var o=this,r=e+t;e<r;++e)if(n(o.lines[e]))return!0}},Vr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var n=this;this.size-=t;for(var o=0;o<this.children.length;++o){var r=n.children[o],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),s=r.height;if(r.removeInner(e,a),n.height-=s-r.height,i==a&&(n.children.splice(o--,1),r.parent=null),0==(t-=a))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n<this.children.length;++n)t.children[n].collapse(e)},insertInner:function(e,t,n){var o=this;this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=o.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,l=s;l<i.lines.length;){var u=new Hr(i.lines.slice(l,l+=25));i.height-=u.height,o.children.splice(++r,0,u),u.parent=o}i.lines=i.lines.slice(0,s),o.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Vr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var o=p(e.parent.children,e);e.parent.children.splice(o+1,0,n)}else{var r=new Vr(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var o=this,r=0;r<this.children.length;++r){var i=o.children[r],a=i.chunkSize();if(e<a){var s=Math.min(t,a-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=a}}};var ks=function(e,t,n){var o=this;if(n)for(var r in n)n.hasOwnProperty(r)&&(o[r]=n[r]);this.doc=e,this.node=t};ks.prototype.clear=function(){var e=this,t=this.doc.cm,n=this.line.widgets,o=this.line,r=P(o);if(null!=r&&n){for(var i=0;i<n.length;++i)n[i]==e&&n.splice(i--,1);n.length||(o.widgets=null);var a=Mt(this);k(o,Math.max(0,o.height-a)),t&&(fo(t,function(){Ur(t,o,-a),Co(t,r,"widget")}),bt(t,"lineWidgetCleared",t,this,r))}},ks.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,o=this.line;this.height=null;var r=Mt(this)-t;r&&(k(o,o.height+r),n&&fo(n,function(){n.curOp.forceUpdate=!0,Ur(n,o,r),bt(n,"lineWidgetChanged",n,e,P(o))}))},ke(ks);var Ps=0,Ds=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ps};Ds.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&io(t),Oe(this,"clear")){var o=this.find();o&&bt(this,"clear",o.from,o.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var s=e.lines[a],l=K(s.markedSpans,e);t&&!e.collapsed?Co(t,P(s),"text"):t&&(null!=l.to&&(i=P(s)),null!=l.from&&(r=P(s))),s.markedSpans=Y(s.markedSpans,l),null==l.from&&e.collapsed&&!me(e.doc,s)&&t&&k(s,Cn(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=de(e.lines[u]),d=Ce(c);d>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&yo(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&xr(t.doc)),t&&bt(t,"markerCleared",t,this,r,i),n&&ao(t),this.parent&&this.parent.clear()}},Ds.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var o,r,i=0;i<this.lines.length;++i){var a=n.lines[i],s=K(a.markedSpans,n);if(null!=s.from&&(o=L(t?a:P(a),s.from),-1==e))return o;if(null!=s.to&&(r=L(t?a:P(a),s.to),1==e))return r}return o&&{from:o,to:r}},Ds.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,o=this.doc.cm;t&&o&&fo(o,function(){var r=t.line,i=P(t.line),a=$t(o,i);if(a&&(Jt(a),o.curOp.selectionChanged=o.curOp.forceUpdate=!0),o.curOp.updateMaxLine=!0,!me(n.doc,r)&&null!=n.height){var s=n.height;n.height=null;var l=Mt(n)-s;l&&k(r,r.height+l)}bt(o,"markerChanged",o,e)})},Ds.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=p(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ds.prototype.detachLine=function(e){if(this.lines.splice(p(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ke(Ds);var Fs=function(e,t){var n=this;this.markers=e,this.primary=t;for(var o=0;o<e.length;++o)e[o].parent=n};Fs.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();bt(this,"clear")}},Fs.prototype.find=function(e,t){return this.primary.find(e,t)},ke(Fs);var Ms=0,Ls=function(e,t,n,o,r){if(!(this instanceof Ls))return new Ls(e,t,n,o,r);null==n&&(n=0),Vr.call(this,[new Hr([new fs("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=L(n,0);this.sel=Go(i),this.history=new tr(null),this.id=++Ms,this.modeOption=t,this.lineSep=o,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Xo(this,{from:i,to:i,text:e}),wr(this,Go(i),Ua)};Ls.prototype=C(Vr.prototype,{constructor:Ls,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,o=0;o<t.length;++o)n+=t[o].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=O(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:vo(function(e){var t=L(this.first,0),n=this.first+this.size-1;Pr(this,{from:t,to:L(n,R(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Kn(this.cm,0,0),wr(this,Go(t),Ua)}),replaceRange:function(e,t,n,o){t=H(this,t),n=n?H(this,n):t,Nr(this,e,t,n,o)},getRange:function(e,t,n){var o=T(this,H(this,e),H(this,t));return!1===n?o:o.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(F(this,e))return R(this,e)},getLineNumber:function(e){return P(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=R(this,e)),de(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return H(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vo(function(e,t,n){yr(this,H(this,"number"==typeof e?L(e,t||0):e),null,n)}),setSelection:vo(function(e,t,n){yr(this,H(this,e),H(this,t||e),n)}),extendSelection:vo(function(e,t,n){gr(this,H(this,e),t&&H(this,t),n)}),extendSelections:vo(function(e,t){mr(this,U(this,e),t)}),extendSelectionsBy:vo(function(e,t){mr(this,U(this,m(this.sel.ranges,e)),t)}),setSelections:vo(function(e,t,n){var o=this;if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Os(H(o,e[i].anchor),H(o,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),wr(this,jo(r,t),n)}}),addSelection:vo(function(e,t,n){var o=this.sel.ranges.slice(0);o.push(new Os(H(this,e),H(this,t||e))),wr(this,jo(o,o.length-1),n)}),getSelection:function(e){for(var t,n=this,o=this.sel.ranges,r=0;r<o.length;r++){var i=T(n,o[r].from(),o[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,n=[],o=this.sel.ranges,r=0;r<o.length;r++){var i=T(t,o[r].from(),o[r].to());!1!==e&&(i=i.join(e||t.lineSeparator())),n[r]=i}return n},replaceSelection:function(e,t,n){for(var o=[],r=0;r<this.sel.ranges.length;r++)o[r]=e;this.replaceSelections(o,t,n||"+input")},replaceSelections:vo(function(e,t,n){for(var o=this,r=[],i=this.sel,a=0;a<i.ranges.length;a++){var s=i.ranges[a];r[a]={from:s.from(),to:s.to(),text:o.splitLines(e[a]),origin:n}}for(var l=t&&"end"!=t&&$o(this,r,t),u=r.length-1;u>=0;u--)Pr(o,r[u]);l?br(this,l):this.cm&&qn(this.cm)}),undo:vo(function(){Fr(this,"undo")}),redo:vo(function(){Fr(this,"redo")}),undoSelection:vo(function(){Fr(this,"undo",!0)}),redoSelection:vo(function(){Fr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,o=0;o<e.done.length;o++)e.done[o].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new tr(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:hr(this.history.done),undone:hr(this.history.undone)}},setHistory:function(e){var t=this.history=new tr(this.history.maxGeneration);t.done=hr(e.done.slice(0),null,!0),t.undone=hr(e.undone.slice(0),null,!0)},setGutterMarker:vo(function(e,t,n){return Gr(this,e,"gutter",function(e){var o=e.gutterMarkers||(e.gutterMarkers={});return o[t]=n,!n&&_(o)&&(e.gutterMarkers=null),!0})}),clearGutter:vo(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Gr(t,n,"gutter",function(){return n.gutterMarkers[e]=null,_(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!F(this,e))return null;if(t=e,!(e=R(this,e)))return null}else if(null==(t=P(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:vo(function(t,n,o){return Gr(this,t,"gutter"==n?"gutter":"class",function(t){var r="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[r]){if(e(o).test(t[r]))return!1;t[r]+=" "+o}else t[r]=o;return!0})}),removeLineClass:vo(function(t,n,o){return Gr(this,t,"gutter"==n?"gutter":"class",function(t){var r="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",i=t[r];if(!i)return!1;if(null==o)t[r]=null;else{var a=i.match(e(o));if(!a)return!1;var s=a.index+a[0].length;t[r]=i.slice(0,a.index)+(a.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0})}),addLineWidget:vo(function(e,t,n){return zr(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return $r(this,H(this,e),H(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=H(this,e),$r(this,e,e,n,"bookmark")},findMarksAt:function(e){e=H(this,e);var t=[],n=R(this,e.line).markedSpans;if(n)for(var o=0;o<n.length;++o){var r=n[o];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=H(this,e),t=H(this,t);var o=[],r=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&r==e.line&&e.ch>=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||o.push(l.marker.parent||l.marker)}++r}),o},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var o=0;o<n.length;++o)null!=n[o].from&&e.push(n[o].marker)}),e},posFromIndex:function(e){var t,n=this.first,o=this.lineSeparator().length;return this.iter(function(r){var i=r.text.length+o;if(i>e)return t=e,!0;e-=i,++n}),H(this,L(n,t))},indexFromPos:function(e){e=H(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Ls(O(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var o=new Ls(O(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(o.history=this.history),(this.linked||(this.linked=[])).push({doc:o,sharedHist:e.sharedHist}),o.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Yr(o,Kr(this)),o},unlinkDoc:function(e){var t=this;if(e instanceof qi&&(e=e.doc),this.linked)for(var n=0;n<this.linked.length;++n){var o=t.linked[n];if(o.doc==e){t.linked.splice(n,1),e.unlinkDoc(t),Xr(Kr(t));break}}if(e.history==this.history){var r=[e.id];Qo(e,function(e){return r.push(e.id)},!0),e.history=new tr(null),e.history.done=hr(this.history.done,r),e.history.undone=hr(this.history.undone,r)}},iterLinkedDocs:function(e){Qo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):os(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:vo(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&er(this.cm))})}),Ls.prototype.eachLine=Ls.prototype.iter;for(var Is=0,Ns=!1,Bs={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ws=0;Ws<10;Ws++)Bs[Ws+48]=Bs[Ws+96]=String(Ws);for(var js=65;js<=90;js++)Bs[js]=String.fromCharCode(js);for(var Gs=1;Gs<=12;Gs++)Bs[Gs+111]=Bs[Gs+63235]="F"+Gs;var Hs={};Hs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Hs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Hs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Hs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Hs.default=ka?Hs.macDefault:Hs.pcDefault;var Vs={selectAll:Or,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ua)},killLine:function(e){return pi(e,function(t){if(t.empty()){var n=R(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:L(t.head.line+1,0)}:{from:t.head,to:L(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return pi(e,function(t){return{from:L(t.from().line,0),to:H(e.doc,L(t.to().line+1,0))}})},delLineLeft:function(e){return pi(e,function(e){return{from:L(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return pi(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){return pi(e,function(t){var n=e.charCoords(t.head,"div").top+5,o=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:o}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(L(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(L(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return vi(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ci(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return yi(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},$a)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},$a)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,o=e.coordsChar({left:0,top:n},"div");return o.ch<e.getLine(o.line).search(/\S/)?Ci(e,t.head):o},$a)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),o=e.options.tabSize,r=0;r<n.length;r++){var i=n[r].from(),a=d(e.getLine(i.line),i.ch,o);t.push(f(o-a%o))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return fo(e,function(){for(var t=e.listSelections(),n=[],o=0;o<t.length;o++)if(t[o].empty()){var r=t[o].head,i=R(e.doc,r.line).text;if(i)if(r.ch==i.length&&(r=new L(r.line,r.ch-1)),r.ch>0)r=new L(r.line,r.ch+1),e.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),L(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var a=R(e.doc,r.line-1).text;a&&(r=new L(r.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),L(r.line-1,a.length-1),r,"+transpose"))}n.push(new Os(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){return fo(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var o=0;o<t.length;o++)e.indentLine(t[o].from().line,null,!0);qn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Us=new Wa,zs=null,$s=function(e,t,n){this.time=e,this.pos=t,this.button=n};$s.prototype.compare=function(e,t,n){return this.time+400>e&&0==I(t,this.pos)&&n==this.button};var qs,Ks,Ys={toString:function(){return"CodeMirror.Init"}},Xs={},Qs={};qi.defaults=Xs,qi.optionHandlers=Qs;var Zs=[];qi.defineInitHook=function(e){return Zs.push(e)};var Js=null,el=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Wa,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};el.prototype.init=function(e){function t(e){if(!Re(r,e)){if(r.somethingSelected())Xi({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ea(r);Xi({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ua),r.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Js.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=na(),s=a.firstChild;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),s.value=Js.text.join("\n");var l=document.activeElement;Ba(s),setTimeout(function(){r.display.lineSpace.removeChild(a),l.focus(),l==i&&o.showPrimarySelection()},50)}}var n=this,o=this,r=o.cm,i=o.div=e.lineDiv;ta(i,r.options.spellcheck),ts(i,"paste",function(e){Re(r,e)||Zi(e,r)||Ca<=11&&setTimeout(go(r,function(){return n.updateFromDOM()}),20)}),ts(i,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ts(i,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ts(i,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ts(i,"touchstart",function(){return o.forceCompositionEnd()}),ts(i,"input",function(){n.composing||n.readFromDOMSoon()}),ts(i,"copy",t),ts(i,"cut",t)},el.prototype.prepareSelection=function(){var e=Tn(this.cm,!1);return e.focus=this.cm.state.focused,e},el.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},el.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),o=n.from(),r=n.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||r.line<t.display.viewFrom)return void e.removeAllRanges();var i=ua(t,e.anchorNode,e.anchorOffset),a=ua(t,e.focusNode,e.focusOffset);if(!i||i.bad||!a||a.bad||0!=I(j(i,a),o)||0!=I(W(i,a),r)){var s=t.display.view,l=o.line>=t.display.viewFrom&&ia(t,o)||{node:s[0].measure.map[2],offset:0},u=r.line<t.display.viewTo&&ia(t,r);if(!u){var c=s[s.length-1].measure,d=c.maps?c.maps[c.maps.length-1]:c.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(!l||!u)return void e.removeAllRanges();var p,h=e.rangeCount&&e.getRangeAt(0);try{p=Ma(l.node,l.offset,u.offset,u.node)}catch(e){}p&&(!fa&&t.state.focused?(e.collapse(l.node,l.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):fa&&this.startGracePeriod()),this.rememberSelection()}},el.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},el.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},el.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},el.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},el.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},el.prototype.blur=function(){this.div.blur()},el.prototype.getField=function(){return this.div},el.prototype.supportsTouch=function(){return!0},el.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():fo(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},el.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},el.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(Ta&&_a&&this.cm.options.gutters.length&&aa(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ua(t,e.anchorNode,e.anchorOffset),o=ua(t,e.focusNode,e.focusOffset);n&&o&&fo(t,function(){wr(t.doc,Go(n,o),Ua),(n.bad||o.bad)&&(t.curOp.selectionChanged=!0)})}}},el.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),o=n.from(),r=n.to();if(0==o.ch&&o.line>e.firstLine()&&(o=L(o.line-1,R(e.doc,o.line-1).length)),r.ch==R(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=L(r.line+1,0)),o.line<t.viewFrom||r.line>t.viewTo-1)return!1;var i,a,s;o.line==t.viewFrom||0==(i=An(e,o.line))?(a=P(t.view[0].line),s=t.view[0].node):(a=P(t.view[i].line),s=t.view[i-1].node.nextSibling);var l,u,c=An(e,r.line);if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=P(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(la(e,s,u,a,l)),p=T(e.doc,L(a,0),L(l,R(e.doc,l).text.length));d.length>1&&p.length>1;)if(g(d)==g(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),a++}for(var h=0,f=0,m=d[0],v=p[0],y=Math.min(m.length,v.length);h<y&&m.charCodeAt(h)==v.charCodeAt(h);)++h;for(var C=g(d),b=g(p),w=Math.min(C.length-(1==d.length?h:0),b.length-(1==p.length?h:0));f<w&&C.charCodeAt(C.length-f-1)==b.charCodeAt(b.length-f-1);)++f;if(1==d.length&&1==p.length&&a==o.line)for(;h&&h>o.ch&&C.charCodeAt(C.length-f-1)==b.charCodeAt(b.length-f-1);)h--,f++;d[d.length-1]=C.slice(0,C.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var _=L(a,h),E=L(l,p.length?g(p).length-f:0);return d.length>1||d[0]||I(_,E)?(Nr(e.doc,d,_,E,"+input"),!0):void 0},el.prototype.ensurePolled=function(){this.forceCompositionEnd()},el.prototype.reset=function(){this.forceCompositionEnd()},el.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},el.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},el.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fo(this.cm,function(){return yo(e.cm)})},el.prototype.setUneditable=function(e){e.contentEditable="false"},el.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||go(this.cm,Qi)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},el.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},el.prototype.onContextMenu=function(){},el.prototype.resetPosition=function(){},el.prototype.needsContentAttribute=!0;var tl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Wa,this.hasSelection=!1,this.composing=null};tl.prototype.init=function(e){function t(e){if(!Re(r,e)){if(r.somethingSelected())Xi({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=ea(r);Xi({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Ua):(o.prevInput="",i.value=t.text.join("\n"),Ba(i))}"cut"==e.type&&(r.state.cutIncoming=!0)}}var n=this,o=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Ra&&(i.style.width="0px"),ts(i,"input",function(){ya&&Ca>=9&&n.hasSelection&&(n.hasSelection=null),o.poll()}),ts(i,"paste",function(e){Re(r,e)||Zi(e,r)||(r.state.pasteIncoming=!0,o.fastPoll())}),ts(i,"cut",t),ts(i,"copy",t),ts(e.scroller,"paste",function(t){Lt(e,t)||Re(r,t)||(r.state.pasteIncoming=!0,o.focus())}),ts(e.lineSpace,"selectstart",function(t){Lt(e,t)||Pe(t)}),ts(i,"compositionstart",function(){var e=r.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ts(i,"compositionend",function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)})},tl.prototype.createField=function(e){this.wrapper=na(),this.textarea=this.wrapper.firstChild},tl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,o=Tn(e);if(e.options.moveInputWithCursor){var r=un(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+a.top-i.top)),o.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+a.left-i.left))}return o},tl.prototype.showSelection=function(e){var t=this.cm,o=t.display;n(o.cursorDiv,e.cursors),n(o.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},tl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ba(this.textarea),ya&&Ca>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ya&&Ca>=9&&(this.hasSelection=null))}},tl.prototype.getField=function(){return this.textarea},tl.prototype.supportsTouch=function(){return!1},tl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Oa||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},tl.prototype.blur=function(){this.textarea.blur()},tl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},tl.prototype.receivedFocus=function(){this.slowPoll()},tl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},tl.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},tl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!t.state.focused||rs(n)&&!o&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=n.value;if(r==o&&!t.somethingSelected())return!1;if(ya&&Ca>=9&&this.hasSelection===r||ka&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||o||(o="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(o.length,r.length);a<s&&o.charCodeAt(a)==r.charCodeAt(a);)++a;return fo(t,function(){Qi(t,r.slice(a),o.length-a,null,e.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},tl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},tl.prototype.onKeyPress=function(){ya&&Ca>=9&&(this.hasSelection=null),this.fastPoll()},tl.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=r.somethingSelected(),t="\u200b"+(e?a.value:"");a.value="\u21da",a.value=t,o.prevInput=e?"":"\u200b",a.selectionStart=1,a.selectionEnd=t.length,i.selForContextMenu=r.doc.sel}}function n(){if(o.contextMenuPending=!1,o.wrapper.style.cssText=c,a.style.cssText=u,ya&&Ca<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=a.selectionStart){(!ya||ya&&Ca<9)&&t();var e=0,n=function(){i.selForContextMenu==r.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"\u200b"==o.prevInput?go(r,Or)(r):e++<10?i.detectingSelectAll=setTimeout(n,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(n,200)}}var o=this,r=o.cm,i=r.display,a=o.textarea,s=Sn(r,e),l=i.scroller.scrollTop;if(s&&!Ea){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(s)&&go(r,wr)(r.doc,Go(s),Ua);var u=a.style.cssText,c=o.wrapper.style.cssText;o.wrapper.style.cssText="position: absolute";var d=o.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(ya?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(ba&&(p=window.scrollY),i.input.focus(),ba&&window.scrollTo(null,p),i.input.reset(),r.somethingSelected()||(a.value=o.prevInput=" "),o.contextMenuPending=!0,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),ya&&Ca>=9&&t(),Ia){Me(e);var h=function(){Se(window,"mouseup",h),setTimeout(n,20)};ts(window,"mouseup",h)}else setTimeout(n,50)}},tl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},tl.prototype.setUneditable=function(){},tl.prototype.needsContentAttribute=!1,function(e){function t(t,o,r,i){e.defaults[t]=o,r&&(n[t]=i?function(e,t,n){n!=Ys&&r(e,t,n)}:r)}var n=e.optionHandlers;e.defineOption=t,e.Init=Ys,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,qo(e)},!0),t("indentUnit",2,qo,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Ko(e),tn(e),yo(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],o=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var i=e.text.indexOf(t,r);if(-1==i)break;r=i+t.length,n.push(L(o,i))}o++});for(var r=n.length-1;r>=0;r--)Nr(e.doc,t,n[r],L(n[r].line,n[r].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ys&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Oa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Da),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Vi(e),Ui(e)},!0),t("keyMap","default",function(e,t,n){var o=di(t),r=n!=Ys&&di(n);r&&r.detach&&r.detach(e,o),o.attach&&o.attach(e,r||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,$i,!0),t("gutters",[],function(e){Io(e.options),Ui(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?_n(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return no(e)},!0),t("scrollbarStyle","native",function(e){ro(e),no(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Io(e.options),Ui(e)},!0),t("firstLineNumber",1,Ui,!0),t("lineNumberFormatter",function(e){return e},Ui,!0),t("showCursorWhenSelecting",!1,Rn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(In(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,zi),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Rn,!0),t("singleCursorHeightPerLine",!0,Rn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Ko,!0),t("addModeClass",!1,Ko,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Ko,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(qi),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var o=this.options,r=o[e];o[e]==n&&"mode"!=e||(o[e]=n,t.hasOwnProperty(e)&&go(this,t[e])(this,n,r),Ae(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](di(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:mo(function(t,n){var o=t.token?t:e.getMode(this.options,t);if(o.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:o,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,yo(this)}),removeOverlay:mo(function(e){for(var t=this,n=this.state.overlays,o=0;o<n.length;++o){var r=n[o].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return n.splice(o,1),t.state.modeGen++,void yo(t)}}),indentLine:mo(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),F(this.doc,e)&&Yi(this,e,t,n)}),indentSelection:mo(function(e){for(var t=this,n=this.doc.sel.ranges,o=-1,r=0;r<n.length;r++){var i=n[r];if(i.empty())i.head.line>o&&(Yi(t,i.head.line,e,!0),o=i.head.line,r==t.doc.sel.primIndex&&qn(t));else{var a=i.from(),s=i.to(),l=Math.max(o,a.line);o=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=l;u<o;++u)Yi(t,u,e);var c=t.doc.sel.ranges;0==a.ch&&n.length==c.length&&c[r].from().ch>0&&vr(t.doc,r,new Os(a,c[r].to()),Ua)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,L(e),t,!0)},getTokenTypeAt:function(e){e=H(this.doc,e);var t,n=Ye(this,R(this.doc,e.line)),o=0,r=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=o+r>>1;if((a?n[2*a-1]:0)>=i)r=a;else{if(!(n[2*a+1]<i)){t=n[2*a+2];break}o=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var o=this,r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if("string"==typeof a[t])i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var s=0;s<a[t].length;s++){var l=i[a[t][s]];l&&r.push(l)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var u=0;u<i._global.length;u++){var c=i._global[u];c.pred(a,o)&&-1==p(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=G(n,null==e?n.first+n.size-1:e),Xe(this,e+1,t).state},cursorCoords:function(e,t){var n,o=this.doc.sel.primary();return n=null==e?o.head:"object"==typeof e?H(this.doc,e):e?o.from():o.to(),un(this,n,t||"page")},charCoords:function(e,t){return ln(this,H(this.doc,e),t||"page")},coordsChar:function(e,t){return e=sn(this,e,t||"page"),pn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=sn(this,{top:e,left:0},t||"page").top,D(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var o,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),o=R(this.doc,e)}else o=e;return an(this,o,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-ye(o):0)},defaultTextHeight:function(){return Cn(this.display)},defaultCharWidth:function(){return bn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,o,r){var i=this.display;e=un(this,H(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==o)a=e.top;else if("above"==o||"near"==o){var l=Math.max(i.wrapper.clientHeight,this.doc.height),u=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==o||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==r?(s=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Un(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:mo(Ai),triggerOnKeyPress:mo(Oi),triggerOnKeyUp:Ti,triggerOnMouseDown:mo(Pi),execCommand:function(e){if(Vs.hasOwnProperty(e))return Vs[e].call(null,this)},triggerElectric:mo(function(e){Ji(this,e)}),findPosH:function(e,t,n,o){var r=this,i=1;t<0&&(i=-1,t=-t);for(var a=H(this.doc,e),s=0;s<t&&(a=oa(r.doc,a,i,n,o),!a.hitSide);++s);return a},moveH:mo(function(e,t){var n=this;this.extendSelectionsBy(function(o){return n.display.shift||n.doc.extend||o.empty()?oa(n.doc,o.head,e,t,n.options.rtlMoveVisually):e<0?o.from():o.to()},$a)}),deleteH:mo(function(e,t){var n=this.doc.sel,o=this.doc;n.somethingSelected()?o.replaceSelection("",null,"+delete"):pi(this,function(n){var r=oa(o,n.head,e,t,!1);return e<0?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(e,t,n,o){var r=this,i=1,a=o;t<0&&(i=-1,t=-t);for(var s=H(this.doc,e),l=0;l<t;++l){var u=un(r,s,"div");if(null==a?a=u.left:u.left=a,s=ra(r,u,i,n),s.hitSide)break}return s},moveV:mo(function(e,t){var n=this,o=this.doc,r=[],i=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(a){if(i)return e<0?a.from():a.to();var s=un(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=ra(n,s,e,t);return"page"==t&&a==o.sel.primary()&&$n(n,ln(n,l,"div").top-s.top),l},$a),r.length)for(var a=0;a<o.sel.ranges.length;a++)o.sel.ranges[a].goalColumn=r[a]}),findWordAt:function(e){var t=this.doc,n=R(t,e.line).text,o=e.ch,r=e.ch;if(n){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=n.length||!o?++r:--o;for(var a=n.charAt(o),s=w(a,i)?function(e){return w(e,i)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};o>0&&s(n.charAt(o-1));)--o;for(;r<n.length&&s(n.charAt(r));)++r}return new Os(L(e.line,o),L(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?s(this.display.cursorDiv,"CodeMirror-overwrite"):Na(this.display.cursorDiv,"CodeMirror-overwrite"),Ae(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:mo(function(e,t){Kn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Wt(this)-this.display.barHeight,width:e.scrollWidth-Wt(this)-this.display.barWidth,clientHeight:Gt(this),clientWidth:jt(this)}},scrollIntoView:mo(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:L(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?Yn(this,e):Qn(this,e.from,e.to,e.margin)}),setSize:mo(function(e,t){var n=this,o=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=o(e)),null!=t&&(this.display.wrapper.style.height=o(t)),this.options.lineWrapping&&en(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Co(n,r,"widget");break}++r}),this.curOp.forceUpdate=!0,Ae(this,"refresh",this)}),operation:function(e){return fo(this,e)},startOperation:function(){return io(this)},endOperation:function(){return ao(this)},refresh:mo(function(){var e=this.display.cachedTextHeight;yo(this),this.curOp.forceUpdate=!0,tn(this),Kn(this,this.doc.scrollLeft,this.doc.scrollTop),Fo(this),(null==e||Math.abs(e-Cn(this.display))>.5)&&xn(this),Ae(this,"refresh",this)}),swapDoc:mo(function(e){var t=this.doc;return t.cm=null,Zo(this,e),tn(this),this.display.input.reset(),Kn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,bt(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,o,r){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][o]=r},e.registerGlobalHelper=function(t,o,r,i){e.registerHelper(t,o,i),n[t]._global.push({pred:r,val:i})}}(qi);var nl="iter insert remove copy getEditor constructor".split(" ");for(var ol in Ls.prototype)Ls.prototype.hasOwnProperty(ol)&&p(nl,ol)<0&&(qi.prototype[ol]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ls.prototype[ol]));return ke(Ls),qi.inputStyles={textarea:tl,contenteditable:el},qi.defineMode=function(e){qi.defaults.mode||"null"==e||(qi.defaults.mode=e),je.apply(this,arguments)},qi.defineMIME=Ge,qi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),qi.defineMIME("text/plain","null"),qi.defineExtension=function(e,t){qi.prototype[e]=t},qi.defineDocExtension=function(e,t){Ls.prototype[e]=t},qi.fromTextArea=da,function(e){e.off=Se,e.on=ts,e.wheelEventPixels=Bo,e.Doc=Ls,e.splitLines=os,e.countColumn=d,e.findColumn=h,e.isWordChar=b,e.Pass=Va,e.signal=Ae,e.Line=fs,e.changeEnd=Ho,e.scrollbarModel=Es,e.Pos=L,e.cmpPos=I,e.modes=ss,e.mimeModes=ls,e.resolveMode=He,e.getMode=Ve,e.modeExtensions=us,e.extendMode=Ue,e.copyState=ze,e.startState=qe,e.innerMode=$e,e.commands=Vs,e.keyMap=Hs,e.keyName=ci,e.isModifierKey=li,e.lookupKey=si,e.normalizeKeyMap=ai,e.StringStream=cs,e.SharedTextMarker=Fs,e.TextMarker=Ds,e.LineWidget=ks,e.e_preventDefault=Pe,e.e_stopPropagation=De,e.e_stop=Me,e.addClass=s,e.contains=i,e.rmClass=Na,e.keyNames=Bs}(qi),qi.version="5.37.0",qi})},function(e,t,n){function o(e){return a(e)?r(e):i(e)}var r=n(426),i=n(996),a=n(112);e.exports=o},function(e,t,n){"use strict";var o={};e.exports=o},function(e,t,n){"use strict";var o=n(20),r=(n(16),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,r,i,a,s,l){this.isInTransaction()&&o("27");var u,c;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),c=e.call(t,n,r,i,a,s,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o=t[n];try{this.wrapperInitData[n]=r,this.wrapperInitData[n]=o.initialize?o.initialize.call(this):null}finally{if(this.wrapperInitData[n]===r)try{this.initializeAll(n+1)}catch(e){}}}},closeAll:function(e){this.isInTransaction()||o("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,a=t[n],s=this.wrapperInitData[n];try{i=!0,s!==r&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(e){}}}this.wrapperInitData.length=0}};e.exports=i},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(124),i=n(325),a=n(210),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};r.augmentClass(o,s),e.exports=o},function(e,t,n){"use strict";var o,r=n(37),i=n(212),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,l=n(213),u=l(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{o=o||document.createElement("div"),o.innerHTML="<svg>"+t+"</svg>";for(var n=o.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(r.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=u},function(e,t,n){"use strict";function o(e){var t=""+e,n=i.exec(t);if(!n)return t;var o,r="",a=0,s=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#x27;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}s!==a&&(r+=t.substring(s,a)),s=a+1,r+=o}return s!==a?r+t.substring(s,a):r}function r(e){return"boolean"===typeof e||"number"===typeof e?""+e:o(e)}var i=/["'&<>]/;e.exports=r},function(e,t,n){"use strict";function o(e){return Object.prototype.hasOwnProperty.call(e,g)||(e[g]=h++,d[e[g]]={}),d[e[g]]}var r,i=n(23),a=n(205),s=n(538),l=n(325),u=n(539),c=n(209),d={},p=!1,h=0,f={topAbort:"abort",topAnimationEnd:u("animationend")||"animationend",topAnimationIteration:u("animationiteration")||"animationiteration",topAnimationStart:u("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:u("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},g="_reactListenersID"+String(Math.random()).slice(2),m=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,r=o(n),i=a.registrationNameDependencies[e],s=0;s<i.length;s++){var l=i[s];r.hasOwnProperty(l)&&r[l]||("topWheel"===l?c("wheel")?m.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):c("mousewheel")?m.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):m.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===l?c("scroll",!0)?m.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):m.ReactEventListener.trapBubbledEvent("topScroll","scroll",m.ReactEventListener.WINDOW_HANDLE):"topFocus"===l||"topBlur"===l?(c("focus",!0)?(m.ReactEventListener.trapCapturedEvent("topFocus","focus",n),m.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):c("focusin")&&(m.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),m.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),r.topBlur=!0,r.topFocus=!0):f.hasOwnProperty(l)&&m.ReactEventListener.trapBubbledEvent(l,f[l],n),r[l]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var e=document.createEvent("MouseEvent");return null!=e&&"pageX"in e},ensureScrollValueMonitoring:function(){if(void 0===r&&(r=m.supportsEventPageXY()),!r&&!p){var e=l.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),p=!0}}});e.exports=m},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(d===clearTimeout)return clearTimeout(e);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){g&&h&&(g=!1,h.length?f=h.concat(f):m=-1,f.length&&s())}function s(){if(!g){var e=r(a);g=!0;for(var t=f.length;t;){for(h=f,f=[];++m<t;)h&&h[m].run();m=-1,t=f.length}h=null,g=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,d,p=e.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{d="function"===typeof clearTimeout?clearTimeout:o}catch(e){d=o}}();var h,f=[],g=!1,m=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new l(e,t)),1!==f.length||g||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(592),i=o(r),a=n(603),s=o(a),l="function"===typeof s.default&&"symbol"===typeof i.default?function(e){return typeof e}:function(e){return e&&"function"===typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"===typeof s.default&&"symbol"===l(i.default)?function(e){return"undefined"===typeof e?"undefined":l(e)}:function(e){return e&&"function"===typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":"undefined"===typeof e?"undefined":l(e)}},function(e,t,n){"use strict";var o=n(594)(!0);n(345)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,o){if("string"!==typeof e)return void(t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()));2==arguments.length&&(o=n),t.modules[e]||(t.payloads[e]=o,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var r=i(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s<l;++s){var u=i(e,t[s]);if(void 0==u&&o.original)return;a.push(u)}return n&&n.apply(null,a)||!0}},o=function(e,t){var r=n("",e,t);return void 0==r&&o.original?o.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)){var o=e.split("/").slice(0,-1).join("/");for(t=o+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},i=function(e,o){o=r(e,o);var i=t.modules[o];if(!i){if("function"===typeof(i=t.payloads[o])){var a={},s={id:o,uri:"",exports:a,packaged:!0};a=i(function(e,t){return n(o,e,t)},a,s)||s.exports,t.modules[o]=a,delete t.payloads[o]}i=t.modules[o]=a||i}return i};!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.acequire&&r.acequire.packaged||(o.original=r.acequire,r.acequire=o,r.acequire.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function r(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var o=n||0;o<e.length;o++)if(e[o]===t)return o;return-1}var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},a=void 0===i.exec.call(/()??/,"")[1],s=function(){var e=/^/g;return i.test.call(e,""),!e.lastIndex}();s&&a||(RegExp.prototype.exec=function(e){var t,n,l=i.exec.apply(this,arguments);if("string"==typeof e&&l){if(!a&&l.length>1&&r(l,"")>-1&&(n=RegExp(this.source,i.replace.call(o(this),"g","")),i.replace.call(e.slice(l.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var u=1;u<l.length;u++)(t=this._xregexp.captureNames[u-1])&&(l[t]=l[u]);!s&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},s||(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 o(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function i(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}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=f.call(arguments,1),r=function(){if(this instanceof r){var o=t.apply(this,n.concat(f.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(f.call(arguments)))};return t.prototype&&(o.prototype=t.prototype,r.prototype=new o,o.prototype=null),r});var a,s,l,u,c,d=Function.prototype.call,p=Array.prototype,h=Object.prototype,f=p.slice,g=d.bind(h.toString),m=d.bind(h.hasOwnProperty);if((c=m(h,"__defineGetter__"))&&(a=d.bind(h.__defineGetter__),s=d.bind(h.__defineSetter__),l=d.bind(h.__lookupGetter__),u=d.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 v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.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 o=this.slice(e,e+t),r=f.call(arguments,2),i=r.length;if(e===n)i&&this.push.apply(this,r);else{var a=Math.min(t,n-e),s=e+a,l=s+i-a,u=n-s,c=n-a;if(l<s)for(var d=0;d<u;++d)this[l+d]=this[s+d];else if(l>s)for(d=u;d--;)this[l+d]=this[s+d];if(i&&e===c)this.length=c,this.push.apply(this,r);else for(this.length=c+i,d=0;d<i;++d)this[e+d]=r[d]}return o};Array.isArray||(Array.isArray=function(e){return"[object Array]"==g(e)});var y=Object("a"),C="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=arguments[1],r=-1,i=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++r<i;)r in n&&e.call(o,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=n.length>>>0,r=Array(o),i=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a<o;a++)a in n&&(r[a]=e.call(i,n[a],a,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=P(this),o=C&&"[object String]"==g(this)?this.split(""):n,r=o.length>>>0,i=[],a=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)s in o&&(t=o[s],e.call(a,t,s,n)&&i.push(t));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var i=0;i<o;i++)if(i in n&&!e.call(r,n[i],i,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var i=0;i<o;i++)if(i in n&&e.call(r,n[i],i,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!o&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,i=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(i in n){r=n[i++];break}if(++i>=o)throw new TypeError("reduce of empty array with no initial value")}for(;i<o;i++)i in n&&(r=e.call(void 0,r,n[i],i,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=P(this),n=C&&"[object String]"==g(this)?this.split(""):t,o=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!o&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,i=o-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(i in n){r=n[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}do{i in this&&(r=e.call(void 0,r,n[i],i,t))}while(i--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=C&&"[object String]"==g(this)?this.split(""):P(this),n=t.length>>>0;if(!n)return-1;var o=0;for(arguments.length>1&&(o=i(arguments[1])),o=o>=0?o:Math.max(0,n+o);o<n;o++)if(o in t&&t[o]===e)return o;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=C&&"[object String]"==g(this)?this.split(""):P(this),n=t.length>>>0;if(!n)return-1;var o=n-1;for(arguments.length>1&&(o=Math.min(o,i(arguments[1]))),o=o>=0?o:n-Math.abs(o);o>=0;o--)if(o in t&&e===t[o])return o;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(m(e,t)){var n,o,r;if(n={enumerable:!0,configurable:!0},c){var i=e.__proto__;e.__proto__=h;var o=l(e,t),r=u(e,t);if(e.__proto__=i,o||r)return o&&(n.get=o),r&&(n.set=r),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var b;b=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=b();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var o=function(){};o.prototype=e,n=new o,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var w=r({}),_="undefined"==typeof document||r(document.createElement("div"));if(!w||!_)var E=Object.defineProperty}if(!Object.defineProperty||E){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(E)try{return E.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(c&&(l(e,t)||u(e,t))){var o=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=o}else e[t]=n.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&a(e,t,n.get),m(n,"set")&&s(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(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="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var x=!0,S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],A=S.length;for(var R in{toString:null})x=!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)m(e,n)&&t.push(n);if(x)for(var o=0,r=A;o<r;o++){var i=S[o];m(e,i)&&t.push(i)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var T="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||T.trim()){T="["+T+"]";var O=new RegExp("^"+T+T+"*"),k=new RegExp(T+T+"*$");String.prototype.trim=function(){return String(this).replace(O,"").replace(k,"")}}var P=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";if(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 o=n.indexOf(t);if(-1==o)break;n.splice(o,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),o=!0;;){var r=n.indexOf(t);if(-1==r)break;o=!1,n.splice(r,1)}return o&&n.push(t),e.className=n.join(" "),o},t.setCssClass=function(e,n,o){o?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,o=0;if(t=t||document,t.createStyleSheet&&(n=t.styleSheets)){for(;o<n.length;)if(n[o++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;o<n.length;)if(n[o++].id===e)return!0;return!1},t.importCssString=function(e,n,o){if(o=o||document,n&&t.hasCssString(n,o))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),o.createStyleSheet?(r=o.createStyleSheet(),r.cssText=e,n&&(r.owningElement.id=n)):(r=t.createElement("style"),r.appendChild(o.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(o).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var o=t.createElement("link");o.rel="stylesheet",o.href=e,t.getDocumentHead(n).appendChild(o)}},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 o=t.createElement("ace_outer"),r=o.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",o.appendChild(n);var i=e.documentElement;i.appendChild(o);var a=n.offsetWidth;r.overflow="scroll";var s=n.offsetWidth;return a==s&&(s=o.clientWidth),i.removeChild(o),a-s},"undefined"==typeof document)return void(t.importCssString=function(){});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}}),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 o=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 o.mixin(n,n.MODIFIER_KEYS),o.mixin(n,n.PRINTABLE_KEYS),o.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}();o.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 o=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,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.isTouchPad=r.indexOf("TouchPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function o(e,t,n){var o=u(t);if(!a.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(o|=8),s.altGr){if(3==(3&o))return;s.altGr=0}if(18===n||17===n){var r="location"in t?t.location:t.keyLocation;if(17===n&&1===r)1==s[n]&&(l=t.timeStamp);else if(18===n&&3===o&&2===r){var c=t.timeStamp-l;c<50&&(s.altGr=!0)}}}if(n in i.MODIFIER_KEYS&&(n=-1),8&o&&n>=91&&n<=93&&(n=-1),!o&&13===n){var r="location"in t?t.location:t.keyLocation;if(3===r&&(e(t,o,-n),t.defaultPrevented))return}if(a.isChromeOS&&8&o){if(e(t,o,n),t.defaultPrevented)return;o&=-9}return!!(o||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,o,n)}function r(){s=Object.create(null)}var i=e("./keys"),a=e("./useragent"),s=null,l=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var o=function(){n.call(e,window.event)};n._wrapper=o,e.attachEvent("on"+t,o)}},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||a.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,o){function r(e){n&&n(e),o&&o(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){if("ontouchmove"in e){var o,r;t.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];o=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.changedTouches[0];e.wheelX=-(t.clientX-o)/1,e.wheelY=-(t.clientY-r)/1,o=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,o,r){function i(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,a.isIE){var i=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-u)>5;c&&!i||(d=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[d-1]||600),1==d&&(l=e.clientX,u=e.clientY)}if(e._clicks=d,o[r]("mousedown",e),d>4)d=0;else if(d>1)return o[r](p[d],e)}function s(e){d=2,c&&clearTimeout(c),c=setTimeout(function(){c=null},n[d-1]||600),o[r]("mousedown",e),o[r](p[d],e)}var l,u,c,d=0,p={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",i),a.isOldIE&&t.addListener(e,"dblclick",s)})};var u=!a.isMac||!a.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)};if(t.getModifierString=function(e){return i.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,n){var i=t.addListener;if(a.isOldGecko||a.isOpera&&!("KeyboardEvent"in window)){var l=null;i(e,"keydown",function(e){l=e.keyCode}),i(e,"keypress",function(e){return o(n,e,l)})}else{var u=null;i(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=o(n,e,e.keyCode);return u=e.defaultPrevented,t}),i(e,"keypress",function(e){u&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),u=null)}),i(e,"keyup",function(e){s[e.keyCode]=null}),s||(r(),i(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!a.isOldIE){t.nextTick=function(e,n){n=n||window;t.addListener(n,"message",function o(r){"zero-timeout-message-1"==r.data&&(t.stopPropagation(r),t.removeListener(n,"message",o),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 o=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},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,o=e.length;n<o;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 o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;n={};for(var o in t)n[o]=e(t[o]);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,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},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()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(o,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,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",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var o=e("../lib/event"),r=e("../lib/useragent"),i=e("../lib/dom"),a=e("../lib/lang"),s=r.isChrome<18,l=r.isIE,u=function(e,t){function n(e){if(!g){if(g=!0,R)t=0,n=e?0:d.value.length-1;else var t=e?2:1,n=2;try{d.setSelectionRange(t,n)}catch(e){}g=!1}}function u(){g||(d.value=p,r.isWebKit&&b.schedule())}function c(){clearTimeout(j),j=setTimeout(function(){m&&(d.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},r.isOldIE?200:0)}var d=i.createElement("textarea");d.className="ace_text-input",r.isTouchPad&&d.setAttribute("x-palm-disable-auto-cap",!0),d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",r.isOldIE&&(d.style.top="-1000px"),e.insertBefore(d,e.firstChild);var p="\x01\x01",h=!1,f=!1,g=!1,m="",v=!0;try{var y=document.activeElement===d}catch(e){}o.addListener(d,"blur",function(e){t.onBlur(e),y=!1}),o.addListener(d,"focus",function(e){y=!0,t.onFocus(e),n()}),this.focus=function(){if(m)return d.focus();var e=d.style.top;d.style.position="fixed",d.style.top="0px",d.focus(),setTimeout(function(){d.style.position="","0px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return y};var C=a.delayedCall(function(){y&&n(v)}),b=a.delayedCall(function(){g||(d.value=p,y&&n())});r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,C.schedule())}),u(),y&&t.onFocus();var w=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length};if(!d.setSelectionRange&&d.createTextRange&&(d.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},w=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&t.text==e.value}),r.isOldIE){var _=!1,E=function(e){if(!_){var t=d.value;if(!g&&t&&t!=p){if(e&&t==p[0])return x.schedule();O(t),_=!0,u(),_=!1}}},x=a.delayedCall(E);o.addListener(d,"propertychange",E);var S={13:1,27:1};o.addListener(d,"keyup",function(e){if(!g||d.value&&!S[e.keyCode]||setTimeout(B,0),(d.value.charCodeAt(0)||0)<129)return x.call();g?N():I()}),o.addListener(d,"keydown",function(e){x.schedule(50)})}var A=function(e){h?h=!1:w(d)?(t.selectAll(),n()):R&&n(t.selection.isEmpty())},R=null;this.setInputHandler=function(e){R=e},this.getInputHandler=function(){return R};var T=!1,O=function(e){R&&(e=R(e),R=null),f?(n(),e&&t.onPaste(e),f=!1):e==p.charAt(0)?T?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==p?e=e.substr(2):e.charAt(0)==p.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),T&&(T=!1)},k=function(e){if(!g){var t=d.value;O(t),u()}},P=function(e,t,n){var o=e.clipboardData||window.clipboardData;if(o&&!s){var r=l||n?"Text":"text/plain";try{return t?!1!==o.setData(r,t):o.getData(r)}catch(e){if(!n)return P(e,t,!0)}}},D=function(e,r){var i=t.getCopyText();if(!i)return o.preventDefault(e);P(e,i)?(r?t.onCut():t.onCopy(),o.preventDefault(e)):(h=!0,d.value=i,d.select(),setTimeout(function(){h=!1,u(),n(),r?t.onCut():t.onCopy()}))},F=function(e){D(e,!0)},M=function(e){D(e,!1)},L=function(e){var i=P(e);"string"==typeof i?(i&&t.onPaste(i,e),r.isIE&&setTimeout(n),o.preventDefault(e)):(d.value="",f=!0)};o.addCommandKeyListener(d,t.onCommandKey.bind(t)),o.addListener(d,"select",A),o.addListener(d,"input",k),o.addListener(d,"cut",F),o.addListener(d,"copy",M),o.addListener(d,"paste",L),"oncut"in d&&"oncopy"in d&&"onpaste"in d||o.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:M(e);break;case 86:L(e);break;case 88:F(e)}});var I=function(e){g||!t.onCompositionStart||t.$readOnly||(g={},g.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(N,0),t.on("mousedown",B),g.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},N=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\x01/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.canUndo&&(g.lastValue=e),g.lastValue)){var n=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},B=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=g;g=!1;var o=setTimeout(function(){o=null;var e=d.value.replace(/\x01/g,"");g||(e==n.lastValue?u():!n.lastValue&&e&&(u(),O(e)))});R=function(e){return o&&clearTimeout(o),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",B),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),r.isChrome&&r.isChrome>=53&&k()}},W=a.delayedCall(N,50);o.addListener(d,"compositionstart",I),r.isGecko?o.addListener(d,"text",function(){W.schedule()}):(o.addListener(d,"keyup",function(){W.schedule()}),o.addListener(d,"keydown",function(){W.schedule()})),o.addListener(d,"compositionend",B),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){T=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){if(n||!r.isOldIE){m||(m=d.style.cssText),d.style.cssText=(n?"z-index:100000;":"")+"height:"+d.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),s=i.computedStyle(t.container),l=a.top+(parseInt(s.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),p=a.bottom-l-d.clientHeight-2,h=function(e){d.style.left=e.clientX-u-2+"px",d.style.top=Math.min(e.clientY-l-2,p)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(j),r.isWin&&!r.isOldIE&&o.capture(t.container,h,c))}},this.onContextMenuClose=c;var j,G=function(e){t.textInput.onContextMenu(e),c()};o.addListener(d,"mouseup",G),o.addListener(d,"mousedown",function(e){e.preventDefault(),c()}),o.addListener(t.renderer.scroller,"contextmenu",G),o.addListener(d,"contextmenu",G)};t.TextInput=u}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function o(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 r(e,t,n,o){return Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))}function i(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)var 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}}e("../lib/dom"),e("../lib/event"),e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,r=e.getButton();if(0!==r){var i=o.getSelectionRange(),a=i.isEmpty();return o.$blockScrolling++,(a||1==r)&&o.selection.moveToPosition(n),o.$blockScrolling--,void(2==r&&o.textInput.onContextMenu(e.domEvent))}return this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimout||this.$clickSelection||o.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 o=this.$clickSelection.comparePoint(n);if(-1==o)e=this.$clickSelection.end;else if(1==o)e=this.$clickSelection.start;else{var r=i(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,o=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](o.row,o.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==a&&s<=0)t=this.$clickSelection.end,r.end.row==o.row&&r.end.column==o.column||(o=r.start);else if(1==s&&a>=0)t=this.$clickSelection.start,r.start.row==o.row&&r.start.column==o.column||(o=r.end);else if(-1==a&&1==s)o=r.end,t=r.start;else{var l=i(this.$clickSelection,o);o=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(o),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=r(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,o=n.session,r=o.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var o=n.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(o.start.row),this.$clickSelection.end=n.selection.getLineRange(o.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),o=this.editor;return o.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200?(this.$lastScrollTime=t,o.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),o=this.editor;if(o.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||n<200)return this.$lastScrollTime=t,o.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(o.prototype),t.DefaultHandlers=o}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=r.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){r.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){r.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}}).call(o.prototype),t.Tooltip=o}),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";function o(e){function t(){var t=d.getDocumentPosition().row,r=l.$annotations[t];if(!r)return n();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,d.y).row,s=d.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return n()}if(p!=r)if(p=r.text.join("<br/>"),u.setHtml(p),u.show(),a._signal("showGutterTooltip",u),a.on("mousewheel",n),e.$tooltipFollowsMouse)o(d);else{var c=d.domEvent.target,h=c.getBoundingClientRect(),f=u.getElement().style;f.left=h.right+"px",f.top=h.bottom+"px"}}function n(){c&&(c=clearTimeout(c)),p&&(u.hide(),p=null,a._signal("hideGutterTooltip",u),a.removeEventListener("mousewheel",n))}function o(e){u.setPosition(e.x,e.y)}var a=e.editor,l=a.renderer.$gutterLayer,u=new r(a.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()){if("foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,o=a.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,d,p;e.editor.setDefaultHandler("guttermousemove",function(r){var a=r.domEvent.target||r.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return n();p&&e.$tooltipFollowsMouse&&o(r),d=r,c||(c=setTimeout(function(){c=null,d&&!e.isMousePressed?t():n()},50))}),s.addListener(a.renderer.$gutter,"mouseout",function(e){d=null,p&&!c&&(c=setTimeout(function(){c=null,n()},50))}),a.on("changeSession",n)}function r(e){l.call(this,e)}var i=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/event"),l=e("../tooltip").Tooltip;a.inherits(r,l),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),i=this.getHeight();e+=15,t+=15,e+r>n&&(e-=e+r-n),t+i>o&&(t-=20+i),l.prototype.setPosition.call(this,e,t)}}.call(r.prototype),t.GutterHandler=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var o=e("../lib/event"),r=e("../lib/useragent"),i=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(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){o.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,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return o.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(i.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";function o(e){function t(e,t){var n=Date.now(),o=!t||e.row!=t.row,i=!t||e.column!=t.column;if(!R||o||i)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,R=n,T={x:C,y:b};else{r(T.x,T.y,C,b)>c?R=null:n-R>=u&&(m.renderer.scrollCursorIntoView(),R=null)}}function n(e,t){var n=Date.now(),o=m.renderer.layerConfig.lineHeight,r=m.renderer.layerConfig.characterWidth,i=m.renderer.scroller.getBoundingClientRect(),a={x:{left:C-i.left,right:i.right-C},y:{top:b-i.top,bottom:i.bottom-b}},s=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};s/r<=2&&(c.column+=a.x.left<a.x.right?-3:2),u/o<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var d=e.row!=c.row,p=e.column!=c.column,h=!t||e.row!=t.row;d||p&&!h?A?n-A>=l&&m.renderer.scrollCursorIntoView(c):A=n:A=null}function o(){var e=E;E=m.renderer.screenToTextCoordinates(C,b),t(E,e),n(E,e)}function d(){_=m.selection.toOrientedRange(),y=m.session.addMarker(_,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),o(),w=setInterval(o,20),k=0,a.addListener(document,"mousemove",h)}function p(){clearInterval(w),m.session.removeMarker(y),y=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(_),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),_=null,E=null,k=0,A=null,R=null,a.removeListener(document,"mousemove",h)}function h(){null==P&&(P=setTimeout(function(){null!=P&&y&&p()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function g(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],o=s.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return o&&t.indexOf(r)>=0?i="copy":n.indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}var m=e.editor,v=i.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.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),m.addEventListener("mousedown",this.onMouseDown.bind(e));var y,C,b,w,_,E,x,S,A,R,T,O=m.container,k=0;this.onDragStart=function(e){if(this.cancelDrag||!O.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}_=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",s.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),s.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(O.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;x||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&f(e.dataTransfer))return C=e.clientX,b=e.clientY,y||d(),k++,e.dataTransfer.dropEffect=x=g(e),a.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&f(e.dataTransfer))return C=e.clientX,b=e.clientY,y||(d(),k++),null!==P&&(P=null),e.dataTransfer.dropEffect=x=g(e),a.preventDefault(e)},this.onDragLeave=function(e){if(--k<=0&&y)return p(),x=null,a.preventDefault(e)},this.onDrop=function(e){if(E){var t=e.dataTransfer;if(S)switch(x){case"move":_=_.contains(E.row,E.column)?{start:E,end:E}:m.moveText(_,E);break;case"copy":_=m.moveText(_,E,!0)}else{var n=t.getData("Text");_={start:E,end:m.session.insert(E,n)},m.focus(),x=null}return p(),a.preventDefault(e)}},a.addListener(O,"dragstart",this.onDragStart.bind(e)),a.addListener(O,"dragend",this.onDragEnd.bind(e)),a.addListener(O,"dragenter",this.onDragEnter.bind(e)),a.addListener(O,"dragover",this.onDragOver.bind(e)),a.addListener(O,"dragleave",this.onDragLeave.bind(e)),a.addListener(O,"drop",this.onDrop.bind(e));var P=null}function r(e,t,n,o){return Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))}var i=e("../lib/dom"),a=e("../lib/event"),s=e("../lib/useragent"),l=200,u=200,c=5;(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=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&"dragReady"==this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>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(),o=e.getButton();if(1===(e.domEvent.detail||1)&&0===o&&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(s.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(o.prototype),t.DragdropHandler=o}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=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=o.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 o={},r=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=i),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;t&&this.addEventListener(e,function o(){n.removeEventListener(e,o),t.apply(null,arguments)})},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(o);var i=r.indexOf(t);-1!=i&&r.splice(i,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t){n[e];o&&this.setDefaultHandler(e,o.pop())}else if(o){var r=o.indexOf(t);-1!=r&&o.splice(r,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=o}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function o(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function r(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var i=e("./oop"),a=e("./event_emitter").EventEmitter,s={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 o('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]:o('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){i.implement(this,a),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var o=n[t];"string"==typeof o&&(o={forwardTo:o}),o.name||(o.name=t),e.$options[o.name]=o,"initialValue"in o&&(e["$"+o.name]=o.initialValue)}),i.implement(e,s),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 o=this.$defaultOptions[e]||(this.$defaultOptions[e]={});o[t]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,t,n):o[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=o,this.reportError=r}).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,o){"no use strict";function r(r){if(u&&u.document){c.packaged=r||e.packaged||o.packaged||u.define&&n(240).packaged;for(var a={},s="",l=document.currentScript||document._currentScript,d=l&&l.ownerDocument||document,p=d.getElementsByTagName("script"),h=0;h<p.length;h++){var f=p[h],g=f.src||f.getAttribute("src");if(g){for(var m=f.attributes,v=0,y=m.length;v<y;v++){var C=m[v];0===C.name.indexOf("data-ace-")&&(a[i(C.name.replace(/^data-ace-/,""))]=C.value)}var b=g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(s=b[1])}}s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var w in a)"undefined"!==typeof a[w]&&t.set(w,a[w])}}function i(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var a=e("./lib/lang"),s=(e("./lib/oop"),e("./lib/net")),l=e("./lib/app_config").AppConfig;o.exports=t=new l;var u=function(){return this||"undefined"!=typeof window&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return a.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var o="snippets"==t?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==o){var i=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(i,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var a=c[t+"Path"];return null==a?a=c.basePath:"/"==o&&(t=o=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+o+r+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,o){var r,i;Array.isArray(n)&&(i=n[0],n=n[1]);try{r=e(n)}catch(e){}if(r&&!t.$loading[n])return o&&o(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(o),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var o=t.$loading[n];t.$loading[n]=null,o.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,i),a)}},r(!0),t.init=r}),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 o=e("../lib/event"),r=e("../lib/useragent"),i=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,u=e("../config"),c=function(e){var t=this;this.editor=e,new i(this),new a(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()},s=e.renderer.getMouseEventTarget();o.addListener(s,"click",this.onMouseEvent.bind(this,"click")),o.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),o.addMultiMouseDownListener([s,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"),o.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),o.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var u=e.renderer.$gutter;o.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),o.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),o.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),o.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),o.addListener(s,"mousedown",n),o.addListener(u,"mousedown",n),r.isIE&&e.renderer.scrollBarV&&(o.addListener(e.renderer.scrollBarV.element,"mousedown",n),o.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var o=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),i=e.renderer;!r.isEmpty()&&r.insideStart(o.row,o.column)?i.setCursorStyle("default"):i.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(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 s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(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 s(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 i=this,a=function(e){if(e){if(r.isWebKit&&!e.which&&i.releaseMouse)return i.releaseMouse();i.x=e.clientX,i.y=e.clientY,t&&t(e),i.mouseEvent=new s(e,i.editor),i.$mouseMoved=!0}},l=function(e){clearInterval(c),u(),i[i.state+"End"]&&i[i.state+"End"](e),i.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),i.isMousePressed=!1,i.$onCaptureMouseMove=i.releaseMouse=null,e&&i.onMouseEvent("mouseup",e)},u=function(){i[i.state]&&i[i.state](),i.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});i.$onCaptureMouseMove=a,i.releaseMouse=o.capture(this.editor.container,a,l);var c=setInterval(u,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&&o.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function o(e){e.on("click",function(t){var n=t.getDocumentPosition(),o=e.session,r=o.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?o.removeFold(r):o.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.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,o=e.session,r=o.getParentFoldRangeData(n,!0),i=r.range||r.firstRange;if(i){n=i.start.row;var a=o.getFoldAt(n,o.getLine(n).length,1);a?o.removeFold(a):(o.addFold("...",i),e.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}t.stop()}})}t.FoldHandler=o}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var o=e("../lib/keys"),r=e("../lib/event"),i=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,o){for(var i,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((i=this.$handlers[l].handleKeyboard(this.$data,e,t,n,o))&&i.command&&(a="null"==i.command||s.exec(i.command,this.$editor,i.args,o),a&&o&&-1!=e&&1!=i.passEvent&&1!=i.command.passEvent&&r.stopEvent(o),a)););return a||-1!=e||(i={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),a},this.onCommandKey=function(e,t,n){var r=o.keyCodeToString(n);this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(i.prototype),t.KeyBinding=i}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var o=function(e,t){return e.row-t.row||e.column-t.column},r=function(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}};(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,o=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(o.row,o.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(o.row,o.column),-1==t?-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)var n={row:e,column:0};if(this.start.row>t)var o={row:t+1,column:0};else if(this.start.row<e)var o={row:e,column:0};return r.fromPoints(o||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 o={row:e,column:t};else var i={row:e,column:t};return r.fromPoints(o||this.start,i||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 r.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(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 r(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(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=o,r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),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 o=e("./lib/oop"),r=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=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(){o.implement(this,i),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)return void this.moveCursorTo(this.lead.row,this.lead.column+e);var t=this.getSelectionAnchor(),n=this.getSelectionLead(),o=this.isBackwards();o&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(o||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()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.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("undefined"==typeof 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,o="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(o);return r?(o=r.start.row,n=r.end.row):n=o,!0===t?new a(o,0,n,this.session.getLine(n).length):new a(o,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.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.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?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.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column,t.column+n).split(" ").length-1==n?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),o=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,o.row,o.column),i=r.match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(o.column+=i[0].length),this.moveCursorToPosition(o)},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 o=n.search(/\s+$/);o>0&&(t.column=o)}}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),o=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);return r?void this.moveCursorTo(r.end.row,r.end.column):(this.session.nonTokenRe.exec(o)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight())):(this.session.tokenRe.exec(o)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void 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))return void this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getFoldStringAt(t,n,-1);null==o&&(o=this.doc.getLine(t).substring(0,n));var i=r.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(n-=this.session.nonTokenRe.lastIndex,i=i.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(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)},this.$shortWordEndIndex=function(e){var t,n=0,o=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&o.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,o.test(t)){if(n>2){n--;break}for(;(t=e[n])&&o.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),o=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 i=this.doc.getLength();do{e++,o=this.doc.getLine(e)}while(e<i&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),t=0}var a=this.$shortWordEndIndex(o);this.moveCursorTo(e,t+a)},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 o=this.session.getLine(t).substring(0,n);if(0===n){do{t--,o=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var i=r.stringReverse(o),a=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-a)},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 o=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&o.row===this.lead.row&&o.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[o.row]&&(o.row>0||e>0)&&o.row++,this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var o=this.session.getFoldAt(e,t,1);o&&(e=o.start.row,t=o.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var o=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(o.row,o.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 a.fromPoints(t,n)}catch(e){return a.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{var e=this.getRange();e.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=a.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(s.prototype),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var o=e("./config"),r=2e3,i=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],o=[],r=0,i=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l<n.length;l++){var u=n[l];if(u.defaultToken&&(i.defaultToken=u.defaultToken),u.caseInsensitive&&(a="gi"),null!=u.regex){u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1));var c=u.regex,d=new RegExp("(?:("+c+")|(.))").exec("a").length-2;Array.isArray(u.token)?1==u.token.length||1==d?u.token=u.token[0]:d-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:d-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(u.onMatch=d>1?this.$applyToken:u.token),d>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(d=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||s.push(u)),i[r]=l,r+=d,o.push(c),u.onMatch||(u.onMatch=null)}}o.length||(i[0]=0,o.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+o.join(")|(")+")|($)",a)}};(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 o=[],r=0,i=n.length;r<i;r++)t[r]&&(o[o.length]={type:n[r],value:t[r]});return o},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],o=this.tokenArray,r=0,i=o.length;r<i;r++)t[r+1]&&(n[n.length]={type:o[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,o=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,i,a,s,l){return o?o="]"!=s:s?o=!0:a?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):i&&(n++,1!=i.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){var n=t.slice(0);t=n[0],"#tmp"===t&&(n.shift(),t=n.shift())}else var n=[];var o=t||"start",i=this.states[o];i||(o="start",i=this.states[o]);var a=this.matchMappings[o],s=this.regExps[o];s.lastIndex=0;for(var l,u=[],c=0,d=0,p={type:null,value:""};l=s.exec(e);){var h=a.defaultToken,f=null,g=l[0],m=s.lastIndex;if(m-g.length>c){var v=e.substring(c,m-g.length);p.type==h?p.value+=v:(p.type&&u.push(p),p={type:h,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){f=i[a[y]],h=f.onMatch?f.onMatch(g,o,n):f.token,f.next&&(o="string"==typeof f.next?f.next:f.next(o,n),i=this.states[o],i||(this.reportError("state doesn't exist",o),o="start",i=this.states[o]),a=this.matchMappings[o],c=m,s=this.regExps[o],s.lastIndex=m);break}if(g)if("string"===typeof h)f&&!1===f.merge||p.type!==h?(p.type&&u.push(p),p={type:h,value:g}):p.value+=g;else if(h){p.type&&u.push(p),p={type:null,value:""};for(var y=0;y<h.length;y++)u.push(h[y])}if(c==e.length)break;if(c=m,d++>r){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)p.type&&u.push(p),p={value:e.substring(c,c+=2e3),type:"overflow"};o="start",n=[];break}}return p.type&&u.push(p),n.length>1&&n[0]!==o&&n.unshift("#tmp",o),{tokens:u,state:n.length?n:o}},this.reportError=o.reportError}).call(i.prototype),t.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var o=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 o=e[n],r=0;r<o.length;r++){var i=o[r];(i.next||i.onMatch)&&("string"==typeof i.next&&0!==i.next.indexOf(t)&&(i.next=t+i.next),i.nextState&&0!==i.nextState.indexOf(t)&&(i.nextState=t+i.nextState))}this.$rules[t+n]=o}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,i){var a="function"==typeof e?(new e).getRules():e;if(r)for(var s=0;s<r.length;s++)r[s]=t+r[s];else{r=[];for(var l in a)r.push(t+l)}if(this.addRules(a,t),n)for(var u=Array.prototype[i?"push":"unshift"],s=0;s<r.length;s++)u.apply(this.$rules[r[s]],o.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(){function n(i){var a=r[i];a.processed=!0;for(var s=0;s<a.length;s++){var l=a[s],u=null;Array.isArray(l)&&(u=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 c=l.next||l.push;if(c&&Array.isArray(c)){var d=l.stateName;d||(d=l.token,"string"!=typeof d&&(d=d[0]||""),r[d]&&(d+=o++)),r[d]=c,l.next=d,n(d)}else"pop"==c&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var p in l.rules)r[p]?r[p].push&&r[p].push.apply(r[p],l.rules[p]):r[p]=l.rules[p];var h="string"==typeof l?l:"string"==typeof l.include?l.include:"";if(h&&(u=r[h]),u){var f=[s,1].concat(u);l.noEscape&&(f=f.filter(function(e){return!e.next})),a.splice.apply(a,f),s--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var o=0,r=this.$rules;Object.keys(r).forEach(n,this)},this.createKeywordMapper=function(e,t,n,o){var r=Object.create(null);return Object.keys(e).forEach(function(t){var i=e[t];n&&(i=i.toLowerCase());for(var a=i.split(o||"|"),s=a.length;s--;)r[a[s]]=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 o=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 var 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(o.prototype),t.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){"use strict";var o=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var o=e.getTokenAt(t,n);this.$tokenIndex=o?o.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(){this.$tokenIndex+=1;for(var e;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;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(o.prototype),t.TokenIterator=o}),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 o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t])return o=c[t];o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,o){var r=e.end.row-e.start.row;return{text:n+t+o,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},h=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){d(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return p(u,c,"{","}");if(h.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(h.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(n);var f=l.substring(a.column,a.column+1);if("}"==f){var g=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==g&&h.isAutoInsertedClosing(a,l,i))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(n);var m="";h.isMaybeInsertedClosing(a,l)&&(m=s.stringRepeat("}",o.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var f=l.substring(a.column,a.column+1);if("}"===f){var v=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!v)return null;var y=this.$getIndent(r.getLine(v.row))}else{if(!m)return void h.clearMaybeInsertedClosing();var y=this.$getIndent(l)}var C=y+r.getTabString();return{text:"\n"+C+"\n"+y+m,selection:[1,C.length,1,C.length]}}h.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){d(n);if("}"==r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){d(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return p(i,a,"(",")");if(h.isSaneInsertion(n,o))return h.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&h.isAutoInsertedClosing(s,l,r))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){d(n);if(")"==o.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,o,r){if("["==r){d(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return p(i,a,"[","]");if(h.isSaneInsertion(n,o))return h.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&h.isAutoInsertedClosing(s,l,r))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){d(n);if("]"==o.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,o,r){if('"'==r||"'"==r){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return p(a,s,i,i);if(!s){var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),h=u.substring(l.column,l.column+1),f=o.getTokenAt(l.row,l.column),g=o.getTokenAt(l.row,l.column+1);if("\\"==c&&f&&/escape/.test(f.type))return null;var m,v=f&&/string|escape/.test(f.type),y=!g||/string|escape/.test(g.type);if(h==i)(m=v!==y)&&/string\.end/.test(g.type)&&(m=!1);else{if(v&&!y)return null;if(v&&y)return null;var C=o.$mode.tokenRe;C.lastIndex=0;var b=C.test(c);C.lastIndex=0;var w=C.test(c);if(b||w)return null;if(h&&!/[\s;,.})\]\\]/.test(h))return null;m=!0}return{text:m?i+i:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){d(n);if(o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==i)return r.end.column++,r}})};h.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},h.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},h.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},h.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(h,i),t.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var o in e)t.packages[o]=e[o].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 o=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,i=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),s=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,c=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new i,this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,o){function r(e){for(var t=n;t<=o;t++)e(i.getLine(t),t)}var i=t.doc,a=!0,l=!0,u=1/0,c=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var p=this.lineCommentStart.map(s.escapeRegExp).join("|"),h=this.lineCommentStart[0];else var p=s.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),d=t.getUseSoftTabs();var f=function(e,t){var n=e.match(p);if(n){var o=n[1].length,r=n[0].length;y(e,o,r)||" "!=n[0][r-1]||r--,i.removeInLine(t,o,r)}},g=h+" ",m=function(e,t){a&&!/\S/.test(e)||(y(e,u,u)?i.insertInLine({row:t,column:u},g):i.insertInLine({row:t,column:u},h))},v=function(e,t){return p.test(e)},y=function(e,t,n){for(var o=0;t--&&" "==e.charAt(t);)o++;if(o%c!=0)return!1;for(var o=0;" "==e.charAt(n++);)o++;return c>2?o%c!=c-1:o%c==0}}else{if(!this.blockComment)return!1;var h=this.blockComment.start,C=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+s.escapeRegExp(h)+")"),b=new RegExp("(?:"+s.escapeRegExp(C)+")\\s*$"),m=function(e,t){v(e,t)||a&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},C),i.insertInLine({row:t,column:u},h))},f=function(e,t){var n;(n=e.match(b))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&i.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(p.test(e))return!0;for(var o=t.getTokens(n),r=0;r<o.length;r++)if("comment"===o[r].type)return!0}}var w=1/0;r(function(e,t){var n=e.search(/\S/);-1!==n?(n<u&&(u=n),l&&!v(e,t)&&(l=!1)):w>e.length&&(w=e.length)}),u==1/0&&(u=w,a=!1,l=!1),d&&u%c!=0&&(u=Math.floor(u/c)*c),r(l?f:m)},this.toggleBlockComment=function(e,t,n,o){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var i,a,s=new l(t,o.row,o.column),c=s.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var p,h;c&&/comment/.test(c.type);){var f=c.value.indexOf(r.start);if(-1!=f){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+f;p=new u(g,m,g,m+r.start.length);break}c=s.stepBackward()}for(var s=new l(t,o.row,o.column),c=s.getCurrentToken();c&&/comment/.test(c.type);){var f=c.value.indexOf(r.end);if(-1!=f){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+f;h=new u(g,m,g,m+r.end.length);break}c=s.stepForward()}h&&t.remove(h),p&&(t.remove(p),i=p.start.row,a=-r.start.length)}else a=r.start.length,i=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);d.start.row==i&&(d.start.column+=a),d.end.row==i&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},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){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<n.length;t++)!function(e){var o=n[t],r=e[o];e[n[t]]=function(){return this.$delegator(o,arguments,r)}}(this)},this.$delegator=function(e,t,n){var o=t[0];"string"!=typeof o&&(o=o[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var i=o.split(this.$embeds[r]);if(!i[0]&&i[1]){t[0]=i[1];var a=this.$modes[this.$embeds[r]];return a[e].apply(a,t)}}var s=n.apply(this,t);return n?s:void 0},this.transformAction=function(e,t,n,o,r){if(this.$behaviour){var i=this.$behaviour.getBehaviours();for(var a in i)if(i[a][t]){var s=i[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var r=t[o],i=0,a=r.length;i<a;i++)if("string"===typeof r[i].token)/keyword|support|storage/.test(r[i].token)&&n.push(r[i].regex);else if("object"===typeof r[i].token)for(var s=0,l=r[i].token.length;s<l;s++)if(/keyword|support|storage/.test(r[i].token[s])){var o=r[i].regex.match(/\(.+?\)/g)[s];n.push(o.substr(1,o.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,o){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,r=t.start.column,i=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=i.substring(0,r)+t.lines[0]+i.substring(r);else{var a=[o,1].concat(t.lines);e.splice.apply(e,a),e[o]=i.substring(0,r)+e[o],e[o+t.lines.length-1]+=i.substring(r)}break;case"remove":var s=t.end.column,l=t.end.row;o===l?e[o]=i.substring(0,r)+i.substring(s):e.splice(o,l-o+1,i.substring(0,r)+e[l].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,i=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}function t(t,n,o){var r="insert"==t.action,i=(r?1:-1)*(t.end.row-t.start.row),a=(r?1:-1)*(t.end.column-t.start.column),s=t.start,l=r?s:t.end;return e(n,s,o)?{row:n.row,column:n.column}:e(l,n,!o)?{row:n.row+i,column:n.column+(n.row==l.row?a:0)}:{row:s.row,column:s.column}}o.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(e){if((e.start.row!=e.end.row||e.start.row==this.row)&&!(e.start.row>this.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var r={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:r,value:o})}},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(i.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 o=e("./lib/oop"),r=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=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(){o.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(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 s(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),t[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),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},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 o=this.getLine(e);return void 0==t&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:e,column:t}},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){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<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),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},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 o=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:o,end:r,action:"remove",lines:this.getLinesForRange({start:o,end:r})},!0),this.clonePos(o)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,o=t<this.getLength()-1,r=n?e-1:e,i=n?this.getLine(r).length:0,s=o?t+1:t,l=o?0:this.getLine(s).length,u=new a(r,i,s,l),c=this.$lines.slice(e,t+1);return this.applyDelta({start:u.start,end:u.end,action:"remove",lines:this.getLinesForRange(u)}),c},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){if(e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);return 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]:!a.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,o=n.length,r=e.start.row,i=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>o){e.lines=l,e.start.row=r+a,e.start.column=i;break}l.push(""),this.applyDelta({start:this.pos(r+a,i),end:this.pos(r+s,i=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(),o=this.getNewLineCharacter().length,r=t||0,i=n.length;r<i;r++)if((e-=n[r].length+o)<0)return{row:r,column:e+n[r].length+o};return{row:i-1,column:n[i-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,r=0,i=Math.min(e.row,n.length),a=t||0;a<i;++a)r+=n[a].length+o;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 o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,i=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,o=-1,r=n.doc,i=t;n.lines[t];)t++;var a=r.getLength(),s=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),o=t;do{t++}while(n.lines[t]);if(++s%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,i<=o&&n.fireUpdateEvent(i,o)}}};(function(){o.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 o=Array(n+1);o.unshift(t,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}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],o=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==o.state+""?(this.states[e]=o.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=o.tokens}}).call(i.prototype),t.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var o=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),i=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,i){if(this.regExp)for(var a=i.firstRow,s=i.lastRow,l=a;l<=s;l++){var u=this.cache[l];null==u&&(u=o.getMatchOffsets(n.getLine(l),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new r(l,e.offset,l,e.offset+e.length)}),this.cache[l]=u.length?u:"");for(var c=u.length;c--;)t.drawSingleLineMarker(e,u[c].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(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)}var r=e("../range").Range;(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 o,r,i,a=0,s=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var u=0;u<s.length;u++){if(o=s[u],-1==(r=o.range.compareStart(t,n)))return void e(null,t,n,a,l);if(i=e(null,o.start.row,o.start.column,a,l),(i=!i&&e(o.placeholder,o.start.row,o.start.column,a))||0===r)return;l=!o.sameRow,a=o.end.column}e(null,t,n,a,l)},this.getNextFoldTo=function(e,t){for(var n,o,r=0;r<this.folds.length;r++){if(n=this.folds[r],-1==(o=n.range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===o)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var o,r,i=this.getNextFoldTo(e,t);if(i)if(o=i.fold,"inside"==i.kind&&o.start.column!=t&&o.start.row!=e)window.console&&window.console.log(e,t,o);else if(o.start.row==e){r=this.folds;var a=r.indexOf(o);for(0===a&&(this.start.column+=n),a;a<r.length;a++){if(o=r[a],o.start.column+=n,!o.sameRow)return;o.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 r=n.fold,i=this.folds,a=this.foldData,s=i.indexOf(r),l=i[s-1];this.end.row=l.end.row,this.end.column=l.end.column,i=i.splice(s,i.length-s);var u=new o(a,i);return a.splice(a.indexOf(this)+1,0,u),u},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var o=this.foldData;o.splice(o.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 o=this.folds[n];if((e-=o.start.column-t)<0)return{row:o.start.row,column:o.start.column+e};if((e-=o.placeholder.length)<0)return o.start;t=o.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(o.prototype),t.FoldLine=o}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("./range").Range,r=o.comparePoints,i=function(){this.ranges=[]};(function(){this.comparePoints=r,this.pointIndex=function(e,t,n){for(var o=this.ranges,i=n||0;i<o.length;i++){var a=o[i],s=r(e,a.end);if(!(s>0)){var l=r(e,a.start);return 0===s?t&&0!==l?-i-2:i:l>0||0===l&&!t?i:-i-1}}return-i-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var o=this.pointIndex(e.end,t,n);return o<0?o=-o-1:o++,this.ranges.splice(n,o-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(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n,o=t[0],i=1;i<t.length;i++){n=o,o=t[i];var a=r(n.end,o.start);a<0||(0!=a||n.isEmpty()||o.isEmpty())&&(r(n.end,o.end)<0&&(n.end.row=o.end.row,n.end.column=o.end.column),t.splice(i,1),e.push(o),o=n,i--)}return this.ranges=t,e},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 o=this.pointIndex({row:e,column:0});o<0&&(o=-o-1);var r=this.pointIndex({row:t,column:0},o);r<0&&(r=-r-1);for(var i=[],a=o;a<r;a++)i.push(n[a]);return i},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 var n=e.start,t=e.end;for(var o=t.row,r=n.row,i=r-o,a=-t.column+n.column,s=this.ranges,l=0,u=s.length;l<u;l++){var c=s[l];if(!(c.end.row<o)){if(c.start.row>o)break;if(c.start.row==o&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=a,c.start.row+=i)),c.end.row==o&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&a>0&&l<u-1&&c.end.column>c.start.column&&c.end.column==s[l+1].start.column&&(c.end.column-=a),c.end.column+=a,c.end.row+=i}}}if(0!=i&&l<u)for(;l<u;l++){var c=s[l];c.start.row+=i,c.end.row+=i}}}).call(i.prototype),t.RangeList=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function o(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function r(e,t){o(e.start,t),o(e.end,t)}function i(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function a(e,t){i(e.start,t),i(e.end,t)}var s=(e("../range").Range,e("../range_list").RangeList),l=e("../lib/oop"),u=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=[]};l.inherits(u,s),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 u(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);r(e,this.start);for(var t=e.start.row,n=e.start.column,o=0,i=-1;o<this.subFolds.length&&1==(i=this.subFolds[o].range.compare(t,n));o++);var a=this.subFolds[o];if(0==i)return a.addSubFold(e);for(var t=e.range.end.row,n=e.range.end.column,s=o,i=-1;s<this.subFolds.length&&1==(i=this.subFolds[s].range.compare(t,n));s++);this.subFolds[s];if(0==i)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(o,s-o,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return a(e,this.start)}}.call(u.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";function o(){this.getFoldAt=function(e,t,n){var o=this.getFoldLine(e);if(!o)return null;for(var r=o.folds,i=0;i<r.length;i++){var a=r[i];if(a.range.contains(e,t)){if(1==n&&a.range.isEnd(e,t))continue;if(-1==n&&a.range.isStart(e,t))continue;return a}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,o=this.$foldData,r=[];t.column+=1,n.column-=1;for(var i=0;i<o.length;i++){var a=o[i].range.compareRange(e);if(2!=a){if(-2==a)break;for(var s=o[i].folds,l=0;l<s.length;l++){var u=s[l];if(-2==(a=u.range.compareRange(e)))break;if(2!=a){if(42==a)break;r.push(u)}}}}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 var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var o=0;o<t[n].folds.length;o++)e.push(t[n].folds[o]);return e},this.getFoldStringAt=function(e,t,n,o){if(!(o=o||this.getFoldLine(e)))return null;for(var r,i,a={end:{column:0}},s=0;s<o.folds.length;s++){i=o.folds[s];var l=i.range.compareEnd(e,t);if(-1==l){r=this.getLine(i.start.row).substring(a.end.column,i.start.column);break}if(0===l)return null;a=i}return r||(r=this.getLine(i.start.row).substring(a.end.column)),-1==n?r.substring(0,t-a.end.column):1==n?r.substring(t-a.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0),o;o<n.length;o++){var r=n[o];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,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0),o;o<n.length;o++){var r=n[o];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,o=t-e+1,r=0;r<n.length;r++){var i=n[r],a=i.end.row,s=i.start.row;if(a>=t){s<t&&(s>=e?o-=t-s:o=0);break}a>=e&&(o-=s>=e?a-s:a-e+1)}return o},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,o=this.$foldData,r=!1;e instanceof a?n=e:(n=new a(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column;if(!(s<u||s==u&&l<=c-2))throw new Error("The range has to be at least 2 characters width");var d=this.getFoldAt(s,l,1),p=this.getFoldAt(u,c,-1);if(d&&p==d)return d.addSubFold(n);d&&!d.range.isStart(s,l)&&this.removeFold(d),p&&!p.range.isEnd(u,c)&&this.removeFold(p);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),h.forEach(function(e){n.addSubFold(e)}));for(var f=0;f<o.length;f++){var g=o[f];if(u==g.start.row){g.addFold(n),r=!0;break}if(s==g.end.row){if(g.addFold(n),r=!0,!n.sameRow){var m=o[f+1];if(m&&m.start.row==u){g.merge(m);break}}break}if(u<=g.start.row)break}return r||(g=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.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,o=t.end.row,r=this.$foldData,i=t.folds;if(1==i.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))i.pop(),t.end.row=i[i.length-1].end.row,t.end.column=i[i.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))i.shift(),t.start.row=i[0].start.row,t.start.column=i[0].start.column;else if(e.sameRow)i.splice(i.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);i=a.folds,i.shift(),a.start.row=i[0].start.row,a.start.column=i[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,o):this.$updateRowLengthCache(n,o)),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,o;if(null==e?(n=new r(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new r(e,0,e,this.getLine(e).length):"row"in e?r.fromPoints(e,e):e,o=this.getFoldsInRangeList(n),t)this.removeFolds(o);else for(var i=o;i.length;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(o.length)return o},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,o,r){null==o&&(o=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t<o)){if(t==o){if(n<r)return;s=Math.max(r,s)}a+=null!=e?e:i.getLine(t).substring(s,n)}},t,n),a},this.getDisplayLine=function(e,t,n,o){var r=this.getFoldLine(e);if(r)return this.getFoldDisplayLine(r,e,t,n,o);var i;return i=this.doc.getLine(e),i.substring(o||0,t||i.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 i(e,n)})},this.toggleFold=function(e){var t,n,o=this.selection,r=o.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var a=this.getFoldsInRange(r);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())return void this.expandFold(t);var s="...";if(!r.isMultiLine()){if(s=this.getTextRange(r),s.length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)},this.getCommentFoldRange=function(e,t,n){var o=new s(this,e,t),i=o.getCurrentToken();if(i&&/^comment|string/.test(i.type)){var a=new r,l=new RegExp(i.type.replace(/\..*/,"\\."));if(1!=n){do{i=o.stepBackward()}while(i&&l.test(i.type));o.stepForward()}if(a.start.row=o.getCurrentTokenRow(),a.start.column=o.getCurrentTokenColumn()+2,o=new s(this,e,t),-1!=n){do{i=o.stepForward()}while(i&&l.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return a.end.row=o.getCurrentTokenRow(),a.end.column=o.getCurrentTokenColumn()+i.value.length-2,a}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength(),e=e||0;for(var r=e;r<t;r++)if(null==o[r]&&(o[r]=this.getFoldWidget(r)),"start"==o[r]){var i=this.getFoldWidgetRange(r);if(i&&i.isMultiLine()&&i.end.row<=t&&i.start.row>=e){r=i.end.row;try{var a=this.addFold("...",i);a&&(a.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){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);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.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var o,r=e-1;r>=0;){var i=n[r];if(null==i&&(i=n[r]=this.getFoldWidget(r)),"start"==i){var a=this.getFoldWidgetRange(r);if(o||(o=a),a&&a.end.row>=e)break}r--}return{range:-1!==r&&a,firstRange:o}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),o=this.getLine(e),r="end"===n?-1:1,i=this.getFoldAt(e,-1===r?0:o.length,r);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(i=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,u=s.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=a?a.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var o=this.getParentFoldRangeData(t,!0);if(n=o.range||o.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 o=Array(n+1);o.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},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)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,a=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function o(){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 o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),o=!0,r=n.charAt(e.column-1),a=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(a||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},a=r&&r.match(/([\(\[\{])|([\)\]\}])/),o=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=i.fromPoints(e,s),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=i.fromPoints(s,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,u=s.value;;){for(;l>=0;){var c=u.charAt(l);if(c==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else c==e&&(i+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;u=s.value,l=u.length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var u=s.value,c=u.length;l<c;){var d=u.charAt(l);if(d==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(i+=1);l+=1}do{s=a.stepForward()}while(s&&!n.test(s.type));if(null==s)break;l=0}return null}}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=o}),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 o=e("./lib/oop"),r=e("./lib/lang"),i=e("./config"),a=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,c=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,h=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++h.$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 c(e)),this.setDocument(e),this.selection=new s(this),i.resetOptions(this),this.setMode(t),i._signal("session",this)};(function(){function e(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)}o.implement(this,a),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,o=e.length-1;n<=o;){var r=n+o>>1,i=e[r];if(t>i)n=r+1;else{if(!(t<i))return r;o=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,o=this.bgTokenizer.getTokens(e),r=0;if(null==t)i=o.length-1,r=this.getLine(e).length;else for(var i=0;i<o.length&&!((r+=o[i].value.length)>=t);i++);return(n=o[i])?(n.index=i,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.$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,o){var r=this.$markerId++,i={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!o,id:r};return o?(this.$frontMarkers[r]=i,this._signal("changeFrontMarker")):(this.$backMarkers[r]=i,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 p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,o){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",o),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),o=!1;if(t>0&&(o=!!n.charAt(t-1).match(this.tokenRe)),o||(o=!!n.charAt(t).match(this.tokenRe)),o)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var r=/\s/;else var r=this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(r));i++}for(var a=t;a<n.length&&n.charAt(a).match(r);)a++;return new u(e,i,e,a)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),o=this.getLine(n.end.row);o.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,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,i.loadModule(["mode",o],function(e){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),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 o=this.onReloadTokenizer.bind(this);n.addEventListener("update",o)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new d(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){i.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,o=0,r=0,i=this.$foldData[r],a=i?i.start.row:1/0,s=t.length,l=0;l<s;l++){if(l>a){if((l=i.end.row+1)>=s)break;i=this.$foldData[r++],a=i?i.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>o&&(o=n[l])}this.screenWidth=o}},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,o=e.length-1;-1!=o;o--){var r=e[o];"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,o=0;o<e.length;o++){var r=e[o];"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 o(e){return t?"insert"!==e.action:"insert"===e.action}var r,i,a=e[0];o(a)?r=u.fromPoints(a.start,a.end):r=u.fromPoints(a.start,a.start);for(var s=1;s<e.length;s++)a=e[s],o(a)?(i=a.start,-1==r.compare(i.row,i.column)&&r.setStart(i),i=a.end,1==r.compare(i.row,i.column)&&r.setEnd(i),!0):(i=a.start,-1==r.compare(i.row,i.column)&&(r=u.fromPoints(a.start,a.start)),!1);if(null!=n){0===u.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 o=this.getTextRange(e),r=this.getFoldsInRange(e),i=u.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row,s=a?-e.end.column:e.start.column-e.end.column;s&&(i.start.row==e.end.row&&i.start.column>e.end.column&&(i.start.column+=s),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=s)),a&&i.start.row>=e.end.row&&(i.start.row+=a,i.end.row+=a)}if(i.end=this.insert(i.start,o),r.length){var l=e.start,c=i.start,a=c.row-l.row,s=c.column-l.column;this.addFolds(r.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=s),e.end.row==l.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return i},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var o=e;o<=t;o++)this.doc.insertInLine({row:o,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),o=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var i=this.getLine(r);n.start.row=r,n.end.row=r;for(var a=0;a<o&&" "==i.charAt(a);++a);a<o&&"\t"==i.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){var o=this.getRowFoldStart(e+n);if(o<0)return 0;var r=o-e}else if(n>0){var o=this.getRowFoldEnd(t+n);if(o>this.doc.getLength()-1)return 0;var r=o-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var r=t-e+1}var i=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(i).map(function(e){return e=e.clone(),e.start.row+=r,e.end.row+=r,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},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 o=this.$constrainWrapLimit(e,n.min,n.max);return o!=this.$wrapLimit&&o>1&&(this.$wrapLimit=o,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,o=e.start,r=e.end,i=o.row,a=r.row,s=a-i,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,s);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=this.getFoldLine(r.row),d=0;if(c){c.addRemoveChars(r.row,r.column,o.column-r.column),c.shiftRow(-s);var p=this.getFoldLine(i);p&&p!==c&&(p.merge(c),c=p),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=r.row&&c.shiftRow(-s)}a=i}else{var h=Array(s);h.unshift(i,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,h);var u=this.$foldData,c=this.getFoldLine(i),d=0;if(c){var g=c.range.compareInside(o.row,o.column);0==g?(c=c.split(o.row,o.column))&&(c.shiftRow(s),c.addRemoveChars(a,0,r.column-o.column)):-1==g&&(c.addRemoveChars(i,0,r.column-o.column),c.shiftRow(s)),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=i&&c.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s);var c=this.getFoldLine(i);c&&c.addRemoveChars(i,o.column,s)}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(i,a):this.$updateRowLengthCache(i,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,o){var r,i,a=this.doc.getAllLines(),s=this.getTabSize(),l=this.$wrapData,u=this.$wrapLimit,c=e;for(o=Math.min(o,a.length-1);c<=o;)i=this.getFoldLine(c,i),i?(r=[],i.walk(function(e,o,i,s){var l;if(null!=e){l=this.$getDisplayTokens(e,r.length),l[0]=t;for(var u=1;u<l.length;u++)l[u]=n}else l=this.$getDisplayTokens(a[o].substring(s,i),r.length);r=r.concat(l)}.bind(this),i.end.row,a[i.end.row].length+1),l[i.start.row]=this.$computeWrapSplits(r,u,s),c=i.end.row+1):(r=this.$getDisplayTokens(a[c]),l[c]=this.$computeWrapSplits(r,u,s),c++)};var t=3,n=4,s=10,c=11,h=12;this.$computeWrapSplits=function(e,o,r){function i(){var t=0;if(0===m)return t;if(g)for(var n=0;n<e.length;n++){var o=e[n];if(o==s)t+=1;else{if(o!=c){if(o==h)continue;break}t+=r}}return f&&!1!==g&&(t+=r),Math.min(t,m)}function a(t){var n=e.slice(d,t),o=n.length;n.join("").replace(/12/g,function(){o-=1}).replace(/2/g,function(){o-=1}),l.length||(v=i(),l.indent=v),p+=o,l.push(p),d=t}if(0==e.length)return[];for(var l=[],u=e.length,d=0,p=0,f=this.$wrapAsCode,g=this.$indentedSoftWrap,m=o<=Math.max(2*r,8)||!1===g?0:Math.floor(o/2),v=0;u-d>o-v;){var y=d+o-v;if(e[y-1]>=s&&e[y]>=s)a(y);else if(e[y]!=t&&e[y]!=n){for(var C=Math.max(y-(o-(o>>2)),d-1);y>C&&e[y]<t;)y--;if(f){for(;y>C&&e[y]<t;)y--;for(;y>C&&9==e[y];)y--}else for(;y>C&&e[y]<s;)y--;y>C?a(++y):(y=d+o,2==e[y]&&y--,a(y-v))}else{for(y;y!=d-1&&e[y]!=t;y--);if(y>d){a(y);continue}for(y=d+o;y<e.length&&e[y]==n;y++);if(y==e.length)break;a(y)}}return l},this.$getDisplayTokens=function(t,n){var o,r=[];n=n||0;for(var i=0;i<t.length;i++){var a=t.charCodeAt(i);if(9==a){o=this.getScreenTabSize(r.length+n),r.push(c);for(var l=1;l<o;l++)r.push(h)}else 32==a?r.push(s):a>39&&a<48||a>57&&a<64?r.push(9):a>=4352&&e(a)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(t,n,o){if(0==n)return[0,0];null==n&&(n=1/0),o=o||0;var r,i;for(i=0;i<t.length&&(r=t.charCodeAt(i),9==r?o+=this.getScreenTabSize(o):r>=4352&&e(r)?o+=2:o+=1,!(o>n));i++);return[o,i]},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,o,r=0,i=0,a=0,s=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var a=l[u],r=this.$docRowCache[u],d=e>l[c-1];else var d=!c;for(var p=this.getLength()-1,h=this.getNextFoldLine(r),f=h?h.start.row:1/0;a<=e&&(s=this.getRowLength(r),!(a+s>e||r>=p));)a+=s,++r>f&&(r=h.end.row+1,h=this.getNextFoldLine(r,h),f=h?h.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(h&&h.start.row<=r)n=this.getFoldDisplayLine(h),r=h.start.row;else{if(a+s<=e||r>p)return{row:p,column:this.getLine(p).length};n=this.getLine(r),h=null}var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){var v=Math.floor(e-a);o=m[v],v>0&&m.length&&(g=m.indent,i=m[v-1]||m[m.length-1],n=n.substring(i))}}return i+=this.$getStringScreenWidth(n,t-g)[1],this.$useWrapMode&&i>=o&&(i=o-1),h?h.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var o=0,r=null,i=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var a,s=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var s=l[u],o=this.$screenRowCache[u],d=e>l[c-1];else var d=!c;for(var p=this.getNextFoldLine(s),h=p?p.start.row:1/0;s<e;){if(s>=h){if((a=p.end.row+1)>e)break;p=this.getNextFoldLine(a,p),h=p?p.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var f="";p&&s>=h?(f=this.getFoldDisplayLine(p,e,t),r=p.start.row):(f=this.getLine(e).substring(0,t),r=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;f.length>=m[v];)o++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return{row:o,column:g+this.$getStringScreenWidth(f)[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,o=0,r=0,t=this.$foldData[r++],i=t?t.start.row:1/0;o<n;){var a=this.$wrapData[o];e+=a?a.length+1:1,o++,o>i&&(o=t.end.row+1,t=this.$foldData[r++],i=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,r=0;r<s.length;r++)t=s[r],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,o){if(0===n)return[0,0];n||(n=1/0),o=o||0;var r,i;for(i=0;i<t.length&&(r=t.charAt(i),!((o+="\t"===r?this.getScreenTabSize(o):e.getCharacterWidth(r))>n));i++);return[o,i]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(h.prototype),e("./edit_session/folding").Folding.call(h.prototype),e("./edit_session/bracket_match").BracketMatch.call(h.prototype),i.defineOptions(h.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},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=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function o(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}var r=e("./lib/lang"),i=e("./lib/oop"),a=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.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 o=null;return n.forEach(function(e,n,r){if(e.start)o=e;else{var i=e.offset+(r||0);if(o=new a(n,i,n,i+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&o.isEqual(t.start))return o=null,!1}return!0}),o},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),i=[],s=t.re;if(t.$isMultiLine){var l,u=s.length,c=o.length-u;e:for(var d=s.offset||0;d<=c;d++){for(var p=0;p<u;p++)if(-1==o[d+p].search(s[p]))continue e;var h=o[d],f=o[d+u-1],g=h.length-h.match(s[0])[0].length,m=f.match(s[u-1])[0].length;l&&l.end.row===d&&l.end.column>g||(i.push(l=new a(d,g,d+u-1,m)),u>2&&(d=d+u-2))}}else for(var v=0;v<o.length;v++)for(var y=r.getMatchOffsets(o[v],s),p=0;p<y.length;p++){var C=y[p];i.push(new a(v,C.offset,v,C.offset+C.length))}if(n){for(var b=n.start.column,w=n.start.column,v=0,p=i.length-1;v<p&&i[v].start.column<b&&i[v].start.row==n.start.row;)v++;for(;v<p&&i[p].end.column>w&&i[p].end.row==n.end.row;)p--;for(i=i.slice(v,p+1),v=0,p=i.length;v<p;v++)i[v].start.row+=n.start.row,i[v].end.row+=n.start.row}return i},this.replace=function(e,t){var n=this.$options,o=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(o){var r=o.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(o,t),n.preserveCase){t=t.split("");for(var i=Math.min(e.length,e.length);i--;){var a=e[i];a&&a.toLowerCase()!=a?t[i]=t[i].toUpperCase():t[i]=t[i].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var o;if(t.$isMultiLine)var i=n.length,s=function(t,r,s){var l=t.search(n[0]);if(-1!=l){for(var u=1;u<i;u++)if(t=e.getLine(r+u),-1==t.search(n[u]))return;var c=t.match(n[i-1])[0].length,d=new a(r,l,r+i-1,c);return 1==n.offset?(d.start.row--,d.start.column=Number.MAX_VALUE):s&&(d.start.column+=s),!!o(d)||void 0}};else if(t.backwards)var s=function(e,t,i){for(var a=r.getMatchOffsets(e,n),s=a.length-1;s>=0;s--)if(o(a[s],t,i))return!0};else var s=function(e,t,i){for(var a=r.getMatchOffsets(e,n),s=0;s<a.length;s++)if(o(a[s],t,i))return!0};var l=this.$lineIterator(e,t);return{forEach:function(e){o=e,l.forEach(s)}}},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=r.escapeRegExp(n)),e.wholeWord&&(n=o(n,e));var i=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var a=new RegExp(n,i)}catch(e){a=!1}return e.re=a},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),o=[],r=0;r<n.length;r++)try{o.push(new RegExp(n[r],t))}catch(e){return!1}return""==n[0]?(o.shift(),o.offset=1):o.offset=0,o},this.$lineIterator=function(e,t){var n=1==t.backwards,o=0!=t.skipCurrent,r=t.range,i=t.start;i||(i=r?r[n?"end":"start"]:e.selection.getRange()),i.start&&(i=i[o!=n?"end":"start"]);var a=r?r.start.row:0,s=r?r.end.row:e.getLength()-1;return{forEach:n?function(n){var o=i.row;if(!n(e.getLine(o).substring(0,i.column),o)){for(o--;o>=a;o--)if(n(e.getLine(o),o))return;if(0!=t.wrap)for(o=s,a=i.row;o>=a;o--)if(n(e.getLine(o),o))return}}:function(n){var o=i.row;if(!n(e.getLine(o).substr(i.column),o,i.column)){for(o+=1;o<=s;o++)if(n(e.getLine(o),o))return;if(0!=t.wrap)for(o=a,s=i.row;o<=s;o++)if(n(e.getLine(o),o))return}}}}}).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";function o(e,t){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){o.call(this,e,t),this.$singleCommand=!1}var i=e("../lib/keys"),a=e("../lib/useragent"),s=i.KEY_MODS;r.prototype=o.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||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 o=this.commandKeyBinding;for(var r in o){var i=o[r];if(i==e)delete o[r];else if(Array.isArray(i)){var a=i.indexOf(e);-1!=a&&(i.splice(a,1),1==i.length&&(o[r]=i[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 o="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;o+=(o?" ":"")+n,this._addCommandToBinding(o,"chainKeys")},this),o+=" "}var i=this.parseKeys(e),a=s[i.hashId]+i.key;this._addCommandToBinding(o+a,t,n)},this)},this._addCommandToBinding=function(t,n,o){var r,i=this.commandKeyBinding;if(n)if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?-1!=(r=i[t].indexOf(n))&&i[t].splice(r,1):i[t]=[i[t]],"number"!=typeof o&&(o=o||n.isDefault?-100:e(n));var a=i[t];for(r=0;r<a.length;r++){var s=a[r],l=e(s);if(l>o)break}a.splice(r,0,n)}else delete i[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(),o=i[n];if(i.FUNCTION_KEYS[o])n=i.FUNCTION_KEYS[o].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 r=0,a=t.length;a--;){var s=i.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;r|=s}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,o){if(!(o<0)){var r=s[t]+n,i=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,i=this.commandKeyBinding[e.$keyChain]||i),!i||"chainKeys"!=i&&"chainKeys"!=i[i.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||o>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:i}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(o.prototype),t.HashHandler=o,t.MultiHashHandler=r}),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 o=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,a=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||{})})};o.inherits(a,r),function(){o.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var o=e.length;o--;)if(this.exec(e[o],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;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(a.prototype),t.CommandManager=a}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),a=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:o("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:o("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:o("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:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.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:o("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:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:o("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:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:o("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:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:o("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:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:o("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:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:o("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:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:o("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:o("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:o(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:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:o("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:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:o("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:o("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(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:o("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:o("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:o(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),i=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),l=s.replace(/\n\s*/," ").length,u=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),u+=d}o.row+1<e.session.doc.getLength()-1&&(u+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new a(n.row,0,o.row+2,0),u),l>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(i=e.session.doc.getLine(n.row).length>i?i+1:i,e.selection.moveCursorTo(n.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,o=e.selection.rangeList.ranges,r=[];o.length<1&&(o=[e.selection.getRange()]);for(var i=0;i<o.length;i++)i==o.length-1&&(o[i].end.row===t&&o[i].end.column===n||r.push(new a(o[i].end.row,o[i].end.column,t,n))),0===i?0===o[i].start.row&&0===o[i].start.column||r.push(new a(0,0,o[i].start.row,o[i].start.column)):r.push(new a(o[i-1].end.row,o[i-1].end.column,o[i].start.row,o[i].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var i=0;i<r.length;i++)e.selection.addRange(r[i],!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 o=e("./lib/oop"),r=e("./lib/dom"),i=e("./lib/lang"),a=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,h=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,C=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new g(a.isMac?"mac":"win",m),this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new c(this),this.$mouseHandler=new l(this),new u(this),this.$blockScrolling=0,this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=i.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 d("")),v.resetOptions(this),v._signal("editor",this)};(function(){o.implement(this,f),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=i.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 o=this.selection.getRange(),r=this.renderer.layerConfig;(o.start.row>=r.lastRow||o.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,o=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),o=o&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else o=o&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(o=!1),o?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;v.loadModule(["keybinding",e],function(o){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(o&&o.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})}},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 o=new h(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var o=t.$mode.getMatching(e.session);o&&(t.$bracketHighlight=t.addMarker(o,"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(),o=new y(e.session,n.row,n.column),r=o.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=o.stepForward())){var i=r.value,a=0,s=o.stepBackward();if("<"==s.value)do{s=r,(r=o.stepForward())&&r.value===i&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--)}while(r&&a>=0);else{do{r=s,s=o.stepBackward(),r&&r.value===i&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--)}while(s&&a<=0);o.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=o.getCurrentTokenRow(),u=o.getCurrentTokenColumn(),c=new h(l,u,l,u+r.value.length),d=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&void 0!=d&&0!==c.compareRange(d.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),c&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(c,"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||(v.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 h(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(),o=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",o)}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,o=t.end.column+1,r=e.getLine(t.start.row),i=r.length,a=r.substring(Math.max(n,0),Math.min(o,i));if(!(n>=0&&/^[\w\d]/.test(a)||o<=i&&/[\w\d]$/.test(a))&&(a=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))){return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}}},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/),o=this.selection.rangeList.ranges;if(n.length>o.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var r=o.length;r--;){var i=o[r];i.isEmpty()||this.session.remove(i),this.session.insert(i.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,o=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var i=o.transformAction(n.getState(r.row),"insertion",this,n,e);i&&(e!==i.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=i.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var a=new h.fromPoints(r,r);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();r=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(r.row);if(r.column>s.search(/\S|$/)){var l=s.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var u=r.column,c=n.getState(r.row),s=n.getLine(r.row),d=o.checkOutdent(c,s,e);n.insert(r,e);if(i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new h(r.row,u+i.selection[0],r.row,u+i.selection[1])):this.selection.setSelectionRange(new h(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3]))),n.getDocument().isNewLine(e)){var p=o.getNextLineIndent(c,s.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},p)}d&&o.autoOutdent(c,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,o=n.getState(t.start.row),r=n.getMode().transformAction(o,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.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,o,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),o=new h(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),o=new h(e.row,t-2,e.row,t)),this.session.replace(o,n)}}},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){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last,"\t")}if(t.start.column<t.end.column){if(!/^\s+$/.test(e.getTextRange(t))){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last,"\t")}}var o=e.getLine(t.start.row),r=t.start,a=e.getTabSize(),s=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=a-s%a,u=i.stringRepeat(" ",l);else{for(var l=s%a;" "==o[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),u="\t"}return this.insert(u)},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 o=new h(0,0,0,0),r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,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 o=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(o);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,o=new h(t,n-1,t,n),r=this.session.getTextRange(o);if(!isNaN(parseFloat(r))&&isFinite(r)){var i=this.getNumberAt(t,n);if(i){var a=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,s=i.start+i.value.length-a,l=parseFloat(i.value);l*=Math.pow(10,s),a!==i.end&&n<a?e*=Math.pow(10,i.end-n-1):e*=Math.pow(10,i.end-n),l+=e,l/=Math.pow(10,s);var u=l.toFixed(s),c=new h(t,i.start,t,i.end);this.session.replace(c,u),this.moveCursorTo(t,Math.max(i.start+1,n+u.length-i.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(),o=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var i=o?n.start:n.end,a=t.insert(i,t.getTextRange(n),!1);n.start=i,n.end=a,e.setSelectionRange(n,o)}},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,o,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var i=r.toOrientedRange();n=this.$getSelectedRows(i),o=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(o=0),i.moveBy(o,0),r.fromOrientedRange(i)}else{var a=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,u=a.length,c=0;c<u;c++){var d=c;a[c].moveBy(s,0),n=this.$getSelectedRows(a[c]);for(var p=n.first,h=n.last;++c<u;){l&&a[c].moveBy(l,0);var f=this.$getSelectedRows(a[c]);if(t&&f.first!=h)break;if(!t&&f.first>h+1)break;h=f.last}for(c--,s=this.session.$moveLines(p,h,t?0:e),t&&-1==e&&(d=c+1);d<=c;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}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,o=this.renderer.layerConfig,r=e*Math.floor(o.height/o.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 i=n.scrollTop;n.scrollBy(0,r*o.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},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,o){this.renderer.scrollToLine(e,t,n,o)},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(),o=new y(this.session,n.row,n.column),r=o.getCurrentToken(),i=r||o.stepForward();if(i){var a,s,l=!1,u={},c=n.column-i.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;c<i.value.length&&!l;c++)if(d[i.value[c]])switch(s=d[i.value[c]]+"."+i.type.replace("rparen","lparen"),isNaN(u[s])&&(u[s]=0),i.value[c]){case"(":case"[":case"{":u[s]++;break;case")":case"]":case"}":u[s]--,-1===u[s]&&(a="bracket",l=!0)}}else i&&-1!==i.type.indexOf("tag-name")&&(isNaN(u[i.value])&&(u[i.value]=0),"<"===r.value?u[i.value]++:"</"===r.value&&u[i.value]--,-1===u[i.value]&&(a="tag",l=!0));l||(r=i,i=o.stepForward(),c=0)}while(i&&!l);if(a){var p,f;if("bracket"===a)(p=this.session.getBracketRange(n))||(p=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn()+c-1,o.getCurrentTokenRow(),o.getCurrentTokenColumn()+c-1),f=p.start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(p=this.session.getBracketRange(f)));else if("tag"===a){if(!i||-1===i.type.indexOf("tag-name"))return;var g=i.value;if(p=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2,o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2),0===p.compare(n.row,n.column)){l=!1;do{i=r,(r=o.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&p.setEnd(o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1),i.value===g&&-1!==i.type.indexOf("tag-name")&&("<"===r.value?u[g]++:"</"===r.value&&u[g]--,0===u[g]&&(l=!0)))}while(r&&!l)}i&&i.type.indexOf("tag-name")&&(f=p.start,f.row==n.row&&Math.abs(f.column-n.column)<2&&(f=p.end))}f=p&&p.cursor||f,f&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment