Files
anonymous_github/public/script/vendor.min.js
T
2026-05-07 14:58:36 +03:00

1 line
820 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function markedMermaid(e){return{extensions:[{name:"mermaid",level:"block",start(e){return e.match(/^```mermaid/m)?.index},tokenizer(e,t){e=/^```mermaid\n([\s\S]*?)\n```/.exec(e);if(e)return{type:"mermaid",raw:e[0],text:e[1].trim()}},renderer(e){const t="mermaid-"+Math.random().toString(36).substr(2,9);e=`<div class="mermaid" id="${t}">${e.text}</div>`;return"undefined"==typeof mermaid&&"function"==typeof window.loadMermaid&&window.loadMermaid(),setTimeout(()=>{if("undefined"!=typeof mermaid){window.mermaidInitialized||(mermaid.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose"}),window.mermaidInitialized=!0);try{var e=document.getElementById(t);e&&!e.getAttribute("data-processed")&&(mermaid.init(void 0,e),e.setAttribute("data-processed","true"))}catch(e){console.error("Mermaid rendering error:",e)}}},100),e}}]}}"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),function(){function r(e,t){return new n(this.slice(e,t))}function s(e,t){arguments.length<2&&(t=0);for(var n=0,i=e.length;n<i;++n,++t)this[t]=255&e[n]}function n(e){if("number"==typeof e)for(var t=[],n=0;n<e;++n)t[n]=0;else if("slice"in e)t=e.slice(0);else{t=[];for(var n=0,i=e.length;n<i;++n)t[n]=e[n]}return t.subarray=r,(t.buffer=t).byteLength=t.length,t.set=s,"object"==typeof e&&e.buffer&&(t.buffer=e.buffer),t}"undefined"!=typeof Uint8Array?(void 0===Uint8Array.prototype.subarray&&(Uint8Array.prototype.subarray=function(e,t){return new Uint8Array(this.slice(e,t))},Float32Array.prototype.subarray=function(e,t){return new Float32Array(this.slice(e,t))}),"undefined"==typeof Float64Array&&(window.Float64Array=Float32Array)):(window.Uint8Array=n,window.Uint32Array=n,window.Int32Array=n,window.Uint16Array=n,window.Float32Array=n,window.Float64Array=n)}(),window.URL||(window.URL=window.webkitURL),void 0===Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),function(){if(void 0!==Object.defineProperty){var t=!0;try{Object.defineProperty(new Image,"id",{value:"test"});function e(){}e.prototype={get id(){}},Object.defineProperty(new e,"id",{value:"",configurable:!0,enumerable:!0,writable:!1})}catch(e){t=!1}if(t)return}Object.defineProperty=function(e,t,n){delete e[t],"get"in n&&e.__defineGetter__(t,n.get),"set"in n&&e.__defineSetter__(t,n.set),"value"in n&&(e.__defineSetter__(t,function(e){return this.__defineGetter__(t,function(){return e}),e}),e[t]=n.value)}}(),void 0===Object.keys&&(Object.keys=function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push(t);return n}),function(){var e;"undefined"==typeof FileReader||"readAsArrayBuffer"in(e=FileReader.prototype)||Object.defineProperty(e,"readAsArrayBuffer",{value:function(e){var t=new FileReader,s=this;t.onload=function(e){e=e.target.result;for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);Object.defineProperty(s,"result",{value:t,enumerable:!0,writable:!1,configurable:!0}),(e=document.createEvent("HTMLEvents")).initEvent("load",!1,!1),s.dispatchEvent(e)},t.readAsBinaryString(e)}})}(),function(){var e=XMLHttpRequest.prototype;"overrideMimeType"in e||Object.defineProperty(e,"overrideMimeType",{value:function(){}}),"response"in e||"mozResponseArrayBuffer"in e||"mozResponse"in e||"responseArrayBuffer"in e||("undefined"!=typeof VBArray?Object.defineProperty(e,"response",{get:function(){return new Uint8Array(new VBArray(this.responseBody).toArray())}}):("function"==typeof e.overrideMimeType&&Object.defineProperty(e,"responseType",{set:function(){this.overrideMimeType("text/plain; charset=x-user-defined")}}),Object.defineProperty(e,"response",{get:function(){for(var e=this.responseText,t=e.length,n=new Uint8Array(t),i=0;i<t;++i)n[i]=255&e.charCodeAt(i);return n}})))}(),"btoa"in window||(window.btoa=function(e){for(var t="",n=0,i=e.length;n<i;n+=3)var r=255&e.charCodeAt(n),s=255&e.charCodeAt(n+1),o=255&e.charCodeAt(n+2),a=(3&r)<<4|s>>4,s=n+1<i?(15&s)<<2|o>>6:64,o=n+2<i?63&o:64,t=t+("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(r>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(s)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(o));return t}),"atob"in window||(window.atob=function(e){if(1==(e=e.replace(/=+$/,"")).length%4)throw Error("bad atob input");for(var t,n,i=0,r=0,s="";n=e.charAt(r++);~n&&(t=i%4?64*t+n:n,i++%4)&&(s+=String.fromCharCode(255&t>>(-2*i&6))))n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return s}),void 0===Function.prototype.bind&&(Function.prototype.bind=function(t){var n=this,i=Array.prototype.slice.call(arguments,1);return function(){var e=Array.prototype.concat.apply(i,arguments);return n.apply(t,e)}}),"dataset"in document.createElement("div")||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;for(var e={},t=0,n=this.attributes.length;t<n;t++){var i=this.attributes[t];"data-"==i.name.substring(0,5)&&(e[i.name.substring(5).replace(/\-([a-z])/g,function(e,t){return t.toUpperCase()})]=i.value)}return Object.defineProperty(this,"_dataset",{value:e,writable:!1,enumerable:!1}),e},enumerable:!0}),function(){function t(e,t,n,i){var r=(e.className||"").split(/\s+/g),s=(""===r[0]&&r.shift(),r.indexOf(t));s<0&&n&&r.push(t),0<=s&&i&&r.splice(s,1),e.className=r.join(" ")}var n;"classList"in document.createElement("div")||(n={add:function(e){t(this.element,e,!0,!1)},remove:function(e){t(this.element,e,!1,!0)},toggle:function(e){t(this.element,e,!0,!0)}},Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){var e;return this._classList||(e=Object.create(n,{element:{value:this,writable:!1,enumerable:!0}}),Object.defineProperty(this,"_classList",{value:e,writable:!1,enumerable:!1}),e)},enumerable:!0}))}(),function(){var t,n,i;"console"in window?"bind"in console.log||(t=console.log,console.log=function(e){return t(e)},n=console.error,console.error=function(e){return n(e)},i=console.warn,console.warn=function(e){return i(e)}):window.console={log:function(){},error:function(){},warn:function(){}}}(),-1!=navigator.userAgent.indexOf("Opera")&&document.addEventListener("click",function(e){!function e(t){return t.disabled||t.parentNode&&e(t.parentNode)}(e.target)||e.stopPropagation()},!0),"language"in navigator||Object.defineProperty(navigator,"language",{get:function(){var e=navigator.userLanguage||"en-US";return e.substring(0,2).toLowerCase()+e.substring(2).toUpperCase()},enumerable:!0}),0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")&&(PDFJS.disableRange=!0),window.history.pushState||(PDFJS.disableHistory=!0),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="0.8.505",PDFJS.build="da1c944",function(){function m(e){N<=H&&(p("Info: "+e),PDFJS.LogManager.notify("info",e))}function g(e){B<=H&&(p("Warning: "+e),PDFJS.LogManager.notify("warn",e))}function A(e){1<arguments.length?((n=["Error:"]).push.apply(n,arguments),p.apply(null,n),e=[].join.call(arguments," ")):p("Error: "+e);var t,n=p;try{throw Error()}catch(e){t=e.stack?e.stack.split("\n").slice(2).join("\n"):""}throw n(t),PDFJS.LogManager.notify("error",e),Error(e)}function v(e){g("TODO: "+e)}function r(e,t){if(!e)return!1;var n=e.indexOf(":");if(n<0)return t;switch(e.substr(0,n)){case"http":case"https":case"ftp":case"mailto":return!0;default:return!1}}function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}function c(e){var t,n=e.length,i="";if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<n;t+=2)i+=String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1));else for(t=0;t<n;++t)var r=V[e.charCodeAt(t)],i=i+(r?String.fromCharCode(r):e.charAt(t));return i}function o(e){return"boolean"==typeof e}function h(e){return e instanceof Name}function s(e,t){return e instanceof Dict&&(!t||h(e=e.get("Type"))&&e.name==t)}function f(e){return e instanceof Array}function a(e){return"object"==typeof e&&null!=e&&"getBytes"in e}function F(e){if("object"==typeof e){if(!s(e)){if(!a(e))return;e=e.dict}return e.has("FunctionType")}}function l(e,i){this.name=e,this.comObj=i,this.callbackIndex=1;var r=this.callbacks={},s=this.actionHandler={console_log:[function(e){p.apply(null,e)}]};s.console_error="console"in w?[function(e){w.console.error.apply(null,e)}]:[function(e){p.apply(null,e)}],s._warn=[function(e){g(e)}],i.onmessage=function(e){var t,n=e.data;n.isReply?(e=n.callbackId,n.callbackId in r?(t=r[e],delete r[e],t(n.data)):A("Cannot resolve callback "+e)):n.action in s?(e=s[n.action],n.callbackId?((t=new b).then(function(e){i.postMessage({isReply:!0,callbackId:n.callbackId,data:e})}),e[0].call(e[1],n.data,t)):e[0].call(e[1],n.data)):A("Unkown action from worker: "+n.action)}}function P(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n}function z(a){a.mozCurrentTransform||(a._scaleX=a._scaleX||1,a._scaleY=a._scaleY||1,a._originalSave=a.save,a._originalRestore=a.restore,a._originalRotate=a.rotate,a._originalScale=a.scale,a._originalTranslate=a.translate,a._originalTransform=a.transform,a._originalSetTransform=a.setTransform,a._transformMatrix=[a._scaleX,0,0,a._scaleY,0,0],a._transformStack=[],Object.defineProperty(a,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(a,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],n=e[1],i=e[2],r=e[3],s=e[4],o=t*r-n*i,a=n*i-t*r;return[r/o,n/a,i/a,t/o,(r*s-i*(e=e[5]))/a,(n*s-t*e)/o]}}),a.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},a.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},a.translate=function(e,t){var n=this._transformMatrix;n[4]=n[0]*e+n[2]*t+n[4],n[5]=n[1]*e+n[3]*t+n[5],this._originalTranslate(e,t)},a.scale=function(e,t){var n=this._transformMatrix;n[0]*=e,n[1]*=e,n[2]*=t,n[3]*=t,this._originalScale(e,t)},a.transform=function(e,t,n,i,r,s){var o=this._transformMatrix;this._transformMatrix=[o[0]*e+o[2]*t,o[1]*e+o[3]*t,o[0]*n+o[2]*i,o[1]*n+o[3]*i,o[0]*r+o[2]*s+o[4],o[1]*r+o[3]*s+o[5]],a._originalTransform(e,t,n,i,r,s)},a.setTransform=function(e,t,n,i,r,s){this._transformMatrix=[e,t,n,i,r,s],a._originalSetTransform(e,t,n,i,r,s)},a.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),i=this._transformMatrix;this._transformMatrix=[i[0]*t+i[2]*n,i[1]*t+i[3]*n,i[0]*-n+i[2]*t,i[1]*-n+i[3]*t,i[4],i[5]],this._originalRotate(e)})}function t(e){this.message=e}function u(){}function i(e,t,n,i,r,s){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=i,this.offsetY=r;var o,a,l,c=(e[2]+e[0])/2,h=(e[3]+e[1])/2;switch((n%=360)<0?n+360:n){case 180:n=-1,a=o=0,l=1;break;case 90:a=o=1,l=n=0;break;case 270:a=o=-1,l=n=0;break;default:a=o=0,l=-(n=1)}s&&(a=-a,l=-l),e=0===n?(i=Math.abs(h-e[1])*t+i,r=Math.abs(c-e[0])*t+r,s=Math.abs(e[3]-e[1])*t,Math.abs(e[2]-e[0])*t):(i=Math.abs(c-e[0])*t+i,r=Math.abs(h-e[1])*t+r,s=Math.abs(e[2]-e[0])*t,Math.abs(e[3]-e[1])*t),this.transform=[n*t,o*t,a*t,l*t,i-n*t*c-a*t*h,r-o*t*c-l*t*h],this.width=s,this.height=e,this.fontScale=t}function d(){this._status=G,this._handlers=[]}var p,w="undefined"==typeof window?this:window,y="undefined"==typeof window,B=1,N=5,H=B,R=[.001,0,0,.001,0,0],W=(w.PDFJS||(w.PDFJS={}),w.PDFJS.pdfBug=!1,p="console"in w&&"log"in w.console?w.console.log.bind(w.console):function(){},PDFJS.isValidUrl=r,[]),q=(PDFJS.LogManager={addLogger:function(e){W.push(e)},notify:function(e,t){for(var n=0,i=W.length;n<i;n++){var r=W[n];r[e]&&r[e](t)}}},PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2}),U=((t.prototype=Error()).name="NotImplementedException",t.constructor=t,[1,0,0,1,0,0]),n=PDFJS,M=(u.makeCssRgb=function(e){return"rgb("+e[0]+","+e[1]+","+e[2]+")"},u.makeCssCmyk=function(e){return e=S.singletons.cmyk.getRgb(e,0),u.makeCssRgb(e)},u.transform=function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]},u.applyTransform=function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},u.applyInverseTransform=function(e,t){var n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]},u.getAxialAlignedBoundingBox=function(e,t){var n=u.applyTransform(e,t),i=u.applyTransform(e.slice(2,4),t),r=u.applyTransform([e[0],e[3]],t),e=u.applyTransform([e[2],e[1]],t);return[Math.min(n[0],i[0],r[0],e[0]),Math.min(n[1],i[1],r[1],e[1]),Math.max(n[0],i[0],r[0],e[0]),Math.max(n[1],i[1],r[1],e[1])]},u.inverseTransform=function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]},u.apply3dTransform=function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]},u.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],i=e[2]*t[1]+e[3]*t[3],r=(n+i)/2,t=r-(e=Math.sqrt((n+i)*(n+i)-4*(n*i-(e[2]*t[0]+e[3]*t[2])*(e[0]*t[1]+e[1]*t[3])))/2)||1;return[Math.sqrt(r+e||1),Math.sqrt(t)]},u.normalizeRect=function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},u.intersect=function(e,t){function n(e,t){return e-t}var i=[e[0],e[2],t[0],t[2]].sort(n),r=[e[1],e[3],t[1],t[3]].sort(n),s=[];return e=u.normalizeRect(e),t=u.normalizeRect(t),(i[0]===e[0]&&i[1]===t[0]||i[0]===t[0]&&i[1]===e[0])&&(s[0]=i[1],s[2]=i[2],r[0]===e[1]&&r[1]===t[1]||r[0]===t[1]&&r[1]===e[1])&&(s[1]=r[1],s[3]=r[2],s)},u.sign=function(e){return e<0?-1:1},u.concatenateToArray=function(e,t){Array.prototype.push.apply(e,t)},u.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)},u.extendObj=function(e,t){for(var n in t)e[n]=t[n]},u.getInheritableProperty=function(e,t){for(;e&&!e.has(t);)e=e.get("Parent");return e?e.get(t):null},u.inherit=function(e,t,n){for(var i in e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n)e.prototype[i]=n[i]},u.loadScript=function(e,t){var n=document.createElement("script"),i=!1;n.setAttribute("src",e),t&&(n.onload=function(){i||t(),i=!0}),document.getElementsByTagName("head")[0].appendChild(n)},n.Util=u),n=PDFJS,V=(i.prototype={clone:function(e){var t=("scale"in(e=e||{})?e:this).scale,n=("rotation"in e?e:this).rotation;return new i(this.viewBox.slice(),t,n,this.offsetX,this.offsetY,e.dontFlip)},convertToViewportPoint:function(e,t){return M.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=M.applyTransform([e[0],e[1]],this.transform);return e=M.applyTransform([e[2],e[3]],this.transform),[t[0],t[1],e[0],e[1]]},convertToPdfPoint:function(e,t){return M.applyInverseTransform([e,t],this.transform)}},n.PageViewport=i,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]),n=PDFJS,G=0,j={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(e){e._status!=G&&(this.handlers=this.handlers.concat(e._handlers),e._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(;0<this.handlers.length;){var e=this.handlers.shift(),t=e.thisPromise._status,n=e.thisPromise._value;try{1===t?"function"==typeof e.onResolve&&(n=e.onResolve(n)):"function"==typeof e.onReject&&(n=e.onReject(n),t=1,e.thisPromise._unhandledRejection)&&this.removeUnhandeledRejection(e.thisPromise)}catch(e){t=2,n=e}e.nextPromise._updateStatus(t,n)}this.running=!1},addUnhandledRejection:function(e){this.unhandledRejections.push({promise:e,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(e){e._unhandledRejection=!1;for(var t=0;t<this.unhandledRejections.length;t++)this.unhandledRejections[t].promise===e&&(this.unhandledRejections.splice(t),t--)},scheduleRejectionCheck:function(){this.pendingRejectionCheck||(this.pendingRejectionCheck=!0,setTimeout(function(){this.pendingRejectionCheck=!1;for(var e,t,n=Date.now(),i=0;i<this.unhandledRejections.length;i++)500<n-this.unhandledRejections[i].time&&(t="Unhandled rejection: "+(e=this.unhandledRejections[i].promise._value),e.stack&&(t+="\n"+e.stack),g(t),this.unhandledRejections.splice(i),i--);this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),500))}},b=(d.all=function(e){function t(e){2!==n._status&&(r=[],n.reject(e))}var n=new d,i=e.length,r=[];if(0===i)n.resolve(r);else for(var s=0,o=e.length;s<o;++s)e[s].then(function(t){return function(e){2!==n._status&&(r[t]=e,0===--i)&&n.resolve(r)}}(s),t);return n},d.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(e,t){1!==this._status&&2!==this._status&&(1==e&&t&&"function"==typeof t.then?t.then(this._updateStatus.bind(this,1),this._updateStatus.bind(this,2)):(this._status=e,this._value=t,2===e&&0===this._handlers.length&&(this._unhandledRejection=!0,j.addUnhandledRejection(this)),j.scheduleHandlers(this)))},get isResolved(){return 1===this._status},get isRejected(){return 2===this._status},resolve:function(e){this._updateStatus(1,e)},reject:function(e){this._updateStatus(2,e)},then:function(e,t){var n=new d;return this._handlers.push({thisPromise:this,onResolve:e,onReject:t,nextPromise:n}),j.scheduleHandlers(this),n}},n.Promise=d),K=function(){this.started={},this.times=[],this.enabled=!0};K.prototype={time:function(e){this.enabled&&(e in this.started&&g("Timer is already running for "+e),this.started[e]=Date.now())},timeEnd:function(e){this.enabled&&(e in this.started||g("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e])},toString:function(){for(var e=this.times,t="",n=0,i=0,r=e.length;i<r;++i)(s=e[i].name).length>n&&(n=s.length);for(i=0,r=e.length;i<r;++i){for(var s=(o=e[i]).end-o.start,o=o.name;o.length<n;)o+=" ";t+=o+" "+s+"ms\n"}return t}},PDFJS.createBlob=function(e,t){var n;return"function"==typeof Blob?new Blob([e],{type:t}):((n=new MozBlobBuilder).append(e),n.getBlob(t))},l.prototype={on:function(e,t,n){var i=this.actionHandler;i[e]&&A('There is already an actionName called "'+e+'"'),i[e]=[t,n]},send:function(e,t,n){e={action:e,data:t},n&&(t=this.callbackIndex++,this.callbacks[t]=n,e.callbackId=t),this.comObj.postMessage(e)}};function x(){A("should not call ColorSpace constructor")}function Y(e,t,n){this.name="Alternate",this.numComps=e,this.defaultColor=new Float32Array(e);for(var i=0;i<e;++i)this.defaultColor[i]=1;this.base=t,this.tintFn=n}function X(e){this.name="Pattern",this.base=e}function J(e,t,n){var i;if(this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=e,this.highVal=t,e=e.numComps*t,a(n))i=new Uint8Array(e),n=n.getBytes(e),i.set(n);else if("string"==typeof n)for(i=new Uint8Array(e),t=0;t<e;++t)i[t]=n.charCodeAt(t);else n instanceof Uint8Array||n instanceof Array?i=n:A("Unrecognized lookup table: "+n);this.lookup=i}function Q(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}function Z(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}function ee(e,t,n,i,r){var s=e[t+0]*n,o=e[t+1]*n,a=e[t+2]*n;e=s*(-4.387332384609988*s+54.48615194189176*o+18.82290502165302*a+212.25662451639585*(n*=e[t+3])-285.2331026137004)+o*(1.7149763477362134*o-5.6096736904047315*a+-17.873870861415444*n-5.497006427196366)+a*(-2.5217340131683033*a-21.248923337353073*n+17.5119270841813)+n*(-21.86122147463605*n-189.48180835922747)+255,t=s*(8.841041422036149*s+60.118027045597366*o+6.871425592049007*a+31.159100130055922*n-79.2970844816548)+o*(-15.310361306967817*o+17.575251261109482*a+131.35250912493976*n-190.9453302588951)+a*(4.444339102852739*a+9.8632861493405*n-24.86741582555878)+n*(-20.737325471181034*n-187.80453709719578)+255,s=s*(.8842522430003296*s+8.078677503112928*o+30.89978309703729*a-.23883238689178934*n-14.183576799673286)+o*(10.49593273432072*o+63.02378494754052*a+50.606957656360734*n-112.23884253719248)+a*(.03296041114873217*a+115.60384449646641*n-193.58209356861505)+n*(-22.33816807309886*n-180.12613974708367)+255,i[r]=255<e?255:e<0?0:e,i[r+1]=255<t?255:t<0?0:t,i[r+2]=255<s?255:s<0?0:s}function te(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}function ne(e,t,n){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),e||A("WhitePoint missing - required for color space Lab"),t=t||[0,0,0],n=n||[-100,100,-100,100],this.XW=e[0],this.YW=e[1],this.ZW=e[2],this.amin=n[0],this.amax=n[1],this.bmin=n[2],this.bmax=n[3],this.XB=t[0],this.YB=t[1],this.ZB=t[2],(this.XW<0||this.ZW<0||1!==this.YW)&&A("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(m("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(m("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function ie(e,t,n,i,r,s){var o=t[n],a=t[n+1];t=t[n+2],!1!==i&&(o=0+100*o/i,a=e.amin+a*(e.amax-e.amin)/i,t=e.bmin+t*(e.bmax-e.bmin)/i),a=a>e.amax?e.amax:a<e.amin?e.amin:a,o=(i=(o+16)/116)-(t=t>e.bmax?e.bmax:t<e.bmin?e.bmin:t)/200,a=e.XW*we(i+a/500),i=e.YW*we(i),o=e.ZW*we(o),a=e.ZW<1?(e=3.1339*a+-1.617*i+-.4906*o,t=-.9785*a+1.916*i+.0333*o,.072*a+-.229*i+1.4057*o):(e=3.2406*a+-1.5372*i+-.4986*o,t=-.9689*a+1.8758*i+.0415*o,.0557*a+-.204*i+1.057*o),r[s]=255*Math.sqrt(e<0?0:1<e?1:e),r[s+1]=255*Math.sqrt(t<0?0:1<t?1:t),r[s+2]=255*Math.sqrt(a<0?0:1<a?1:a)}function k(){A("should not call Pattern constructor")}function re(e,t,n,i,r){this.matrix=t,this.coordsArr=e.get("Coords"),this.shadingType=e.get("ShadingType"),this.type="Pattern",this.ctx=r,t=e.get("ColorSpace","CS"),this.cs=t=S.parse(t,n,i),i=0;var s,o,a,l,c=1,h=(e.has("Domain")&&(i=(r=e.get("Domain"))[0],c=r[1]),r=!1);if(e.has("Extend")&&(r=(h=e.get("Extend"))[0],h=h[1]),3!==this.shadingType||r&&h||(p=this.coordsArr[0],s=this.coordsArr[1],o=this.coordsArr[2],a=this.coordsArr[3],l=this.coordsArr[4],o<=(d=this.coordsArr[5])+(p=Math.sqrt((p-a)*(p-a)+(s-l)*(s-l)))&&d<=o+p&&g("Unsupported radial gradient.")),this.extendStart=r,this.extendEnd=h,f(o=e.get("Function"))){for(var u=[],d=0,p=o.length;d<p;d++)F(s=n.fetchIfRef(o[d]))||A("Invalid function"),u.push($.parse(n,s));o=function(e){for(var t=[],n=0,i=u.length;n<i;n++)t.push(u[n](e)[0]);return t}}else F(o)||A("Invalid function"),o=$.parse(n,o);if(p=(d=c-i)/10,n=this.colorStops=[],c<=i||p<=0)m("Bad shading domain.");else{for(s=i;s<=c;s+=p)a=t.getRgb(o([s]),0),a=M.makeCssRgb(a),n.push([(s-i)/d,a]);i="transparent",e.has("Background")&&(a=t.getRgb(e.get("Background"),0),i=M.makeCssRgb(a)),r||(n.unshift([0,i]),n[1][0]+=C.SMALL_NUMBER),h||(n[n.length-1][0]-=C.SMALL_NUMBER,n.push([1,i])),this.colorStops=n}}function se(){this.type="Pattern"}function oe(e,t,n,i,r,s){this.name=e[1][0].name,this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.objs=i,this.commonObjs=r,this.baseTransform=s,this.type="Pattern",this.ctx=n}function ae(){this.cache={},this.total=0}function le(e){this.stack=e||[]}x.prototype={getRgb:function(){A("Should not call ColorSpace.getRgb")},getRgbItem:function(){A("Should not call ColorSpace.getRgbItem")},getRgbBuffer:function(){A("Should not call ColorSpace.getRgbBuffer")},getOutputLength:function(){A("Should not call ColorSpace.getOutputLength")},isPassthrough:function(){return!1},createRgbBuffer:function(e,t,n,i){if(this.isPassthrough(i))return e.subarray(t);var r=new Uint8Array(3*n),s=1<<i;if(1===this.numComps&&s<n&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var o=new(i<=8?Uint8Array:Uint16Array)(s),a=0;a<s;a++)o[a]=a;var l=new Uint8Array(3*s);for(this.getRgbBuffer(o,0,s,l,0,i),a=i=0;a<n;++a)s=3*e[t++],r[i++]=l[s],r[i++]=l[s+1],r[i++]=l[s+2]}else this.getRgbBuffer(e,t,n,r,0,i);return r},usesZeroToOneRange:!0},x.parse=function(e,t,n){return(e=x.parseToIR(e,t,n))instanceof ue?e:x.fromIR(e)},x.fromIR=function(e){switch(t=f(e)?e[0]:e){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"PatternCS":return e=(e=e[1])&&x.fromIR(e),new de(e);case"IndexedCS":var t=e[2],n=e[3];return new pe(x.fromIR(e[1]),t,n);case"AlternateCS":return t=e[3],new ue(e[1],x.fromIR(e[2]),$.fromIR(t));case"LabCS":return new ce(e[1].WhitePoint,e[1].BlackPoint,e[1].Range);default:A("Unkown name "+t)}return null},x.parseToIR=function(e,t,n){if(h(e)&&s(r=n.get("ColorSpace"))&&(r=r.get(e.name))&&(e=r),h(e=t.fetchIfRef(e)))switch(this.mode=r=e.name,r){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:A("unrecognized colorspace "+r)}else if(f(e))switch(this.mode=r=e[0].name,r){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return"DeviceGrayCS";case"CalRGB":return"DeviceRgbCS";case"ICCBased":if(1==(r=t.fetchIfRef(e[1]).dict.get("N")))return"DeviceGrayCS";if(3==r)return"DeviceRgbCS";if(4==r)return"DeviceCmykCS";break;case"Pattern":return["PatternCS",e=(e=e[1])&&x.parseToIR(e,t,n)];case"Indexed":case"I":return["IndexedCS",n=x.parseToIR(e[1],t,n),r=e[2]+1,t=a(t=t.fetchIfRef(e[3]))?t.getBytes():t];case"Separation":case"DeviceN":var i=e[1],r=1;return h(i)?r=1:f(i)&&(r=i.length),["AlternateCS",r,n=x.parseToIR(e[2],t,n),t=$.getIR(t,t.fetchIfRef(e[3]))];case"Lab":return["LabCS",e[1].getAll()];default:A('unimplemented color space object "'+r+'"')}else A('unrecognized color space object: "'+e+'"');return null},x.isDefaultDecode=function(e,t){if(e)if(2*t!==e.length)g("The decode map is not the correct length");else for(var n=0,i=e.length;n<i;n+=2)if(0!==e[n]||1!=e[n+1])return!1;return!0},x.singletons={get gray(){return e(this,"gray",new me)},get rgb(){return e(this,"rgb",new ge)},get cmyk(){return e(this,"cmyk",new fe)}};var ce,he,S=x,ue=(Y.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return this.getRgbItem(e,t,n,0),n},getRgbItem:function(e,t,n,i){e="subarray"in e?e.subarray(t,t+this.numComps):Array.prototype.slice.call(e,t,t+this.numComps),e=this.tintFn(e),this.base.getRgbItem(e,0,n,i)},getRgbBuffer:function(e,t,n,i,r,s){var o=this.tintFn,a=this.base;s=1/((1<<s)-1);for(var l=a.numComps,c=a.usesZeroToOneRange,h=a.isPassthrough(8)||!c,u=h?r:0,d=h?i:new Uint8Array(l*n),p=this.numComps,m=new Float32Array(p),g=0;g<n;g++){for(var f=0;f<p;f++)m[f]=e[t++]*s;var w=o(m);if(c)for(f=0;f<l;f++)d[u++]=255*w[f];else a.getRgbItem(w,0,d,u),u+=l}h||a.getRgbBuffer(d,0,n,i,r,8)},getOutputLength:function(e){return this.base.getOutputLength(e*this.base.numComps/this.numComps)},isPassthrough:S.prototype.isPassthrough,createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(e){return S.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0},Y),de=(X.prototype={},X),pe=(J.prototype={getRgb:function(e,t){return this.base.getRgb(this.lookup,e[t]*this.base.numComps)},getRgbItem:function(e,t,n,i){this.base.getRgbItem(this.lookup,e[t]*this.base.numComps,n,i)},getRgbBuffer:function(e,t,n,i,r){for(var s=this.base,o=s.numComps,a=s.getOutputLength(o),l=this.lookup,c=0;c<n;++c){var h=e[t++]*o;s.getRgbBuffer(l,h,1,i,r,8),r+=a}},getOutputLength:function(e){return this.base.getOutputLength(e*this.base.numComps)},isPassthrough:S.prototype.isPassthrough,createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(){return!0},usesZeroToOneRange:!0},J),me=(Q.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return this.getRgbItem(e,t,n,0),n},getRgbItem:function(e,t,n,i){e=255*e[t]|0,n[i]=n[i+1]=n[i+2]=e<0?0:255<e?255:e},getRgbBuffer:function(e,t,n,i,r,s){s=255/((1<<s)-1);for(var o=0;o<n;++o){var a=s*e[t++]|0;i[r++]=a,i[r++]=a,i[r++]=a}},getOutputLength:function(e){return 3*e},isPassthrough:S.prototype.isPassthrough,createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(e){return S.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0},Q),ge=(Z.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return this.getRgbItem(e,t,n,0),n},getRgbItem:function(e,t,n,i){var r=255*e[t]|0,s=255*e[t+1]|0;e=255*e[t+2]|0,n[i]=r<0?0:255<r?255:r,n[i+1]=s<0?0:255<s?255:s,n[i+2]=e<0?0:255<e?255:e},getRgbBuffer:function(e,t,n,i,r,s){if(n*=3,8==s)i.set(e.subarray(t,t+n),r);else{s=255/((1<<s)-1);for(var o=0;o<n;++o)i[r++]=s*e[t++]|0}},getOutputLength:function(e){return e},isPassthrough:function(e){return 8==e},createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(e){return S.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0},Z),fe=(te.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return ee(e,t,1,n,0),n},getRgbItem:function(e,t,n,i){ee(e,t,1,n,i)},getRgbBuffer:function(e,t,n,i,r,s){s=1/((1<<s)-1);for(var o=0;o<n;o++)ee(e,t,s,i,r),t+=4,r+=3},getOutputLength:function(e){return 3*(e>>2)},isPassthrough:S.prototype.isPassthrough,createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(e){return S.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0},te),we=function(e){return 6/29<=e?e*e*e:108/841*(e-4/29)},C=(ne.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return ie(this,e,t,!1,n,0),n},getRgbItem:function(e,t,n,i){ie(this,e,t,!1,n,i)},getRgbBuffer:function(e,t,n,i,r,s){s=(1<<s)-1;for(var o=0;o<n;o++)ie(this,e,t,s,i,r),t+=3,r+=3},getOutputLength:function(e){return e},isPassthrough:S.prototype.isPassthrough,isDefaultDecode:function(){return!0},usesZeroToOneRange:!1},ce=ne,k.prototype={getPattern:function(e){A("Should not call Pattern.getStyle: "+e)}},k.shadingFromIR=function(e){return C[e[0]].fromIR(e)},k.parseShading=function(e,t,n,i){var r=(e=a(e)?e.dict:e).get("ShadingType");switch(r){case 2:case 3:return new C.RadialAxial(e,t,n,i);default:return v("Unsupported shading type: "+r),new C.Dummy}},{SMALL_NUMBER:.01}),n=C,n=(re.fromIR=function(e){var r=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6];return{type:"Pattern",getPattern:function(e){var t;2==r?t=e.createLinearGradient(o[0],o[1],a[0],a[1]):3==r&&(t=e.createRadialGradient(o[0],o[1],l,a[0],a[1],c)),e=0;for(var n=s.length;e<n;++e){var i=s[e];t.addColorStop(i[0],i[1])}return t}}},re.prototype={getIR:function(){var e,t,n,i,r=this.coordsArr,s=this.shadingType;return 2==s?(e=[r[0],r[1]],t=[r[2],r[3]],i=n=null):3==s?(e=[r[0],r[1]],t=[r[3],r[4]],n=r[2],i=r[5]):A("getPattern type unknown: "+s),(r=this.matrix)&&(e=M.applyTransform(e,r),t=M.applyTransform(t,r)),["RadialAxial",s,this.colorStops,e,t,n,i]}},n.RadialAxial=re,C),$=(se.fromIR=function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}},se.prototype={getIR:function(){return["Dummy"]}},n.Dummy=se,oe.getIR=function(e,t,n){return["TilingPattern",n,e,t.get("Matrix"),t.get("BBox"),t.get("XStep"),t.get("YStep"),t.get("PaintType"),t=t.get("TilingType")]},oe.prototype={createPatternCanvas:function(e){var t=this.operatorList,n=this.bbox,i=this.xstep,r=this.ystep,s=this.paintType,o=this.color,a=this.objs,l=this.commonObjs,c=(v("TilingType: "+this.tilingType),n[0]),h=n[1],u=n[2],d=n[3],p=[c,h],m=(g=[c+i,h+r])[0]-p[0],g=g[1]-p[1],f=M.singularValueDecompose2dScale(this.matrix),w=M.singularValueDecompose2dScale(this.baseTransform),f=[f[0]*w[0],f[1]*w[1]],m=Math.min(Math.ceil(Math.abs(m*f[0])),3e3),g=Math.min(Math.ceil(Math.abs(g*f[1])),3e3),w=(f=_.getCanvas("pattern",m,g,!0)).context;return(a=new Ke(w,l,a)).groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(w,s,o),this.setScale(m,g,i,r),this.transformToScale(a),a.transform.apply(a,[1,0,0,1,-p[0],-p[1]]),this.clipBbox(a,n,c,h,u,d),a.executeOperatorList(t),f.canvas},setScale:function(e,t,n,i){this.scale=[e/n,t/i]},transformToScale:function(e){var t=this.scale;e.transform.apply(e,[t[0],0,0,t[1],0,0])},scaleToContext:function(){var e=this.scale;this.ctx.scale(1/e[0],1/e[1])},clipBbox:function(e,t,n,i,r,s){t&&f(t)&&4==t.length&&(e.rectangle(n,i,r-n,s-i),e.clip(),e.endPath())},setFillAndStrokeStyleToContext:function(e,t,n){switch(t){case 1:t=this.ctx,e.fillStyle=t.fillStyle,e.strokeStyle=t.strokeStyle;break;case 2:t=S.singletons.rgb.getRgb(n,0),t=M.makeCssRgb(t),e.fillStyle=t,e.strokeStyle=t;break;default:A("Unsupported paint type: "+t)}},getPattern:function(e,t){t=this.createPatternCanvas(t);return(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix),this.scaleToContext(),e.createPattern(t,"repeat")}},{getSampleArray:function(e,t,n,i){for(var r=1,s=0,o=e.length;s<o;s++)r*=e[s];r*=t,e=[];var o=t=0,a=1/(Math.pow(2,n)-1);i=i.getBytes((r*n+7)/8);for(var l=0,s=0;s<r;s++){for(;t<n;)o=(o<<=8)|i[l++],t+=8;t-=n,e.push((o>>t)*a),o&=(1<<t)-1}return e},getIR:function(e,t){var n=(n=t.dict)||t,i=[this.constructSampled,null,this.constructInterpolated,this.constructStiched,this.constructPostScript];return(i=i[n.get("FunctionType")])||A("Unknown type of function"),i.call(this,t,n,e)},fromIR:function(e){switch(e[0]){case 0:return this.constructSampledFromIR(e);case 2:return this.constructInterpolatedFromIR(e);case 3:return this.constructStichedFromIR(e);default:return this.constructPostScriptFromIR(e)}},parse:function(e,t){e=this.getIR(e,t);return this.fromIR(e)},constructSampled:function(e,t){function n(e){for(var t=e.length,n=[],i=0,r=0;r<t;r+=2)n[i]=[e[r],e[r+1]],++i;return n}var i=t.get("Domain"),r=t.get("Range"),s=(i&&r||A("No domain or range"),i.length/2),o=r.length/2,i=n(i),r=n(r),a=t.get("Size"),l=t.get("BitsPerSample");if(1!==(c=t.get("Order")||1)&&v("No support for cubic spline interpolation: "+c),!(c=t.get("Encode")))for(var c=[],h=0;h<s;++h)c.push(0),c.push(a[h]-1);return[0,s,i,c=n(c),h=(h=t.get("Decode"))?n(h):r,this.getSampleArray(a,o,l,e),a,o,Math.pow(2,l)-1,r]},constructSampledFromIR:function(x){return function(e){var t=x[1],n=x[2],i=x[3],r=x[4],s=x[5],o=x[6],a=x[7],l=x[9];t!=e.length&&A("Incorrect number of arguments: "+t+" != "+e.length);for(var c=1<<t,h=new Float64Array(c),u=new Uint32Array(c),d=0;d<c;d++)h[d]=1;for(var p=a,m=1,g=0;g<t;++g){for(var d=n[g][0],f=n[g][1],w=Math.min(Math.max(e[g],d),f),v=i[g][0]+(w-d)*((i[g][1]-i[g][0])/(f-d)),f=o[g],w=(d=(v=Math.min(Math.max(v,0),f-1))<f-1?Math.floor(v):v-1)+1-v,v=v-d,y=d*p,b=y+p,d=0;d<c;d++)d&m?(h[d]*=v,u[d]+=b):(h[d]*=w,u[d]+=y);p*=f,m<<=1}for(e=new Float64Array(a),d=0;d<a;++d){for(g=t=0;g<c;g++)t+=s[u[g]+d]*h[g];t=r[d][0]+ +t*(r[d][1]-r[d][0]),e[d]=Math.min(Math.max(t,l[d][0]),l[d][1])}return e}},constructInterpolated:function(e,t){var n=t.get("C0")||[0],i=t.get("C1")||[1],t=t.get("N");f(n)&&f(i)||A("Illegal dictionary for interpolated function");for(var r=n.length,s=[],o=0;o<r;++o)s.push(i[o]-n[o]);return[2,n,s,t]},constructInterpolatedFromIR:function(e){var i=e[1],r=e[2],s=e[3],o=r.length;return function(e){e=1==s?e[0]:Math.pow(e[0],s);for(var t=[],n=0;n<o;++n)t.push(i[n]+e*r[n]);return t}},constructStiched:function(e,t,n){(e=t.get("Domain"))||A("No domain"),1!=e.length/2&&A("Bad domain for stiched function");for(var i=t.get("Functions"),r=[],s=0,o=i.length;s<o;++s)r.push($.getIR(n,n.fetchIfRef(i[s])));return[3,e,n=t.get("Bounds"),t=t.get("Encode"),r]},constructStichedFromIR:function(e){var s=e[1],o=e[2],a=e[3];e=e[4];for(var l=[],t=0,n=e.length;t<n;t++)l.push($.fromIR(e[t]));return function(e){e=e[0];var t=s[0],n=s[1];for(n<e?e=n:e<t&&(e=t),t=0,n=o.length;t<n&&!(e<o[t]);++t);n=s[0],0<t&&(n=o[t-1]);var i=s[1],r=(t<o.length&&(i=o[t]),a[2*t]);return l[t]([r+(e-n)*(a[2*t+1]-r)/(i-n)])}},constructPostScript:function(e,t){var n=t.get("Domain"),t=t.get("Range"),e=(n||A("No domain."),t||A("No range."),new Se(e));return[4,n,t,new be(e).parse()]},constructPostScriptFromIR:function(e){var o=e[1],a=e[2],l=a.length/2,c=new xe(e[3]),h=new he;return function(e){for(var t=[],n=0,i=o.length/2;n<i;++n)t.push(e[n]);if(e=t.join("_"),h.has(e))return h.get(e);for(t=c.execute(t),i=[],n=l-1;0<=n;--n){var r=t.pop(),s=2*n;r<a[s]?r=a[s]:r>a[1+s]&&(r=a[1+s]),i[n]=r}return h.set(e,i),i}}});ae.prototype={has:function(e){return e in this.cache},get:function(e){return this.cache[e]},set:function(e,t){this.total<1024&&(this.cache[e]=t,this.total++)}},he=ae;le.prototype={push:function(e){100<=this.stack.length&&A("PostScript function stack overflow."),this.stack.push(e)},pop:function(){return this.stack.length<=0&&A("PostScript function stack underflow."),this.stack.pop()},copy:function(e){100<=this.stack.length+e&&A("PostScript function stack overflow.");var t=this.stack,n=t.length-e;for(--e;0<=e;e--,n++)t.push(t[n])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){for(var n,i=this.stack,r=i.length-e,s=i.length-1,t=r+(t-Math.floor(t/e)*e),o=r,a=s;o<a;o++,a--)n=i[o],i[o]=i[a],i[a]=n;for(o=r,a=t-1;o<a;o++,a--)n=i[o],i[o]=i[a],i[a]=n;for(o=t,a=s;o<a;o++,a--)n=i[o],i[o]=i[a],i[a]=n}};function ve(e,t){this.operators=e,this.operands=t}function ye(e){this.lexer=e,this.operators=[],this.prev=this.token=null}function T(e,t){this.type=e,this.value=t}ve.prototype={execute:function(e){e=new le(e);for(var t,n,i=0,r=this.operators,s=r.length;i<s;)if("number"==typeof(t=r[i++]))e.push(t);else switch(t){case"jz":n=e.pop(),(t=e.pop())||(i=n);break;case"j":i=t=e.pop();break;case"abs":t=e.pop(),e.push(Math.abs(t));break;case"add":n=e.pop(),t=e.pop(),e.push(t+n);break;case"and":n=e.pop(),o(t=e.pop())&&o(n)?e.push(t&&n):e.push(t&n);break;case"atan":t=e.pop(),e.push(Math.atan(t));break;case"bitshift":n=e.pop(),0<(t=e.pop())?e.push(t<<n):e.push(t>>n);break;case"ceiling":t=e.pop(),e.push(Math.ceil(t));break;case"copy":t=e.pop(),e.copy(t);break;case"cos":t=e.pop(),e.push(Math.cos(t));break;case"cvi":t=0|e.pop(),e.push(t);break;case"cvr":break;case"div":n=e.pop(),t=e.pop(),e.push(t/n);break;case"dup":e.copy(1);break;case"eq":n=e.pop(),t=e.pop(),e.push(t==n);break;case"exch":e.roll(2,1);break;case"exp":n=e.pop(),t=e.pop(),e.push(Math.pow(t,n));break;case"false":e.push(!1);break;case"floor":t=e.pop(),e.push(Math.floor(t));break;case"ge":n=e.pop(),t=e.pop(),e.push(n<=t);break;case"gt":n=e.pop(),t=e.pop(),e.push(n<t);break;case"idiv":n=e.pop(),t=e.pop(),e.push(t/n|0);break;case"index":t=e.pop(),e.index(t);break;case"le":n=e.pop(),t=e.pop(),e.push(t<=n);break;case"ln":t=e.pop(),e.push(Math.log(t));break;case"log":t=e.pop(),e.push(Math.log(t)/Math.LN10);break;case"lt":n=e.pop(),t=e.pop(),e.push(t<n);break;case"mod":n=e.pop(),t=e.pop(),e.push(t%n);break;case"mul":n=e.pop(),t=e.pop(),e.push(t*n);break;case"ne":n=e.pop(),t=e.pop(),e.push(t!=n);break;case"neg":e.pop(),e.push(-n);break;case"not":o(t=e.pop())&&o(n)?e.push(t&&n):e.push(t&n);break;case"or":n=e.pop(),o(t=e.pop())&&o(n)?e.push(t||n):e.push(t|n);break;case"pop":e.pop();break;case"roll":n=e.pop(),t=e.pop(),e.roll(t,n);break;case"round":t=e.pop(),e.push(Math.round(t));break;case"sin":t=e.pop(),e.push(Math.sin(t));break;case"sqrt":t=e.pop(),e.push(Math.sqrt(t));break;case"sub":n=e.pop(),t=e.pop(),e.push(t-n);break;case"true":e.push(!0);break;case"truncate":t=(t=e.pop())<0?Math.ceil(t):Math.floor(t),e.push(t);break;case"xor":n=e.pop(),o(t=e.pop())&&o(n)?e.push(t!=n):e.push(t^n);break;default:A("Unknown operator "+t)}return e.stack}};var be,xe=ve,L=(ye.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(e){return this.token.type==e&&(this.nextToken(),!0)},expect:function(e){if(this.accept(e))return!0;A("Unexpected symbol: found "+this.token.type+" expected "+e+".")},parse:function(){return this.nextToken(),this.expect(L.LBRACE),this.parseBlock(),this.expect(L.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(L.NUMBER))this.operators.push(this.prev.value);else if(this.accept(L.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(L.LBRACE))break;this.parseCondition()}},parseCondition:function(){var e,t,n=this.operators.length;this.operators.push(null,null),this.parseBlock(),this.expect(L.RBRACE),this.accept(L.IF)?(this.operators[n]=this.operators.length,this.operators[n+1]="jz"):this.accept(L.LBRACE)?(e=this.operators.length,this.operators.push(null,null),t=this.operators.length,this.parseBlock(),this.expect(L.RBRACE),this.expect(L.IFELSE),this.operators[e]=this.operators.length,this.operators[e+1]="j",this.operators[n]=t,this.operators[n+1]="jz"):A("PS Function: error parsing conditional.")}},be=ye,{LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5}),Ae={};T.getOperator=function(e){var t=Ae[e];return t||(Ae[e]=new T(L.OPERATOR,e))},T.LBRACE=new T(L.LBRACE,"{"),T.RBRACE=new T(L.RBRACE,"}"),T.IF=new T(L.IF,"IF"),T.IFELSE=new T(L.IFELSE,"IFELSE");function ke(e){this.stream=e,this.nextChar()}ke.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return EOF;if(e)10!==t&&13!==t||(e=!1);else if(37==t)e=!0;else if(!Lexer.isSpace(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new T(L.NUMBER,this.getNumber());case 123:return this.nextChar(),T.LBRACE;case 125:return this.nextChar(),T.RBRACE}for(e=String.fromCharCode(t);0<=(t=this.nextChar())&&(65<=t&&t<=90||97<=t&&t<=122);)e+=String.fromCharCode(t);switch(e.toLowerCase()){case"if":return T.IF;case"ifelse":return T.IFELSE;default:return T.getOperator(e)}},getNumber:function(){for(var e=this.currentChar,t=String.fromCharCode(e);0<=(e=this.nextChar())&&(48<=e&&e<=57||45===e||46===e);)t+=String.fromCharCode(e);return e=parseFloat(t),isNaN(e)&&A("Invalid floating point number: "+e),e}},Se=ke;var Se,E=function(e){var t,n,i;e.data?this.data=e.data:(t=e.dict,(e=this.data={}).subtype=t.get("Subtype").name,n=t.get("Rect"),e.rect=M.normalizeRect(n),e.annotationFlags=t.get("F"),n=t.get("C"),e.color=f(n)&&3===n.length?n:[0,0,0],t.has("BS")?(n=t.get("BS"),e.borderWidth=n.has("W")?n.get("W"):1):(n=t.get("Border")||[0,0,1],e.borderWidth=n[2]||0),s(n=t.get("AP"))?s(n=n.get("N"))?(t=t.get("AS"))&&n.has(t.name)&&(i=n.get(t.name)):i=n:i=void 0,this.appearance=i,e.hasAppearance=!!this.appearance)};E.prototype={getData:function(){return this.data},hasHtml:function(){return!1},getHtmlElement:function(){throw new t("getHtmlElement() should be implemented in subclass")},getEmptyContainer:function(e,t){y&&A("getEmptyContainer() should be called from main thread"),t=t||this.data.rect;e=document.createElement(e);return e.style.width=Math.ceil(t[2]-t[0])+"px",e.style.height=Math.ceil(t[3]-t[1])+"px",e},isViewable:function(){var e=this.data;return!(!e||e.annotationFlags&&34&e.annotationFlags||!e.rect)},loadResources:function(t){var n=new b;return this.appearance.dict.getAsync("Resources").then(function(e){e?new ObjectLoader(e.map,t,e.xref).load().then(function(){n.resolve(e)}):n.resolve()}.bind(this)),n},getOperatorList:function(n){var i,e,r,t,s,o,a,l,c,h=new b;return this.appearance?(i=this.data,t=this.appearance.dict,e=this.loadResources("ExtGState ColorSpace Pattern Shading XObject Font".split(" ")),s=t.get("BBox")||[0,0,1,1],r=t.get("Matrix")||[1,0,0,1,0,0],t=i.rect,s=(l=M.getAxialAlignedBoundingBox(s,r))[0],o=l[1],a=l[2],l=l[3],c=s===a||o===l?[1,0,0,1,t[0],t[1]]:[a=(t[2]-t[0])/(a-s),0,0,l=(t[3]-t[1])/(l-o),t[0]-s*a,t[1]-o*l],e.then(function(e){var t=new OperatorList;t.addOp("beginAnnotation",[i.rect,c,r]),n.getOperatorList(this.appearance,e,t),t.addOp("endAnnotation",[]),h.resolve(t)}.bind(this))):h.resolve(new OperatorList),h}},E.getConstructor=function(e,t){if(e)return"Link"===e?Ee:"Text"===e?Oe:"Widget"!==e?E:t?"Tx"===t?De:_e:void 0},E.fromData=function(e){var t=E.getConstructor(e.subtype,e.fieldType);if(t)return new t({data:e})},E.fromRef=function(e,t){e=e.fetchIfRef(t);if(s(e)){var n=e.get("Subtype");if(n=h(n)?n.name:""){var i=h(i=M.getInheritableProperty(e,"FT"))?i.name:"";if(i=E.getConstructor(n,i)){if((e=new i({dict:e,ref:t})).isViewable())return e;v("unimplemented annotation type: "+n)}}}},E.appendToOperatorList=function(e,i,t,n){var r=new b;t=[];for(var s=0,o=e.length;s<o;++s)t.push(e[s].getOperatorList(n));return b.all(t).then(function(e){i.addOp("beginAnnotations",[]);for(var t=0,n=e.length;t<n;++t)i.addOpList(e[t]);i.addOp("endAnnotations",[]),r.resolve()},function(e){r.reject(e)}),r};function Ce(e){if(E.call(this,e),!e.data){var t=e.dict,n=this.data,i=(n.fieldValue=c(M.getInheritableProperty(t,"V")||""),n.alternativeText=c(t.get("TU")||""),n.defaultAppearance=M.getInheritableProperty(t,"DA")||"",M.getInheritableProperty(t,"FT")),i=(n.fieldType=h(i)?i.name:"",n.fieldFlags=M.getInheritableProperty(t,"Ff")||0,this.fieldResources=M.getInheritableProperty(t,"DR")||new Dict,[]),r=t;for(e=e.ref;r;){var t=r.get("Parent"),s=r.getRaw("Parent");if(r=r.get("T"))i.unshift(c(r));else{for(var o=0,a=(r=t.get("Kids")).length;o<a;o++){var l=r[o];if(l.num==e.num&&l.gen==e.gen)break}i.unshift("`"+o)}r=t,e=s}n.fullName=i.join(".")}}function $e(e){_e.call(this,e),e.data||(this.data.textAlignment=M.getInheritableProperty(e.dict,"Q"))}function Re(e){var t,n,i;E.call(this,e),e.data||(e=e.dict,t=this.data,n=e.get("Contents"),i=e.get("T"),t.content=c(n||""),t.title=c(i||""),t.name=e.has("Name")?e.get("Name").name:"Note")}function Me(e){var t,n,i;E.call(this,e),e.data||(t=e.dict,e=this.data,(n=t.get("A"))?"URI"===(t=n.get("S").name)?(r(i=n.get("URI"),!1)||(i=""),e.url=i):"GoTo"===t?e.dest=n.get("D"):"GoToR"===t?(r(i=s(t=n.get("F"))?t.get("F")||"":i,!1)||(i=""),e.url=i,e.dest=n.get("D")):"Named"===t?e.action=n.get("N").name:v("unrecognized link type: "+t):t.has("Dest")&&(i=t.get("Dest"),e.dest=h(i)?i.name:i))}function Te(e,t){this.pdfInfo=e,this.transport=t}function Le(e,t){this.pageInfo=e,this.transport=t,this.stats=new K,this.stats.enabled=!!w.PDFJS.enableStats,this.commonObjs=t.commonObjs,this.objs=new qe,this.pendingDestroy=this.cleanupAfterRender=this.receivingOperatorList=!1,this.renderTasks=[]}var Ee,Ie=(PDFJS.Annotation=E).prototype,_e=(M.inherit(Ce,E,{isViewable:function(){return"Sig"===this.data.fieldType?(v("unimplemented annotation type: Widget signature"),!1):Ie.isViewable.call(this)}}),Ce),De=(M.inherit($e,_e,{hasHtml:function(){return!this.data.hasAppearance&&!!this.data.fieldValue},getHtmlElement:function(e){y&&A("getHtmlElement() shall be called from main thread");var t=this.data,n=this.getEmptyContainer("div"),i=(n.style.display="table",document.createElement("div")),r=(i.textContent=t.fieldValue,i.style.textAlign=["left","center","right"][t.textAlignment],i.style.verticalAlign="middle",i.style.display="table-cell",e=t.fontRefName?e.getData(t.fontRefName):null,i.style);return r.fontSize=t.fontSize+"px",r.direction=t.fontDirection<0?"rtl":"ltr",e&&(r.fontWeight=e.black?e.bold?"bolder":"bold":e.bold?"bold":"normal",r.fontStyle=e.italic?"italic":"normal",t=e.loadedName,r.fontFamily=(t?'"'+t+'", ':"")+(e.fallbackName||"Helvetica, sans-serif")),n.appendChild(i),n},getOperatorList:function(e){if(this.appearance)return E.prototype.getOperatorList.call(this,e);var t=new b,n=new OperatorList,i=this.data,r=i.defaultAppearance;if(r){for(var s=Stream,o=r.length,a=new Uint8Array(o),l=0;l<o;++l)a[l]=255&r.charCodeAt(l);for(r=new s(a),e.getOperatorList(r,this.fieldResources,n),e=n.fnArray,r=n.argsArray,i.rgb=[0,0,0],s=0;s<0;++s)o=e[s],a=r[s],"setFont"===o?(i.fontRefName=a[0],(o=a[1])<0?(i.fontDirection=-1,i.fontSize=-o):(i.fontDirection=1,i.fontSize=o)):"setFillRGBColor"===o?i.rgb=a:"setFillGray"===o&&(o=255*a[0],i.rgb=[o,o,o])}return t.resolve(n),t}}),$e),Oe=(M.inherit(Re,E,{getOperatorList:function(){var e=new b;return e.resolve(new OperatorList),e},hasHtml:function(){return!0},getHtmlElement:function(){y&&A("getHtmlElement() shall be called from main thread");(o=(s=this.data).rect)[3]-o[1]<10&&(o[3]=o[1]+10),o[2]-o[0]<10&&(o[2]=o[0]+(o[3]-o[1]));var t=this.getEmptyContainer("section",o),e=(t.className="annotText",document.createElement("img")),n=(e.style.height=t.style.height,s.name),i=(e.src=PDFJS.imageResourcesPath+"annotation-"+n.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:n}),document.createElement("div")),n=(i.setAttribute("hidden",!0),document.createElement("h1")),r=document.createElement("p");if(i.style.left=Math.floor(o[2]-o[0])+"px",i.style.top="0px",n.textContent=s.title,s.content||s.title){for(var s,o=document.createElement("span"),a=0,l=(s=s.content.split(/(?:\r\n?|\n)/)).length;a<l;++a)o.appendChild(document.createTextNode(s[a])),a<l-1&&o.appendChild(document.createElement("br"));r.appendChild(o),i.addEventListener("mouseover",o=function(){t.style.zIndex+=1,i.removeAttribute("hidden")},!(s=function(e){(e.toElement||e.relatedTarget)&&(--t.style.zIndex,i.setAttribute("hidden",!0))})),i.addEventListener("mouseout",s,!1),e.addEventListener("mouseover",o,!1),e.addEventListener("mouseout",s,!1)}else i.setAttribute("hidden",!0);return i.appendChild(n),i.appendChild(r),t.appendChild(e),t.appendChild(i),t}}),Re);M.inherit(Me,E,{hasOperatorList:function(){return!1},hasHtml:function(){return!0},getHtmlElement:function(){var e=this.data.rect,t=document.createElement("a"),n=this.data.borderWidth;t.style.borderWidth=n+"px";for(var i=this.data.color,r=[],s=0;s<3;++s)r[s]=Math.round(255*i[s]);return t.style.borderColor=M.makeCssRgb(r),t.style.borderStyle="solid",i=e[3]-e[1]-2*n,t.style.width=e[2]-e[0]-2*n+"px",t.style.height=i+"px",t.href=this.data.url||"",t}}),Ee=Me,PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.disableFontFace=void 0!==PDFJS.disableFontFace&&PDFJS.disableFontFace,PDFJS.getDocument=function(e,t,n,i){"string"==typeof e?e={url:e}:"object"==typeof e&&null!=e&&"byteLength"in e?e={data:e}:"object"!=typeof e&&A("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),e.url||e.data||A("Invalid parameter array, need either .data or .url");var r,s,o,a,l,c,h={};for(r in e)h[r]="url"===r&&"undefined"!=typeof window?(o=window.location.href,a=e[r],l=void 0,c=void 0,a?0<=a.indexOf(":")?a:"/"==a.charAt(0)?(c=o.indexOf("://"),c=o.indexOf("/",c+3),o.substring(0,c)+a):(l=o.length,c=o.lastIndexOf("#"),c=o.lastIndexOf("?",l=0<=c?c:l),c=o.lastIndexOf("/",0<=c?c:l),o.substring(0,c+1)+a):o):e[r];return e=new PDFJS.Promise,r=new PDFJS.Promise,s=new We(e,r,t,i),e.then(function(){s.passwordCallback=n,s.fetchDocument(h)}),r},Te.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},get embeddedFontsUsed(){return this.transport.embeddedFontsUsed},getPage:function(e){return this.transport.getPage(e)},getDestinations:function(){return this.transport.getDestinations()},getJavaScript:function(){var e=new PDFJS.Promise;return e.resolve(this.pdfInfo.javaScript),e},getOutline:function(){var e=new PDFJS.Promise;return e.resolve(this.pdfInfo.outline),e},getMetadata:function(){var e=new PDFJS.Promise,t=this.pdfInfo.metadata;return e.resolve({info:this.pdfInfo.info,metadata:t?new PDFJS.Metadata(t):null}),e},isEncrypted:function(){var e=new PDFJS.Promise;return e.resolve(this.pdfInfo.encrypted),e},getData:function(){var e=new PDFJS.Promise;return this.transport.getData(e),e},dataLoaded:function(){return this.transport.dataLoaded()},destroy:function(){this.transport.destroy()}};Le.prototype={get pageNumber(){return this.pageInfo.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(e,t){return arguments.length<2&&(t=this.rotate),new PDFJS.PageViewport(this.view,e,t,0,0)},getAnnotations:function(){var e;return this.annotationsPromise||(e=new PDFJS.Promise,this.annotationsPromise=e,this.transport.getAnnotations(this.pageInfo.pageIndex),e)},render:function(e){function t(e){var t=s.renderTasks.indexOf(i);0<=t&&s.renderTasks.splice(t,1),s.cleanupAfterRender&&(s.pendingDestroy=!0),s._tryDestroy(),e?r.reject(e):r.resolve(),n.timeEnd("Rendering"),n.timeEnd("Overall")}var n=this.stats,i=(n.time("Overall"),this.pendingDestroy=!1,this.displayReadyPromise||(this.receivingOperatorList=!0,this.displayReadyPromise=new b,this.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1})),new He(t,e,this.objs,this.commonObjs,this.operatorList,this.pageNumber)),r=(this.renderTasks.push(i),new Ue(i)),s=this;return this.displayReadyPromise.then(function(e){s.pendingDestroy?t():(n.time("Rendering"),i.initalizeGraphics(e),i.operatorListChanged())},function(e){t(e)}),r},getTextContent:function(){var t=new PDFJS.Promise;return this.transport.messageHandler.send("GetTextContent",{pageIndex:this.pageNumber-1},function(e){t.resolve(e)}),t},getOperationList:function(){var e=new PDFJS.Promise;return e.resolve({dependencyFontsID:null,operatorList:null}),e},destroy:function(){this.pendingDestroy=!0,this._tryDestroy()},_tryDestroy:function(){this.pendingDestroy&&0===this.renderTasks.length&&!this.receivingOperatorList&&(delete this.operatorList,delete this.displayReadyPromise,this.objs.clear(),this.pendingDestroy=!1)},_startRenderPage:function(e){this.displayReadyPromise.resolve(e)},_renderPageChunk:function(e){M.concatenateToArray(this.operatorList.fnArray,e.fnArray),M.concatenateToArray(this.operatorList.argsArray,e.argsArray),this.operatorList.lastChunk=e.lastChunk;for(var t=0;t<this.renderTasks.length;t++)this.renderTasks[t].operatorListChanged();e.lastChunk&&(this.receivingOperatorList=!1,this._tryDestroy())}};function Fe(t,e,n,i){if(this.pdfDataRangeTransport=n,this.workerReadyPromise=e,this.progressCallback=i,this.commonObjs=new qe,this.pageCache=[],this.pagePromises=[],this.embeddedFontsUsed=!1,this.passwordCallback=null,!w.PDFJS.disableWorker&&"undefined"!=typeof Worker){void 0===(e=PDFJS.workerSrc)&&A("No PDFJS.workerSrc specified");try{var r=new Worker(e),s=new l("main",r),o=((this.messageHandler=s).on("test",function(e){e?(this.worker=r,this.setupMessageHandler(s)):(w.PDFJS.disableWorker=!0,this.setupFakeWorker()),t.resolve()}.bind(this)),new Uint8Array(1));return void s.send("test",o)}catch(e){m("The worker has been disabled.")}}w.PDFJS.disableWorker=!0,this.loadFakeWorkerFiles().then(function(){this.setupFakeWorker(),t.resolve()}.bind(this))}function Pe(){this.objs={}}function ze(e){this.internalRenderTask=e,b.call(this)}function Be(e,t,n,i,r,s){this.callback=e,this.params=t,this.objs=n,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=r,this.pageNumber=s,this.running=!1,this.graphicsReadyCallback=null,this.cancelled=this.graphicsReady=!1}function Ne(e){"string"==typeof e?(e=e.replace(/>\\376\\377([^<]+)/g,function(e,t){for(var n=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,n,i){return String.fromCharCode(64*t+8*n+ +i)}),i="",r=0;r<n.length;r+=2)i=i+("&#x"+(65536+(256*n.charCodeAt(r)+n.charCodeAt(r+1))).toString(16).substring(1))+";";return">"+i}),e=(new DOMParser).parseFromString(e,"application/xml")):e instanceof Document||A("Metadata: Invalid metadata object"),this.metaDocument=e,this.metadata={},this.parse()}Fe.prototype={destroy:function(){this.pageCache=[],this.pagePromises=[];var e=this;this.messageHandler.send("Terminate",null,function(){e.worker&&e.worker.terminate()})},loadFakeWorkerFiles:function(){return PDFJS.fakeWorkerFilesLoadedPromise||(PDFJS.fakeWorkerFilesLoadedPromise=new b,M.loadScript(PDFJS.workerSrc)),PDFJS.fakeWorkerFilesLoadedPromise},setupFakeWorker:function(){g("Setting up fake worker.");var t={postMessage:function(e){t.onmessage({data:e})},terminate:function(){}},e=new l("main",t);this.setupMessageHandler(e),PDFJS.WorkerMessageHandler.setup(e)},setupMessageHandler:function(n){function t(e){n.send("UpdatePassword",e)}this.messageHandler=n;var i=this.pdfDataRangeTransport;i&&(i.addRangeListener(function(e,t){n.send("OnDataRange",{begin:e,chunk:t})}),i.addProgressListener(function(e){n.send("OnDataProgress",{loaded:e})}),n.on("RequestDataRange",function(e){i.requestDataRange(e.begin,e.end)},this)),n.on("GetDoc",function(e){this.pdfDocument=e=new Te(e.pdfInfo,this),this.workerReadyPromise.resolve(e)},this),n.on("NeedPassword",function(e){if(this.passwordCallback)return this.passwordCallback(t,q.NEED_PASSWORD);this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("IncorrectPassword",function(e){if(this.passwordCallback)return this.passwordCallback(t,q.INCORRECT_PASSWORD);this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("InvalidPDF",function(e){this.workerReadyPromise.reject(e.exception.name,e.exception)},this),n.on("MissingPDF",function(e){this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("UnknownError",function(e){this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("GetPage",function(e){e=e.pageInfo;var t=new Le(e,this);this.pageCache[e.pageIndex]=t,this.pagePromises[e.pageIndex].resolve(t)},this),n.on("GetAnnotations",function(e){this.pageCache[e.pageIndex].annotationsPromise.resolve(e.annotations)},this),n.on("StartRenderPage",function(e){var t=this.pageCache[e.pageIndex];t.stats.timeEnd("Page Request"),t._startRenderPage(e.transparency)},this),n.on("RenderPageChunk",function(e){this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList)},this),n.on("commonobj",function(e){var t,n,i=e[0],r=e[1];if(!this.commonObjs.hasData(i))switch(r){case"Font":"error"in(e=e[2])?(g("Error during font loading: "+(n=e.error)),this.commonObjs.resolve(i,n)):(t=new Ye(e),O.bind([t],function(){this.commonObjs.resolve(i,t)}.bind(this)));break;case"FontPath":this.commonObjs.resolve(i,e[2]);break;default:n("Got unknown common object type "+r)}},this),n.on("obj",function(e){var t=e[0],n=e[2],i=this.pageCache[e[1]];if(!i.objs.hasData(t))switch(n){case"JpegStream":e=e[3];var r=i.objs,s=new Image;s.onload=function(){r.resolve(t,s)},s.src="data:image/jpeg;base64,"+window.btoa(e);break;case"Image":e=e[3],i.objs.resolve(t,e),"data"in e&&8e6<e.data.length&&(i.cleanupAfterRender=!0);break;default:A("Got unknown object type "+n)}},this),n.on("DocProgress",function(e){this.progressCallback&&this.progressCallback({loaded:e.loaded,total:e.total})},this),n.on("DocError",function(e){this.workerReadyPromise.reject(e)},this),n.on("PageError",function(e){var t=this.pageCache[e.pageNum-1];t.displayReadyPromise?t.displayReadyPromise.reject(e.error):A(e.error)},this),n.on("JpegDecode",function(e,a){var t=e[0],l=e[1],c=(3!=l&&1!=l&&A("Only 3 component or 1 component can be returned"),new Image);c.onload=function(){var e=c.width,t=c.height,n=4*(i=e*t),i=new Uint8Array(i*l),r=P(e,t).getContext("2d");if(r.drawImage(c,0,0),r=r.getImageData(0,0,e,t).data,3==l)for(var s=0,o=0;s<n;s+=4,o+=3)i[o]=r[s],i[o+1]=r[s+1],i[o+2]=r[s+2];else if(1==l)for(o=s=0;s<n;s+=4,o++)i[o]=r[s];a.resolve({data:i,width:e,height:t})}.bind(this),t="data:image/jpeg;base64,"+window.btoa(t),c.src=t})},fetchDocument:function(e){e.disableAutoFetch=PDFJS.disableAutoFetch,e.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.messageHandler.send("GetDocRequest",{source:e,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,disableFontFace:PDFJS.disableFontFace})},getData:function(t){this.messageHandler.send("GetData",null,function(e){t.resolve(e)})},dataLoaded:function(){var t=new PDFJS.Promise;return this.messageHandler.send("DataLoaded",null,function(e){t.resolve(e)}),t},getPage:function(e,t){var n=e-1;return n in this.pagePromises?this.pagePromises[n]:(t=new PDFJS.Promise("Page "+e),this.pagePromises[n]=t,this.messageHandler.send("GetPageRequest",{pageIndex:n}),t)},getAnnotations:function(e){this.messageHandler.send("GetAnnotationsRequest",{pageIndex:e})},getDestinations:function(){var t=new PDFJS.Promise;return this.messageHandler.send("GetDestinations",null,function(e){t.resolve(e)}),t}};var He,We=Fe,qe=(Pe.prototype={ensureObj:function(e){var t;return this.objs[e]||(t={promise:new b(e),data:null,resolved:!1},this.objs[e]=t)},get:function(e,t){return t?(this.ensureObj(e).promise.then(t),null):((t=this.objs[e])&&t.resolved||A("Requesting object that isn't resolved yet "+e),t.data)},resolve:function(e,t){e=this.ensureObj(e);e.resolved=!0,e.data=t,e.promise.resolve(t)},isResolved:function(e){var t=this.objs;return!!t[e]&&t[e].resolved},hasData:function(e){return this.isResolved(e)},getData:function(e){var t=this.objs;return t[e]&&t[e].resolved?t[e].data:null},clear:function(){this.objs={}}},Pe),Ue=((ze.prototype=Object.create(b.prototype)).cancel=function(){this.internalRenderTask.cancel()},ze),n=(Be.prototype={initalizeGraphics:function(e){var t;this.cancelled||(PDFJS.pdfBug&&"StepperManager"in w&&w.StepperManager.enabled&&(this.stepper=w.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()),t=this.params,this.gfx=new Ke(t.canvasContext,this.commonObjs,this.objs,t.textLayer,t.imageLayer),this.gfx.beginDrawing(t.viewport,e),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback())},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continue.bind(this))},_continue:function(){this.running=!0,this.cancelled||(this.params.continueCallback?this.params.continueCallback(this._next.bind(this)):this._next())},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continue.bind(this),this.stepper),this.operatorListIdx===this.operatorList.fnArray.length&&(this.running=!1,this.operatorList.lastChunk)&&(this.gfx.endDrawing(),this.callback()))}},He=Be,PDFJS);Ne.prototype={parse:function(){var e=this.metaDocument.documentElement;if("rdf:rdf"!==e.nodeName.toLowerCase())for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName.toLowerCase();)e=e.nextSibling;var t=e?e.nodeName.toLowerCase():null;if(e&&"rdf:rdf"===t&&e.hasChildNodes())for(var n,i,r,s,o=0,a=(e=e.childNodes).length;o<a;o++)if("rdf:description"===(t=e[o]).nodeName.toLowerCase())for(r=0,s=t.childNodes.length;r<s;r++)"#text"!==t.childNodes[r].nodeName.toLowerCase()&&(i=(n=t.childNodes[r]).nodeName.toLowerCase(),this.metadata[i]=n.textContent.trim())},get:function(e){return this.metadata[e]||null},has:function(e){return void 0!==this.metadata[e]}},n.Metadata=Ne;var I={},_={getCanvas:function(e,t,n,i){return e in I?((e=I[e]).canvas.width=t,e.canvas.height=n,e.context.setTransform(1,0,0,1,0,0)):(n=(t=P(t,n)).getContext("2d"),i&&z(n),I[e]=e={canvas:t,context:n}),e},clear:function(){I={}}},Ve=function(e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=U,this.fontMatrix=R,this.wordSpacing=this.charSpacing=this.lineY=this.lineX=this.y=this.x=this.leading=0,this.textHScale=1,this.textRise=this.textRenderingMode=0,this.fillColorSpace=S.singletons.gray,this.fillColorSpaceObj=null,this.strokeColorSpace=S.singletons.gray,this.strokeColorObj=this.fillColorObj=this.strokeColorSpaceObj=null,this.strokeColor=this.fillColor="#000000",this.lineWidth=this.strokeAlpha=this.fillAlpha=1,this.paintFormXObjectDepth=0,this.old=e};Ve.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}};function Ge(e,t,n,i,r){this.ctx=e,this.current=new Ve,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.xobjs=this.res=null,this.commonObjs=t,this.objs=n,this.textLayer=i,this.imageLayer=r,this.groupStack=[],this.baseTransform=this.processingType3=null,this.baseTransformStack=[],this.groupLevel=0,e&&z(e)}function D(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var n=e.createImageData(t.width,t.height),i=t.data,r=n.data;if("set"in r)r.set(i);else for(var s=0,o=r.length;s<o;s++)r[s]=i[s];e.putImageData(n,0,0)}}function je(e,t,n){if(this.compiledGlyphs={},1===arguments.length){var i,r=e;for(i in r)this[i]=r[i]}}var Ke,Ye,Xe=["butt","round","square"],Je=["miter","round","bevel"],Qe={},Ze={},O=(Ge.prototype={slowCommands:{stroke:!0,closeStroke:!0,fill:!0,eoFill:!0,fillStroke:!0,eoFillStroke:!0,closeFillStroke:!0,closeEOFillStroke:!0,showText:!0,showSpacedText:!0,setStrokeColorSpace:!0,setFillColorSpace:!0,setStrokeColor:!0,setStrokeColorN:!0,setFillColor:!0,setFillColorN:!0,setStrokeGray:!0,setFillGray:!0,setStrokeRGBColor:!0,setFillRGBColor:!0,setStrokeCMYKColor:!0,setFillCMYKColor:!0,paintJpegXObject:!0,paintImageXObject:!0,paintInlineImageXObject:!0,paintInlineImageXObjectGroup:!0,paintImageMaskXObject:!0,paintImageMaskXObjectGroup:!0,shadingFill:!0},beginDrawing:function(e,t){var n=this.ctx.canvas.width,i=this.ctx.canvas.height;t?this.ctx.clearRect(0,0,n,i):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,n,i),this.ctx.restore()),n=e.transform,this.baseTransform=n.slice(),this.ctx.save(),this.ctx.transform.apply(this.ctx,n),this.textLayer&&this.textLayer.beginLayout(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,n,i){var r=e.argsArray,s=(e=e.fnArray,r.length);if(s==(t=t||0))return t;for(var o,a=Date.now()+15,l=this.commonObjs,c=this.objs,h=this.slowCommands;;){if(i&&t===i.nextBreakPoint)return i.breakIt(t,n),t;if("dependency"!==(o=e[t]))this[o].apply(this,r[t]);else for(var u=r[t],d=0,p=u.length;d<p;d++){var m=u[d],g="g_"==m.substring(0,2);if(!g&&!c.isResolved(m))return c.get(m,n),t;if(g&&!l.isResolved(m))return l.get(m,n),t}if(++t==s)return t;if(n&&h[o]&&Date.now()>a)return setTimeout(n,0),t}},endDrawing:function(){this.ctx.restore(),_.clear(),this.textLayer&&this.textLayer.endLayout(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=Xe[e]},setLineJoin:function(e){this.ctx.lineJoin=Je[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var n=this.ctx;"setLineDash"in n?(n.setLineDash(e),n.lineDashOffset=t):(n.mozDash=e,n.mozDashOffset=t)},setRenderingIntent:function(){},setFlatness:function(){},setGState:function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t],r=i[1];switch(i[0]){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=i[1];break;case"ca":this.current.fillAlpha=i[1],this.ctx.globalAlpha=i[1];break;case"BM":r&&r.name&&"Normal"!==r.name?(i=r.name.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}).substring(1),this.ctx.globalCompositeOperation=i,this.ctx.globalCompositeOperation!==i&&g('globalCompositeOperation "'+i+'" is not supported')):this.ctx.globalCompositeOperation="source-over"}}},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()},restore:function(){var e=this.stateStack.pop();e&&(this.current=e,this.ctx.restore())},transform:function(e,t,n,i,r,s){this.ctx.transform(e,t,n,i,r,s)},moveTo:function(e,t){this.ctx.moveTo(e,t),this.current.setCurrentPoint(e,t)},lineTo:function(e,t){this.ctx.lineTo(e,t),this.current.setCurrentPoint(e,t)},curveTo:function(e,t,n,i,r,s){this.ctx.bezierCurveTo(e,t,n,i,r,s),this.current.setCurrentPoint(r,s)},curveTo2:function(e,t,n,i){var r=this.current;this.ctx.bezierCurveTo(r.x,r.y,e,t,n,i),r.setCurrentPoint(n,i)},curveTo3:function(e,t,n,i){this.curveTo(e,t,n,i,n,i),this.current.setCurrentPoint(n,i)},closePath:function(){this.ctx.closePath()},rectangle:function(e,t,n,i){this.ctx.rect(e,t,n,i)},stroke:function(e){e=void 0===e||e;var t=this.ctx,n=this.current.strokeColor;0===this.current.lineWidth&&(t.lineWidth=this.getSinglePixelWidth()),t.globalAlpha=this.current.strokeAlpha,n&&n.hasOwnProperty("type")&&"Pattern"===n.type?(t.save(),t.strokeStyle=n.getPattern(t,this),t.stroke(),t.restore()):t.stroke(),e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,n=this.current.fillColor,i=!1;if(n&&n.hasOwnProperty("type")&&"Pattern"===n.type&&(t.save(),t.fillStyle=n.getPattern(t,this),i=!0),this.pendingEOFill){if("mozFillRule"in this.ctx)this.ctx.mozFillRule="evenodd",this.ctx.fill(),this.ctx.mozFillRule="nonzero";else try{this.ctx.fill("evenodd")}catch(e){this.ctx.fill()}this.pendingEOFill=!1}else this.ctx.fill();i&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=Qe},eoClip:function(){this.pendingClip=Ze},beginText:function(){this.current.textMatrix=U,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){if("pendingTextPaths"in this){var e=this.pendingTextPaths,t=this.ctx;t.save(),t.beginPath();for(var n=0;n<e.length;n++){var i=e[n];t.setTransform.apply(t,i.transform),t.translate(i.x,i.y),i.addToPath(t,i.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else this.ctx.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var n,i=this.commonObjs.get(e),r=this.current;i||A("Can't find font for "+e),r.fontMatrix=i.fontMatrix||R,0!==r.fontMatrix[0]&&0!==r.fontMatrix[3]||g("Invalid font matrix for font "+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=i,this.current.fontSize=t,i.coded||(r=i.black?i.bold?"bolder":"bold":i.bold?"bold":"normal",e=i.italic?"italic":"normal",i='"'+(i.loadedName||"sans-serif")+'", '+i.fallbackName,this.current.fontSizeScale=16!=(n=16<=t?t:16)?1:t/16,this.ctx.font=e+" "+r+" "+n+"px "+i)},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,n,i,r,s){this.current.textMatrix=[e,t,n,i,r,s],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},applyTextTransforms:function(){var e=this.ctx,t=this.current;e.transform.apply(e,t.textMatrix),e.translate(t.x,t.y+t.textRise),0<t.fontDirection?e.scale(t.textHScale,-1):e.scale(-t.textHScale,1)},createTextGeometry:function(){var e={},t=this.current.font,n=(a=this.ctx.mozCurrentTransform)[0],i=a[1],r=a[2],s=a[3],o=a[4],a=a[5],l=0<=n?Math.sqrt(n*n+i*i):-Math.sqrt(n*n+i*i),r=0<=s?Math.sqrt(r*r+s*s):-Math.sqrt(r*r+s*s),n=Math.atan2(i,n);return e.x=o,e.y=a,e.hScale=l,e.vScale=r,e.angle=n,e.spaceWidth=t.spaceWidth,e.fontName=t.loadedName,e.fontFamily=t.fallbackName,e.fontSize=this.current.fontSize,e},paintChar:function(e,t,n){var i,r=this.ctx,s=(a=this.current).font,o=a.fontSize/a.fontSizeScale,a=3&(l=a.textRenderingMode),l=!!(4&l);(s.disableFontFace||l)&&(i=s.getPathGenerator(this.commonObjs,e)),s.disableFontFace?(r.save(),r.translate(t,n),r.beginPath(),i(r,o),0!=a&&2!=a||r.fill(),1!=a&&2!=a||r.stroke(),r.restore()):(0!=a&&2!=a||r.fillText(e,t,n),1!=a&&2!=a||r.strokeText(e,t,n)),l&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:r.mozCurrentTransform,x:t,y:n,fontSize:o,addToPath:i})},showText:function(e,t){var n,i=this.ctx,r=this.current,s=r.font,o=r.fontSize,a=r.fontSizeScale,l=r.charSpacing,c=r.wordSpacing,h=r.textHScale*r.fontDirection,u=r.fontMatrix||R,d=e.length,t=!(!this.textLayer||t),p=0,m=s.vertical,g=s.defaultVMetrics;if(s.coded){i.save(),i.transform.apply(i,r.textMatrix),i.translate(r.x,r.y),i.scale(h,1),t&&(this.save(),i.scale(1,-1),n=this.createTextGeometry(),this.restore());for(var f=0;f<d;++f){var w=e[f];null===w?(this.ctx.translate(c,0),r.x+=c*h):(this.processingType3=w,this.save(),i.scale(o,o),i.transform.apply(i,u),this.executeOperatorList(w.operatorList),this.restore(),x=(M.applyTransform([w.width,0],u)[0]*o+l)*r.fontDirection,i.translate(x,0),r.x+=x*h,p+=x)}i.restore(),this.processingType3=null}else{i.save(),this.applyTextTransforms();var v,y,b,x,A,k,S,C,f=r.lineWidth,u=r.textMatrix[0],$=r.textMatrix[1],f=0===(u=Math.sqrt(u*u+$*$))||0===f?this.getSinglePixelWidth():f/u;for(t&&(n=this.createTextGeometry()),1!=a&&(i.scale(a,a),f/=a),i.lineWidth=f,f=u=0;f<d;++f)null===(w=e[f])?u+=r.fontDirection*c:($=!1,v=w.fontChar,A=w.vmetric||g,m&&(y=-(y=w.vmetric?A[1]:.5*w.width)*o*r.fontMatrix[0],b=A[2]*o*r.fontMatrix[0]),A=(x=A?-A[0]:w.width)*o*r.fontMatrix[0]+l*r.fontDirection,k=w.accent,w.disabled||(S=m?(w=y/a,(u+b)/a):(w=u/a,0),s.remeasure&&0<x&&(x/=$=1e3*i.measureText(v).width/r.fontSize*r.fontSizeScale,$=!0,i.save(),i.scale(x,1),w/=x,k)&&(C/=x),this.paintChar(v,w,S),k&&(C=w+k.offset.x/a,v=S-k.offset.y/a,this.paintChar(k.fontChar,C,v))),u+=A,p+=A,$&&i.restore());m?r.y-=u*h:r.x+=u*h,i.restore()}return t&&(n.canvasWidth=p,m&&(n.angle+=Math.PI/2),this.textLayer.appendText(n)),p},showSpacedText:function(e){var t,n=this.ctx,i=this.current,r=i.fontSize,s=.001*i.textHScale*i.fontDirection,o=e.length,a=0,l=!!this.textLayer,c=i.font.vertical,h=0;for(l&&(n.save(),this.applyTextTransforms(),t=this.createTextGeometry(),n.restore()),n=0;n<o;++n){var u=e[n];"number"==typeof u?(u=-u*r*s,c?i.y+=u:i.x+=u,l&&(h+=u)):(u=this.showText(u,!0),l&&(a+=h+u,h=0))}l&&(t.canvasWidth=a,c&&(t.angle+=Math.PI/2),this.textLayer.appendText(t))},nextLineShowText:function(e){this.nextLine(),this.showText(e)},nextLineSetSpacingShowText:function(e,t,n){this.setWordSpacing(e),this.setCharSpacing(t),this.nextLineShowText(n)},setCharWidth:function(){},setCharWidthAndBounds:function(e,t,n,i,r,s){this.rectangle(n,i,r-n,s-i),this.clip(),this.endPath()},setStrokeColorSpace:function(e){this.current.strokeColorSpace=S.fromIR(e)},setFillColorSpace:function(e){this.current.fillColorSpace=S.fromIR(e)},setStrokeColor:function(){var e=this.current.strokeColorSpace.getRgb(arguments,0),e=M.makeCssRgb(e);this.ctx.strokeStyle=e,this.current.strokeColor=e},getColorN_Pattern:function(e,t){var n,i;return"TilingPattern"==e[0]?(n=e[1],(t=t.base)&&(i=t.getRgb(n,0)),n=new oe(e,i,this.ctx,this.objs,this.commonObjs,this.baseTransform)):"RadialAxial"==e[0]||"Dummy"==e[0]?n=k.shadingFromIR(e):A("Unkown IR type "+e[0]),n},setStrokeColorN:function(){var e=this.current.strokeColorSpace;"Pattern"==e.name?this.current.strokeColor=this.getColorN_Pattern(arguments,e):this.setStrokeColor.apply(this,arguments)},setFillColor:function(){var e=this.current.fillColorSpace.getRgb(arguments,0),e=M.makeCssRgb(e);this.ctx.fillStyle=e,this.current.fillColor=e},setFillColorN:function(){var e=this.current.fillColorSpace;"Pattern"==e.name?this.current.fillColor=this.getColorN_Pattern(arguments,e):this.setFillColor.apply(this,arguments)},setStrokeGray:function(e){this.current.strokeColorSpace=S.singletons.gray;var t=this.current.strokeColorSpace.getRgb(arguments,0),t=M.makeCssRgb(t);this.ctx.strokeStyle=t,this.current.strokeColor=t},setFillGray:function(e){this.current.fillColorSpace=S.singletons.gray;var t=this.current.fillColorSpace.getRgb(arguments,0),t=M.makeCssRgb(t);this.ctx.fillStyle=t,this.current.fillColor=t},setStrokeRGBColor:function(e,t,n){this.current.strokeColorSpace=S.singletons.rgb;var i=this.current.strokeColorSpace.getRgb(arguments,0),i=M.makeCssRgb(i);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(e,t,n){this.current.fillColorSpace=S.singletons.rgb;var i=this.current.fillColorSpace.getRgb(arguments,0),i=M.makeCssRgb(i);this.ctx.fillStyle=i,this.current.fillColor=i},setStrokeCMYKColor:function(e,t,n,i){this.current.strokeColorSpace=S.singletons.cmyk;var r=M.makeCssCmyk(arguments);this.ctx.strokeStyle=r,this.current.strokeColor=r},setFillCMYKColor:function(e,t,n,i){this.current.fillColorSpace=S.singletons.cmyk;var r=M.makeCssCmyk(arguments);this.ctx.fillStyle=r,this.current.fillColor=r},shadingFill:function(e){var t,n,i,r,s=this.ctx,o=(this.save(),e=k.shadingFromIR(e),s.fillStyle=e.getPattern(s,this),s.mozCurrentTransformInverse);o?(i=(s=s.canvas).width,r=s.height,s=M.applyTransform([0,0],o),e=M.applyTransform([0,r],o),t=M.applyTransform([i,0],o),n=M.applyTransform([i,r],o),o=Math.min(s[0],e[0],t[0],n[0]),i=Math.min(s[1],e[1],t[1],n[1]),r=Math.max(s[0],e[0],t[0],n[0]),s=Math.max(s[1],e[1],t[1],n[1]),this.ctx.fillRect(o,i,r-o,s-i)):this.ctx.fillRect(-1e10,-1e10,2e10,2e10),this.restore()},beginInlineImage:function(){A("Should not call beginInlineImage")},beginImageData:function(){A("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){this.save(),this.current.paintFormXObjectDepth++,this.baseTransformStack.push(this.baseTransform),e&&f(e)&&6==e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t&&f(t)&&4==t.length&&(this.rectangle(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.clip(),this.endPath())},paintFormXObjectEnd:function(){for(var e=this.current.paintFormXObjectDepth;this.restore(),this.current.paintFormXObjectDepth>=e;);this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx,n=(e.isolated||m("TODO: Support non-isolated groups."),e.knockout&&v("Support knockout groups."),t.mozCurrentTransform),i=(e.matrix&&t.transform.apply(t,e.matrix),e.bbox||A("Bounding box is required."),M.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform)),r=(e=Math.max(Math.ceil(i[2]-i[0]),1),Math.max(Math.ceil(i[3]-i[1]),1));for(e=_.getCanvas("groupAt"+this.groupLevel,e,r,!0).context,r=i[0],i=i[1],e.translate(-r,-i),e.transform.apply(e,n),t.setTransform(1,0,0,1,0,0),t.translate(r,i),i=0,r=(n="strokeStyle fillStyle fillRule globalAlpha lineWidth lineCap lineJoin miterLimit globalCompositeOperation font".split(" ")).length;i<r;i++){var s=n[i];s in t&&(e[s]=t[s])}"setLineDash"in t?(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset):"mozDash"in t&&(e.mozDash=t.mozDash,e.mozDashOffset=t.mozDashOffset),this.ctx=e,this.setGState([["SMask","None"],["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++},endGroup:function(){this.groupLevel--;var e=this.ctx;this.ctx=this.groupStack.pop(),"imageSmoothingEnabled"in this.ctx?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,this.ctx.drawImage(e.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new Ve},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,n){this.save(),e&&f(e)&&4==e.length&&(this.rectangle(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.clip(),this.endPath()),this.transform.apply(this,t),this.transform.apply(this,n)},endAnnotation:function(){this.restore()},paintJpegXObject:function(e,t,n){var i=this.objs.get(e),r=(i||A("Dependent image isn't ready yet"),this.save(),this.ctx);r.scale(1/t,-1/n),r.drawImage(i,0,0,i.width,i.height,0,-n,t,n),this.imageLayer&&(i=r.mozCurrentTransformInverse,r=this.getCanvasPosition(0,0),this.imageLayer.appendImage({objId:e,left:r[0],top:r[1],width:t/i[0],height:n/i[3]})),this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,o=e.width,a=e.height,n=this.processingType3;if(n&&!("compiled"in n)){if(o<=1e3&&a<=1e3)e:{var i,r=e.data,s=o+1,l=new Uint8Array(s*(a+1)),c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=3,u=4*o,d=0;for(0!==r[3]&&(l[0]=1,++d),m=1;m<o;m++)r[h]!==r[h+4]&&(l[m]=r[h]?2:1,++d),h+=4;for(0!==r[h]&&(l[m]=2,++d),h+=4,f=1;f<a;f++){i=f*s,r[h-u]!==r[h]&&(l[i]=r[h]?1:8,++d);for(var p=(r[h]?4:0)+(r[h-u]?8:0),m=1;m<o;m++)c[p=(p>>2)+(r[h+4]?4:0)+(r[h-u+4]?8:0)]&&(l[i+m]=c[p],++d),h+=4;if(r[h-u]!==r[h]&&(l[i+m]=r[h]?2:4,++d),h+=4,1e3<d){f=null;break e}}for(i=f*s,0!==r[h-=u]&&(l[i]=8,++d),m=1;m<o;m++)r[h]!==r[h+4]&&(l[i+m]=r[h]?4:8,++d),h+=4;if(0!==r[h]&&(l[i+m]=4,++d),1e3<d)f=null;else{for(var r=new Int32Array([0,s,-1,0,-s,0,0,0,1]),g=[],f=0;d&&f<=a;f++){for(i=(m=f*s)+o;m<i&&!l[m];)m++;if(m!==i){i=[m%s,f],c=l[m],h=m;do{for(u=r[c];!l[m+=u];);}while(5!==(u=l[m])&&10!==u?(c=u,l[m]=0):l[m]&=(c=u&51*c>>4)>>2|c<<2,i.push(m%s),i.push(m/s|0),--d,h!==m);g.push(i),--f}}f=function(e){e.save(),e.scale(1/o,-1/a),e.translate(0,-a),e.beginPath();for(var t=0,n=g.length;t<n;t++){var i=g[t];e.moveTo(i[0],i[1]);for(var r=2,s=i.length;r<s;r+=2)e.lineTo(i[r],i[r+1])}e.fill(),e.beginPath(),e.restore()}}}else f=null;n.compiled=f}n&&n.compiled?n.compiled(t):((n=(t=_.getCanvas("maskCanvas",o,a)).context).save(),D(n,e),n.globalCompositeOperation="source-in",e=this.current.fillColor,n.fillStyle=e&&e.hasOwnProperty("type")&&"Pattern"===e.type?e.getPattern(n,this):e,n.fillRect(0,0,o,a),n.restore(),this.paintInlineImageXObject(t.canvas))},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,n=0,i=e.length;n<i;n++){var r=e[n],s=r.width,o=r.height,a=_.getCanvas("maskCanvas",s,o),l=a.context,c=(l.save(),D(l,r),l.globalCompositeOperation="source-in",this.current.fillColor);l.fillStyle=c&&c.hasOwnProperty("type")&&"Pattern"===c.type?c.getPattern(l,this):c,l.fillRect(0,0,s,o),l.restore(),t.save(),t.transform.apply(t,r.transform),t.scale(1,-1),t.drawImage(a.canvas,0,0,s,o,0,-1,1,1),t.restore()}},paintImageXObject:function(e){(e=this.objs.get(e))||A("Dependent image isn't ready yet"),this.paintInlineImageXObject(e)},paintInlineImageXObject:function(e){for(var t,n,i=e.width,r=e.height,s=this.ctx,o=(this.save(),s.scale(1/i,-1/r),s.mozCurrentTransformInverse),a=o[0],l=o[1],a=Math.max(Math.sqrt(a*a+l*l),1),l=o[2],c=o[3],l=Math.max(Math.sqrt(l*l+c*c),1),c=e instanceof HTMLElement?e:(n=(t=_.getCanvas("inlineImage",i,r)).context,D(n,e),t.canvas),h=i,u=r,d="prescale1";2<a&&1<h||2<l&&1<u;){var p=h,m=u;2<a&&1<h&&(a/=h/(p=Math.ceil(h/2))),2<l&&1<u&&(l/=u/(m=Math.ceil(u/2))),(n=(t=_.getCanvas(d,p,m)).context).clearRect(0,0,p,m),n.drawImage(c,0,0,h,u,0,0,p,m),c=t.canvas,h=p,u=m,d="prescale1"===d?"prescale2":"prescale1"}s.drawImage(c,0,0,h,u,0,-r,i,r),this.imageLayer&&(s=this.getCanvasPosition(0,-r),this.imageLayer.appendImage({imgData:e,left:s[0],top:s[1],width:i/o[0],height:r/o[3]})),this.restore()},paintInlineImageXObjectGroup:function(e,t){var n=this.ctx,i=e.width,r=e.height,s=_.getCanvas("inlineImage",i,r);D(s.context,e);for(var o=0,a=t.length;o<a;o++){var l=t[o];n.save(),n.transform.apply(n,l.transform),n.scale(1,-1),n.drawImage(s.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer&&(l=this.getCanvasPosition(l.x,l.y),this.imageLayer.appendImage({imgData:e,left:l[0],top:l[1],width:i,height:r})),n.restore()}},markPoint:function(){},markPointProps:function(){},beginMarkedContent:function(){},beginMarkedContentProps:function(){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){if(this.pendingClip){if(this.pendingClip==Ze)if("mozFillRule"in this.ctx)this.ctx.mozFillRule="evenodd",this.ctx.clip(),this.ctx.mozFillRule="nonzero";else try{this.ctx.clip("evenodd")}catch(e){this.ctx.clip()}else this.ctx.clip();this.pendingClip=null}this.ctx.beginPath()},getSinglePixelWidth:function(){var e=this.ctx.mozCurrentTransformInverse;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1],e[2]*e[2]+e[3]*e[3]))},getCanvasPosition:function(e,t){var n=this.ctx.mozCurrentTransform;return[n[0]*e+n[2]*t+n[4],n[1]*e+n[3]*t+n[5]]}},Ke=Ge,PDFJS.disableFontFace=!1,n=!y&&!!((n=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(window.navigator.userAgent))&&14<=n[1]),{insertRule:function(e){var t=document.getElementById("PDFJS_FONT_STYLE_TAG");t||((t=document.createElement("style")).id="PDFJS_FONT_STYLE_TAG",document.documentElement.getElementsByTagName("head")[0].appendChild(t)),(t=t.sheet).insertRule(e,t.cssRules.length)},get loadTestFont(){return e(this,"loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))},loadTestFontId:0,loadingContext:{requests:[],nextRequestId:0},isSyncFontLoadingSupported:n,bind:function(e,t){y&&A("bind() shall be called from main thread");for(var n=[],i=[],r=0,s=e.length;r<s;r++){var o,a=e[r];!a.attached&&!1!==a.loading&&(a.attached=!0,o=a.bindDOM())&&(n.push(o),i.push(a))}r=O.queueLoadingCallback(t),0<n.length&&!this.isSyncFontLoadingSupported?O.prepareFontLoadEvent(n,i,r):r.complete()},queueLoadingCallback:function(e){var t=O.loadingContext,n={id:"pdfjs-font-loading-"+t.nextRequestId++,complete:function(){for(n.end&&A("completeRequest() cannot be called twice"),n.end=Date.now();0<t.requests.length&&t.requests[0].end;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e,started:Date.now()};return t.requests.push(n),n},prepareFontLoadEvent:function(e,t,n){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function r(e,t,n,i){return l.substr(0,t)+i+(t=l.substr(t+n))}function s(e,t){30<++a?(g("Load test font never loaded."),t()):(o.font="30px "+e,o.fillText(".",0,20),0<o.getImageData(0,0,1,1).data[3]?t():setTimeout(s.bind(null,e,t)))}(e=document.createElement("canvas")).width=1,e.height=1;for(var o=e.getContext("2d"),a=0,l=(e="lt"+Date.now()+this.loadTestFontId++,this.loadTestFont),c=i(l=r(0,976,e.length,e),16),h=0,u=e.length-3;h<u;h+=4)c=c-1482184792+i(e,h)|0;for(h<e.length&&(c=c-1482184792+i(e+"XXX",h)|0),l=r(0,16,4,String.fromCharCode(c>>24&255)+String.fromCharCode(c>>16&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(255&c)),h="url(data:font/opentype;base64,"+btoa(l)+");",O.insertRule('@font-face { font-family:"'+e+'";src:'+h+"}"),c=[],h=0,u=t.length;h<u;h++)c.push(t[h].loadedName);c.push(e);var d=document.createElement("div");for(d.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,u=c.length;h<u;++h)(t=document.createElement("span")).textContent="Hi",t.style.fontFamily=c[h],d.appendChild(t);document.body.appendChild(d),s(e,function(){document.body.removeChild(d),n.complete()})}});je.prototype={bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;for(var e=this.data,t="",n=e.length,i=0;i<n;++i)t+=String.fromCharCode(e[i]);return e=this.loadedName,t="url(data:"+this.mimetype+";base64,"+window.btoa(t)+");",O.insertRule(e='@font-face { font-family:"'+e+'";src:'+t+"}"),PDFJS.pdfBug&&"FontInspector"in w&&w.FontInspector.enabled&&w.FontInspector.fontAdded(this,t),e},getPathGenerator:function(e,t){return t in this.compiledGlyphs||(e=e.get(this.loadedName+"_path_"+t),this.compiledGlyphs[t]=new Function("c","size",e)),this.compiledGlyphs[t]}},Ye=je}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){var e=(document.body||document.getElementsByTagName("head")[0]).lastChild.src;return e&&e.replace(/\.js$/i,".worker.js")}()),angular.module("ngPDFViewer",[]).factory("RecursionHelper",["$compile",function(s){return{compile:function(e,n){angular.isFunction(n)&&(n={post:n});var i,r=e.contents().remove();return{pre:n&&n.pre?n.pre:null,post:function(e,t){(i=i||s(r))(e,function(e){t.append(e)}),n&&n.post&&n.post.apply(null,arguments)}}}}}]).directive("pdfpageviewer",[function(){return{restrict:"E",template:"<canvas></canvas>",scope:{onPageLoad:"=",page:"=",pdfDoc:"="},controller:["$scope","$element",function(i,r){i.scale=1;const s=r.find("canvas")[0];i.$watch("pdfDoc",e=>{e&&i.renderPage(i.page)}),i.renderPage=async function(e){var e=await i.pdfDoc.getPage(e),t=r[0].clientWidth/e.getViewport(1).width,t=e.getViewport(t),n=(s.height=t.height,s.width=t.width,s.getContext("2d"));return await e.render({canvasContext:n,viewport:t}),i.onPageLoad&&i.$apply(function(){i.onPageLoad({page:i.page,total:i.pdfDoc.numPages})}),!0}}]}}]).directive("pdfviewer",["RecursionHelper",function(t){return{restrict:"E",template:"<pdfpageviewer ng-repeat='p in [].constructor(pdfDoc.numPages) track by $index' page='$index + 1' pdf-doc='pdfDoc'></pdfpageviewer>",scope:{onPageLoad:"&",loadProgress:"&",src:"@",id:"="},compile:function(e){return t.compile(e)},controller:["$scope",function(i){i.pdfDoc=null,i.scale=1,i.documentProgress=function(e){i.loadProgress&&i.loadProgress({state:"loading",loaded:e.loaded,total:e.total})},i.loadPDF=function(e){PDFJS.getDocument(e,null,null,i.documentProgress).then(function(e){i.$apply(()=>{i.pdfDoc=e}),i.loadProgress&&i.loadProgress({state:"finished",loaded:0,total:0})},function(e,t){console.log("PDF load error: "+e),i.loadProgress&&i.loadProgress({state:"error",loaded:0,total:0})})},i.$on("pdfviewer.nextPage",function(e,t){null===t&&i.pageNum<i.pdfDoc.numPages&&(i.pageNum++,i.renderPage(i.pageNum))}),i.$on("pdfviewer.prevPage",function(e,t){null===t&&1<i.pageNum&&(i.pageNum--,i.renderPage(i.pageNum))}),i.$on("pdfviewer.gotoPage",function(e,t,n){null===t&&1<=n&&n<=i.pdfDoc.numPages&&(i.pageNum=n,i.renderPage(i.pageNum))}),i.$watch("src",()=>{i.loadPDF(i.src)})}]}}]).service("PDFViewerService",["$rootScope",function(n){var e={nextPage:function(){n.$broadcast("pdfviewer.nextPage")},prevPage:function(){n.$broadcast("pdfviewer.prevPage")},Instance:function(e){var t=e;return{prevPage:function(){n.$broadcast("pdfviewer.prevPage",t)},nextPage:function(){n.$broadcast("pdfviewer.nextPage",t)},gotoPage:function(e){n.$broadcast("pdfviewer.gotoPage",t,e)}}}};return e}]),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){"use strict";var F={d:function(e,t){for(var n in t)F.o(t,n)&&!F.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};F.d(t,{default:function(){return $i}});class P{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,i,r="KaTeX parse error: "+e;var s=t&&t.loc;if(s&&s.start<=s.end){const e=s.lexer.input,t=(n=s.start,i=s.end,n===e.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ",e.slice(n,i).replace(/[^]/g,"$&̲"));var s=15<n?"…"+e.slice(n-15,n):e.slice(0,n),o=i+15<e.length?e.slice(i,i+15)+"…":e.slice(i);r+=s+t+o}t=new Error(r);return t.name="ParseError",t.__proto__=P.prototype,null!=(t.position=n)&&null!=i&&(t.length=i-n),t.rawMessage=e,t}}P.prototype.__proto__=Error.prototype;var C=P;function z(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?z(e.body[0]):e:"font"===e.type?z(e.body):e}const B=/([A-Z])/g,N={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},H=/[&><"']/g;var $={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(H,e=>N[e])},hyphenate:function(e){return e.replace(B,"-$1").toLowerCase()},getBaseElem:z,isCharacterBox:function(e){e=z(e);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return e?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};const W={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class q{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const n in W){var t;W.hasOwnProperty(n)&&(t=W[n],this[n]=void 0!==e[n]?t.processor?t.processor(e[n]):e[n]:function(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(t))}}reportNonstrict(e,t,n){let i=this.strict;if((i="function"==typeof i?i(e,t,n):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){let i=this.strict;if("function"==typeof i)try{i=i(e,t,n)}catch(e){i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){const t=$.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class U{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return V[G[this.id]]}sub(){return V[j[this.id]]}fracNum(){return V[K[this.id]]}fracDen(){return V[Y[this.id]]}cramp(){return V[X[this.id]]}text(){return V[J[this.id]]}isTight(){return 2<=this.size}}const V=[new U(0,0,!1),new U(1,0,!0),new U(2,1,!1),new U(3,1,!0),new U(4,2,!1),new U(5,2,!0),new U(6,3,!1),new U(7,3,!0)],G=[4,5,4,5,6,7,6,7],j=[5,5,5,5,7,7,7,7],K=[2,3,4,5,6,7,6,7],Y=[3,3,5,5,7,7,7,7],X=[1,1,3,3,5,5,7,7],J=[0,1,2,3,2,3,2,3];var R={DISPLAY:V[0],TEXT:V[2],SCRIPT:V[4],SCRIPTSCRIPT:V[6]};const Q=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],Z=[];function ee(t){for(let e=0;e<Z.length;e+=2)if(t>=Z[e]&&t<=Z[e+1])return 1}Q.forEach(e=>e.blocks.forEach(e=>Z.push(...e)));const te={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class ne{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return $.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(e=>e.toText()).join("")}}var ie={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const re={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},se={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function oe(e,t,n){if(!ie[t])throw new Error("Font metrics not found for font: "+t+".");let i=e.charCodeAt(0),r=ie[t][i];if(!r&&e[0]in se&&(i=se[e[0]].charCodeAt(0),r=ie[t][i]),r||"text"!==n||ee(i)&&(r=ie[t][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}function ae(e,t){return t.size<2?e:ce[e-1][t.size-1]}const le={},ce=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],he=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class ue{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||ue.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=he[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new ue(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ae(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:he[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=ae(ue.BASESIZE,e);return this.size===t&&this.textSize===ue.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ue.BASESIZE?["sizing","reset-size"+this.size,"size"+ue.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t=5<=e?0:3<=e?1:2;if(!le[t]){const e=le[t]={cssEmPerMu:re.quad[t]/18};for(const n in re)re.hasOwnProperty(n)&&(e[n]=re[n][t])}return le[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ue.BASESIZE=6;var de=ue;function pe(e){return(e="string"!=typeof e?e.unit:e)in ve||e in ye||"ex"===e}function M(e,t){let n;if(e.unit in ve)n=ve[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var i=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)n=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new C("Invalid unit: '"+e.unit+"'");n=i.fontMetrics().quad}i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)}function me(e){return e.filter(e=>e).join(" ")}function ge(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}}function fe(e){var t=document.createElement(e);t.className=me(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}function we(e){let t="<"+e,n=(this.classes.length&&(t+=' class="'+$.escape(me(this.classes))+'"'),"");for(const e in this.style)this.style.hasOwnProperty(e)&&(n+=$.hyphenate(e)+":"+this.style[e]+";");n&&(t+=' style="'+$.escape(n)+'"');for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&(t+=" "+e+'="'+$.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">"}const ve={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ye={ex:!0,em:!0,mu:!0},T=function(e){return+e.toFixed(4)+"em"};class be{constructor(e,t,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,e,n,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return fe.call(this,"span")}toMarkup(){return we.call(this,"span")}}class xe{constructor(e,t,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,t,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return fe.call(this,"a")}toMarkup(){return we.call(this,"a")}}class Ae{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return $.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e='<img src="'+$.escape(this.src)+'" alt="'+$.escape(this.alt)+'"',t="";for(const e in this.style)this.style.hasOwnProperty(e)&&(t+=$.hyphenate(e)+":"+this.style[e]+";");return t&&(e+=' style="'+$.escape(t)+'"'),e+="'/>"}}const ke={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class m{constructor(e,t,n,i,r,s,o,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=i||0,this.skew=r||0,this.width=s||0,this.classes=o||[],this.style=a||{},this.maxFontSize=0;e=function(t){for(let e=0;e<Q.length;e++){var n=Q[e];for(let e=0;e<n.blocks.length;e++){var i=n.blocks[e];if(t>=i[0]&&t<=i[1])return n.name}}return null}(this.text.charCodeAt(0));e&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=ke[this.text])}hasClass(e){return $.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0<this.italic&&((t=document.createElement("span")).style.marginRight=T(this.italic)),0<this.classes.length&&((t=t||document.createElement("span")).className=me(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span",n=(this.classes.length&&(e=!0,t=(t+=' class="')+$.escape(me(this.classes))+'"'),"");0<this.italic&&(n+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(n+=$.hyphenate(e)+":"+this.style[e]+";");n&&(e=!0,t+=' style="'+$.escape(n)+'"');var i=$.escape(this.text);return e?t=(t+=">")+i+"</span>":i}}class Se{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t='<svg xmlns="http://www.w3.org/2000/svg"';for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+$.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</svg>"}}class Ce{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",te[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+$.escape(this.alternate)+'"/>':'<path d="'+$.escape(te[this.pathName])+'"/>'}}class $e{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="<line";for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+$.escape(this.attributes[t])+'"');return e+="/>"}}function Re(e){if(e instanceof m)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}const Me={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Te={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Le={math:{},text:{}};var u=Le;function n(e,t,n,i,r,s){Le[e][r]={font:t,group:n,replace:i},s&&i&&(Le[e][i]=Le[e][r])}var i="math",r="text",s="main",e="ams",o="accent-token",a="bin",l="close",Ee="inner",c="mathord",h="op-token",d="open",Ie="punct",p="rel",g="spacing",f="textord";n(i,s,p,"≡","\\equiv",!0),n(i,s,p,"≺","\\prec",!0),n(i,s,p,"≻","\\succ",!0),n(i,s,p,"","\\sim",!0),n(i,s,p,"⊥","\\perp"),n(i,s,p,"⪯","\\preceq",!0),n(i,s,p,"⪰","\\succeq",!0),n(i,s,p,"≃","\\simeq",!0),n(i,s,p,"","\\mid",!0),n(i,s,p,"≪","\\ll",!0),n(i,s,p,"≫","\\gg",!0),n(i,s,p,"≍","\\asymp",!0),n(i,s,p,"∥","\\parallel"),n(i,s,p,"⋈","\\bowtie",!0),n(i,s,p,"⌣","\\smile",!0),n(i,s,p,"⊑","\\sqsubseteq",!0),n(i,s,p,"⊒","\\sqsupseteq",!0),n(i,s,p,"≐","\\doteq",!0),n(i,s,p,"⌢","\\frown",!0),n(i,s,p,"∋","\\ni",!0),n(i,s,p,"∝","\\propto",!0),n(i,s,p,"⊢","\\vdash",!0),n(i,s,p,"⊣","\\dashv",!0),n(i,s,p,"∋","\\owns"),n(i,s,Ie,".","\\ldotp"),n(i,s,Ie,"⋅","\\cdotp"),n(i,s,f,"#","\\#"),n(r,s,f,"#","\\#"),n(i,s,f,"&","\\&"),n(r,s,f,"&","\\&"),n(i,s,f,"ℵ","\\aleph",!0),n(i,s,f,"∀","\\forall",!0),n(i,s,f,"ℏ","\\hbar",!0),n(i,s,f,"∃","\\exists",!0),n(i,s,f,"∇","\\nabla",!0),n(i,s,f,"♭","\\flat",!0),n(i,s,f,"","\\ell",!0),n(i,s,f,"♮","\\natural",!0),n(i,s,f,"♣","\\clubsuit",!0),n(i,s,f,"℘","\\wp",!0),n(i,s,f,"♯","\\sharp",!0),n(i,s,f,"♢","\\diamondsuit",!0),n(i,s,f,"","\\Re",!0),n(i,s,f,"♡","\\heartsuit",!0),n(i,s,f,"","\\Im",!0),n(i,s,f,"♠","\\spadesuit",!0),n(i,s,f,"§","\\S",!0),n(r,s,f,"§","\\S"),n(i,s,f,"¶","\\P",!0),n(r,s,f,"¶","\\P"),n(i,s,f,"†","\\dag"),n(r,s,f,"†","\\dag"),n(r,s,f,"†","\\textdagger"),n(i,s,f,"‡","\\ddag"),n(r,s,f,"‡","\\ddag"),n(r,s,f,"‡","\\textdaggerdbl"),n(i,s,l,"⎱","\\rmoustache",!0),n(i,s,d,"⎰","\\lmoustache",!0),n(i,s,l,"⟯","\\rgroup",!0),n(i,s,d,"⟮","\\lgroup",!0),n(i,s,a,"∓","\\mp",!0),n(i,s,a,"⊖","\\ominus",!0),n(i,s,a,"⊎","\\uplus",!0),n(i,s,a,"⊓","\\sqcap",!0),n(i,s,a,"","\\ast"),n(i,s,a,"⊔","\\sqcup",!0),n(i,s,a,"◯","\\bigcirc",!0),n(i,s,a,"∙","\\bullet",!0),n(i,s,a,"‡","\\ddagger"),n(i,s,a,"≀","\\wr",!0),n(i,s,a,"⨿","\\amalg"),n(i,s,a,"&","\\And"),n(i,s,p,"⟵","\\longleftarrow",!0),n(i,s,p,"⇐","\\Leftarrow",!0),n(i,s,p,"⟸","\\Longleftarrow",!0),n(i,s,p,"⟶","\\longrightarrow",!0),n(i,s,p,"⇒","\\Rightarrow",!0),n(i,s,p,"⟹","\\Longrightarrow",!0),n(i,s,p,"↔","\\leftrightarrow",!0),n(i,s,p,"⟷","\\longleftrightarrow",!0),n(i,s,p,"⇔","\\Leftrightarrow",!0),n(i,s,p,"⟺","\\Longleftrightarrow",!0),n(i,s,p,"↦","\\mapsto",!0),n(i,s,p,"⟼","\\longmapsto",!0),n(i,s,p,"↗","\\nearrow",!0),n(i,s,p,"↩","\\hookleftarrow",!0),n(i,s,p,"↪","\\hookrightarrow",!0),n(i,s,p,"↘","\\searrow",!0),n(i,s,p,"↼","\\leftharpoonup",!0),n(i,s,p,"⇀","\\rightharpoonup",!0),n(i,s,p,"↙","\\swarrow",!0),n(i,s,p,"↽","\\leftharpoondown",!0),n(i,s,p,"⇁","\\rightharpoondown",!0),n(i,s,p,"↖","\\nwarrow",!0),n(i,s,p,"⇌","\\rightleftharpoons",!0),n(i,e,p,"≮","\\nless",!0),n(i,e,p,"","\\@nleqslant"),n(i,e,p,"","\\@nleqq"),n(i,e,p,"⪇","\\lneq",!0),n(i,e,p,"≨","\\lneqq",!0),n(i,e,p,"","\\@lvertneqq"),n(i,e,p,"⋦","\\lnsim",!0),n(i,e,p,"⪉","\\lnapprox",!0),n(i,e,p,"⊀","\\nprec",!0),n(i,e,p,"⋠","\\npreceq",!0),n(i,e,p,"⋨","\\precnsim",!0),n(i,e,p,"⪹","\\precnapprox",!0),n(i,e,p,"≁","\\nsim",!0),n(i,e,p,"","\\@nshortmid"),n(i,e,p,"∤","\\nmid",!0),n(i,e,p,"⊬","\\nvdash",!0),n(i,e,p,"⊭","\\nvDash",!0),n(i,e,p,"⋪","\\ntriangleleft"),n(i,e,p,"⋬","\\ntrianglelefteq",!0),n(i,e,p,"⊊","\\subsetneq",!0),n(i,e,p,"","\\@varsubsetneq"),n(i,e,p,"⫋","\\subsetneqq",!0),n(i,e,p,"","\\@varsubsetneqq"),n(i,e,p,"≯","\\ngtr",!0),n(i,e,p,"","\\@ngeqslant"),n(i,e,p,"","\\@ngeqq"),n(i,e,p,"⪈","\\gneq",!0),n(i,e,p,"≩","\\gneqq",!0),n(i,e,p,"","\\@gvertneqq"),n(i,e,p,"⋧","\\gnsim",!0),n(i,e,p,"⪊","\\gnapprox",!0),n(i,e,p,"⊁","\\nsucc",!0),n(i,e,p,"⋡","\\nsucceq",!0),n(i,e,p,"⋩","\\succnsim",!0),n(i,e,p,"⪺","\\succnapprox",!0),n(i,e,p,"≆","\\ncong",!0),n(i,e,p,"","\\@nshortparallel"),n(i,e,p,"∦","\\nparallel",!0),n(i,e,p,"⊯","\\nVDash",!0),n(i,e,p,"⋫","\\ntriangleright"),n(i,e,p,"⋭","\\ntrianglerighteq",!0),n(i,e,p,"","\\@nsupseteqq"),n(i,e,p,"⊋","\\supsetneq",!0),n(i,e,p,"","\\@varsupsetneq"),n(i,e,p,"⫌","\\supsetneqq",!0),n(i,e,p,"","\\@varsupsetneqq"),n(i,e,p,"⊮","\\nVdash",!0),n(i,e,p,"⪵","\\precneqq",!0),n(i,e,p,"⪶","\\succneqq",!0),n(i,e,p,"","\\@nsubseteqq"),n(i,e,a,"⊴","\\unlhd"),n(i,e,a,"⊵","\\unrhd"),n(i,e,p,"↚","\\nleftarrow",!0),n(i,e,p,"↛","\\nrightarrow",!0),n(i,e,p,"⇍","\\nLeftarrow",!0),n(i,e,p,"⇏","\\nRightarrow",!0),n(i,e,p,"↮","\\nleftrightarrow",!0),n(i,e,p,"⇎","\\nLeftrightarrow",!0),n(i,e,p,"△","\\vartriangle"),n(i,e,f,"ℏ","\\hslash"),n(i,e,f,"▽","\\triangledown"),n(i,e,f,"◊","\\lozenge"),n(i,e,f,"Ⓢ","\\circledS"),n(i,e,f,"®","\\circledR"),n(r,e,f,"®","\\circledR"),n(i,e,f,"∡","\\measuredangle",!0),n(i,e,f,"∄","\\nexists"),n(i,e,f,"℧","\\mho"),n(i,e,f,"Ⅎ","\\Finv",!0),n(i,e,f,"⅁","\\Game",!0),n(i,e,f,"","\\backprime"),n(i,e,f,"▲","\\blacktriangle"),n(i,e,f,"▼","\\blacktriangledown"),n(i,e,f,"■","\\blacksquare"),n(i,e,f,"⧫","\\blacklozenge"),n(i,e,f,"★","\\bigstar"),n(i,e,f,"∢","\\sphericalangle",!0),n(i,e,f,"∁","\\complement",!0),n(i,e,f,"ð","\\eth",!0),n(r,s,f,"ð","ð"),n(i,e,f,"","\\diagup"),n(i,e,f,"╲","\\diagdown"),n(i,e,f,"□","\\square"),n(i,e,f,"□","\\Box"),n(i,e,f,"◊","\\Diamond"),n(i,e,f,"¥","\\yen",!0),n(r,e,f,"¥","\\yen",!0),n(i,e,f,"✓","\\checkmark",!0),n(r,e,f,"✓","\\checkmark"),n(i,e,f,"ℶ","\\beth",!0),n(i,e,f,"ℸ","\\daleth",!0),n(i,e,f,"ℷ","\\gimel",!0),n(i,e,f,"ϝ","\\digamma",!0),n(i,e,f,"ϰ","\\varkappa"),n(i,e,d,"┌","\\@ulcorner",!0),n(i,e,l,"┐","\\@urcorner",!0),n(i,e,d,"└","\\@llcorner",!0),n(i,e,l,"┘","\\@lrcorner",!0),n(i,e,p,"≦","\\leqq",!0),n(i,e,p,"⩽","\\leqslant",!0),n(i,e,p,"⪕","\\eqslantless",!0),n(i,e,p,"≲","\\lesssim",!0),n(i,e,p,"⪅","\\lessapprox",!0),n(i,e,p,"≊","\\approxeq",!0),n(i,e,a,"⋖","\\lessdot"),n(i,e,p,"⋘","\\lll",!0),n(i,e,p,"≶","\\lessgtr",!0),n(i,e,p,"⋚","\\lesseqgtr",!0),n(i,e,p,"⪋","\\lesseqqgtr",!0),n(i,e,p,"≑","\\doteqdot"),n(i,e,p,"≓","\\risingdotseq",!0),n(i,e,p,"≒","\\fallingdotseq",!0),n(i,e,p,"∽","\\backsim",!0),n(i,e,p,"⋍","\\backsimeq",!0),n(i,e,p,"⫅","\\subseteqq",!0),n(i,e,p,"⋐","\\Subset",!0),n(i,e,p,"⊏","\\sqsubset",!0),n(i,e,p,"≼","\\preccurlyeq",!0),n(i,e,p,"⋞","\\curlyeqprec",!0),n(i,e,p,"≾","\\precsim",!0),n(i,e,p,"⪷","\\precapprox",!0),n(i,e,p,"⊲","\\vartriangleleft"),n(i,e,p,"⊴","\\trianglelefteq"),n(i,e,p,"⊨","\\vDash",!0),n(i,e,p,"⊪","\\Vvdash",!0),n(i,e,p,"⌣","\\smallsmile"),n(i,e,p,"⌢","\\smallfrown"),n(i,e,p,"≏","\\bumpeq",!0),n(i,e,p,"≎","\\Bumpeq",!0),n(i,e,p,"≧","\\geqq",!0),n(i,e,p,"⩾","\\geqslant",!0),n(i,e,p,"⪖","\\eqslantgtr",!0),n(i,e,p,"≳","\\gtrsim",!0),n(i,e,p,"⪆","\\gtrapprox",!0),n(i,e,a,"⋗","\\gtrdot"),n(i,e,p,"⋙","\\ggg",!0),n(i,e,p,"≷","\\gtrless",!0),n(i,e,p,"⋛","\\gtreqless",!0),n(i,e,p,"⪌","\\gtreqqless",!0),n(i,e,p,"≖","\\eqcirc",!0),n(i,e,p,"≗","\\circeq",!0),n(i,e,p,"≜","\\triangleq",!0),n(i,e,p,"","\\thicksim"),n(i,e,p,"≈","\\thickapprox"),n(i,e,p,"⫆","\\supseteqq",!0),n(i,e,p,"⋑","\\Supset",!0),n(i,e,p,"⊐","\\sqsupset",!0),n(i,e,p,"≽","\\succcurlyeq",!0),n(i,e,p,"⋟","\\curlyeqsucc",!0),n(i,e,p,"≿","\\succsim",!0),n(i,e,p,"⪸","\\succapprox",!0),n(i,e,p,"⊳","\\vartriangleright"),n(i,e,p,"⊵","\\trianglerighteq"),n(i,e,p,"⊩","\\Vdash",!0),n(i,e,p,"","\\shortmid"),n(i,e,p,"∥","\\shortparallel"),n(i,e,p,"≬","\\between",!0),n(i,e,p,"⋔","\\pitchfork",!0),n(i,e,p,"∝","\\varpropto"),n(i,e,p,"◀","\\blacktriangleleft"),n(i,e,p,"∴","\\therefore",!0),n(i,e,p,"∍","\\backepsilon"),n(i,e,p,"▶","\\blacktriangleright"),n(i,e,p,"∵","\\because",!0),n(i,e,p,"⋘","\\llless"),n(i,e,p,"⋙","\\gggtr"),n(i,e,a,"⊲","\\lhd"),n(i,e,a,"⊳","\\rhd"),n(i,e,p,"≂","\\eqsim",!0),n(i,s,p,"⋈","\\Join"),n(i,e,p,"≑","\\Doteq",!0),n(i,e,a,"∔","\\dotplus",!0),n(i,e,a,"","\\smallsetminus"),n(i,e,a,"⋒","\\Cap",!0),n(i,e,a,"⋓","\\Cup",!0),n(i,e,a,"⩞","\\doublebarwedge",!0),n(i,e,a,"⊟","\\boxminus",!0),n(i,e,a,"⊞","\\boxplus",!0),n(i,e,a,"⋇","\\divideontimes",!0),n(i,e,a,"⋉","\\ltimes",!0),n(i,e,a,"⋊","\\rtimes",!0),n(i,e,a,"⋋","\\leftthreetimes",!0),n(i,e,a,"⋌","\\rightthreetimes",!0),n(i,e,a,"⋏","\\curlywedge",!0),n(i,e,a,"⋎","\\curlyvee",!0),n(i,e,a,"⊝","\\circleddash",!0),n(i,e,a,"⊛","\\circledast",!0),n(i,e,a,"⋅","\\centerdot"),n(i,e,a,"⊺","\\intercal",!0),n(i,e,a,"⋒","\\doublecap"),n(i,e,a,"⋓","\\doublecup"),n(i,e,a,"⊠","\\boxtimes",!0),n(i,e,p,"⇢","\\dashrightarrow",!0),n(i,e,p,"⇠","\\dashleftarrow",!0),n(i,e,p,"⇇","\\leftleftarrows",!0),n(i,e,p,"⇆","\\leftrightarrows",!0),n(i,e,p,"⇚","\\Lleftarrow",!0),n(i,e,p,"↞","\\twoheadleftarrow",!0),n(i,e,p,"↢","\\leftarrowtail",!0),n(i,e,p,"↫","\\looparrowleft",!0),n(i,e,p,"⇋","\\leftrightharpoons",!0),n(i,e,p,"↶","\\curvearrowleft",!0),n(i,e,p,"↺","\\circlearrowleft",!0),n(i,e,p,"↰","\\Lsh",!0),n(i,e,p,"⇈","\\upuparrows",!0),n(i,e,p,"↿","\\upharpoonleft",!0),n(i,e,p,"⇃","\\downharpoonleft",!0),n(i,s,p,"⊶","\\origof",!0),n(i,s,p,"⊷","\\imageof",!0),n(i,e,p,"⊸","\\multimap",!0),n(i,e,p,"↭","\\leftrightsquigarrow",!0),n(i,e,p,"⇉","\\rightrightarrows",!0),n(i,e,p,"⇄","\\rightleftarrows",!0),n(i,e,p,"↠","\\twoheadrightarrow",!0),n(i,e,p,"↣","\\rightarrowtail",!0),n(i,e,p,"↬","\\looparrowright",!0),n(i,e,p,"↷","\\curvearrowright",!0),n(i,e,p,"↻","\\circlearrowright",!0),n(i,e,p,"↱","\\Rsh",!0),n(i,e,p,"⇊","\\downdownarrows",!0),n(i,e,p,"↾","\\upharpoonright",!0),n(i,e,p,"⇂","\\downharpoonright",!0),n(i,e,p,"⇝","\\rightsquigarrow",!0),n(i,e,p,"⇝","\\leadsto"),n(i,e,p,"⇛","\\Rrightarrow",!0),n(i,e,p,"↾","\\restriction"),n(i,s,f,"","`"),n(i,s,f,"$","\\$"),n(r,s,f,"$","\\$"),n(r,s,f,"$","\\textdollar"),n(i,s,f,"%","\\%"),n(r,s,f,"%","\\%"),n(i,s,f,"_","\\_"),n(r,s,f,"_","\\_"),n(r,s,f,"_","\\textunderscore"),n(i,s,f,"∠","\\angle",!0),n(i,s,f,"∞","\\infty",!0),n(i,s,f,"","\\prime"),n(i,s,f,"△","\\triangle"),n(i,s,f,"Γ","\\Gamma",!0),n(i,s,f,"Δ","\\Delta",!0),n(i,s,f,"Θ","\\Theta",!0),n(i,s,f,"Λ","\\Lambda",!0),n(i,s,f,"Ξ","\\Xi",!0),n(i,s,f,"Π","\\Pi",!0),n(i,s,f,"Σ","\\Sigma",!0),n(i,s,f,"Υ","\\Upsilon",!0),n(i,s,f,"Φ","\\Phi",!0),n(i,s,f,"Ψ","\\Psi",!0),n(i,s,f,"Ω","\\Omega",!0),n(i,s,f,"A","Α"),n(i,s,f,"B","Β"),n(i,s,f,"E","Ε"),n(i,s,f,"Z","Ζ"),n(i,s,f,"H","Η"),n(i,s,f,"I","Ι"),n(i,s,f,"K","Κ"),n(i,s,f,"M","Μ"),n(i,s,f,"N","Ν"),n(i,s,f,"O","Ο"),n(i,s,f,"P","Ρ"),n(i,s,f,"T","Τ"),n(i,s,f,"X","Χ"),n(i,s,f,"¬","\\neg",!0),n(i,s,f,"¬","\\lnot"),n(i,s,f,"","\\top"),n(i,s,f,"⊥","\\bot"),n(i,s,f,"∅","\\emptyset"),n(i,e,f,"∅","\\varnothing"),n(i,s,c,"α","\\alpha",!0),n(i,s,c,"β","\\beta",!0),n(i,s,c,"γ","\\gamma",!0),n(i,s,c,"δ","\\delta",!0),n(i,s,c,"ϵ","\\epsilon",!0),n(i,s,c,"ζ","\\zeta",!0),n(i,s,c,"η","\\eta",!0),n(i,s,c,"θ","\\theta",!0),n(i,s,c,"ι","\\iota",!0),n(i,s,c,"κ","\\kappa",!0),n(i,s,c,"λ","\\lambda",!0),n(i,s,c,"μ","\\mu",!0),n(i,s,c,"ν","\\nu",!0),n(i,s,c,"ξ","\\xi",!0),n(i,s,c,"ο","\\omicron",!0),n(i,s,c,"π","\\pi",!0),n(i,s,c,"ρ","\\rho",!0),n(i,s,c,"σ","\\sigma",!0),n(i,s,c,"τ","\\tau",!0),n(i,s,c,"υ","\\upsilon",!0),n(i,s,c,"ϕ","\\phi",!0),n(i,s,c,"χ","\\chi",!0),n(i,s,c,"ψ","\\psi",!0),n(i,s,c,"ω","\\omega",!0),n(i,s,c,"ε","\\varepsilon",!0),n(i,s,c,"ϑ","\\vartheta",!0),n(i,s,c,"ϖ","\\varpi",!0),n(i,s,c,"ϱ","\\varrho",!0),n(i,s,c,"ς","\\varsigma",!0),n(i,s,c,"φ","\\varphi",!0),n(i,s,a,"","*",!0),n(i,s,a,"+","+"),n(i,s,a,"","-",!0),n(i,s,a,"⋅","\\cdot",!0),n(i,s,a,"∘","\\circ",!0),n(i,s,a,"÷","\\div",!0),n(i,s,a,"±","\\pm",!0),n(i,s,a,"×","\\times",!0),n(i,s,a,"∩","\\cap",!0),n(i,s,a,"","\\cup",!0),n(i,s,a,"","\\setminus",!0),n(i,s,a,"∧","\\land"),n(i,s,a,"","\\lor"),n(i,s,a,"∧","\\wedge",!0),n(i,s,a,"","\\vee",!0),n(i,s,f,"√","\\surd"),n(i,s,d,"⟨","\\langle",!0),n(i,s,d,"","\\lvert"),n(i,s,d,"∥","\\lVert"),n(i,s,l,"?","?"),n(i,s,l,"!","!"),n(i,s,l,"⟩","\\rangle",!0),n(i,s,l,"","\\rvert"),n(i,s,l,"∥","\\rVert"),n(i,s,p,"=","="),n(i,s,p,":",":"),n(i,s,p,"≈","\\approx",!0),n(i,s,p,"≅","\\cong",!0),n(i,s,p,"≥","\\ge"),n(i,s,p,"≥","\\geq",!0),n(i,s,p,"←","\\gets"),n(i,s,p,">","\\gt",!0),n(i,s,p,"∈","\\in",!0),n(i,s,p,"","\\@not"),n(i,s,p,"⊂","\\subset",!0),n(i,s,p,"⊃","\\supset",!0),n(i,s,p,"⊆","\\subseteq",!0),n(i,s,p,"⊇","\\supseteq",!0),n(i,e,p,"⊈","\\nsubseteq",!0),n(i,e,p,"⊉","\\nsupseteq",!0),n(i,s,p,"⊨","\\models"),n(i,s,p,"←","\\leftarrow",!0),n(i,s,p,"≤","\\le"),n(i,s,p,"≤","\\leq",!0),n(i,s,p,"<","\\lt",!0),n(i,s,p,"→","\\rightarrow",!0),n(i,s,p,"→","\\to"),n(i,e,p,"≱","\\ngeq",!0),n(i,e,p,"≰","\\nleq",!0),n(i,s,g," ","\\ "),n(i,s,g," ","\\space"),n(i,s,g," ","\\nobreakspace"),n(r,s,g," ","\\ "),n(r,s,g," "," "),n(r,s,g," ","\\space"),n(r,s,g," ","\\nobreakspace"),n(i,s,g,null,"\\nobreak"),n(i,s,g,null,"\\allowbreak"),n(i,s,Ie,",",","),n(i,s,Ie,";",";"),n(i,e,a,"⊼","\\barwedge",!0),n(i,e,a,"⊻","\\veebar",!0),n(i,s,a,"⊙","\\odot",!0),n(i,s,a,"⊕","\\oplus",!0),n(i,s,a,"⊗","\\otimes",!0),n(i,s,f,"∂","\\partial",!0),n(i,s,a,"⊘","\\oslash",!0),n(i,e,a,"⊚","\\circledcirc",!0),n(i,e,a,"⊡","\\boxdot",!0),n(i,s,a,"△","\\bigtriangleup"),n(i,s,a,"▽","\\bigtriangledown"),n(i,s,a,"†","\\dagger"),n(i,s,a,"⋄","\\diamond"),n(i,s,a,"⋆","\\star"),n(i,s,a,"◃","\\triangleleft"),n(i,s,a,"▹","\\triangleright"),n(i,s,d,"{","\\{"),n(r,s,f,"{","\\{"),n(r,s,f,"{","\\textbraceleft"),n(i,s,l,"}","\\}"),n(r,s,f,"}","\\}"),n(r,s,f,"}","\\textbraceright"),n(i,s,d,"{","\\lbrace"),n(i,s,l,"}","\\rbrace"),n(i,s,d,"[","\\lbrack",!0),n(r,s,f,"[","\\lbrack",!0),n(i,s,l,"]","\\rbrack",!0),n(r,s,f,"]","\\rbrack",!0),n(i,s,d,"(","\\lparen",!0),n(i,s,l,")","\\rparen",!0),n(r,s,f,"<","\\textless",!0),n(r,s,f,">","\\textgreater",!0),n(i,s,d,"⌊","\\lfloor",!0),n(i,s,l,"⌋","\\rfloor",!0),n(i,s,d,"⌈","\\lceil",!0),n(i,s,l,"⌉","\\rceil",!0),n(i,s,f,"\\","\\backslash"),n(i,s,f,"","|"),n(i,s,f,"","\\vert"),n(r,s,f,"|","\\textbar",!0),n(i,s,f,"∥","\\|"),n(i,s,f,"∥","\\Vert"),n(r,s,f,"∥","\\textbardbl"),n(r,s,f,"~","\\textasciitilde"),n(r,s,f,"\\","\\textbackslash"),n(r,s,f,"^","\\textasciicircum"),n(i,s,p,"↑","\\uparrow",!0),n(i,s,p,"⇑","\\Uparrow",!0),n(i,s,p,"↓","\\downarrow",!0),n(i,s,p,"⇓","\\Downarrow",!0),n(i,s,p,"↕","\\updownarrow",!0),n(i,s,p,"⇕","\\Updownarrow",!0),n(i,s,h,"∐","\\coprod"),n(i,s,h,"","\\bigvee"),n(i,s,h,"⋀","\\bigwedge"),n(i,s,h,"⨄","\\biguplus"),n(i,s,h,"⋂","\\bigcap"),n(i,s,h,"","\\bigcup"),n(i,s,h,"∫","\\int"),n(i,s,h,"∫","\\intop"),n(i,s,h,"∬","\\iint"),n(i,s,h,"∭","\\iiint"),n(i,s,h,"∏","\\prod"),n(i,s,h,"∑","\\sum"),n(i,s,h,"⨂","\\bigotimes"),n(i,s,h,"⨁","\\bigoplus"),n(i,s,h,"⨀","\\bigodot"),n(i,s,h,"∮","\\oint"),n(i,s,h,"∯","\\oiint"),n(i,s,h,"∰","\\oiiint"),n(i,s,h,"⨆","\\bigsqcup"),n(i,s,h,"∫","\\smallint"),n(r,s,Ee,"…","\\textellipsis"),n(i,s,Ee,"…","\\mathellipsis"),n(r,s,Ee,"…","\\ldots",!0),n(i,s,Ee,"…","\\ldots",!0),n(i,s,Ee,"⋯","\\@cdots",!0),n(i,s,Ee,"⋱","\\ddots",!0),n(i,s,f,"⋮","\\varvdots"),n(i,s,o,"ˊ","\\acute"),n(i,s,o,"ˋ","\\grave"),n(i,s,o,"¨","\\ddot"),n(i,s,o,"~","\\tilde"),n(i,s,o,"ˉ","\\bar"),n(i,s,o,"˘","\\breve"),n(i,s,o,"ˇ","\\check"),n(i,s,o,"^","\\hat"),n(i,s,o,"⃗","\\vec"),n(i,s,o,"˙","\\dot"),n(i,s,o,"˚","\\mathring"),n(i,s,c,"","\\@imath"),n(i,s,c,"","\\@jmath"),n(i,s,f,"ı","ı"),n(i,s,f,"ȷ","ȷ"),n(r,s,f,"ı","\\i",!0),n(r,s,f,"ȷ","\\j",!0),n(r,s,f,"ß","\\ss",!0),n(r,s,f,"æ","\\ae",!0),n(r,s,f,"œ","\\oe",!0),n(r,s,f,"ø","\\o",!0),n(r,s,f,"Æ","\\AE",!0),n(r,s,f,"Œ","\\OE",!0),n(r,s,f,"Ø","\\O",!0),n(r,s,o,"ˊ","\\'"),n(r,s,o,"ˋ","\\`"),n(r,s,o,"ˆ","\\^"),n(r,s,o,"˜","\\~"),n(r,s,o,"ˉ","\\="),n(r,s,o,"˘","\\u"),n(r,s,o,"˙","\\."),n(r,s,o,"¸","\\c"),n(r,s,o,"˚","\\r"),n(r,s,o,"ˇ","\\v"),n(r,s,o,"¨",'\\"'),n(r,s,o,"˝","\\H"),n(r,s,o,"◯","\\textcircled");const _e={"--":!0,"---":!0,"``":!0,"''":!0};n(r,s,f,"","--",!0),n(r,s,f,"","\\textendash"),n(r,s,f,"—","---",!0),n(r,s,f,"—","\\textemdash"),n(r,s,f,"","`",!0),n(r,s,f,"","\\textquoteleft"),n(r,s,f,"","'",!0),n(r,s,f,"","\\textquoteright"),n(r,s,f,"“","``",!0),n(r,s,f,"“","\\textquotedblleft"),n(r,s,f,"”","''",!0),n(r,s,f,"”","\\textquotedblright"),n(i,s,f,"°","\\degree",!0),n(r,s,f,"°","\\degree"),n(r,s,f,"°","\\textdegree",!0),n(i,s,f,"£","\\pounds"),n(i,s,f,"£","\\mathsterling",!0),n(r,s,f,"£","\\pounds"),n(r,s,f,"£","\\textsterling",!0),n(i,e,f,"✠","\\maltese"),n(r,e,f,"✠","\\maltese");var De='0123456789/@."';for(let e=0;e<De.length;e++){const t=De.charAt(e);n(i,s,f,t,t)}var Oe='0123456789!@*()-=+";:?/.,';for(let e=0;e<Oe.length;e++){const t=Oe.charAt(e);n(r,s,f,t,t)}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<Fe.length;e++){const t=Fe.charAt(e);n(i,s,c,t,t),n(r,s,f,t,t)}n(i,e,f,"C",""),n(r,e,f,"C",""),n(i,e,f,"H",""),n(r,e,f,"H",""),n(i,e,f,"N",""),n(r,e,f,"N",""),n(i,e,f,"P",""),n(r,e,f,"P",""),n(i,e,f,"Q",""),n(r,e,f,"Q",""),n(i,e,f,"R",""),n(r,e,f,"R",""),n(i,e,f,"Z",""),n(r,e,f,"Z",""),n(i,s,c,"h",""),n(r,s,c,"h","");let w="";for(let e=0;e<Fe.length;e++){const t=Fe.charAt(e);n(i,s,c,t,w=String.fromCharCode(55349,56320+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56372+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56424+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56580+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56684+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56736+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56788+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56840+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56944+e)),n(r,s,f,t,w),e<26&&(n(i,s,c,t,w=String.fromCharCode(55349,56632+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,56476+e)),n(r,s,f,t,w))}n(i,s,c,"k",w=String.fromCharCode(55349,56668)),n(r,s,f,"k",w);for(let e=0;e<10;e++){const t=e.toString();n(i,s,c,t,w=String.fromCharCode(55349,57294+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,57314+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,57324+e)),n(r,s,f,t,w),n(i,s,c,t,w=String.fromCharCode(55349,57334+e)),n(r,s,f,t,w)}for(let e=0;e<"ÐÞþ".length;e++){const t="ÐÞþ".charAt(e);n(i,s,c,t,t),n(r,s,f,t,t)}function Pe(e,t,n){return{value:e=u[n][e]&&u[n][e].replace?u[n][e].replace:e,metrics:oe(e,t,n)}}function ze(t,e,n,i,r){var s=Pe(t,e,n),o=s.metrics;let a;if(t=s.value,o){let e=o.italic;("text"===n||i&&"mathit"===i.font)&&(e=0),a=new m(t,o.height,o.depth,e,o.skew,o.width,r)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+n+"'"),a=new m(t,0,0,0,0,0,r);if(i){a.maxFontSize=i.sizeMultiplier,i.style.isTight()&&a.classes.push("mtight");const t=i.getColor();t&&(a.style.color=t)}return a}function Be(t){let n=0,i=0,r=0;for(let e=0;e<t.children.length;e++){var s=t.children[e];s.height>n&&(n=s.height),s.depth>i&&(i=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}t.height=n,t.depth=i,t.maxFontSize=r}function v(e,t,n,i){return e=new be(e,t,n,i),Be(e),e}function Ne(e){return e=new ne(e),Be(e),e}function He(e,t,n){let i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return i+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}const We=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],qe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ue=(e,t,n,i)=>new be(e,t,n,i),Ve={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ge={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var L={fontMap:Ve,makeSymbol:ze,mathsym:function(e,t,n,i){return void 0===i&&(i=[]),"boldsymbol"===n.font&&Pe(e,"Main-Bold",t).metrics?ze(e,"Main-Bold",t,n,i.concat(["mathbf"])):"\\"===e||"main"===u[t][e].font?ze(e,"Main-Regular",t,n,i):ze(e,"AMS-Regular",t,n,i.concat(["amsrm"]))},makeSpan:v,makeSvgSpan:Ue,makeLineSpan:function(e,t,n){e=v([e],[],t);return e.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=T(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,n,i){e=new xe(e,t,n,i);return Be(e),e},makeFragment:Ne,wrapFragment:function(e,t){return e instanceof ne?v([],[e],t):e},makeVList:function(t,n){const{children:i,depth:r}=function(n){if("individualShift"===n.positionType){const s=n.children,a=[s[0]],l=-s[0].shift-s[0].elem.depth;let t=l;for(let e=1;e<s.length;e++){var i=-s[e].shift-t-s[e].elem.depth,r=i-(s[e-1].elem.height+s[e-1].elem.depth);t+=i,a.push({type:"kern",size:r}),a.push(s[e])}return{children:a,depth:l}}let s;if("top"===n.positionType){let t=n.positionData;for(let e=0;e<n.children.length;e++){var o=n.children[e];t-="kern"===o.type?o.size:o.elem.height+o.elem.depth}s=t}else if("bottom"===n.positionType)s=-n.positionData;else{var e=n.children[0];if("elem"!==e.type)throw new Error('First child must have type "elem".');if("shift"===n.positionType)s=-e.elem.depth-n.positionData;else{if("firstBaseline"!==n.positionType)throw new Error("Invalid positionType "+n.positionType+".");s=-e.elem.depth}}return{children:n.children,depth:s}}(t);let s=0;for(let e=0;e<i.length;e++){const n=i[e];if("elem"===n.type){const t=n.elem;s=Math.max(s,t.maxFontSize,t.height)}}s+=2;var o=v(["pstrut"],[]),a=(o.style.height=T(s),[]);let l=r,c=r,h=r;for(let e=0;e<i.length;e++){const n=i[e];if("kern"===n.type)h+=n.size;else{const t=n.elem,i=n.wrapperClasses||[],r=n.wrapperStyle||{},l=v(i,[o,t],void 0,r);l.style.top=T(-s-h-t.depth),n.marginLeft&&(l.style.marginLeft=n.marginLeft),n.marginRight&&(l.style.marginRight=n.marginRight),a.push(l),h+=t.height+t.depth}l=Math.min(l,h),c=Math.max(c,h)}var e=v(["vlist"],a);let u;if(e.style.height=T(c),l<0){const t=v([],[]),n=v(["vlist"],[t]),i=(n.style.height=T(-l),v(["vlist-s"],[new m("")]));u=[v(["vlist-r"],[e,i]),v(["vlist-r"],[n])]}else u=[v(["vlist-r"],[e])];t=v(["vlist-t"],u);return 2===u.length&&t.classes.push("vlist-t2"),t.height=c,t.depth=-l,t},makeOrd:function(e,i,r){var s,o,a=e.mode,l=e.text,c=["mord"],e="math"===a||"text"===a&&i.font,h=e?i.font:i.fontFamily;let t="",n="";if(55349===l.charCodeAt(0)&&([t,n]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=n&&n<120484){const e=Math.floor((n-119808)/26);return[We[e][2],We[e][t]]}if(120782<=n&&n<=120831){const e=Math.floor((n-120782)/10);return[qe[e][2],qe[e][t]]}if(120485==n||120486==n)return[We[0][2],We[0][t]];if(120486<n&&n<120782)return["",""];throw new C("Unsupported character: "+e)}(l,a)),0<t.length)return ze(l,t,a,i,c.concat(n));if(h){let t,n;if("boldsymbol"===h){s=l,o=a;const i="textord"!==r&&Pe(s,"Math-BoldItalic",o).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};t=i.fontName,n=[i.fontClass]}else n=e?(t=Ve[h].fontName,[h]):(t=He(h,i.fontWeight,i.fontShape),[h,i.fontWeight,i.fontShape]);if(Pe(l,t,a).metrics)return ze(l,t,a,i,c.concat(n));if(_e.hasOwnProperty(l)&&"Typewriter"===t.slice(0,10)){const r=[];for(let e=0;e<l.length;e++)r.push(ze(l[e],t,a,i,c.concat(n)));return Ne(r)}}if("mathord"===r)return ze(l,"Math-Italic",a,i,c.concat(["mathnormal"]));if("textord"!==r)throw new Error("unexpected type: "+r+" in makeOrd");{const e=u[a][l]&&u[a][l].font;if("ams"===e){const e=He("amsrm",i.fontWeight,i.fontShape);return ze(l,e,a,i,c.concat("amsrm",i.fontWeight,i.fontShape))}if("main"!==e&&e){const r=He(e,i.fontWeight,i.fontShape);return ze(l,r,a,i,c.concat(r,i.fontWeight,i.fontShape))}{const e=He("textrm",i.fontWeight,i.fontShape);return ze(l,e,a,i,c.concat(i.fontWeight,i.fontShape))}}},makeGlue:(e,t)=>{var n=v(["mspace"],[],t),e=M(e,t);return n.style.marginRight=T(e),n},staticSvg:function(e,t){var[e,n,i]=Ge[e],e=new Ce(e),e=new Se([e],{width:T(n),height:T(i),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),e=Ue(["overlay"],[e],t);return e.height=i,e.style.height=T(i),e.style.width=T(n),e},svgData:Ge,tryCombineChars:t=>{for(let e=0;e<t.length-1;e++){var n=t[e],i=t[e+1];n instanceof m&&i instanceof m&&((e,t)=>{if(me(e.classes)!==me(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(const i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0})(n,i)&&(n.text+=i.text,n.height=Math.max(n.height,i.height),n.depth=Math.max(n.depth,i.depth),n.italic=i.italic,t.splice(e+1,1),e--)}return t}};const y={number:3,unit:"mu"},je={number:4,unit:"mu"},Ke={number:5,unit:"mu"},Ye={mord:{mop:y,mbin:je,mrel:Ke,minner:y},mop:{mord:y,mop:y,mrel:Ke,minner:y},mbin:{mord:je,mop:je,mopen:je,minner:je},mrel:{mord:Ke,mop:Ke,mopen:Ke,minner:Ke},mopen:{},mclose:{mop:y,mbin:je,mrel:Ke,minner:y},mpunct:{mord:y,mop:y,mrel:Ke,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:je,mrel:Ke,mopen:y,mpunct:y,minner:y}},Xe={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Je={},Qe={},Ze={};function b(e){var{type:e,names:t,props:n,handler:i,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i};for(let e=0;e<t.length;++e)Je[t[e]]=o;e&&(r&&(Qe[e]=r),s)&&(Ze[e]=s)}function et(e){var{type:e,htmlBuilder:t,mathmlBuilder:n}=e;b({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}function tt(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e}function x(e){return"ordgroup"===e.type?e.body:[e]}function E(t,n,e,r){void 0===r&&(r=[null,null]);var s=[];for(let e=0;e<t.length;e++){const r=I(t[e],n);if(r instanceof ne){const t=r.children;s.push(...t)}else s.push(r)}if(L.tryCombineChars(s),e){let i=n;if(1===t.length){const e=t[0];"sizing"===e.type?i=n.havingSize(e.size):"styling"===e.type&&(i=n.havingStyle(ot[e.style]))}var o=it([r[0]||"leftmost"],[],n),r=it([r[1]||"rightmost"],[],n),e="root"===e;lt(s,(e,t)=>{var n=t.classes[0],i=e.classes[0];"mbin"===n&&$.contains(st,i)?t.classes[0]="mord":"mbin"===i&&$.contains(rt,n)&&(e.classes[0]="mord")},{node:o},r,e),lt(s,(e,t)=>{var t=ut(t),n=ut(e),e=t&&n?(e.hasClass("mtight")?Xe:Ye)[t][n]:null;if(e)return L.makeGlue(e,i)},{node:o},r,e)}return s}function nt(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),it(t.concat(e))}const it=L.makeSpan,rt=["leftmost","mbin","mopen","mrel","mop","mpunct"],st=["rightmost","mrel","mclose","mpunct"],ot={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},at={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lt=function(n,e,t,i,r){i&&n.push(i);let s=0;for(;s<n.length;s++){const i=n[s],a=ct(i);if(a)lt(a.children,e,t,null,r);else{var o=!i.hasClass("mspace");if(o){const r=e(i,t.node);r&&(t.insertAfter?t.insertAfter(r):(n.unshift(r),s++))}o?t.node=i:r&&i.hasClass("newline")&&(t.node=it(["leftmost"])),t.insertAfter=(t=>e=>{n.splice(t+1,0,e),s++})(s)}}i&&n.pop()},ct=function(e){return e instanceof ne||e instanceof xe||e instanceof be&&e.hasClass("enclosing")?e:null},ht=function(e,t){var n=ct(e);if(n){const e=n.children;if(e.length){if("right"===t)return ht(e[e.length-1],"right");if("left"===t)return ht(e[0],"left")}}return e},ut=function(e,t){return e&&(t&&(e=ht(e,t)),at[e.classes[0]])||null},I=function(t,n,i){if(!t)return it();if(Qe[t.type]){let e=Qe[t.type](t,n);if(i&&n.size!==i.size){e=it(n.sizingClasses(i),[e],n);const t=n.sizeMultiplier/i.sizeMultiplier;e.height*=t,e.depth*=t}return e}throw new C("Got group of unknown type: '"+t.type+"'")};function dt(e,t){e=it(["base"],e,t),t=it(["strut"]);return t.style.height=T(e.height+e.depth),e.depth&&(t.style.verticalAlign=T(-e.depth)),e.children.unshift(t),e}function pt(e,n){let t=null;1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body);var i=E(e,n,"root");let r;2===i.length&&i[1].hasClass("tag")&&(r=i.pop());var s=[];let o,a=[];for(let t=0;t<i.length;t++)if(a.push(i[t]),i[t].hasClass("mbin")||i[t].hasClass("mrel")||i[t].hasClass("allowbreak")){let e=!1;for(;t<i.length-1&&i[t+1].hasClass("mspace")&&!i[t+1].hasClass("newline");)t++,a.push(i[t]),i[t].hasClass("nobreak")&&(e=!0);e||(s.push(dt(a,n)),a=[])}else i[t].hasClass("newline")&&(a.pop(),0<a.length&&(s.push(dt(a,n)),a=[]),s.push(i[t]));0<a.length&&s.push(dt(a,n)),t?((o=dt(E(t,n,!0))).classes=["tag"],s.push(o)):r&&s.push(r);var l=it(["katex-html"],s);if(l.setAttribute("aria-hidden","true"),o){const e=o.children[0];e.style.height=T(l.height+l.depth),l.depth&&(e.style.verticalAlign=T(-l.depth))}return l}function mt(e){return new ne(e)}class A{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0<this.classes.length&&(t.className=me(this.classes));for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="<"+this.type;for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=$.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+$.escape(me(this.classes))+'"'),t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class gt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $.escape(this.toText())}toText(){return this.text}}var k={MathNode:A,TextNode:gt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?"":.1666<=e&&e<=.1667?"":.2222<=e&&e<=.2223?"":.2777<=e&&e<=.2778?"":-.05556<=e&&e<=-.05555?"":-.1667<=e&&e<=-.1666?"":-.2223<=e&&e<=-.2222?"":-.2778<=e&&e<=-.2777?"":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",T(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+T(this.width)+'"/>'}toText(){return this.character||" "}},newDocumentFragment:mt};function ft(e,t,n){return!u[t][e]||!u[t][e].replace||55349===e.charCodeAt(0)||_e.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=u[t][e].replace),new k.TextNode(e)}function wt(e){return 1===e.length?e[0]:new k.MathNode("mrow",e)}function vt(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";if(!(t=t.font)||"mathnormal"===t)return null;var n=e.mode;if("mathit"===t)return"italic";if("boldsymbol"===t)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===t)return"bold";if("mathbb"===t)return"double-struck";if("mathfrak"===t)return"fraktur";if("mathscr"===t||"mathcal"===t)return"script";if("mathsf"===t)return"sans-serif";if("mathtt"===t)return"monospace";let i=e.text;return!$.contains(["\\imath","\\jmath"],i)&&oe(i=u[n][i]&&u[n][i].replace?u[n][i].replace:i,L.fontMap[t].fontName,n)?L.fontMap[t].variant:null}function S(t,n,e){if(1===t.length){const i=_(t[0],n);return e&&i instanceof A&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}const i=[];let r;for(let e=0;e<t.length;e++){var s=_(t[e],n);if(s instanceof A&&r instanceof A){if("mtext"===s.type&&"mtext"===r.type&&s.getAttribute("mathvariant")===r.getAttribute("mathvariant")){r.children.push(...s.children);continue}if("mn"===s.type&&"mn"===r.type){r.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===r.type){const t=s.children[0];if(t instanceof gt&&"."===t.text){r.children.push(...s.children);continue}}else if("mi"===r.type&&1===r.children.length){const t=r.children[0];if(t instanceof gt&&"̸"===t.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){const t=s.children[0];t instanceof gt&&0<t.text.length&&(t.text=t.text.slice(0,1)+"̸"+t.text.slice(1),i.pop())}}}i.push(s),r=s}return i}function yt(e,t,n){return wt(S(e,t,n))}const _=function(e,t){if(!e)return new k.MathNode("mrow");if(Ze[e.type])return Ze[e.type](e,t);throw new C("Got group of unknown type: '"+e.type+"'")};function bt(e,t,n,i,r){e=S(e,n),n=1===e.length&&e[0]instanceof A&&$.contains(["mrow","mtable"],e[0].type)?e[0]:new k.MathNode("mrow",e),e=new k.MathNode("annotation",[new k.TextNode(t)]),e.setAttribute("encoding","application/x-tex"),t=new k.MathNode("semantics",[n,e]),n=new k.MathNode("math",[t]),n.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&n.setAttribute("display","block"),e=r?"katex":"katex-mathml";return L.makeSpan([e],[n])}const xt=function(e){return new de({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},At=function(e,t){var n;return t.displayMode&&(n=["katex-display"],t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=L.makeSpan(n,[e])),e},kt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},St={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};function Ct(e){return(e=new k.MathNode("mo",[new k.TextNode(kt[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e}function $t(d,p){var{span:e,minWidth:t,height:n}=function(){let i=4e5;var r=d.label.slice(1);if($.contains(["widehat","widecheck","widetilde","utilde"],r)){var s="ordgroup"===(s=d.base).type?s.body.length:1;let e,t,n;if(5<s)t="widehat"===r||"widecheck"===r?(e=420,i=2364,n=.42,r+"4"):(e=312,i=2340,n=.34,"tilde4");else{const d=[1,1,2,2,3,3][s];t="widehat"===r||"widecheck"===r?(i=[0,1062,2364,2364,2364][d],e=[0,239,300,360,420][d],n=[0,.24,.3,.3,.36,.42][d],r+d):(i=[0,600,1033,2339,2340][d],e=[0,260,286,306,312][d],n=[0,.26,.286,.3,.306,.34][d],"tilde"+d)}s=new Ce(t),s=new Se([s],{width:"100%",height:T(n),viewBox:"0 0 "+i+" "+e,preserveAspectRatio:"none"});return{span:L.makeSvgSpan([],[s],p),minWidth:0,height:n}}{const d=[],s=St[r],[o,a,l]=s,$=l/1e3,c=o.length;let t,n;if(1===c)t=["hide-tail"],n=[s[3]];else if(2===c)t=["halfarrow-left","halfarrow-right"],n=["xMinYMin","xMaxYMin"];else{if(3!==c)throw new Error("Correct katexImagesData or update code here to support\n "+c+" children.");t=["brace-left","brace-center","brace-right"],n=["xMinYMin","xMidYMin","xMaxYMin"]}for(let e=0;e<c;e++){const s=new Ce(o[e]),h=new Se([s],{width:"400em",height:T($),viewBox:"0 0 "+i+" "+l,preserveAspectRatio:n[e]+" slice"}),u=L.makeSvgSpan([t[e]],[h],p);if(1===c)return{span:u,minWidth:a,height:$};u.style.height=T($),d.push(u)}return{span:L.makeSpan(["stretchy"],d,p),minWidth:a,height:$}}}();return e.height=n,e.style.height=T(n),0<t&&(e.style.minWidth=T(t)),e}function D(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function Rt(e){var t=Mt(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function Mt(e){return e&&("atom"===e.type||Te.hasOwnProperty(e.type))?e:null}const Tt=(i,r)=>{let e,s,o;i&&"supsub"===i.type?(s=D(i.base,"accent"),e=s.base,i.base=e,o=function(e){if(e instanceof be)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(I(i,r)),i.base=s):(s=D(i,"accent"),e=s.base);i=I(e,r.havingCrampedStyle());let a=0;if(s.isShifty&&$.isCharacterBox(e)){const i=$.getBaseElem(e);a=Re(I(i,r.havingCrampedStyle())).skew}var l="\\c"===s.label;let c,h=l?i.height+i.depth:Math.min(i.height,r.fontMetrics().xHeight);if(s.isStretchy)c=$t(s,r),c=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<a?{width:"calc(100% - "+T(2*a)+")",marginLeft:T(2*a)}:void 0}]},r);else{let e,t;"\\vec"===s.label?(e=L.staticSvg("vec",r),t=L.svgData.vec[1]):((e=Re(e=L.makeOrd({mode:s.mode,text:s.label},r,"textord"))).italic=0,t=e.width,l&&(h+=e.depth)),c=L.makeSpan(["accent-body"],[e]);const o="\\textcircled"===s.label;o&&(c.classes.push("accent-full"),h=i.height);let n=a;o||(n-=t/2),c.style.left=T(n),"\\textcircled"===s.label&&(c.style.top=".2em"),c=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:c}]},r)}l=L.makeSpan(["mord","accent"],[c],r);return o?(o.children[0]=l,o.height=Math.max(l.height,o.height),o.classes[0]="mord",o):l},Lt=(e,t)=>{var n=e.isStretchy?Ct(e.label):new k.MathNode("mo",[ft(e.label,e.mode)]),e=new k.MathNode("mover",[_(e.base,t),n]);return e.setAttribute("accent","true"),e},Et=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),It=(b({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var t=tt(t[0]),n=!Et.test(e.funcName),i=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:t}},htmlBuilder:Tt,mathmlBuilder:Lt}),b({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Tt,mathmlBuilder:Lt}),b({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:n,base:t}},htmlBuilder:(e,t)=>{var n=I(e.base,t),i=$t(e,t),e="\\utilde"===e.label?.12:0,i=L.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:n}]},t);return L.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=Ct(e.label),e=new k.MathNode("munder",[_(e.base,t),n]);return e.setAttribute("accentunder","true"),e}}),e=>{e=new k.MathNode("mpadded",e?[e]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),_t=(b({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:e,funcName:i}=e;return{type:"xArrow",mode:e.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,i=t.havingStyle(n.sup()),r=L.wrapFragment(I(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let o;r.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(n.sub()),(o=L.wrapFragment(I(e.below,i,t),t)).classes.push(s+"-arrow-pad"));n=$t(e,t),i=-t.fontMetrics().axisHeight+.5*n.height;let a,l=-t.fontMetrics().axisHeight-.5*n.height-.111;if((.25<r.depth||"\\xleftequilibrium"===e.label)&&(l-=r.depth),o){const e=-t.fontMetrics().axisHeight+o.height+.5*n.height+.111;a=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:n,shift:i},{type:"elem",elem:o,shift:e}]},t)}else a=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:n,shift:i}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),L.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var n,i,r=Ct(e.label);let s;return r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),s=e.body?(n=It(_(e.body,t)),e.below?(i=It(_(e.below,t)),new k.MathNode("munderover",[r,i,n])):new k.MathNode("mover",[r,n])):e.below?(i=It(_(e.below,t)),new k.MathNode("munder",[r,i])):(s=It(),new k.MathNode("mover",[r,s]))}}),L.makeSpan);function Dt(e,t){var n=E(e.body,t,!0);return _t([e.mclass],n,t)}function Ot(e,t){let n;t=S(e.body,t);return"minner"===e.mclass?n=new k.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(n=t[0]).type="mi":n=new k.MathNode("mi",t):(e.isCharacterBox?(n=t[0]).type="mo":n=new k.MathNode("mo",t),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}b({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:n}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+n.slice(5),body:x(t),isCharacterBox:$.isCharacterBox(t)}},htmlBuilder:Dt,mathmlBuilder:Ot});const Ft=e=>{e="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family},Pt=(b({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){e=e.parser;return{type:"mclass",mode:e.mode,mclass:Ft(t[0]),body:x(t[1]),isCharacterBox:$.isCharacterBox(t[1])}}}),b({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:n}=e,i=t[1],t=t[0],r="\\stackrel"!==n?Ft(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:x(i)},i={type:"supsub",mode:t.mode,base:i,sup:"\\underset"===n?null:t,sub:"\\underset"===n?t:null};return{type:"mclass",mode:e.mode,mclass:r,body:[i],isCharacterBox:$.isCharacterBox(i)}},htmlBuilder:Dt,mathmlBuilder:Ot}),b({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"pmb",mode:e.mode,mclass:Ft(t[0]),body:x(t[0])}},htmlBuilder(e,t){var n=E(e.body,t,!0),e=L.makeSpan([e.mclass],n,t);return e.style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){e=S(e.body,t),t=new k.MathNode("mstyle",e);return t.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),zt=e=>"textord"===e.type&&"@"===e.text;b({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:n}=e;return{type:"cdlabel",mode:e.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),n=L.wrapFragment(I(e.label,n,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=T(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let n=new k.MathNode("mrow",[_(e.label,t)]);return(n=new k.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new k.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),b({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){e=e.parser;return{type:"cdlabelparent",mode:e.mode,fragment:t[0]}},htmlBuilder(e,t){e=L.wrapFragment(I(e.fragment,t),t);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new k.MathNode("mrow",[_(e.fragment,t)])}}),b({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e["parser"],n=D(t[0],"ordgroup").body;let i="";for(let e=0;e<n.length;e++)i+=D(n[e],"textord").text;let r,s=parseInt(i);if(isNaN(s))throw new C("\\@char has non-numeric argument "+i);if(s<0||1114111<=s)throw new C("\\@char with invalid code point "+i);return r=s<=65535?String.fromCharCode(s):(s-=65536,String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:e.mode,text:r}}});g=(e,t)=>{t=E(e.body,t.withColor(e.color),!1);return L.makeFragment(t)},Ie=(e,t)=>{t=S(e.body,t.withColor(e.color)),t=new k.MathNode("mstyle",t);return t.setAttribute("mathcolor",e.color),t};b({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e["parser"],n=D(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:n,body:x(t)}},htmlBuilder:g,mathmlBuilder:Ie}),b({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:n}=e,t=D(t[0],"color-token").color,n=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,n));return{type:"color",mode:e.mode,color:t,body:n}},htmlBuilder:g,mathmlBuilder:Ie}),b({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var e=e["parser"],i="["===e.gullet.future().text?e.parseSizeGroup(!0):null,r=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:r,size:i&&D(i,"size").value}},htmlBuilder(e,t){var n=L.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size)&&(n.style.marginTop=T(M(e.size,t))),n},mathmlBuilder(e,t){var n=new k.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size)&&n.setAttribute("height",T(M(e.size,t))),n}});function Bt(e,t,n){if(n=oe(u.math[e]&&u.math[e].replace||e,t,n))return n;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function Nt(e,t,n,i){return t=n.havingBaseStyle(t),i=L.makeSpan(i.concat(t.sizingClasses(n)),[e],n),e=t.sizeMultiplier/n.sizeMultiplier,i.height*=e,i.depth*=e,i.maxFontSize=t.sizeMultiplier,i}function Ht(e,t,n){n=t.havingBaseStyle(n),n=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=T(n),e.height-=n,e.depth+=n}function Wt(e,t,n,i,r,s){return e=L.makeSymbol(e,"Size"+t+"-Regular",r,i),r=Nt(L.makeSpan(["delimsizing","size"+t],[e],i),R.TEXT,i,s),n&&Ht(r,i,R.TEXT),r}function qt(e,t,n){return{type:"elem",elem:L.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[L.makeSpan([],[L.makeSymbol(e,t,n)])])}}function Ut(e,t,n){var i=(ie["Size4-Regular"][e.charCodeAt(0)]?ie["Size4-Regular"]:ie["Size1-Regular"])[e.charCodeAt(0)][4],e=new Ce("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),e=new Se([e],{width:T(i),height:T(t),style:"width:"+T(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=L.makeSvgSpan([],[e],n)).height=t,e.style.height=T(t),e.style.width=T(i),{type:"elem",elem:e}}function Vt(e,t,n,i,r,s){let o,a,l,c,h="",u=0,d=(o=l=c=e,a=null,"Size1-Regular");"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",c="\\Downarrow"):$.contains(Zt,e)?(l="",h="vert",u=333):$.contains(en,e)?(l="∥",h="doublevert",u=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===e||"\\lbrace"===e?(o="⎧",a="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",a="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",c="⎩",l="⎪",d="Size4-Regular");var e=Bt(o,d,r),p=e.height+e.depth,e=Bt(l,d,r),e=e.height+e.depth,m=(m=Bt(c,d,r)).height+m.depth;let g=0,f=1;if(null!==a){const e=Bt(a,d,r);g=e.height+e.depth,f=2}var w=(w=p+m+g)+Math.max(0,Math.ceil((t-w)/(f*e)))*f*e;let v=i.fontMetrics().axisHeight;n&&(v*=i.sizeMultiplier);var t=w/2-v,y=[];if(0<h.length){const e=w-p-m,t=Math.round(1e3*w),n=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(h,Math.round(1e3*e)),r=new Ce(h,n),s=(u/1e3).toFixed(3)+"em",o=(t/1e3).toFixed(3)+"em",a=new Se([r],{width:s,height:o,viewBox:"0 0 "+u+" "+t}),$=L.makeSvgSpan([],[a],i);$.height=t/1e3,$.style.width=s,$.style.height=o,y.push({type:"elem",elem:$})}else{if(y.push(qt(c,d,r)),y.push(Qt),null===a){const e=w-p-m+.016;y.push(Ut(l,e,i))}else{const e=(w-p-m-g)/2+.016;y.push(Ut(l,e,i)),y.push(Qt),y.push(qt(a,d,r)),y.push(Qt),y.push(Ut(l,e,i))}y.push(Qt),y.push(qt(o,d,r))}return e=i.havingBaseStyle(R.TEXT),n=L.makeVList({positionType:"bottom",positionData:t,children:y},e),Nt(L.makeSpan(["delimsizing","mult"],[n],e),R.TEXT,i,s)}function Gt(i,e,t,n,r){return n=function(e,t){e*=1e3;let n="";switch(i){case"sqrtMain":n="M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize1":n="M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize2":n="M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize3":n="M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z";break;case"sqrtSize4":n="M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z";break;case"sqrtTall":n="M702 "+(80+e)+"H400000"+(40+e)+"\nH742v"+(t-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}return n}(n,t),n=new Ce(i,n),n=new Se([n],{width:"400em",height:T(e),viewBox:"0 0 400000 "+t,preserveAspectRatio:"xMinYMin slice"}),L.makeSvgSpan(["hide-tail"],[n],r)}function jt(n,i,r,s){for(let t=Math.min(2,3-s.style.size);t<r.length&&"stack"!==r[t].type;t++){var o=Bt(n,function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")}(r[t]),"math");let e=o.height+o.depth;if("small"===r[t].type&&(e*=s.havingBaseStyle(r[t].style).sizeMultiplier),e>i)return r[t]}return r[r.length-1]}function Kt(e,t,n,i,r,s){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),u=$.contains(rn,e)?on:$.contains(tn,e)?ln:an;var o,a,l,c,h,u=jt(e,t,u,i);return"small"===u.type?(o=e,a=u.style,l=n,c=i,h=s,o=L.makeSymbol(o,"Main-Regular",r,c),o=Nt(o,a,c,h),l&&Ht(o,c,a),o):"large"===u.type?Wt(e,u.size,n,i,r,s):Vt(e,t,n,i,r,s)}const Yt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new C("Expected a control sequence",e);return t},Jt=(e,t,n,i)=>{let r=e.gullet.macros.get(n.text);null==r&&(n.noexpand=!0,r={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,r,i)},Qt=(b({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,n=(e.consumeSpaces(),e.fetch());if(Yt[n.text])return"\\global"!==t&&"\\\\globallong"!==t||(n.text=Yt[n.text]),D(e.parseFunction(),"internal");throw new C("Invalid token after macro prefix",n)}}),b({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:n}=e,i=t.gullet.popToken();e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new C("Expected a control sequence",i);let r,s=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(i=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),o[s].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new C('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new C('Argument number "'+i.text+'" out of order');s++,o.push([])}else{if("EOF"===i.text)throw new C("Expected a macro definition");o[s].push(i.text)}let a=t.gullet.consumeArg()["tokens"];return r&&a.unshift(r),"\\edef"!==n&&"\\xdef"!==n||(a=t.gullet.expandTokens(a)).reverse(),t.gullet.macros.set(e,{tokens:a,numArgs:s,delimiters:o},n===Yt[n]),{type:"internal",mode:t.mode}}}),b({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,n=Xt(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Jt(e,n,i,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),b({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,n=Xt(e.gullet.popToken()),i=e.gullet.popToken(),r=e.gullet.popToken();return Jt(e,n,r,"\\\\globalfuture"===t),e.gullet.pushToken(r),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Zt=["|","\\lvert","\\rvert","\\vert"],en=["\\|","\\lVert","\\rVert","\\Vert"],tn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],nn=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],rn=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sn=[0,1.2,1.8,2.4,3],on=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],an=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],ln=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var cn={sqrtImage:function(e,t){var n=t.havingBaseSizing(),i=jt("\\surd",e*n.sizeMultiplier,ln,n);let r=n.sizeMultiplier;n=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let s,o,a=0,l=0,c=0;return o="small"===i.type?(c=1e3+1e3*n+80,e<1?r=1:e<1.4&&(r=.7),a=(1+n+.08)/r,l=(1+n)/r,(s=Gt("sqrtMain",a,c,n,t)).style.minWidth="0.853em",.833/r):"large"===i.type?(c=1080*sn[i.size],l=(sn[i.size]+n)/r,a=(sn[i.size]+n+.08)/r,(s=Gt("sqrtSize"+i.size,a,c,n,t)).style.minWidth="1.02em",1/r):(a=e+n+.08,l=e+n,c=Math.floor(1e3*e+n)+80,(s=Gt("sqrtTall",a,c,n,t)).style.minWidth="0.742em",1.056),s.height=l,s.style.height=T(a),{span:s,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+n)*r}},sizedDelim:function(e,t,n,i,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),$.contains(tn,e)||$.contains(rn,e))return Wt(e,t,!1,n,i,r);if($.contains(nn,e))return Vt(e,sn[t],!1,n,i,r);throw new C("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:sn,customSizedDelim:Kt,leftRightDelim:function(e,t,n,i,r,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,a=5/i.fontMetrics().ptPerEm,t=Math.max(t-o,n+o),n=Math.max(t/500*901,2*t-a);return Kt(e,n,!0,i,r,s)}};const hn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},un=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function dn(e,t){var n=Mt(e);if(n&&$.contains(un,n.text))return n;throw new C(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function pn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}b({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{t=dn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hn[e.funcName].size,mclass:hn[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,t)=>"."===e.delim?L.makeSpan([e.mclass]):cn.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(ft(e.delim,e.mode)),new k.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),T(cn.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),b({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new C("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dn(t[0],e).text,color:n}}}),b({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=dn(t[0],e),e=e.parser,n=(++e.leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),D(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:n,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{pn(t);const n=E(t.body,e,!0,["mopen","mclose"]);let i,r,s=0,o=0,a=!1;for(let e=0;e<n.length;e++)n[e].isMiddle?a=!0:(s=Math.max(n[e].height,s),o=Math.max(n[e].depth,o));if(s*=e.sizeMultiplier,o*=e.sizeMultiplier,i="."===t.left?nt(e,["mopen"]):cn.leftRightDelim(t.left,s,o,e,t.mode,["mopen"]),n.unshift(i),a)for(let e=1;e<n.length;e++){const i=n[e].isMiddle;i&&(n[e]=cn.leftRightDelim(i.delim,s,o,i.options,t.mode,[]))}if("."===t.right)r=nt(e,["mclose"]);else{const n=t.rightColor?e.withColor(t.rightColor):e;r=cn.leftRightDelim(t.right,s,o,n,t.mode,["mclose"])}return n.push(r),L.makeSpan(["minner"],n,e)},mathmlBuilder:(e,t)=>{pn(e);var n=S(e.body,t);if("."!==e.left){const t=new k.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),n.unshift(t)}if("."!==e.right){const t=new k.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),n.push(t)}return wt(n)}}),b({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{t=dn(t[0],e);if(e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new C("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let n;return"."===e.delim?n=nt(t,[]):(n=cn.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},n.isMiddle=e),n},mathmlBuilder:(e,t)=>{e="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),e=new k.MathNode("mo",[e]);return e.setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e}});a=(i,r)=>{const s=L.wrapFragment(I(i.body,r),r),o=i.label.slice(1);let a,e=r.sizeMultiplier,l=0;const c=$.isCharacterBox(i.body);if("sout"===o)(a=L.makeSpan(["stretchy","sout"])).height=r.fontMetrics().defaultRuleThickness/e,l=-.5*r.fontMetrics().xHeight;else if("phase"===o){const i=M({number:.6,unit:"pt"},r),o=M({number:.35,unit:"ex"},r),c=(e/=r.havingBaseSizing().sizeMultiplier,s.height+s.depth+i+o),$=(s.style.paddingLeft=T(c/2+i),Math.floor(1e3*c*e)),t="M400000 "+$+" H0 L"+$/2+" 0 l65 45 L145 "+($-80)+" H400000z",n=new Se([new Ce("phase",t)],{width:"400em",height:T($/1e3),viewBox:"0 0 400000 "+$,preserveAspectRatio:"xMinYMin slice"});(a=L.makeSvgSpan(["hide-tail"],[n],r)).style.height=T(c),l=s.depth+i+o}else{/cancel/.test(o)?c||s.classes.push("cancel-pad"):"angl"===o?s.classes.push("anglpad"):s.classes.push("boxpad");let e=0,t=0,n=0;t=/box/.test(o)?(n=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),e=r.fontMetrics().fboxsep+("colorbox"===o?0:n)):"angl"===o?(n=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),e=4*n,Math.max(0,.25-s.depth)):e=c?.2:0,a=function(e,t,n,i,r){let s;i=e.height+e.depth+n+i;if(/fbox|color|angl/.test(t)){if(s=L.makeSpan(["stretchy",t],[],r),"fbox"===t){const e=r.color&&r.getColor();e&&(s.style.borderColor=e)}}else{const e=[],n=(/^[bx]cancel$/.test(t)&&e.push(new $e({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new $e({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),new Se(e,{width:"100%",height:T(i)}));s=L.makeSvgSpan([],[n],r)}return s.height=i,s.style.height=T(i),s}(s,o,e,t,r),/fbox|boxed|fcolorbox/.test(o)?(a.style.borderStyle="solid",a.style.borderWidth=T(n)):"angl"===o&&.049!==n&&(a.style.borderTopWidth=T(n),a.style.borderRightWidth=T(n)),l=s.depth+t,i.backgroundColor&&(a.style.backgroundColor=i.backgroundColor,i.borderColor)&&(a.style.borderColor=i.borderColor)}let t;if(i.backgroundColor)t=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:0}]},r);else{const i=/cancel|phase/.test(o)?["svg-align"]:[];t=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:i}]},r)}return/cancel/.test(o)&&(t.height=s.height,t.depth=s.depth),/cancel/.test(o)&&!c?L.makeSpan(["mord","cancel-lap"],[t],r):L.makeSpan(["mord"],[t],r)},d=(e,t)=>{let n=0;var i=new k.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[_(e.body,t)]);switch(e.label){case"\\cancel":i.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":i.setAttribute("notation","downdiagonalstrike");break;case"\\phase":i.setAttribute("notation","phasorangle");break;case"\\sout":i.setAttribute("notation","horizontalstrike");break;case"\\fbox":i.setAttribute("notation","box");break;case"\\angl":i.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,i.setAttribute("width","+"+2*n+"pt"),i.setAttribute("height","+"+2*n+"pt"),i.setAttribute("lspace",n+"pt"),i.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){const n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);i.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":i.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&i.setAttribute("mathbackground",e.backgroundColor),i};b({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:e,funcName:i}=e,r=D(t[0],"color-token").color,t=t[1];return{type:"enclose",mode:e.mode,label:i,backgroundColor:r,body:t}},htmlBuilder:a,mathmlBuilder:d}),b({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:e,funcName:i}=e,r=D(t[0],"color-token").color,s=D(t[1],"color-token").color,t=t[2];return{type:"enclose",mode:e.mode,label:i,backgroundColor:s,borderColor:r,body:t}},htmlBuilder:a,mathmlBuilder:d}),b({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){e=e.parser;return{type:"enclose",mode:e.mode,label:"\\fbox",body:t[0]}}}),b({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:n}=e,t=t[0];return{type:"enclose",mode:e.mode,label:n,body:t}},htmlBuilder:a,mathmlBuilder:d}),b({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"enclose",mode:e.mode,label:"\\angl",body:t[0]}}});const mn={};function gn(e){var{type:e,names:t,props:n,handler:i,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i};for(let e=0;e<t.length;++e)mn[t[e]]=o;r&&(Qe[e]=r),s&&(Ze[e]=s)}const fn={};function O(e,t){fn[e]=t}class wn{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new wn(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class vn{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new vn(t,wn.range(this,e))}}function yn(e){var t=[];e.consumeSpaces();let n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}const bn=e=>{if(!e.parser.settings.displayMode)throw new C("{"+e.envName+"} can be used only in display mode.")};function xn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function An(t,e,n){let{hskipBeforeAndAfter:i,addJot:r,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:h,maxNumCols:u,leqno:d}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){const e=t.gullet.expandMacroAsText("\\arraystretch");if(null==e)o=1;else if(!(o=parseFloat(e))||o<0)throw new C("Invalid \\arraystretch: "+e)}t.gullet.beginGroup();let p=[];const m=[p],g=[],f=[],w=null!=l?[]:void 0;function v(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function y(){w&&(t.gullet.macros.get("\\df@tag")?(w.push(t.subparse([new vn("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):w.push(Boolean(l)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(v(),f.push(yn(t));;){let e=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),e={type:"ordgroup",mode:t.mode,body:e},n&&(e={type:"styling",mode:t.mode,style:n,body:[e]}),p.push(e);const i=t.fetch().text;if("&"===i){if(u&&p.length===u){if(c||a)throw new C("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===i){y(),1===p.length&&"styling"===e.type&&0===e.body[0].body.length&&(1<m.length||!h)&&m.pop(),f.length<m.length+1&&f.push([]);break}if("\\\\"!==i)throw new C("Expected & or \\\\ or \\cr or \\end",t.nextToken);{let e;t.consume()," "!==t.gullet.future().text&&(e=t.parseSizeGroup(!0)),g.push(e?e.value:null),y(),f.push(yn(t)),p=[],m.push(p),v()}}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:r,arraystretch:o,body:m,cols:s,rowGaps:g,hskipBeforeAndAfter:i,hLinesBeforeRow:f,colSeparationType:a,tags:w,leqno:d}}function kn(e){return"d"===e.slice(0,1)?"display":"text"}function Sn(i,r){let s,o;const a=i.body.length,l=i.hLinesBeforeRow;let c=0,h=new Array(a);const u=[],d=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),e=1/r.fontMetrics().ptPerEm;let p=5*e;i.colSeparationType&&"small"===i.colSeparationType&&(p=r.havingStyle(R.SCRIPT).sizeMultiplier/r.sizeMultiplier*.2778);var t="CD"===i.colSeparationType?M({number:3,unit:"ex"},r):12*e,m=3*e,g=.7*(t=i.arraystretch*t),f=.3*t;let w=0;function v(t){for(let e=0;e<t.length;++e)0<e&&(w+=.25),u.push({pos:w,isDashed:t[e]})}for(v(l[0]),s=0;s<i.body.length;++s){const C=i.body[s];let e=g,t=f;c<C.length&&(c=C.length);const u=new Array(C.length);for(o=0;o<C.length;++o){const i=I(C[o],r);t<i.depth&&(t=i.depth),e<i.height&&(e=i.height),u[o]=i}const d=i.rowGaps[s];let n=0;d&&0<(n=M(d,r))&&(n+=f,t<n&&(t=n),n=0),i.addJot&&(t+=m),u.height=e,u.depth=t,w+=e,u.pos=w,w+=t+n,h[s]=u,v(l[s+1])}var y=w/2+r.fontMetrics().axisHeight,b=i.cols||[],x=[];let A,k;var n=[];if(i.tags&&i.tags.some(e=>e))for(s=0;s<a;++s){const C=h[s],o=C.pos-y,a=i.tags[s];var S=!0===a?L.makeSpan(["eqn-num"],[],r):!1===a?L.makeSpan([],[],r):L.makeSpan([],E(a,r,!0),r);S.depth=C.depth,S.height=C.height,n.push({type:"elem",elem:S,shift:o})}for(o=0,k=0;o<c||k<b.length;++o,++k){let t,n=b[k]||{},e=!0;for(;"separator"===n.type;){if(e||((A=L.makeSpan(["arraycolsep"],[])).style.width=T(r.fontMetrics().doubleRuleSep),x.push(A)),"|"!==n.separator&&":"!==n.separator)throw new C("Invalid separator type: "+n.separator);{const i="|"===n.separator?"solid":"dashed",s=L.makeSpan(["vertical-separator"],[],r),C=(s.style.height=T(w),s.style.borderRightWidth=T(d),s.style.borderRightStyle=i,s.style.margin="0 "+T(-d/2),w-y);C&&(s.style.verticalAlign=T(-C)),x.push(s)}k++,n=b[k]||{},e=!1}if(!(o>=c)){(0<o||i.hskipBeforeAndAfter)&&0!==(t=$.deflt(n.pregap,p))&&((A=L.makeSpan(["arraycolsep"],[])).style.width=T(t),x.push(A));let e=[];for(s=0;s<a;++s){const i=h[s],r=i[o];if(r){const C=i.pos-y;r.depth=i.depth,r.height=i.height,e.push({type:"elem",elem:r,shift:C})}}e=L.makeVList({positionType:"individualShift",children:e},r),e=L.makeSpan(["col-align-"+(n.align||"c")],[e]),x.push(e),(o<c-1||i.hskipBeforeAndAfter)&&0!==(t=$.deflt(n.postgap,p))&&((A=L.makeSpan(["arraycolsep"],[])).style.width=T(t),x.push(A))}}if(h=L.makeSpan(["mtable"],x),0<u.length){const i=L.makeLineSpan("hline",r,d),s=L.makeLineSpan("hdashline",r,d),C=[{type:"elem",elem:h,shift:0}];for(;0<u.length;){const r=u.pop(),o=r.pos-y;r.isDashed?C.push({type:"elem",elem:s,shift:o}):C.push({type:"elem",elem:i,shift:o})}h=L.makeVList({positionType:"individualShift",children:C},r)}return 0===n.length?L.makeSpan(["mord"],[h],r):(t=L.makeVList({positionType:"individualShift",children:n},r),t=L.makeSpan(["tag"],[t],r),L.makeFragment([h,t]))}function Cn(s,o){var t=[],n=new k.MathNode("mtd",[],["mtr-glue"]),i=new k.MathNode("mtd",[],["mml-eqn-num"]);for(let e=0;e<s.body.length;e++){const r=s.body[e],a=[];for(let e=0;e<r.length;e++)a.push(new k.MathNode("mtd",[_(r[e],o)]));s.tags&&s.tags[e]&&(a.unshift(n),a.push(n),s.leqno?a.unshift(i):a.push(i)),t.push(new k.MathNode("mtr",a))}let e=new k.MathNode("mtable",t);const r=.5===s.arraystretch?.1:.16+s.arraystretch-1+(s.addJot?.09:0);e.setAttribute("rowspacing",T(r));let a="",l="";if(s.cols&&0<s.cols.length){const o=s.cols;let t="",n=!1,i=0,r=o.length;"separator"===o[0].type&&(a+="top ",i=1),"separator"===o[o.length-1].type&&(a+="bottom ",--r);for(let e=i;e<r;e++)"align"===o[e].type?(l+=Rn[o[e].align],n&&(t+="none "),n=!0):"separator"===o[e].type&&n&&(t+="|"===o[e].separator?"solid ":"dashed ",n=!1);e.setAttribute("columnalign",l.trim()),/[sd]/.test(t)&&e.setAttribute("columnlines",t.trim())}if("align"===s.colSeparationType){const o=s.cols||[];let t="";for(let e=1;e<o.length;e++)t+=e%2?"0em ":"1em ";e.setAttribute("columnspacing",t.trim())}else"alignat"===s.colSeparationType||"gather"===s.colSeparationType?e.setAttribute("columnspacing","0em"):"small"===s.colSeparationType?e.setAttribute("columnspacing","0.2778em"):"CD"===s.colSeparationType?e.setAttribute("columnspacing","0.5em"):e.setAttribute("columnspacing","1em");let c="";var h=s.hLinesBeforeRow;a=(a+=0<h[0].length?"left ":"")+(0<h[h.length-1].length?"right ":"");for(let e=1;e<h.length-1;e++)c+=0===h[e].length?"none ":h[e][0]?"dashed ":"solid ";return/[sd]/.test(c)&&e.setAttribute("rowlines",c.trim()),""!==a&&(e=new k.MathNode("menclose",[e])).setAttribute("notation",a.trim()),s.arraystretch&&s.arraystretch<1&&(e=new k.MathNode("mstyle",[e])).setAttribute("scriptlevel","1"),e}function $n(e,n){-1===e.envName.indexOf("ed")&&bn(e);var i=[],t=-1<e.envName.indexOf("at")?"alignat":"align",r="split"===e.envName,t=An(e.parser,{cols:i,addJot:!0,autoTag:r?void 0:xn(e.envName),emptySingleRow:!0,colSeparationType:t,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},"display");let s,o=0;const a={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&"ordgroup"===n[0].type){let t="";for(let e=0;e<n[0].body.length;e++)t+=D(n[0].body[e],"textord").text;s=Number(t),o=2*s}const l=!o;t.body.forEach(function(t){for(let e=1;e<t.length;e+=2){var n=D(t[e],"styling");D(n.body[0],"ordgroup").body.unshift(a)}if(l)o<t.length&&(o=t.length);else{var e=t.length/2;if(s<e)throw new C("Too many math in a row: expected "+s+", but got "+e,t[0])}});for(let n=0;n<o;++n){let e="r",t=0;n%2==1?e="l":0<n&&l&&(t=1),i[n]={type:"align",align:e,pregap:t,postgap:0}}return t.colSeparationType=l?"align":"alignat",t}const Rn={c:"center ",l:"left ",r:"right "};gn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){t=(Mt(t[0])?[t[0]]:D(t[0],"ordgroup").body).map(function(e){var t=Rt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new C("Unknown column alignment: "+t,e)}),t={cols:t,hskipBeforeAndAfter:!0,maxNumCols:t.length};return An(e.parser,t,kn(e.envName))},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let n="c";var i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),n=t.fetch().text,-1==="lcr".indexOf(n))throw new C("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),i.cols=[{type:"align",align:n}]}}var i=An(e.parser,i,kn(e.envName)),r=Math.max(0,...i.body.map(e=>e.length));return i.cols=new Array(r).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){e=An(e.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){t=(Mt(t[0])?[t[0]]:D(t[0],"ordgroup").body).map(function(e){var t=Rt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new C("Unknown column alignment: "+t,e)});if(1<t.length)throw new C("{subarray} can contain only one column");if(0<(e=An(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new C("{subarray} can contain only one column");return e},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=An(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},kn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:$n,htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){$.contains(["gather","gather*"],e.envName)&&bn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:xn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return An(e.parser,t,"display")},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:$n,htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){bn(e);var t={autoTag:xn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return An(e.parser,t,"display")},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["CD"],props:{numArgs:0},handler(e){bn(e);{var r=e.parser,s,o,i=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){i.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();const e=r.fetch().text;if("&"!==e&&"\\\\"!==e){if("\\end"!==e)throw new C("Expected \\\\ or \\cr or \\end",r.nextToken);0===i[i.length-1].length&&i.pop();break}r.consume()}let n=[];const c=[n];for(let t=0;t<i.length;t++){var a=i[t];let e={type:"styling",body:[],mode:"math",style:"display"};for(let i=0;i<a.length;i++)if(zt(a[i])){n.push(e);const c=Rt(a[i+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(c))){if(!(-1<"<>AV".indexOf(c)))throw new C('Expected one of "<>AV=|." after @',a[i]);for(let n=0;n<2;n++){let t=!0;for(let e=i+1;e<a.length;e++){if(o=c,("mathord"===(s=a[e]).type||"atom"===s.type)&&s.text===o){t=!1,i=e;break}if(zt(a[e]))throw new C("Missing a "+c+" character to complete a CD arrow.",a[e]);h[n].body.push(a[e])}if(t)throw new C("Missing a "+c+" character to complete a CD arrow.",a[i])}}var l={type:"styling",body:[function(e,t,n){var i=Pt[e];switch(i){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(i,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:i,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[e],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[r],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}(c,h,r)],mode:"math",style:"display"};n.push(l),e={type:"styling",body:[],mode:"math",style:"display"}}else e.body.push(a[i]);t%2==0?n.push(e):n.shift(),n=[],c.push(n)}return r.gullet.endGroup(),r.gullet.endGroup(),{type:"array",mode:"math",body:c,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(c[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(c.length+1).fill([])}}},htmlBuilder:Sn,mathmlBuilder:Cn}),O("\\nonumber","\\gdef\\@eqnsw{0}"),O("\\notag","\\nonumber"),b({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new C(e.funcName+" valid only within array environment")}});var Mn=mn;b({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:n,funcName:i}=e;var r=t[0];if("ordgroup"!==r.type)throw new C("Invalid environment name",r);let s="";for(let e=0;e<r.body.length;++e)s+=D(r.body[e],"textord").text;if("\\begin"!==i)return{type:"environment",mode:n.mode,name:s,nameGroup:r};{if(!Mn.hasOwnProperty(s))throw new C("No such environment: "+s,r);const e=Mn[s],{args:t,optArgs:i}=n.parseArguments("\\begin{"+s+"}",e),l={mode:n.mode,envName:s,parser:n},c=e.handler(l,t,i);n.expect("\\end",!1);var o=n.nextToken,a=D(n.parseFunction(),"environment");if(a.name!==s)throw new C("Mismatch: \\begin{"+s+"} matched by \\end{"+a.name+"}",o);return c}}});function Tn(e){let t=null;return t=0<e.length?"."===(t=e)?null:t:t}function Ln(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new C("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},pe(e))return e;throw new C("Invalid unit: '"+e.unit+"' in \\includegraphics.")}const En=(e,t)=>{var n=e.font,t=t.withFont(n);return I(e.body,t)},In=(e,t)=>{var n=e.font,t=t.withFont(n);return _(e.body,t)},_n={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Dn=(b({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=tt(t[0]);let i=n;return i in _n&&(i=_n[i]),{type:"font",mode:e.mode,font:i.slice(1),body:t}},htmlBuilder:En,mathmlBuilder:In}),b({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e["parser"],t=t[0],n=$.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Ft(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:n}}}),b({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:n,breakOnTokenText:i}=e,r=e["mode"],i=e.parseExpression(!0,i);return{type:"font",mode:r,font:"math"+n.slice(1),body:{type:"ordgroup",mode:e.mode,body:i}}},htmlBuilder:En,mathmlBuilder:In}),(e,t)=>{let n=t;return"display"===e?n=n.id>=R.SCRIPT.id?n.text():R.DISPLAY:"text"===e&&n.size===R.DISPLAY.size?n=R.TEXT:"script"===e?n=R.SCRIPT:"scriptscript"===e&&(n=R.SCRIPTSCRIPT),n}),On=(e,t)=>{const n=Dn(e.size,t.style),i=n.fracNum(),r=n.fracDen();var s=t.havingStyle(i),o=I(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,n=3.5/t.fontMetrics().ptPerEm;o.height=o.height<e?e:o.height,o.depth=o.depth<n?n:o.depth}s=t.havingStyle(r);var a=I(e.denom,s,t);let l,c,h,u,d,p,m,g,f,w;if(h=e.hasBarLine?(l=e.barSize?(c=M(e.barSize,t),L.makeLineSpan("frac-line",t,c)):L.makeLineSpan("frac-line",t),c=l.height,l.height):(l=null,c=0,t.fontMetrics().defaultRuleThickness),p=n.size===R.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,d=0<c?3*h:7*h,t.fontMetrics().denom1):(d=0<c?(u=t.fontMetrics().num2,h):(u=t.fontMetrics().num3,3*h),t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight,n=(u-o.depth-(e+.5*c)<d&&(u+=d-(u-o.depth-(e+.5*c))),e-.5*c-(a.height-p)<d&&(p+=d-(e-.5*c-(a.height-p))),-(e-.5*c));m=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:l,shift:n},{type:"elem",elem:o,shift:-u}]},t)}else{const e=u-o.depth-(a.height-p);e<d&&(u+=.5*(d-e),p+=.5*(d-e)),m=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:o,shift:-u}]},t)}return s=t.havingStyle(n),m.height*=s.sizeMultiplier/t.sizeMultiplier,m.depth*=s.sizeMultiplier/t.sizeMultiplier,g=n.size===R.DISPLAY.size?t.fontMetrics().delim1:(n.size===R.SCRIPTSCRIPT.size?t.havingStyle(R.SCRIPT):t).fontMetrics().delim2,f=null==e.leftDelim?nt(t,["mopen"]):cn.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),w=e.continued?L.makeSpan([]):null==e.rightDelim?nt(t,["mclose"]):cn.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),L.makeSpan(["mord"].concat(s.sizingClasses(t)),[f,L.makeSpan(["mfrac"],[m]),w],t)},Fn=(e,t)=>{let n=new k.MathNode("mfrac",[_(e.numer,t),_(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const i=M(e.barSize,t);n.setAttribute("linethickness",T(i))}}else n.setAttribute("linethickness","0px");const i=Dn(e.size,t.style);if(i.size!==t.style.size){n=new k.MathNode("mstyle",[n]);const e=i.size===R.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",e),n.setAttribute("scriptlevel","0")}if(null==e.leftDelim&&null==e.rightDelim)return n;{const t=[];if(null!=e.leftDelim){const n=new k.MathNode("mo",[new k.TextNode(e.leftDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}if(t.push(n),null!=e.rightDelim){const n=new k.MathNode("mo",[new k.TextNode(e.rightDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}return wt(t)}},Pn=(b({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:n}=e,i=t[0],t=t[1];let r,s=null,o=null,a="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",o=")";break;case"\\\\bracefrac":r=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":r=!1,s="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":a="display";break;case"\\tfrac":case"\\tbinom":a="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:t,hasBarLine:r,leftDelim:s,rightDelim:o,size:a,barSize:null}},htmlBuilder:On,mathmlBuilder:Fn}),b({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e["parser"],n=t[0],t=t[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:n,denom:t,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),b({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:n,funcName:i,token:r}=e;switch(i){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:r}}}),["display","text","script","scriptscript"]),zn=(b({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e["parser"],n=t[4],i=t[5],r=tt(t[0]),r="atom"===r.type&&"open"===r.family?Tn(r.text):null,s=tt(t[1]),s="atom"===s.type&&"close"===s.family?Tn(s.text):null,o=D(t[2],"size");let a,l=null,c=(a=!!o.isBlank||0<(l=o.value).number,"auto"),h=t[3];if("ordgroup"===h.type){if(0<h.body.length){const e=D(h.body[0],"textord");c=Pn[Number(e.text)]}}else h=D(h,"textord"),c=Pn[Number(h.text)];return{type:"genfrac",mode:e.mode,numer:n,denom:i,continued:!1,hasBarLine:a,barSize:l,leftDelim:r,rightDelim:s,size:c}},htmlBuilder:On,mathmlBuilder:Fn}),b({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:n}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:D(t[0],"size").value,token:n}}}),b({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var e=e["parser"],n=t[0],i=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(D(t[1],"infix").size),t=t[2],r=0<i.number;return{type:"genfrac",mode:e.mode,numer:n,denom:t,continued:!1,hasBarLine:r,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:On,mathmlBuilder:Fn}),(e,t)=>{var n=t.style;let i,r;r="supsub"===e.type?(i=e.sup?I(e.sup,t.havingStyle(n.sup()),t):I(e.sub,t.havingStyle(n.sub()),t),D(e.base,"horizBrace")):D(e,"horizBrace");n=I(r.base,t.havingBaseStyle(R.DISPLAY)),e=$t(r,t);let s;if((r.isOver?(s=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(s=L.makeVList({positionType:"bottom",positionData:n.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:n}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),i){const e=L.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t);s=r.isOver?L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:i}]},t):L.makeVList({positionType:"bottom",positionData:e.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return L.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t)}),Bn=(b({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:n}=e;return{type:"horizBrace",mode:e.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:zn,mathmlBuilder:(e,t)=>{var n=Ct(e.label);return new k.MathNode(e.isOver?"mover":"munder",[_(e.base,t),n])}}),b({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],n=t[1],t=D(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:x(n)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=E(e.body,t,!1);return L.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{let n=yt(e.body,t);return(n=n instanceof A?n:new A("mrow",[n])).setAttribute("href",e.href),n}}),b({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],n=D(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:n}))return e.formatUnsupportedCmd("\\url");var i=[];for(let t=0;t<n.length;t++){let e=n[t];"~"===e&&(e="\\textasciitilde"),i.push({type:"textord",mode:"text",text:e})}t={type:"text",mode:e.mode,font:"\\texttt",body:i};return{type:"href",mode:e.mode,href:n,body:x(t)}}}),b({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){e=e.parser;return{type:"hbox",mode:e.mode,body:x(t[0])}},htmlBuilder(e,t){e=E(e.body,t,!1);return L.makeFragment(e)},mathmlBuilder(e,t){return new k.MathNode("mrow",S(e.body,t))}}),b({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{let{parser:n,funcName:i}=t;var r=D(e[0],"raw").string,t=e[1];let s;n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(i){case"\\htmlClass":o.class=r,s={command:"\\htmlClass",class:r};break;case"\\htmlId":o.id=r,s={command:"\\htmlId",id:r};break;case"\\htmlStyle":o.style=r,s={command:"\\htmlStyle",style:r};break;case"\\htmlData":{const t=r.split(",");for(let e=0;e<t.length;e++){const n=t[e].split("=");if(2!==n.length)throw new C("Error parsing key-value for \\htmlData");o["data-"+n[0].trim()]=n[1].trim()}s={command:"\\htmlData",attributes:o};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(s)?{type:"html",mode:n.mode,attributes:o,body:x(t)}:n.formatUnsupportedCmd(i)},htmlBuilder:(e,t)=>{var n=E(e.body,t,!1),i=["enclosing"],r=(e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/)),L.makeSpan(i,n,t));for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&r.setAttribute(t,e.attributes[t]);return r},mathmlBuilder:(e,t)=>yt(e.body,t)}),b({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{e=e.parser;return{type:"htmlmathml",mode:e.mode,html:x(t[0]),mathml:x(t[1])}},htmlBuilder:(e,t)=>{e=E(e.html,t,!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>yt(e.mathml,t)}),b({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{let i=t["parser"],r={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0]){const t=D(n[0],"raw").string.split(",");for(let e=0;e<t.length;e++){const n=t[e].split("=");if(2===n.length){const t=n[1].trim();switch(n[0].trim()){case"alt":a=t;break;case"width":r=Ln(t);break;case"height":s=Ln(t);break;case"totalheight":o=Ln(t);break;default:throw new C("Invalid key: '"+n[0]+"' in \\includegraphics.")}}}}t=D(e[0],"url").url;return""===a&&(a=(a=(a=t).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:t})?{type:"includegraphics",mode:i.mode,alt:a,width:r,height:s,totalheight:o,src:t}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=M(e.height,t);let i=0,r=(0<e.totalheight.number&&(i=M(e.totalheight,t)-n),0);0<e.width.number&&(r=M(e.width,t));t={height:T(n+i)},0<r&&(t.width=T(r)),0<i&&(t.verticalAlign=T(-i)),e=new Ae(e.src,e.alt,t);return e.height=n,e.depth=i,e},mathmlBuilder:(e,t)=>{var n=new k.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);const i=M(e.height,t);let r=0;if(0<e.totalheight.number&&(r=M(e.totalheight,t)-i,n.setAttribute("valign",T(-r))),n.setAttribute("height",T(i+r)),0<e.width.number){const i=M(e.width,t);n.setAttribute("width",T(i))}return n.setAttribute("src",e.src),n}}),b({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:i}=e,r=D(t[0],"size");if(n.settings.strict){const e="m"===i[1],t="mu"===r.value.unit;e?(t||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, not "+r.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):t&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:r.value}},htmlBuilder(e,t){return L.makeGlue(e.dimension,t)},mathmlBuilder(e,t){e=M(e.dimension,t);return new k.SpaceNode(e)}}),b({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:n.slice(5),body:t}},htmlBuilder:(e,t)=>{let n;n="clap"===e.alignment?(n=L.makeSpan([],[I(e.body,t)]),L.makeSpan(["inner"],[n],t)):L.makeSpan(["inner"],[I(e.body,t)]);var i=L.makeSpan(["fix"],[]);let r=L.makeSpan([e.alignment],[n,i],t);e=L.makeSpan(["strut"]);return e.style.height=T(r.height+r.depth),r.depth&&(e.style.verticalAlign=T(-r.depth)),r.children.unshift(e),r=L.makeSpan(["thinbox"],[r],t),L.makeSpan(["mord","vbox"],[r],t)},mathmlBuilder:(e,t)=>{var n=new k.MathNode("mpadded",[_(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",t+"width")}return n.setAttribute("width","0px"),n}}),b({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:n}=e,i=n.mode,e=(n.switchMode("math"),"\\("===e?"\\)":"$"),r=n.parseExpression(!1,e);return n.expect(e),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:r}}}),b({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new C("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case R.DISPLAY.size:return e.display;case R.TEXT.size:return e.text;case R.SCRIPT.size:return e.script;case R.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Nn=(b({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{e=e.parser;return{type:"mathchoice",mode:e.mode,display:x(t[0]),text:x(t[1]),script:x(t[2]),scriptscript:x(t[3])}},htmlBuilder:(e,t)=>{e=Bn(e,t),e=E(e,t,!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>{e=Bn(e,t);return yt(e,t)}}),(e,t,n,i,r,s,o)=>{e=L.makeSpan([],[e]);var a=n&&$.isCharacterBox(n);let l,c,h;if(t){const e=I(t,i.havingStyle(r.sup()),i);c={elem:e,kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-e.depth)}}if(n){const e=I(n,i.havingStyle(r.sub()),i);l={elem:e,kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-e.height)}}if(c&&l){const t=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;h=L.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:T(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:T(s)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}else if(l){const t=e.height-o;h=L.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:T(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},i)}else{if(!c)return e;{const t=e.depth+o;h=L.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:T(s)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}}t=[h];if(l&&0!==s&&!a){const e=L.makeSpan(["mspace"],[],i);e.style.marginRight=T(s),t.unshift(e)}return L.makeSpan(["mop","op-limits"],t,i)}),Hn=["\\smallint"],Wn=(t,n)=>{let e,i,r,s=!1;"supsub"===t.type?(e=t.sup,i=t.sub,r=D(t.base,"op"),s=!0):r=D(t,"op");t=n.style;let o,a=!1;if(t.size===R.DISPLAY.size&&r.symbol&&!$.contains(Hn,r.name)&&(a=!0),r.symbol){const t=a?"Size2-Regular":"Size1-Regular";let e="";if("\\oiint"!==r.name&&"\\oiiint"!==r.name||(e=r.name.slice(1),r.name="oiint"===e?"\\iint":"\\iiint"),o=L.makeSymbol(r.name,t,"math",n,["mop","op-symbol",a?"large-op":"small-op"]),0<e.length){const t=o.italic,i=L.staticSvg(e+"Size"+(a?"2":"1"),n);o=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:i,shift:a?.08:0}]},n),r.name="\\"+e,o.classes.unshift("mop"),o.italic=t}}else if(r.body){const t=E(r.body,n,!0);1===t.length&&t[0]instanceof m?(o=t[0]).classes[0]="mop":o=L.makeSpan(["mop"],t,n)}else{const t=[];for(let e=1;e<r.name.length;e++)t.push(L.mathsym(r.name[e],r.mode,n));o=L.makeSpan(["mop"],t,n)}let l=0,c=0;return(o instanceof m||"\\oiint"===r.name||"\\oiiint"===r.name)&&!r.suppressBaseShift&&(l=(o.height-o.depth)/2-n.fontMetrics().axisHeight,c=o.italic),s?Nn(o,e,i,n,t,c,l):(l&&(o.style.position="relative",o.style.top=T(l)),o)},qn=(e,t)=>{let n;if(e.symbol)n=new A("mo",[ft(e.name,e.mode)]),$.contains(Hn,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new A("mo",S(e.body,t));else{n=new A("mi",[new gt(e.name.slice(1))]);const t=new A("mo",[ft("","text")]);n=e.parentIsSupSub?new A("mrow",[n,t]):mt([n,t])}return n},Un={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},Vn=(b({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:n,funcName:i}=e,r=i;return 1===r.length&&(r=Un[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:x(t)}},htmlBuilder:Wn,mathmlBuilder:qn}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),Gn=(b({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:n}=e,i=n;return 1===i.length&&(i=Vn[i]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Wn,mathmlBuilder:qn}),(e,t)=>{let n,i,r,s,o=!1;if("supsub"===e.type?(n=e.sup,i=e.sub,r=D(e.base,"operatorname"),o=!0):r=D(e,"operatorname"),0<r.body.length){const e=r.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),n=E(e,t.withFont("mathrm"),!0);for(let e=0;e<n.length;e++){const t=n[e];t instanceof m&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=L.makeSpan(["mop"],n,t)}else s=L.makeSpan(["mop"],[],t);return o?Nn(s,n,i,t,t.style,0,0):s});function jn(e,t,n){var i=E(e,t,!1),r=t.sizeMultiplier/n.sizeMultiplier;for(let e=0;e<i.length;e++){var s=i[e].classes.indexOf("sizing");s<0?Array.prototype.push.apply(i[e].classes,t.sizingClasses(n)):i[e].classes[s+1]==="reset-size"+t.size&&(i[e].classes[s+1]="reset-size"+n.size),i[e].height*=r,i[e].depth*=r}return L.makeFragment(i)}b({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:x(t),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Gn,mathmlBuilder:(t,n)=>{let i=S(t.body,n.withFont("mathrm")),r=!0;for(let e=0;e<i.length;e++){const n=i[e];if(!(n instanceof k.SpaceNode))if(n instanceof k.MathNode)switch(n.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const t=n.children[0];1===n.children.length&&t instanceof k.TextNode?t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){const t=i.map(e=>e.toText()).join("");i=[new k.TextNode(t)]}var n=new k.MathNode("mi",i),e=(n.setAttribute("mathvariant","normal"),new k.MathNode("mo",[ft("","text")]));return t.parentIsSupSub?new k.MathNode("mrow",[n,e]):k.newDocumentFragment([n,e])}}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),et({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?L.makeFragment(E(e.body,t,!1)):L.makeSpan(["mord"],E(e.body,t,!0),t)},mathmlBuilder(e,t){return yt(e.body,t,!0)}}),b({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){e=e.parser,t=t[0];return{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=I(e.body,t.havingCrampedStyle()),n=L.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,e=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},t);return L.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var n=new k.MathNode("mo",[new k.TextNode("‾")]),e=(n.setAttribute("stretchy","true"),new k.MathNode("mover",[_(e.body,t),n]));return e.setAttribute("accent","true"),e}}),b({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"phantom",mode:e.mode,body:x(t)}},htmlBuilder:(e,t)=>{e=E(e.body,t.withPhantom(),!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>{e=S(e.body,t);return new k.MathNode("mphantom",e)}}),b({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"hphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{let n=L.makeSpan([],[I(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(let e=0;e<n.children.length;e++)n.children[e].height=0,n.children[e].depth=0;return n=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),L.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{e=S(x(e.body),t),t=new k.MathNode("mphantom",e),e=new k.MathNode("mpadded",[t]);return e.setAttribute("height","0px"),e.setAttribute("depth","0px"),e}}),b({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"vphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{var e=L.makeSpan(["inner"],[I(e.body,t.withPhantom())]),n=L.makeSpan(["fix"],[]);return L.makeSpan(["mord","rlap"],[e,n],t)},mathmlBuilder:(e,t)=>{e=S(x(e.body),t),t=new k.MathNode("mphantom",e),e=new k.MathNode("mpadded",[t]);return e.setAttribute("width","0px"),e}}),b({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e["parser"],n=D(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:n,body:t}},htmlBuilder(e,t){var n=I(e.body,t),e=M(e.dy,t);return L.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){t=new k.MathNode("mpadded",[_(e.body,t)]),e=e.dy.number+e.dy.unit;return t.setAttribute("voffset",e),t}}),b({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){e=e.parser;return{type:"internal",mode:e.mode}}}),b({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var e=e["parser"],n=n[0],i=D(t[0],"size"),t=D(t[1],"size");return{type:"rule",mode:e.mode,shift:n&&D(n,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var n=L.makeSpan(["mord","rule"],[],t),i=M(e.width,t),r=M(e.height,t),e=e.shift?M(e.shift,t):0;return n.style.borderRightWidth=T(i),n.style.borderTopWidth=T(r),n.style.bottom=T(e),n.width=i,n.height=r+e,n.depth=-e,n.maxFontSize=1.125*r*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=M(e.width,t),i=M(e.height,t),e=e.shift?M(e.shift,t):0,t=t.color&&t.getColor()||"black",r=new k.MathNode("mspace"),t=(r.setAttribute("mathbackground",t),r.setAttribute("width",T(n)),r.setAttribute("height",T(i)),new k.MathNode("mpadded",[r]));return 0<=e?t.setAttribute("height",T(e)):(t.setAttribute("height",T(e)),t.setAttribute("depth",T(-e))),t.setAttribute("voffset",T(e)),t}});const Kn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Yn=(b({type:"sizing",names:Kn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:n,parser:i}=e,e=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Kn.indexOf(n)+1,body:e}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return jn(e.body,n,t)},mathmlBuilder:(e,t)=>{t=t.havingSize(e.size),e=S(e.body,t),e=new k.MathNode("mstyle",e);return e.setAttribute("mathsize",T(t.sizeMultiplier)),e}}),b({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{let i=e["parser"],r=!1,s=!1;var o=n[0]&&D(n[0],"ordgroup");if(o){var a;for(let e=0;e<o.body.length;++e)if("t"===(a=o.body[e].text))r=!0;else{if("b"!==a){r=!1,s=!1;break}s=!0}}else r=!0,s=!0;e=t[0];return{type:"smash",mode:i.mode,body:e,smashHeight:r,smashDepth:s}},htmlBuilder:(e,t)=>{var n=L.makeSpan([],[I(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(let e=0;e<n.children.length;e++)n.children[e].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(let e=0;e<n.children.length;e++)n.children[e].depth=0;e=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return L.makeSpan(["mord"],[e],t)},mathmlBuilder:(e,t)=>{t=new k.MathNode("mpadded",[_(e.body,t)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}}),b({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){e=e.parser,n=n[0],t=t[0];return{type:"sqrt",mode:e.mode,body:t,index:n}},htmlBuilder(e,t){let n=I(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=L.wrapFragment(n,t);const i=t.fontMetrics().defaultRuleThickness;let r=i,s=(t.style.id<R.TEXT.id&&(r=t.fontMetrics().xHeight),i+r/4);const o=n.height+n.depth+s+i,{span:a,ruleWidth:l,advanceWidth:c}=cn.sqrtImage(o,t),h=a.height-l;h>n.height+n.depth+s&&(s=(s+h-n.height-n.depth)/2);var u=a.height-n.height-s-l,u=(n.style.paddingLeft=T(c),L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:a},{type:"kern",size:l}]},t));if(e.index){const n=t.havingStyle(R.SCRIPTSCRIPT),i=I(e.index,n,t),r=.6*(u.height-u.depth),s=L.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:i}]},t),o=L.makeSpan(["root"],[s]);return L.makeSpan(["mord","sqrt"],[o,u],t)}return L.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:e,index:n}=e;return n?new k.MathNode("mroot",[_(e,t),_(n,t)]):new k.MathNode("msqrt",[_(e,t)])}}),{display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT}),Xn=(b({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:n,parser:i}=e,e=i.parseExpression(!0,e),n=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:n,body:e}},htmlBuilder(e,t){var n=Yn[e.style],n=t.havingStyle(n).withFont("");return jn(e.body,n,t)},mathmlBuilder(e,t){var n=Yn[e.style],t=t.havingStyle(n),n=S(e.body,t),t=new k.MathNode("mstyle",n),n={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",n[0]),t.setAttribute("displaystyle",n[1]),t}}),et({type:"supsub",htmlBuilder(e,t){i=t;const n=(s=(r=e).base)?"op"===s.type?s.limits&&(i.style.size===R.DISPLAY.size||s.alwaysHandleSupSub)?Wn:null:"operatorname"===s.type?s.alwaysHandleSupSub&&(i.style.size===R.DISPLAY.size||s.limits)?Gn:null:"accent"===s.type?$.isCharacterBox(s.base)?Tt:null:"horizBrace"===s.type&&!r.sub===s.isOver?zn:null:null;if(n)return n(e,t);var{base:i,sup:r,sub:s}=e,o=I(i,t);let a,l;var c=t.fontMetrics();let h=0,u=0;i=i&&$.isCharacterBox(i);if(r){const e=t.havingStyle(t.style.sup());a=I(r,e,t),i||(h=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());l=I(s,e,t),i||(u=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}r=t.style===R.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,s=t.sizeMultiplier,i=T(.5/c.ptPerEm/s);let d,p=null;if(l){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(o instanceof m||t)&&(p=T(-o.italic))}if(a&&l){h=Math.max(h,r,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);const e=4*c.defaultRuleThickness;if(h-a.depth-(l.height-u)<e){u=e-(h-a.depth)+l.height;const t=.8*c.xHeight-(h-a.depth);0<t&&(h+=t,u-=t)}const n=[{type:"elem",elem:l,shift:u,marginRight:i,marginLeft:p},{type:"elem",elem:a,shift:-h,marginRight:i}];d=L.makeVList({positionType:"individualShift",children:n},t)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);const e=[{type:"elem",elem:l,marginLeft:p,marginRight:i}];d=L.makeVList({positionType:"shift",positionData:u,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");h=Math.max(h,r,a.depth+.25*c.xHeight),d=L.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:a,marginRight:i}]},t)}s=ut(o,"right")||"mord";return L.makeSpan([s],[o,L.makeSpan(["msupsub"],[d])],t)},mathmlBuilder(e,t){let n,i=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(i=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var r=[_(e.base,t)];let s;if(e.sub&&r.push(_(e.sub,t)),e.sup&&r.push(_(e.sup,t)),i)s=n?"mover":"munder";else if(e.sub)if(e.sup){const n=e.base;s=n&&"op"===n.type&&n.limits&&t.style===R.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(t.style===R.DISPLAY||n.limits)?"munderover":"msubsup"}else{const n=e.base;s=n&&"op"===n.type&&n.limits&&(t.style===R.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===R.DISPLAY)?"munder":"msub"}else{const n=e.base;s=n&&"op"===n.type&&n.limits&&(t.style===R.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===R.DISPLAY)?"mover":"msup"}return new k.MathNode(s,r)}}),et({type:"atom",htmlBuilder(e,t){return L.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new k.MathNode("mo",[ft(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=vt(e,t))&&n.setAttribute("mathvariant",t):"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false"),n}}),{mi:"italic",mn:"normal",mtext:"normal"}),Jn=(et({type:"mathord",htmlBuilder(e,t){return L.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new k.MathNode("mi",[ft(e.text,e.mode,t)]),e=vt(e,t)||"italic";return e!==Xn[n.type]&&n.setAttribute("mathvariant",e),n}}),et({type:"textord",htmlBuilder(e,t){return L.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=ft(e.text,e.mode,t),t=vt(e,t)||"normal",e="text"===e.mode?new k.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new k.MathNode("mn",[n]):"\\prime"===e.text?new k.MathNode("mo",[n]):new k.MathNode("mi",[n]);return t!==Xn[e.type]&&e.setAttribute("mathvariant",t),e}}),{"\\nobreak":"nobreak","\\allowbreak":"allowbreak"}),Qn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Zn=(et({type:"spacing",htmlBuilder(e,t){if(Qn.hasOwnProperty(e.text)){var n=Qn[e.text].className||"";if("text"!==e.mode)return L.makeSpan(["mspace",n],[L.mathsym(e.text,e.mode,t)],t);{const C=L.makeOrd(e,t,"textord");return C.classes.push(n),C}}if(Jn.hasOwnProperty(e.text))return L.makeSpan(["mspace",Jn[e.text]],[],t);throw new C('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Qn.hasOwnProperty(e.text))return new k.MathNode("mtext",[new k.TextNode(" ")]);if(Jn.hasOwnProperty(e.text))return new k.MathNode("mspace");throw new C('Unknown type of space "'+e.text+'"')}}),()=>{var e=new k.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),ei=(et({type:"tag",mathmlBuilder(e,t){e=new k.MathNode("mtable",[new k.MathNode("mtr",[Zn(),new k.MathNode("mtd",[yt(e.body,t)]),Zn(),new k.MathNode("mtd",[yt(e.tag,t)])])]);return e.setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),ti={"\\textbf":"textbf","\\textmd":"textmd"},ni={"\\textit":"textit","\\textup":"textup"},ii=(e,t)=>{e=e.font;return e?ei[e]?t.withTextFontFamily(ei[e]):ti[e]?t.withTextFontWeight(ti[e]):t.withTextFontShape(ni[e]):t},ri=(b({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:n}=e,t=t[0];return{type:"text",mode:e.mode,body:x(t),font:n}},htmlBuilder(e,t){t=ii(e,t),e=E(e.body,t,!0);return L.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){t=ii(e,t);return yt(e.body,t)}}),b({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"underline",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),n=L.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,n=L.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:e}]},t);return L.makeSpan(["mord","underline"],[n],t)},mathmlBuilder(e,t){var n=new k.MathNode("mo",[new k.TextNode("‾")]),e=(n.setAttribute("stretchy","true"),new k.MathNode("munder",[_(e.body,t),n]));return e.setAttribute("accentunder","true"),e}}),b({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"vcenter",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),n=t.fontMetrics().axisHeight,n=.5*(e.height-n-(e.depth+n));return L.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new k.MathNode("mpadded",[_(e.body,t)],["vcenter"])}}),b({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new C("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(n,e){var i=ri(n),r=[],s=e.havingStyle(e.style.text());for(let t=0;t<i.length;t++){let e=i[t];"~"===e&&(e="\\textasciitilde"),r.push(L.makeSymbol(e,"Typewriter-Regular",n.mode,s,["mord","texttt"]))}return L.makeSpan(["mord","text"].concat(s.sizingClasses(e)),L.tryCombineChars(r),s)},mathmlBuilder(e,t){e=new k.TextNode(ri(e)),e=new k.MathNode("mtext",[e]);return e.setAttribute("mathvariant","monospace"),e}}),e=>e.body.replace(/ /g,e.star?"␣":" "));var si=Je;const oi="[̀-ͯ]",ai=new RegExp(oi+"+$");class li{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new vn("EOF",new wn(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new C("Unexpected character: '"+e[t]+"'",new vn(e[t],new wn(this,t,t+1)));n=n[6]||n[3]||(n[2]?"\\ ":" ");if(14!==this.catcodes[n])return new vn(n,new wn(this,t,this.tokenRegex.lastIndex));{const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}}}class ci{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new C("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(t,e,n){if(n=void 0===n?!1:n){for(let e=0;e<this.undefStack.length;e++)delete this.undefStack[e][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else{const e=this.undefStack[this.undefStack.length-1];e&&!e.hasOwnProperty(t)&&(e[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var hi=fn;O("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),O("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),O("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),O("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),O("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),O("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),O("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});const ui={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},di=(O("\\char",function(e){let t,n=e.popToken(),i="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new C("\\char` missing argument");i=n.text.charCodeAt(0)}else t=10;if(t){if(null==(i=ui[n.text])||i>=t)throw new C("Invalid base-"+t+" digit "+n.text);for(var r;null!=(r=ui[e.future().text])&&r<t;)i=i*t+r,e.popToken()}return"\\@char{"+i+"}"}),(n,e,t)=>{let i=n.consumeArg().tokens;if(1!==i.length)throw new C("\\newcommand's first argument must be a macro name");var r=i[0].text,s=n.isDefined(r);if(s&&!e)throw new C("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!t)throw new C("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");let o=0;if(1===(i=n.consumeArg().tokens).length&&"["===i[0].text){let e="",t=n.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=n.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new C("Invalid number of arguments: "+e);o=parseInt(e),i=n.consumeArg().tokens}return n.macros.set(r,{tokens:i,numArgs:o}),""}),pi=(O("\\newcommand",e=>di(e,!1,!0)),O("\\renewcommand",e=>di(e,!0,!1)),O("\\providecommand",e=>di(e,!0,!0)),O("\\message",e=>{e=e.consumeArgs(1)[0];return console.log(e.reverse().map(e=>e.text).join("")),""}),O("\\errmessage",e=>{e=e.consumeArgs(1)[0];return console.error(e.reverse().map(e=>e.text).join("")),""}),O("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),si[n],u.math[n],u.text[n]),""}),O("\\bgroup","{"),O("\\egroup","}"),O("~","\\nobreakspace"),O("\\lq","`"),O("\\rq","'"),O("\\aa","\\r a"),O("\\AA","\\r A"),O("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),O("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),O("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),O("","\\mathscr{B}"),O("","\\mathscr{E}"),O("","\\mathscr{F}"),O("","\\mathscr{H}"),O("","\\mathscr{I}"),O("","\\mathscr{L}"),O("","\\mathscr{M}"),O("","\\mathscr{R}"),O("","\\mathfrak{C}"),O("","\\mathfrak{H}"),O("","\\mathfrak{Z}"),O("\\Bbbk","\\Bbb{k}"),O("·","\\cdotp"),O("\\llap","\\mathllap{\\textrm{#1}}"),O("\\rlap","\\mathrlap{\\textrm{#1}}"),O("\\clap","\\mathclap{\\textrm{#1}}"),O("\\mathstrut","\\vphantom{(}"),O("\\underbar","\\underline{\\text{#1}}"),O("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),O("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),O("\\ne","\\neq"),O("≠","\\neq"),O("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),O("∉","\\notin"),O("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),O("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),O("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),O("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),O("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),O("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),O("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),O("⟂","\\perp"),O("‼","\\mathclose{!\\mkern-0.8mu!}"),O("∌","\\notni"),O("⌜","\\ulcorner"),O("⌝","\\urcorner"),O("⌞","\\llcorner"),O("⌟","\\lrcorner"),O("©","\\copyright"),O("®","\\textregistered"),O("","\\textregistered"),O("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),O("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),O("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),O("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),O("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),O("⋮","\\vdots"),O("\\varGamma","\\mathit{\\Gamma}"),O("\\varDelta","\\mathit{\\Delta}"),O("\\varTheta","\\mathit{\\Theta}"),O("\\varLambda","\\mathit{\\Lambda}"),O("\\varXi","\\mathit{\\Xi}"),O("\\varPi","\\mathit{\\Pi}"),O("\\varSigma","\\mathit{\\Sigma}"),O("\\varUpsilon","\\mathit{\\Upsilon}"),O("\\varPhi","\\mathit{\\Phi}"),O("\\varPsi","\\mathit{\\Psi}"),O("\\varOmega","\\mathit{\\Omega}"),O("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),O("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),O("\\boxed","\\fbox{$\\displaystyle{#1}$}"),O("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),O("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),O("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),{",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"}),mi=(O("\\dots",function(e){let t="\\dotso";e=e.expandAfterFuture().text;return e in pi?t=pi[e]:("\\not"===e.slice(0,4)||e in u.math&&$.contains(["bin","rel"],u.math[e].group))&&(t="\\dotsb"),t}),{")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0});O("\\dotso",function(e){return e.future().text in mi?"\\ldots\\,":"\\ldots"}),O("\\dotsc",function(e){e=e.future().text;return e in mi&&","!==e?"\\ldots\\,":"\\ldots"}),O("\\cdots",function(e){return e.future().text in mi?"\\@cdots\\,":"\\@cdots"}),O("\\dotsb","\\cdots"),O("\\dotsm","\\cdots"),O("\\dotsi","\\!\\cdots"),O("\\dotsx","\\ldots\\,"),O("\\DOTSI","\\relax"),O("\\DOTSB","\\relax"),O("\\DOTSX","\\relax"),O("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),O("\\,","\\tmspace+{3mu}{.1667em}"),O("\\thinspace","\\,"),O("\\>","\\mskip{4mu}"),O("\\:","\\tmspace+{4mu}{.2222em}"),O("\\medspace","\\:"),O("\\;","\\tmspace+{5mu}{.2777em}"),O("\\thickspace","\\;"),O("\\!","\\tmspace-{3mu}{.1667em}"),O("\\negthinspace","\\!"),O("\\negmedspace","\\tmspace-{4mu}{.2222em}"),O("\\negthickspace","\\tmspace-{5mu}{.277em}"),O("\\enspace","\\kern.5em "),O("\\enskip","\\hskip.5em\\relax"),O("\\quad","\\hskip1em\\relax"),O("\\qquad","\\hskip2em\\relax"),O("\\tag","\\@ifstar\\tag@literal\\tag@paren"),O("\\tag@paren","\\tag@literal{({#1})}"),O("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new C("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),O("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),O("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),O("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),O("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),O("\\newline","\\\\\\relax"),O("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");l=T(ie["Main-Regular"]["T".charCodeAt(0)][1]-.7*ie["Main-Regular"]["A".charCodeAt(0)][1]),O("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),O("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),O("\\hspace","\\@ifstar\\@hspacer\\@hspace"),O("\\@hspace","\\hskip #1\\relax"),O("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),O("\\ordinarycolon",":"),O("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),O("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),O("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),O("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),O("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),O("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),O("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),O("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),O("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),O("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),O("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),O("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),O("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),O("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),O("∷","\\dblcolon"),O("∹","\\eqcolon"),O("≔","\\coloneqq"),O("≕","\\eqqcolon"),O("⩴","\\Coloneqq"),O("\\ratio","\\vcentcolon"),O("\\coloncolon","\\dblcolon"),O("\\colonequals","\\coloneqq"),O("\\coloncolonequals","\\Coloneqq"),O("\\equalscolon","\\eqqcolon"),O("\\equalscoloncolon","\\Eqqcolon"),O("\\colonminus","\\coloneq"),O("\\coloncolonminus","\\Coloneq"),O("\\minuscolon","\\eqcolon"),O("\\minuscoloncolon","\\Eqcolon"),O("\\coloncolonapprox","\\Colonapprox"),O("\\coloncolonsim","\\Colonsim"),O("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),O("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),O("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),O("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),O("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),O("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),O("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),O("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),O("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),O("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),O("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),O("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),O("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),O("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),O("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),O("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),O("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),O("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),O("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),O("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),O("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),O("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),O("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),O("\\imath","\\html@mathml{\\@imath}{ı}"),O("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),O("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),O("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),O("⟦","\\llbracket"),O("⟧","\\rrbracket"),O("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),O("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),O("⦃","\\lBrace"),O("⦄","\\rBrace"),O("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),O("⦵","\\minuso"),O("\\darr","\\downarrow"),O("\\dArr","\\Downarrow"),O("\\Darr","\\Downarrow"),O("\\lang","\\langle"),O("\\rang","\\rangle"),O("\\uarr","\\uparrow"),O("\\uArr","\\Uparrow"),O("\\Uarr","\\Uparrow"),O("\\N","\\mathbb{N}"),O("\\R","\\mathbb{R}"),O("\\Z","\\mathbb{Z}"),O("\\alef","\\aleph"),O("\\alefsym","\\aleph"),O("\\Alpha","\\mathrm{A}"),O("\\Beta","\\mathrm{B}"),O("\\bull","\\bullet"),O("\\Chi","\\mathrm{X}"),O("\\clubs","\\clubsuit"),O("\\cnums","\\mathbb{C}"),O("\\Complex","\\mathbb{C}"),O("\\Dagger","\\ddagger"),O("\\diamonds","\\diamondsuit"),O("\\empty","\\emptyset"),O("\\Epsilon","\\mathrm{E}"),O("\\Eta","\\mathrm{H}"),O("\\exist","\\exists"),O("\\harr","\\leftrightarrow"),O("\\hArr","\\Leftrightarrow"),O("\\Harr","\\Leftrightarrow"),O("\\hearts","\\heartsuit"),O("\\image","\\Im"),O("\\infin","\\infty"),O("\\Iota","\\mathrm{I}"),O("\\isin","\\in"),O("\\Kappa","\\mathrm{K}"),O("\\larr","\\leftarrow"),O("\\lArr","\\Leftarrow"),O("\\Larr","\\Leftarrow"),O("\\lrarr","\\leftrightarrow"),O("\\lrArr","\\Leftrightarrow"),O("\\Lrarr","\\Leftrightarrow"),O("\\Mu","\\mathrm{M}"),O("\\natnums","\\mathbb{N}"),O("\\Nu","\\mathrm{N}"),O("\\Omicron","\\mathrm{O}"),O("\\plusmn","\\pm"),O("\\rarr","\\rightarrow"),O("\\rArr","\\Rightarrow"),O("\\Rarr","\\Rightarrow"),O("\\real","\\Re"),O("\\reals","\\mathbb{R}"),O("\\Reals","\\mathbb{R}"),O("\\Rho","\\mathrm{P}"),O("\\sdot","\\cdot"),O("\\sect","\\S"),O("\\spades","\\spadesuit"),O("\\sub","\\subset"),O("\\sube","\\subseteq"),O("\\supe","\\supseteq"),O("\\Tau","\\mathrm{T}"),O("\\thetasym","\\vartheta"),O("\\weierp","\\wp"),O("\\Zeta","\\mathrm{Z}"),O("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),O("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),O("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),O("\\bra","\\mathinner{\\langle{#1}|}"),O("\\ket","\\mathinner{|{#1}\\rangle}"),O("\\braket","\\mathinner{\\langle{#1}\\rangle}"),O("\\Bra","\\left\\langle#1\\right|"),O("\\Ket","\\left|#1\\right\\rangle"),p=l=>e=>{const t=e.consumeArg().tokens,i=e.consumeArg().tokens,r=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var a=n=>e=>{l&&(e.macros.set("|",s),r.length)&&e.macros.set("\\|",o);let t=n;return!n&&r.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?r:i,numArgs:0}},a=(e.macros.set("|",a(!1)),r.length&&e.macros.set("\\|",a(!0)),e.consumeArg().tokens),a=e.expandTokens([...n,...a,...t]);return e.macros.endGroup(),{tokens:a.reverse(),numArgs:0}};O("\\bra@ket",p(!1)),O("\\bra@set",p(!0)),O("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),O("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),O("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),O("\\angln","{\\angl n}"),O("\\blue","\\textcolor{##6495ed}{#1}"),O("\\orange","\\textcolor{##ffa500}{#1}"),O("\\pink","\\textcolor{##ff00af}{#1}"),O("\\red","\\textcolor{##df0030}{#1}"),O("\\green","\\textcolor{##28ae7b}{#1}"),O("\\gray","\\textcolor{gray}{#1}"),O("\\purple","\\textcolor{##9d38bd}{#1}"),O("\\blueA","\\textcolor{##ccfaff}{#1}"),O("\\blueB","\\textcolor{##80f6ff}{#1}"),O("\\blueC","\\textcolor{##63d9ea}{#1}"),O("\\blueD","\\textcolor{##11accd}{#1}"),O("\\blueE","\\textcolor{##0c7f99}{#1}"),O("\\tealA","\\textcolor{##94fff5}{#1}"),O("\\tealB","\\textcolor{##26edd5}{#1}"),O("\\tealC","\\textcolor{##01d1c1}{#1}"),O("\\tealD","\\textcolor{##01a995}{#1}"),O("\\tealE","\\textcolor{##208170}{#1}"),O("\\greenA","\\textcolor{##b6ffb0}{#1}"),O("\\greenB","\\textcolor{##8af281}{#1}"),O("\\greenC","\\textcolor{##74cf70}{#1}"),O("\\greenD","\\textcolor{##1fab54}{#1}"),O("\\greenE","\\textcolor{##0d923f}{#1}"),O("\\goldA","\\textcolor{##ffd0a9}{#1}"),O("\\goldB","\\textcolor{##ffbb71}{#1}"),O("\\goldC","\\textcolor{##ff9c39}{#1}"),O("\\goldD","\\textcolor{##e07d10}{#1}"),O("\\goldE","\\textcolor{##a75a05}{#1}"),O("\\redA","\\textcolor{##fca9a9}{#1}"),O("\\redB","\\textcolor{##ff8482}{#1}"),O("\\redC","\\textcolor{##f9685d}{#1}"),O("\\redD","\\textcolor{##e84d39}{#1}"),O("\\redE","\\textcolor{##bc2612}{#1}"),O("\\maroonA","\\textcolor{##ffbde0}{#1}"),O("\\maroonB","\\textcolor{##ff92c6}{#1}"),O("\\maroonC","\\textcolor{##ed5fa6}{#1}"),O("\\maroonD","\\textcolor{##ca337c}{#1}"),O("\\maroonE","\\textcolor{##9e034e}{#1}"),O("\\purpleA","\\textcolor{##ddd7ff}{#1}"),O("\\purpleB","\\textcolor{##c6b9fc}{#1}"),O("\\purpleC","\\textcolor{##aa87ff}{#1}"),O("\\purpleD","\\textcolor{##7854ab}{#1}"),O("\\purpleE","\\textcolor{##543b78}{#1}"),O("\\mintA","\\textcolor{##f5f9e8}{#1}"),O("\\mintB","\\textcolor{##edf2df}{#1}"),O("\\mintC","\\textcolor{##e0e5cc}{#1}"),O("\\grayA","\\textcolor{##f6f7f7}{#1}"),O("\\grayB","\\textcolor{##f0f1f2}{#1}"),O("\\grayC","\\textcolor{##e3e5e6}{#1}"),O("\\grayD","\\textcolor{##d6d8da}{#1}"),O("\\grayE","\\textcolor{##babec2}{#1}"),O("\\grayF","\\textcolor{##888d93}{#1}"),O("\\grayG","\\textcolor{##626569}{#1}"),O("\\grayH","\\textcolor{##3b3e40}{#1}"),O("\\grayI","\\textcolor{##21242c}{#1}"),O("\\kaBlue","\\textcolor{##314453}{#1}"),O("\\kaGreen","\\textcolor{##71B307}{#1}");const gi={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class fi{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ci(hi,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new li(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,n,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:t,end:n}=this.consumeArg());return this.pushToken(new vn("EOF",n.loc)),this.pushTokens(i),t.range(n,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],n=e&&0<e.length,i=(n||this.consumeSpaces(),this.future());let r,s=0,o=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++s;else if("}"===r.text){if(-1===--s)throw new C("Extra }",r)}else if("EOF"===r.text)throw new C("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",r);if(e&&n)if((0===s||1===s&&"{"===e[o])&&r.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==s||n);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:r}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new C("The length of delimiters doesn't match the number of args!");const i=n[0];for(let e=0;e<i.length;e++){const n=this.popToken();if(i[e]!==n.text)throw new C("Use of the macro doesn't match its definition",n)}}const i=[];for(let e=0;e<t;e++)i.push(this.consumeArg(n&&n[e+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new C("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new C("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);let r=i.tokens;var s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(let e=(r=r.slice()).length-1;0<=e;--e){var o=r[e];if("#"===o.text){if(0===e)throw new C("Incomplete placeholder at end of macro body",o);if("#"===(o=r[--e]).text)r.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new C("Not a valid argument number",o);r.splice(e,2,...s[+o.text-1])}}}return this.pushTokens(r),r.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new vn(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){e=this.expandMacro(e);return e&&e.map(e=>e.text).join("")}_getExpansion(n){const i=this.macros.get(n);if(null==i)return i;if(1===n.length){const i=this.lexer.catcodes[n];if(null!=i&&13!==i)return}n="function"==typeof i?i(this):i;if("string"!=typeof n)return n;{let e=0;if(-1!==n.indexOf("#")){const i=n.replace(/##/g,"");for(;-1!==i.indexOf("#"+(e+1));)++e}const i=new li(n,this.settings),r=[];let t=i.lex();for(;"EOF"!==t.text;)r.push(t),t=i.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||si.hasOwnProperty(e)||u.math.hasOwnProperty(e)||u.text.hasOwnProperty(e)||gi.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:si.hasOwnProperty(e)&&!si[e].primitive}}const wi=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,vi=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),yi={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},bi={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class xi{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new fi(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new C("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new vn("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==xi.endOfExpression.indexOf(i.text))break;if(t&&i.text===t)break;if(e&&si[i.text]&&si[i.text].infix)break;i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){let n,i=-1;for(let e=0;e<t.length;e++)if("infix"===t[e].type){if(-1!==i)throw new C("only one infix operator per group",t[e].token);i=e,n=t[e].replaceWith}var e,r;return-1!==i&&n?(e=t.slice(0,i),r=t.slice(i+1),e=1===e.length&&"ordgroup"===e[0].type?e[0]:{type:"ordgroup",mode:this.mode,body:e},r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},["\\\\abovefrac"===n?this.callFunction(n,[e,t[i],r],[]):this.callFunction(n,[e,r],[])]):t}handleSupSubscript(e){var t=this.fetch(),n=t.text,e=(this.consume(),this.consumeSpaces(),this.parseGroup(e));if(e)return e;throw new C("Expected group after '"+n+"'",t)}formatUnsupportedCmd(t){var n=[];for(let e=0;e<t.length;e++)n.push({type:"textord",mode:"text",text:t[e]});var e={type:"text",mode:this.mode,body:n};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[e]}}parseAtom(e){const t=this.parseGroup("atom",e);if("text"===this.mode)return t;let n,i;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const n="\\limits"===e.text;t.limits=n,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new C("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(n)throw new C("Double superscript",e);n=this.handleSupSubscript("superscript")}else if("_"===e.text){if(i)throw new C("Double subscript",e);i=this.handleSupSubscript("subscript")}else if("'"===e.text){if(n)throw new C("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},i=[t];for(this.consume();"'"===this.fetch().text;)i.push(t),this.consume();"^"===this.fetch().text&&i.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:i}}else{if(!vi[e.text])break;{const t=wi.test(e.text),C=[];for(C.push(new vn(vi[e.text])),this.consume();;){const e=this.fetch().text;if(!vi[e])break;if(wi.test(e)!==t)break;C.unshift(new vn(vi[e])),this.consume()}var r=this.subparse(C);t?i={type:"ordgroup",mode:"math",body:r}:n={type:"ordgroup",mode:"math",body:r}}}}return n||i?{type:"supsub",mode:this.mode,base:t,sup:n,sub:i}:t}parseFunction(e,t){var n=this.fetch(),i=n.text,r=si[i];if(!r)return null;if(this.consume(),t&&"atom"!==t&&!r.allowedInArgument)throw new C("Got function '"+i+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!r.allowedInText)throw new C("Can't use function '"+i+"' in text mode",n);if("math"===this.mode&&!1===r.allowedInMath)throw new C("Can't use function '"+i+"' in math mode",n);var{args:t,optArgs:r}=this.parseArguments(i,r);return this.callFunction(i,t,r,n,e)}callFunction(e,t,n,i,r){var s=si[e];if(s&&s.handler)return s.handler({funcName:e,parser:this,token:i,breakOnTokenText:r},t,n);throw new C("No function handler for "+e)}parseArguments(n,i){var e=i.numArgs+i.numOptionalArgs;if(0===e)return{args:[],optArgs:[]};var r=[],s=[];for(let t=0;t<e;t++){let e=i.argTypes&&i.argTypes[t];var o=t<i.numOptionalArgs,a=((i.primitive&&null==e||"sqrt"===i.type&&1===t&&null==s[0])&&(e="primitive"),this.parseGroupOfType("argument to '"+n+"'",e,o));if(o)s.push(a);else{if(null==a)throw new C("Null argument, please report this as a bug");r.push(a)}}return{args:r,optArgs:s}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{const e=this.parseArgumentGroup(n,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",n);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(n)throw new C("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new C("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new C("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){t=this.gullet.scanArgument(t);if(null==t)return null;let n,i="";for(;"EOF"!==(n=this.fetch()).text;)i+=n.text,this.consume();return this.consume(),t.text=i,t}parseRegexGroup(e,t){var n=this.fetch();let i,r=n,s="";for(;"EOF"!==(i=this.fetch()).text&&e.test(s+i.text);)r=i,s+=r.text,this.consume();if(""===s)throw new C("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){e=this.parseStringGroup("color",e);if(null==e)return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!t)throw new C("Invalid color: '"+e.text+"'",e);let n=t[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){let t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!e)throw new C("Invalid size: '"+t.text+"'",t);e={number:+(e[1]+e[2]),unit:e[3]};if(pe(e))return{type:"size",mode:this.mode,value:e,isBlank:n};throw new C("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var e=this.parseStringGroup("url",e);return this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var n,i,e=this.gullet.scanArgument(e);return null==e?null:(n=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),i=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:i},t&&this.switchMode(n),e)}parseGroup(e,t){var n=this.fetch(),i=n.text;let r;if("{"===i||"\\begingroup"===i){this.consume();const e="{"===i?"}":"\\endgroup",t=(this.gullet.beginGroup(),this.parseExpression(!1,e)),C=this.fetch();this.expect(e),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:wn.range(n,C),body:t,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!gi.hasOwnProperty(i)){if(this.settings.throwOnError)throw new C("Undefined control sequence: "+i,n);r=this.formatUnsupportedCmd(i),this.consume()}return r}formLigatures(t){let n=t.length-1;for(let e=0;e<n;++e){var i=t[e],r=i.text;"-"===r&&"-"===t[e+1].text&&(e+1<n&&"-"===t[e+2].text?(t.splice(e,3,{type:"textord",mode:"text",loc:wn.range(i,t[e+2]),text:"---"}),n-=2):(t.splice(e,2,{type:"textord",mode:"text",loc:wn.range(i,t[e+1]),text:"--"}),--n)),"'"!==r&&"`"!==r||t[e+1].text!==r||(t.splice(e,2,{type:"textord",mode:"text",loc:wn.range(i,t[e+1]),text:r+r}),--n)}}parseSymbol(){const t=this.fetch();let n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();let e=n.slice(5);const i="*"===e.charAt(0);if((e=i?e.slice(1):e).length<2||e.charAt(0)!==e.slice(-1))throw new C("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:e=e.slice(1,-1),star:i}}bi.hasOwnProperty(n[0])&&!u[this.mode][n[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=bi[n[0]]+n.slice(1));const i=ai.exec(n);let r;if(i&&("i"===(n=n.substring(0,i.index))?n="ı":"j"===n&&(n="ȷ")),u[this.mode][n]){this.settings.strict&&"math"===this.mode&&0<="ÐÞþ".indexOf(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);const i=u[this.mode][n].group,C=wn.range(t);let e;if(Me.hasOwnProperty(i)){const t=i;e={type:"atom",mode:this.mode,family:t,loc:C,text:n}}else e={type:i,mode:this.mode,loc:C,text:n};r=e}else{if(!(128<=n.charCodeAt(0)))return null;this.settings.strict&&(ee(n.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'" ('+n.charCodeAt(0)+")",t)),r={type:"textord",mode:"text",loc:wn.range(t),text:n}}if(this.consume(),i)for(let e=0;e<i[0].length;e++){var s=i[0][e];if(!yi[s])throw new C("Unknown accent ' "+s+"'",t);var o=yi[s][this.mode]||yi[s].text;if(!o)throw new C("Accent "+s+" unsupported in "+this.mode+" mode",t);r={type:"accent",mode:this.mode,loc:wn.range(t),label:o,isStretchy:!1,isShifty:!0,base:r}}return r}}xi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];function Ai(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new xi(e,t)).gullet.macros.current["\\df@tag"];let n=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new C("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:e.subparse([new vn("\\df@tag")])}]}return n}let ki=function(e,t,n){t.textContent="";e=Ci(e,n).toNode();t.appendChild(e)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ki=function(){throw new C("KaTeX doesn't work in quirks mode.")});function Si(e,t,n){if(!n.throwOnError&&e instanceof C)return(t=L.makeSpan(["katex-error"],[new m(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+n.errorColor),t;throw e}function Ci(t,n){var i=new q(n);try{const n=Ai(t,i);{var r=n;var s=t;var o=i;var a=xt(o);let e;if("mathml"===o.output)return bt(r,s,a,o.displayMode,!0);if("html"===o.output){const s=pt(r,a);e=L.makeSpan(["katex"],[s])}else{s=bt(r,s,a,o.displayMode,!1),r=pt(r,a);e=L.makeSpan(["katex"],[s,r])}return At(e,o);return}}catch(n){return Si(n,t,i)}}var $i={version:"0.16.10",render:ki,renderToString:function(e,t){return Ci(e,t).toMarkup()},ParseError:C,SETTINGS_SCHEMA:W,__parse:function(e,t){t=new q(t);return Ai(e,t)},__renderToDomTree:Ci,__renderToHTMLTree:function(e,t){var n=new q(t);try{var i=Ai(e,n),r=n;return i=pt(i,xt(r)),i=L.makeSpan(["katex"],[i]),At(i,r)}catch(t){return Si(t,e,n)}},__setFontMetrics:function(e,t){ie[e]=t},__defineSymbol:n,__defineFunction:b,__defineMacro:O,__domTree:{Span:be,Anchor:xe,SymbolNode:m,SvgNode:Se,PathNode:Ce,LineNode:$e}};return t.default}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(h){return function(){"use strict";var n={771:function(e){e.exports=h}},i={};function r(e){var t=i[e];return void 0!==t||(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var e={};{r.d(e,{default:function(){return s}});var t=r(771),o=r.n(t);const a=/^\\begin{/,l=function(e,n){var i=function(t,e){var n;const i=[],r=new RegExp("("+e.map(e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;-1!==(n=t.search(r));){0<n&&(i.push({type:"text",data:t.slice(0,n)}),t=t.slice(n));const r=e.findIndex(e=>t.startsWith(e.left));if(-1===(n=function(e,t,n){let i=n,r=0;for(var s=e.length;i<t.length;){const n=t[i];if(r<=0&&t.slice(i,i+s)===e)return i;"\\"===n?i++:"{"===n?r++:"}"===n&&r--,i++}return-1}(e[r].right,t,e[r].left.length)))break;var s=t.slice(0,n+e[r].right.length),o=a.test(s)?s:t.slice(e[r].left.length,n);i.push({type:"math",data:o,rawData:s,display:e[r].display}),t=t.slice(n+e[r].right.length)}return""!==t&&i.push({type:"text",data:t}),i}(e,n.delimiters);if(1===i.length&&"text"===i[0].type)return null;var r=document.createDocumentFragment();for(let t=0;t<i.length;t++)if("text"===i[t].type)r.appendChild(document.createTextNode(i[t].data));else{var s=document.createElement("span");let e=i[t].data;n.displayMode=i[t].display;try{n.preProcess&&(e=n.preProcess(e)),o().render(e,s,n)}catch(e){if(!(e instanceof o().ParseError))throw e;n.errorCallback("KaTeX auto-render: Failed to parse `"+i[t].data+"` with ",e),r.appendChild(document.createTextNode(i[t].rawData));continue}r.appendChild(s)}return r},c=function(r,s){for(let i=0;i<r.childNodes.length;i++){var o=r.childNodes[i];if(3===o.nodeType){let e=o.textContent,t=o.nextSibling,n=0;for(;t&&t.nodeType===Node.TEXT_NODE;)e+=t.textContent,t=t.nextSibling,n++;const c=l(e,s);if(c){for(let e=0;e<n;e++)o.nextSibling.remove();i+=c.childNodes.length-1,r.replaceChild(c,o)}else i+=n}else if(1===o.nodeType){const r=" "+o.className+" ";-1===s.ignoredTags.indexOf(o.nodeName.toLowerCase())&&s.ignoredClasses.every(e=>-1===r.indexOf(" "+e+" "))&&c(o,s)}}};var s=function(e,t){if(!e)throw new Error("No element provided to render");var n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},c(e,n)}}return e.default}()}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).markedKatex=t(e.katex)}(this,function(i){"use strict";const r=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function t(t,n){return e=>i.renderToString(e.text,{...t,displayMode:e.displayMode})+(n?"\n":"")}return function(e={}){return{extensions:[{name:"inlineKatex",level:"inline",start(e){let t,n=e;for(;n;){if(-1===(t=n.indexOf("$")))return;if((0===t||" "===n.charAt(t-1))&&n.substring(t).match(r))return t;n=n.substring(t+1).replace(/^\$+/,"")}},tokenizer(e,t){e=e.match(r);if(e)return{type:"inlineKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!1)},{name:"blockKatex",level:"block",tokenizer(e,t){e=e.match(n);if(e)return{type:"blockKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!0)}]}}}),"undefined"!=typeof window&&(window.markedMermaid=markedMermaid),"undefined"!=typeof module&&module.exports&&(module.exports=markedMermaid),function(){function e(e){return e}function t(n){return function(e){var t=c("img",["image-output"]);return t.src="data:image/"+n+";base64,"+u(e).replace(/\n/g,""),t}}function n(){var t=this,e=d.display_priority.filter(function(e){return(t.raw.data||t.raw)[e]})[0];return e&&d.display[e]?d.display[e](t.raw[e]||t.raw.data[e]):c("div",["empty-output"])}function i(){var e=c("pre",["pyerr"]),t=this.raw.traceback.join("\n");return e.innerHTML=d.highlighter(d.ansi(h(t)),e),e}var r,s,o,a=this,l=void 0!==a.window,c=(s=(l?a:(r=new(require("jsdom").JSDOM)).window).document,function(e,t){e=s.createElement(e);return e.className=(t||[]).map(function(e){return d.prefix+e}).join(" "),e}),h=function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")},u=function(e){return e.join?e.map(u).join(""):e},d={prefix:"nb-",markdown:(o=a.marked||"function"==typeof require&&require("marked"))&&o.parse||e,ansi:(o=a.ansi_up||"function"==typeof require&&require("ansi_up"))&&o.ansi_to_html||e,sanitizer:(o=a.DOMPurify||"function"==typeof require&&require("dompurify"),(l?o&&o.sanitize:o(r.window).sanitize)||e),highlighter:e,VERSION:"0.7.0",Input:function(e,t){this.raw=e,this.cell=t}},p=(d.Input.prototype.render=function(){var e,t,n,i;return this.raw.length?(e=c("div",["input"]),"number"==typeof(i=this.cell).number&&e.setAttribute("data-prompt-number",this.cell.number),t=c("pre"),n=c("code"),i=i.worksheet.notebook.metadata,i=this.cell.raw.language||i.language||i.kernelspec&&i.kernelspec.language||i.language_info&&i.language_info.name,n.setAttribute("data-language",i),n.className="lang-"+i,n.innerHTML=d.highlighter(h(u(this.raw)),t,n,i),t.appendChild(n),e.appendChild(t),this.el=e):c("div")},d.display={},d.display.text=function(e){var t=c("pre",["text-output"]);return t.innerHTML=d.highlighter(d.ansi(u(e)),t),t},d.display["text/plain"]=d.display.text,d.display.html=function(e){var t=c("div",["html-output"]);return t.innerHTML=d.sanitizer(u(e)),t},d.display["text/html"]=d.display.html,d.display.marked=function(e){return d.display.html(d.markdown(u(e)))},d.display["text/markdown"]=d.display.marked,d.display.svg=function(e){var t=c("div",["svg-output"]);return t.innerHTML=u(e),t},d.display["text/svg+xml"]=d.display.svg,d.display["image/svg+xml"]=d.display.svg,d.display.latex=function(e){var t=c("div",["latex-output"]);return t.innerHTML=u(e),t},d.display["text/latex"]=d.display.latex,d.display.javascript=function(e){var t=c("script");return t.innerHTML=u(e),t},d.display["application/javascript"]=d.display.javascript,d.display.png=t("png"),d.display["image/png"]=d.display.png,d.display.jpeg=t("jpeg"),d.display["image/jpeg"]=d.display.jpeg,d.display_priority=["png","image/png","jpeg","image/jpeg","svg","image/svg+xml","text/svg+xml","html","text/html","text/markdown","latex","text/latex","javascript","application/javascript","text","text/plain"],d.Output=function(e,t){this.raw=e,this.cell=t,this.type=e.output_type},d.Output.prototype.renderers={display_data:n,execute_result:n,pyout:n,pyerr:i,error:i,stream:function(){var e=c("pre",[this.raw.stream||this.raw.name]),t=u(this.raw.text);return e.innerHTML=d.highlighter(d.ansi(h(t)),e),e}},d.Output.prototype.render=function(){var e=c("div",["output"]),t=("number"==typeof this.cell.number&&e.setAttribute("data-prompt-number",this.cell.number),this.renderers[this.type].call(this));return e.appendChild(t),this.el=e},d.coalesceStreams=function(e){var t,n;return e.length?(t=e[0],n=[t],e.slice(1).forEach(function(e){"stream"===e.raw.output_type&&"stream"===t.raw.output_type&&e.raw.stream===t.raw.stream&&e.raw.name===t.raw.name?t.raw.text=t.raw.text.concat(e.raw.text):(n.push(e),t=e)}),n):e},[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!(d.Cell=function(e,t){var n=this;n.raw=e,n.worksheet=t,n.type=e.cell_type,"code"===n.type&&(n.number=-1<e.prompt_number?e.prompt_number:e.execution_count,t=e.input||[e.source],n.input=new d.Input(t,n),e=(n.raw.outputs||[]).map(function(e){return new d.Output(e,n)}),n.outputs=d.coalesceStreams(e))})},{left:"$",right:"$",display:!1}]);d.Cell.prototype.renderers={markdown:function(){var e=c("div",["cell","markdown-cell"]),t=u(this.raw.source);return null!=a.renderMathInElement?(e.innerHTML=d.sanitizer(t),a.renderMathInElement(e,{delimiters:p}),e.innerHTML=d.sanitizer(d.markdown(e.innerHTML.replace(/&gt;/g,">")))):e.innerHTML=d.sanitizer(d.markdown(t)),e},heading:function(){var e=c("h"+this.raw.level,["cell","heading-cell"]);return e.innerHTML=d.sanitizer(u(this.raw.source)),e},raw:function(){var e=c("div",["cell","raw-cell"]);return e.innerHTML=h(u(this.raw.source)),e},code:function(){var t=c("div",["cell","code-cell"]);t.appendChild(this.input.render()),this.outputs.forEach(function(e){t.appendChild(e.render())});return t}},d.Cell.prototype.render=function(){var e=this.renderers[this.type].call(this);return this.el=e},d.Worksheet=function(e,t){var n=this;this.raw=e,this.notebook=t,this.cells=e.cells.map(function(e){return new d.Cell(e,n)}),this.render=function(){var t=c("div",["worksheet"]);return n.cells.forEach(function(e){t.appendChild(e.render())}),this.el=t}},d.Notebook=function(e,t){var n=this,t=(this.raw=e,this.config=t,this.metadata=e.metadata||{}),t=(this.title=t.title||t.name,e.worksheets||[{cells:e.cells}]);this.worksheets=t.map(function(e){return new d.Worksheet(e,n)}),this.sheet=this.worksheets[0]},d.Notebook.prototype.render=function(){var t=c("div",["notebook"]);return this.worksheets.forEach(function(e){t.appendChild(e.render())}),this.el=t},d.parse=function(e,t){return new d.Notebook(e,t)},"function"==typeof define&&define.amd&&define(function(){return d}),"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=d:exports).nb=d:a.nb=d}.call(this);var Org=function(){var e={},i={rules:{},define:function(t,e){this.rules[t]=e,this["is"+t.substring(0,1).toUpperCase()+t.substring(1)]=function(e){return this.rules[t].exec(e)}}};function r(){}function s(e){this.stream=e,this.tokenStack=[]}function o(e,t){if(this.type=e,this.children=[],t)for(var n=0,i=t.length;n<i;++n)this.appendChild(t[n])}i.define("header",/^(\*+)\s+(.*)$/),i.define("preformatted",/^(\s*):(?: (.*)$|$)/),i.define("unorderedListElement",/^(\s*)(?:-|\+|\s+\*)\s+(.*)$/),i.define("orderedListElement",/^(\s*)(\d+)(?:\.|\))\s+(.*)$/),i.define("tableSeparator",/^(\s*)\|((?:\+|-)*?)\|?$/),i.define("tableRow",/^(\s*)\|(.*?)\|?$/),i.define("blank",/^$/),i.define("horizontalRule",/^(\s*)-{5,}$/),i.define("directive",/^(\s*)#\+(?:(begin|end)_)?(.*)$/i),i.define("comment",/^(\s*)#(.*)$/),i.define("line",/^(\s*)(.*)$/),r.prototype={isListElement:function(){return this.type===s.tokens.orderedListElement||this.type===s.tokens.unorderedListElement},isTableElement:function(){return this.type===s.tokens.tableSeparator||this.type===s.tokens.tableRow}},s.prototype={tokenize:function(e){var t=new r;if(t.fromLineNumber=this.stream.lineNumber,i.isHeader(e))t.type=s.tokens.header,t.indentation=0,t.content=RegExp.$2,t.level=RegExp.$1.length;else if(i.isPreformatted(e))t.type=s.tokens.preformatted,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(i.isUnorderedListElement(e))t.type=s.tokens.unorderedListElement,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(i.isOrderedListElement(e))t.type=s.tokens.orderedListElement,t.indentation=RegExp.$1.length,t.content=RegExp.$3,t.number=RegExp.$2;else if(i.isTableSeparator(e))t.type=s.tokens.tableSeparator,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(i.isTableRow(e))t.type=s.tokens.tableRow,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(i.isBlank(e))t.type=s.tokens.blank,t.indentation=0,t.content=null;else if(i.isHorizontalRule(e))t.type=s.tokens.horizontalRule,t.indentation=RegExp.$1.length,t.content=null;else if(i.isDirective(e)){t.type=s.tokens.directive,t.indentation=RegExp.$1.length,t.content=RegExp.$3;var n=RegExp.$2;/^begin/i.test(n)?t.beginDirective=!0:/^end/i.test(n)?t.endDirective=!0:t.oneshotDirective=!0}else{if(i.isComment(e))t.type=s.tokens.comment;else{if(!i.isLine(e))throw new Error("SyntaxError: Unknown line: "+e);t.type=s.tokens.line}t.indentation=RegExp.$1.length,t.content=RegExp.$2}return t},pushToken:function(e){this.tokenStack.push(e)},pushDummyTokenByType:function(e){var t=new r;t.type=e,this.tokenStack.push(t)},peekStackedToken:function(){return 0<this.tokenStack.length?this.tokenStack[this.tokenStack.length-1]:null},getStackedToken:function(){return 0<this.tokenStack.length?this.tokenStack.pop():null},peekNextToken:function(){return this.peekStackedToken()||this.tokenize(this.stream.peekNextLine())},getNextToken:function(){return this.getStackedToken()||this.tokenize(this.stream.getNextLine())},hasNext:function(){return this.stream.hasNext()},getLineNumber:function(){return this.stream.lineNumber}},s.tokens={},["header","orderedListElement","unorderedListElement","tableRow","tableSeparator","preformatted","line","horizontalRule","blank","directive","comment"].forEach(function(e,t){s.tokens[e]=t}),void 0!==e&&(e.Lexer=s),o.prototype={previousSibling:null,parent:null,get firstChild(){return this.children.length<1?null:this.children[0]},get lastChild(){return this.children.length<1?null:this.children[this.children.length-1]},appendChild:function(e){var t=this.children.length<1?null:this.lastChild;this.children.push(e),e.previousSibling=t,e.parent=this},toString:function(){var e="<"+this.type+">";return void 0!==this.value?e+=" "+this.value:this.children&&(e+="\n"+this.children.map(function(e,t){return"#"+t+" "+e.toString()}).join("\n").split("\n").map(function(e){return" "+e}).join("\n")),e}};var d={types:{},define:function(n,i){var e="create"+(this.types[n]=n).substring(0,1).toUpperCase()+n.substring(1),r="function"==typeof i;this[e]=function(e,t){e=new o(n,e);return r&&i(e,t||{}),e}}};function a(e){this.sequences=e.split(/\r?\n/),this.totalLines=this.sequences.length,this.lineNumber=0}function l(){this.inlineParser=new t}function t(){this.preEmphasis=" \t\\('\"",this.postEmphasis="- \t.,:!?;'\"\\)",this.borderForbidden=" \t\r\n,\"'",this.bodyRegexp="[\\s\\S]*?",this.markers="*/_=~+",this.emphasisPattern=this.buildEmphasisPattern(),this.linkPattern=/\[\[([^\]]*)\](?:\[([^\]]*)\])?\]/g}function n(){}function c(e,t){this.initialize(e,t),this.result=this.convert()}return d.define("text",function(e,t){e.value=t.value}),d.define("header",function(e,t){e.level=t.level}),d.define("orderedList"),d.define("unorderedList"),d.define("definitionList"),d.define("listElement"),d.define("paragraph"),d.define("preformatted"),d.define("table"),d.define("tableRow"),d.define("tableCell"),d.define("horizontalRule"),d.define("directive"),d.define("inlineContainer"),d.define("bold"),d.define("italic"),d.define("underline"),d.define("code"),d.define("verbatim"),d.define("dashed"),d.define("link",function(e,t){e.src=t.src}),void 0!==e&&(e.Node=d),a.prototype.peekNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber]:null},a.prototype.getNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber++]:null},a.prototype.hasNext=function(){return this.lineNumber<this.totalLines},void 0!==e&&(e.Stream=a),l.parseStream=function(e,t){var n=new l;return n.initStatus(e,t),n.parseNodes(),n.nodes},(l.prototype={initStatus:function(e,t){if("string"==typeof e&&(e=new a(e)),this.lexer=new s(e),this.nodes=[],this.options={toc:!0,num:!0,"^":"{}",multilineCell:!1},t&&"object"==typeof t)for(var n in t)this.options[n]=t[n];this.document={options:this.options,convert:function(e,t){return new e(this,t).result}}},parse:function(e,t){return this.initStatus(e,t),this.parseDocument(),this.document.nodes=this.nodes,this.document},createErrorReport:function(e){return new Error(e+" at line "+this.lexer.getLineNumber())},skipBlank:function(){for(var e=null;this.lexer.peekNextToken().type===s.tokens.blank;)e=this.lexer.getNextToken();return e},setNodeOriginFromToken:function(e,t){return e.fromLineNumber=t.fromLineNumber,e},appendNode:function(e){var t=0<this.nodes.length?this.nodes[this.nodes.length-1]:null;this.nodes.push(e),e.previousSibling=t},parseDocument:function(){this.parseTitle(),this.parseNodes()},parseNodes:function(){for(;this.lexer.hasNext();){var e=this.parseElement();e&&this.appendNode(e)}},parseTitle:function(){this.skipBlank(),this.lexer.hasNext()&&this.lexer.peekNextToken().type===s.tokens.line?this.document.title=this.createTextNode(this.lexer.getNextToken().content):this.document.title=null,this.lexer.pushDummyTokenByType(s.tokens.blank)},parseElement:function(){var e=null;switch(this.lexer.peekNextToken().type){case s.tokens.header:e=this.parseHeader();break;case s.tokens.preformatted:e=this.parsePreformatted();break;case s.tokens.orderedListElement:case s.tokens.unorderedListElement:e=this.parseList();break;case s.tokens.line:e=this.parseText();break;case s.tokens.tableRow:case s.tokens.tableSeparator:e=this.parseTable();break;case s.tokens.blank:this.skipBlank(),this.lexer.hasNext()&&(e=this.lexer.peekNextToken().type===s.tokens.line?this.parseParagraph():this.parseElement());break;case s.tokens.horizontalRule:this.lexer.getNextToken(),e=d.createHorizontalRule();break;case s.tokens.directive:e=this.parseDirective();break;case s.tokens.comment:this.lexer.getNextToken();break;default:throw this.createErrorReport("Unhandled token: "+this.lexer.peekNextToken().type)}return e},parseElementBesidesDirectiveEnd:function(){try{return this.parseElement=this.parseElementBesidesDirectiveEndBody,this.parseElement()}finally{this.parseElement=this.originalParseElement}},parseElementBesidesDirectiveEndBody:function(){return this.lexer.peekNextToken().type===s.tokens.directive&&this.lexer.peekNextToken().endDirective?null:this.originalParseElement()},parseHeader:function(){var e=this.lexer.getNextToken(),t=d.createHeader([this.createTextNode(e.content)],{level:e.level});return this.setNodeOriginFromToken(t,e),t},parsePreformatted:function(){for(var e=this.lexer.peekNextToken(),t=d.createPreformatted([]),n=(this.setNodeOriginFromToken(t,e),[]);this.lexer.hasNext();){var i=this.lexer.peekNextToken();if(i.type!==s.tokens.preformatted||i.indentation<e.indentation)break;this.lexer.getNextToken(),n.push(i.content)}return t.appendChild(this.createTextNode(n.join("\n"),!0)),t},definitionPattern:/^(.*?) :: *(.*)$/,parseList:function(){var e,t=this.lexer.peekNextToken(),n=!1;for(this.definitionPattern.test(t.content)?(e=d.createDefinitionList([]),n=!0):e=t.type===s.tokens.unorderedListElement?d.createUnorderedList([]):d.createOrderedList([]),this.setNodeOriginFromToken(e,t);this.lexer.hasNext();){var i=this.lexer.peekNextToken();if(!i.isListElement()||i.indentation!==t.indentation)break;e.appendChild(this.parseListElement(t.indentation,n))}return e},unknownDefinitionTerm:"???",parseListElement:function(e,t){var n=this.lexer.getNextToken(),i=d.createListElement([]);for(this.setNodeOriginFromToken(i,n),(i.isDefinitionList=t)?(t=this.definitionPattern.exec(n.content),i.term=[this.createTextNode(t&&t[1]?t[1]:this.unknownDefinitionTerm)],i.appendChild(this.createTextNode(t?t[2]:n.content))):i.appendChild(this.createTextNode(n.content));this.lexer.hasNext();){var r=this.skipBlank();if(!this.lexer.hasNext())break;var s=this.lexer.peekNextToken();if(r&&!s.isListElement()&&this.lexer.pushToken(r),s.indentation<=e)break;r=this.parseElement();r&&i.appendChild(r)}return i},parseTable:function(){for(var e,t=this.lexer.peekNextToken(),n=d.createTable([]),i=(this.setNodeOriginFromToken(n,t),!1),r=t.type===s.tokens.tableSeparator&&this.options.multilineCell;this.lexer.hasNext()&&(t=this.lexer.peekNextToken()).isTableElement();)t.type===s.tokens.tableRow?(e=this.parseTableRow(r),n.appendChild(e)):(i=!0,this.lexer.getNextToken());return i&&n.children.length&&n.children[0].children.forEach(function(e){e.isHeader=!0}),n},parseTableRow:function(e){for(var t,n,i,r=[];this.lexer.peekNextToken().type===s.tokens.tableRow&&(r.push(this.lexer.getNextToken()),e););if(r.length)return t=r.shift(),n=t.content.split("|"),r.forEach(function(e){e.content.split("|").forEach(function(e,t){n[t]=(n[t]||"")+"\n"+e})}),i=n.map(function(e){return d.createTableCell(l.parseStream(e))},this),this.setNodeOriginFromToken(d.createTableRow(i),t);throw this.createErrorReport("Expected table row")},parseDirective:function(){var e=this.lexer.getNextToken(),t=this.createDirectiveNodeFromToken(e);if(e.endDirective)throw this.createErrorReport("Unmatched 'end' directive for "+t.directiveName);if(e.oneshotDirective)return this.interpretDirective(t),t;if(e.beginDirective)return t.children=[],this.isVerbatimDirective(t)?this.parseDirectiveBlockVerbatim(t):this.parseDirectiveBlock(t);throw this.createErrorReport("Invalid directive "+t.directiveName)},createDirectiveNodeFromToken:function(e){var t=/^[ ]*([^ ]*)[ ]*(.*)[ ]*$/.exec(e.content),n=d.createDirective(null);return this.setNodeOriginFromToken(n,e),n.directiveName=t[1].toLowerCase(),n.directiveArguments=this.parseDirectiveArguments(t[2]),n.directiveOptions=this.parseDirectiveOptions(t[2]),n.directiveRawValue=t[2],n},isVerbatimDirective:function(e){e=e.directiveName;return"src"===e||"example"===e},parseDirectiveBlock:function(e,t){for(this.lexer.pushDummyTokenByType(s.tokens.blank);this.lexer.hasNext();){var n=this.lexer.peekNextToken();if(n.type===s.tokens.directive&&n.endDirective&&this.createDirectiveNodeFromToken(n).directiveName===e.directiveName)return this.lexer.getNextToken(),e;n=this.parseElementBesidesDirectiveEnd();n&&e.appendChild(n)}throw this.createErrorReport("Unclosed directive "+e.directiveName)},parseDirectiveBlockVerbatim:function(e){for(var t=[];this.lexer.hasNext();){var n=this.lexer.peekNextToken();if(n.type===s.tokens.directive&&n.endDirective&&this.createDirectiveNodeFromToken(n).directiveName===e.directiveName)return this.lexer.getNextToken(),e.appendChild(this.createTextNode(t.join("\n"),!0)),e;t.push(this.lexer.stream.getNextLine())}throw this.createErrorReport("Unclosed directive "+e.directiveName)},parseDirectiveArguments:function(e){return e.split(/[ ]+/).filter(function(e){return e.length&&"-"!==e[0]})},parseDirectiveOptions:function(e){return e.split(/[ ]+/).filter(function(e){return e.length&&"-"===e[0]})},interpretDirective:function(e){switch(e.directiveName){case"options:":this.interpretOptionDirective(e);break;case"title:":this.document.title=e.directiveRawValue;break;case"author:":this.document.author=e.directiveRawValue;break;case"email:":this.document.email=e.directiveRawValue}},interpretOptionDirective:function(e){e.directiveArguments.forEach(function(e){e=e.split(":");this.options[e[0]]=this.convertLispyValue(e[1])},this)},convertLispyValue:function(e){switch(e){case"t":return!0;case"nil":return!1;default:return/^[0-9]+$/.test(e)?parseInt(e):e}},parseParagraph:function(){for(var e=this.lexer.peekNextToken(),t=d.createParagraph([]),n=(this.setNodeOriginFromToken(t,e),[]);this.lexer.hasNext();){var i=this.lexer.peekNextToken();if(i.type!==s.tokens.line||i.indentation<e.indentation)break;this.lexer.getNextToken(),n.push(i.content)}return t.appendChild(this.createTextNode(n.join("\n"))),t},parseText:function(e){var t=this.lexer.getNextToken();return this.createTextNode(t.content,e)},createTextNode:function(e,t){return t?d.createText(null,{value:e}):this.inlineParser.parseEmphasis(e)}}).originalParseElement=l.prototype.parseElement,t.prototype={parseEmphasis:function(e){for(var t=this.emphasisPattern,n=[],i=t.lastIndex=0;l=t.exec(e);){var r=l[0],s=l[1],o=l[2],a=l[3],l=l[4],r=t.lastIndex-r.length,r=e.substring(i,r+s.length),s=t.lastIndex,r=(n.push(this.parseLink(r)),t.lastIndex=s,[d.createText(null,{value:a})]),s=this.emphasizeElementByMarker(r,o);n.push(s),i=t.lastIndex-l.length}return 0!==t.lastIndex&&t.lastIndex===e.length-1||n.push(this.parseLink(e.substring(i))),1===n.length?n[0]:d.createInlineContainer(n)},depth:0,parseLink:function(e){for(var t,n=this.linkPattern,i=[],r=n.lastIndex=0;a=n.exec(e);){var s=a[0],o=a[1],a=a[2],s=n.lastIndex-s.length,s=e.substring(r,s),s=(i.push(d.createText(null,{value:s})),d.createLink([]));s.src=o,a?(t=n.lastIndex,s.appendChild(this.parseEmphasis(a)),n.lastIndex=t):s.appendChild(d.createText(null,{value:o})),i.push(s),r=n.lastIndex}return 0!==n.lastIndex&&n.lastIndex===e.length-1||i.push(d.createText(null,{value:e.substring(r)})),d.createInlineContainer(i)},emphasizeElementByMarker:function(e,t){switch(t){case"*":return d.createBold(e);case"/":return d.createItalic(e);case"_":return d.createUnderline(e);case"=":case"~":return d.createCode(e);case"+":return d.createDashed(e)}},buildEmphasisPattern:function(){return new RegExp("(["+this.preEmphasis+"]|^|\r?\n)(["+this.markers+"])([^"+this.borderForbidden+"]|[^"+this.borderForbidden+"]"+this.bodyRegexp+"[^"+this.borderForbidden+"])\\2(["+this.postEmphasis+"]|$|\r?\n)","g")}},void 0!==e&&(e.Parser=l,e.InlineParser=t),n.prototype={exportOptions:{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!1,suppressAutoLink:!1},untitled:"Untitled",result:null,initialize:function(e,t){this.orgDocument=e,this.documentOptions=e.options||{},this.exportOptions=t||{},this.headers=[],this.headerOffset="number"==typeof this.exportOptions.headerOffset?this.exportOptions.headerOffset:1,this.sectionNumbers=[0]},createTocItem:function(e,t){var n=[];return n.parent=t,{headerNode:e,childTocs:n}},computeToc:function(e){"number"!=typeof e&&(e=1/0);for(var t=[],n=(t.parent=null,1),i=t,r=0;r<this.headers.length;++r){var s=this.headers[r];if(!(s.level>e)){if(0<(l=s.level-n))for(var o,a=0;a<l;++a)0===i.length&&((o=d.createHeader([],{level:n+a})).sectionNumberText="",i.push(this.createTocItem(o,i))),i=i[i.length-1].childTocs;else if(l<0)for(var l=-l,c=0;c<l;++c)i=i.parent;i.push(this.createTocItem(s,i)),n=s.level}}return t},convertNode:function(e,t,n){n||(e.type===d.types.directive?"example"!==e.directiveName&&"src"!==e.directiveName||(n=!0):e.type===d.types.preformatted&&(n=!0));var i,r=(e="string"==typeof e?d.createText(null,{value:e}):e).children?this.convertNodes(e.children,t,n):"",s=this.computeAuxDataForNode(e);switch(e.type){case d.types.header:var o=null,a=(0===r.indexOf("TODO ")?o="todo":0===r.indexOf("DONE ")&&(o="done"),null);if(t){var l=e.level,c=this.sectionNumbers.length;if(c<l)for(var h=l-c,u=0;u<h;++u)this.sectionNumbers[l-1-u]=0;else l<c&&(this.sectionNumbers.length=l);this.sectionNumbers[l-1]++,a=this.sectionNumbers.join("."),e.sectionNumberText=a}i=this.convertHeader(e,r,s,o,a),t&&this.headers.push(e);break;case d.types.orderedList:i=this.convertOrderedList(e,r,s);break;case d.types.unorderedList:i=this.convertUnorderedList(e,r,s);break;case d.types.definitionList:i=this.convertDefinitionList(e,r,s);break;case d.types.listElement:i=e.isDefinitionList?(c=this.convertNodes(e.term,t,n),this.convertDefinitionItem(e,r,s,c,r)):this.convertListItem(e,r,s);break;case d.types.paragraph:i=this.convertParagraph(e,r,s);break;case d.types.preformatted:i=this.convertPreformatted(e,r,s);break;case d.types.table:i=this.convertTable(e,r,s);break;case d.types.tableRow:i=this.convertTableRow(e,r,s);break;case d.types.tableCell:i=e.isHeader?this.convertTableHeader(e,r,s):this.convertTableCell(e,r,s);break;case d.types.horizontalRule:i=this.convertHorizontalRule(e,r,s);break;case d.types.inlineContainer:i=this.convertInlineContainer(e,r,s);break;case d.types.bold:i=this.convertBold(e,r,s);break;case d.types.italic:i=this.convertItalic(e,r,s);break;case d.types.underline:i=this.convertUnderline(e,r,s);break;case d.types.code:i=this.convertCode(e,r,s);break;case d.types.dashed:i=this.convertDashed(e,r,s);break;case d.types.link:i=this.convertLink(e,r,s);break;case d.types.directive:switch(e.directiveName){case"quote":i=this.convertQuote(e,r,s);break;case"example":i=this.convertExample(e,r,s);break;case"src":i=this.convertSrc(e,r,s);break;default:i=r}break;case d.types.text:i=this.convertText(e.value,n);break;default:throw"Unknown node type: "+e.type}return i="function"==typeof this.postProcess?this.postProcess(e,i,n):i},convertText:function(e,t){e=this.escapeSpecialChars(e,t);return this.exportOptions.suppressSubScriptHandling||t||(e=this.makeSubscripts(e,t)),e=this.exportOptions.suppressAutoLink?e:this.linkURL(e)},convertNodes:function(e,t,n){return e.map(function(e){return this.convertNode(e,t,n)},this).join("")},getNodeTextContent:function(e){return e.type===d.types.text?this.escapeSpecialChars(e.value):e.children?e.children.map(this.getNodeTextContent,this).join(""):""},escapeSpecialChars:function(e){throw"Implement escapeSpecialChars"},urlPattern:/\b(?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/i,linkURL:function(e){var t=this;return e.replace(this.urlPattern,function(e){return e.indexOf("://")<0&&(e="http://"+e),t.makeLink(e)})},makeLink:function(e){throw"Implement makeLink"},makeSubscripts:function(e){return"{}"===this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_{([^}]*)}/g,this.makeSubscript):this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_([^_]*)\b/g,this.makeSubscript):e},makeSubscript:function(e,t,n){throw"Implement makeSubscript"},imageExtensionPattern:new RegExp("("+["bmp","png","jpeg","jpg","gif","tiff","tif","xbm","xpm","pbm","pgm","ppm"].join("|")+")$","i")},void 0!==e&&(e.Converter=n),c.prototype={__proto__:n.prototype,convert:function(){var e=this.orgDocument.title?this.convertNode(this.orgDocument.title):this.untitled,t=this.tag("h1",e),n=this.convertNodes(this.orgDocument.nodes,!0),i=this.computeToc(this.documentOptions.toc),r=this.tocToHTML(i);return{title:e,titleHTML:t,contentHTML:n,tocHTML:r,toc:i,toString:function(){return t+r+"\n"+n}}},tocToHTML:function(e){function a(e){for(var t="",n=0;n<e.length;++n){var i=e[n],r=i.headerNode.sectionNumberText,s=this.documentOptions.num?this.inlineTag("span",r,{class:"section-number"}):"",o=this.getNodeTextContent(i.headerNode),s=this.inlineTag("a",s+o,{href:"#header-"+r.replace(/\./g,"-")}),o=i.childTocs.length?a.call(this,i.childTocs):"";t+=this.tag("li",s+o)}return this.tag("ul",t)}return a.call(this,e)},computeAuxDataForNode:function(e){for(;e.parent&&e.parent.type===d.types.inlineContainer;)e=e.parent;for(var t=e.previousSibling,n="";t&&t.type===d.types.directive&&"attr_html:"===t.directiveName;)n+=t.directiveRawValue+" ",t=t.previousSibling;return n},convertHeader:function(e,t,n,i,r){var s={};return i&&(t=this.inlineTag("span",t.substring(0,4),{class:"task-status "+i})+t.substring(5)),r&&(t=this.inlineTag("span",r,{class:"section-number"})+t,s.id="header-"+r.replace(/\./g,"-")),i&&(s.class="task-status "+i),this.tag("h"+(this.headerOffset+e.level),t,s,n)},convertOrderedList:function(e,t,n){return this.tag("ol",t,null,n)},convertUnorderedList:function(e,t,n){return this.tag("ul",t,null,n)},convertDefinitionList:function(e,t,n){return this.tag("dl",t,null,n)},convertDefinitionItem:function(e,t,n,i,r){return this.tag("dt",i)+this.tag("dd",r)},convertListItem:function(e,t,n){if(this.exportOptions.suppressCheckboxHandling)return this.tag("li",t,null,n);var i={};if(/^\s*\[(X| |-)\]([\s\S]*)/.exec(t)){var t=RegExp.$2,r={type:"checkbox"};switch(RegExp.$1){case"X":r.checked="true",i["data-checkbox-status"]="done";break;case"-":i["data-checkbox-status"]="intermediate";break;default:i["data-checkbox-status"]="undone"}t=this.inlineTag("input",null,r)+t}return this.tag("li",t,i,n)},convertParagraph:function(e,t,n){return this.tag("p",t,null,n)},convertPreformatted:function(e,t,n){return this.tag("pre",t,null,n)},convertTable:function(e,t,n){return this.tag("table",this.tag("tbody",t),null,n)},convertTableRow:function(e,t,n){return this.tag("tr",t)},convertTableHeader:function(e,t,n){return this.tag("th",t)},convertTableCell:function(e,t,n){return this.tag("td",t)},convertHorizontalRule:function(e,t,n){return this.tag("hr",null,null,n)},convertInlineContainer:function(e,t,n){return t},convertBold:function(e,t,n){return this.inlineTag("b",t)},convertItalic:function(e,t,n){return this.inlineTag("i",t)},convertUnderline:function(e,t,n){return this.inlineTag("span",t,{style:"text-decoration:underline;"})},convertCode:function(e,t,n){return this.inlineTag("code",t)},convertDashed:function(e,t,n){return this.inlineTag("del",t)},convertLink:function(e,t,n){var i;return this.imageExtensionPattern.exec(e.src)?(i=this.getNodeTextContent(e),this.inlineTag("img",null,{src:e.src,alt:i,title:i},n)):this.inlineTag("a",t,{href:e.src})},convertQuote:function(e,t,n){return this.tag("blockquote",t,null,n)},convertExample:function(e,t,n){return this.tag("pre",t,null,n)},convertSrc:function(e,t,n){e=e.directiveArguments.length?e.directiveArguments[0]:"unknown";return t=this.tag("code",t,{class:"language-"+e},n),this.tag("pre",t,{class:"prettyprint"})},replaceMap:{"&":["&#38;",null],"<":["&#60;",null],">":["&#62;",null],'"':["&#34;",null],"'":["&#39;",null],"->":["&#10132;",function(e,t){return this.exportOptions.translateSymbolArrow&&!t}]},replaceRegexp:null,escapeSpecialChars:function(n,i){this.replaceRegexp||(this.replaceRegexp=new RegExp(Object.keys(this.replaceMap).join("|"),"g"));var r=this.replaceMap,s=this;return n.replace(this.replaceRegexp,function(e){var t;if(r[e])return"function"!=typeof(t=r[e][1])||t.call(s,n,i)?r[e][0]:e;throw"escapeSpecialChars: Invalid match"})},postProcess:function(e,t,n){return t=this.exportOptions.exportFromLineNumber&&"number"==typeof e.fromLineNumber?this.inlineTag("div",t,{"data-line-number":e.fromLineNumber}):t},makeLink:function(e){return'<a href="'+e+'">'+decodeURIComponent(e)+"</a>"},makeSubscript:function(e,t,n){return'<span class="org-subscript-parent">'+t+'</span><span class="org-subscript-child">'+n+"</span>"},attributesObjectToString:function(e){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+=" "+t+'="'+e[t]+'"');return n},inlineTag:function(e,t,n,i){var r="<"+e;return i&&(r+=" "+i),r+=this.attributesObjectToString(n=n||{}),null===t?r+"/>":r+">"+t+"</"+e+">"},tag:function(e,t,n,i){return this.inlineTag(e,t,n,i)+"\n"}},void 0!==e&&(e.ConverterHTML=c),e}();(function(){function l(e,n){var t,i;return n=o(e,n),(e=r.modules[n])||("function"==typeof(e=r.payloads[n])&&(t={id:n,uri:"",exports:i={},packaged:!0},i=e(function(e,t){return s(n,e,t)},i,t)||t.exports,r.modules[n]=i,delete r.payloads[n]),e=r.modules[n]=i||e),e}var e,t,n=function(){return this}(),r=(n||"undefined"==typeof window||(n=window),function(e,t,n){"string"!=typeof e?r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(n=t),r.modules[e]||(r.payloads[e]=n,r.modules[e]=null))}),s=(r.modules={},r.payloads={},function(e,t,n){if("string"==typeof t){var i=l(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,o=t.length;s<o;++s){var a=l(e,t[s]);if(null==a&&c.original)return;r.push(a)}return n&&n.apply(null,r)||!0}}),c=function(e,t){var n=s("",e,t);return null==n&&c.original?c.original.apply(this,arguments):n},o=function(e,t){var n;if(-1!==t.indexOf("!"))return n=t.split("!"),o(e,n[0])+"!"+o(e,n[1]);if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t};t=n,(e="ace")&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(r.original=t.define,t.define=r,t.define.packaged=!0),t.require&&t.require.packaged||(c.original=t.require,t.require=c,t.require.packaged=!0)})(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],function(e,t,n){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";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};var i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),s=i.userAgent||"",i=i.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==i||0<=i.indexOf("MSAppHost")?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=0<=s.indexOf("AdobeAIR"),t.isAndroid=0<=s.indexOf("Android"),t.isChromeOS=0<=s.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,s,t){"use strict";var n,e=e("./useragent");s.buildDom=function e(t,n,i){if("string"==typeof t&&t)return c=document.createTextNode(t),n&&n.appendChild(c),c;if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s<t.length;s++){var o=e(t[s],n,i);o&&r.push(o)}return r}for(var a=document.createElement(t[0]),l=t[1],c=1,s=c=l&&"object"==typeof l&&!Array.isArray(l)?2:c;s<t.length;s++)e(t[s],a,i);return 2==c&&Object.keys(l).forEach(function(e){var t=l[e];"class"===e?a.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?a[e]=t:"ref"===e?i&&(i[t]=a):null!=t&&a.setAttribute(e,t)}),n&&n.appendChild(a),a},s.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},s.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},s.removeChildren=function(e){e.innerHTML=""},s.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},s.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},s.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},s.addCssClass=function(e,t){s.hasCssClass(e,t)||(e.className+=" "+t)},s.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},s.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},s.setCssClass=function(e,t,n){n?s.addCssClass(e,t):s.removeCssClass(e,t)},s.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},s.importCssString=function(e,t,n){var i=n,n=(i=n&&n.getRootNode&&(i=n.getRootNode())&&i!=n?i:document).ownerDocument||i;if(t&&s.hasCssString(t,i))return null;t&&(e+="\n/*# sourceURL=ace/css/"+t+" */");var r=s.createElement("style");r.appendChild(n.createTextNode(e)),t&&(r.id=t),(i=i==n?s.getDocumentHead(n):i).insertBefore(r,i.firstChild)},s.importCssStylsheet=function(e,t){s.buildDom(["link",{rel:"stylesheet",href:e}],s.getDocumentHead(t))},s.scrollbarWidth=function(e){var t=s.createElement("ace_inner"),n=(t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block",s.createElement("ace_outer")),i=n.style,e=(i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",n.appendChild(t),e.documentElement),r=(e.appendChild(n),t.offsetWidth),i=(i.overflow="scroll",t.offsetWidth);return r==i&&(i=n.clientWidth),e.removeChild(n),r-i},"undefined"==typeof document&&(s.importCssString=function(){}),s.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},s.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},s.HAS_CSS_ANIMATION=!1,s.HAS_CSS_TRANSFORMS=!1,s.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,"undefined"!=typeof document&&(n=document.createElement("div"),s.HI_DPI&&void 0!==n.style.transform&&(s.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===n.style.animationName||(s.HAS_CSS_ANIMATION=!0),n=null),s.HAS_CSS_TRANSFORMS?s.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:s.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,n,t){"use strict";n.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},n.implement=function(e,t){n.mixin(e,t)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";var s=e("./oop"),i=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},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);s.mixin(n,n.MODIFIER_KEYS),s.mixin(n,n.PRINTABLE_KEYS),s.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-";for(var i=["cmd","ctrl","alt","shift"],r=Math.pow(2,i.length);r--;)n.KEY_MODS[r]=i.filter(function(e){return r&n.KEY_MODS[e]}).join("-")+"-";return n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();s.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return(t="string"!=typeof t?String.fromCharCode(e):t).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,t){"use strict";function r(){if(null==n){n=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){n={passive:!1}}})}catch(e){}}return n}function s(e,t,n){this.elem=e,this.type=t,this.callback=n}function o(e,t,n){var i=l(t);if(!d.isMac&&p){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),p.altGr){if(3==(3&i))return;p.altGr=0}18!==n&&17!==n||(r="location"in t?t.location:t.keyLocation,17===n&&1===r?1==p[n]&&(m=t.timeStamp):18===n&&3===i&&2===r&&t.timeStamp-m<50&&(p.altGr=!0))}if(n in h.MODIFIER_KEYS&&(n=-1),!i&&13===n){var r="location"in t?t.location:t.keyLocation;if(3===r&&(e(t,i,-n),t.defaultPrevented))return}if(d.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in h.FUNCTION_KEYS||n in h.PRINTABLE_KEYS)&&e(t,i,n)}function a(){p=Object.create(null)}function l(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}var n,c,h=e("./keys"),d=e("./useragent"),p=null,m=0,g=(s.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0},u.addListener=function(e,t,n,i){e.addEventListener(t,n,r()),i&&i.$toDestroy.push(new s(e,t,n))}),f=u.removeListener=function(e,t,n){e.removeEventListener(t,n,r())};u.stopEvent=function(e){return u.stopPropagation(e),u.preventDefault(e),!1},u.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},u.preventDefault=function(e){e.preventDefault&&e.preventDefault()},u.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||d.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},u.capture=function(e,t,n){function i(e){t&&t(e),n&&n(e),f(r,"mousemove",t),f(r,"mouseup",i),f(r,"dragstart",i)}var r=e&&e.ownerDocument||document;return g(r,"mousemove",t),g(r,"mouseup",i),g(r,"dragstart",i),i},u.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?g(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),t(e)},n):"onwheel"in e?g(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)}t(e)},n):g(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)),t(e)},n)},u.addMultiMouseDownListener=function(e,n,i,r,t){function s(e){var t;if(0!==u.getButton(e)?c=0:1<e.detail&&!(4<++c)||(c=1),d.isIE&&(t=5<Math.abs(e.clientX-o)||5<Math.abs(e.clientY-a),l&&!t||(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[c-1]||600),1==c)&&(o=e.clientX,a=e.clientY),e._clicks=c,i[r]("mousedown",e),4<c)c=0;else if(1<c)return i[r](h[c],e)}var o,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};(e=Array.isArray(e)?e:[e]).forEach(function(e){g(e,"mousedown",s,t)})};u.getModifierString=function(e){return h.KEY_MODS[l(e)]},u.addCommandKeyListener=function(e,n,t){var i,r;d.isOldGecko||d.isOpera&&!("KeyboardEvent"in window)?(i=null,g(e,"keydown",function(e){i=e.keyCode},t),g(e,"keypress",function(e){return o(n,e,i)},t)):(r=null,g(e,"keydown",function(e){p[e.keyCode]=(p[e.keyCode]||0)+1;var t=o(n,e,e.keyCode);return r=e.defaultPrevented,t},t),g(e,"keypress",function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(u.stopEvent(e),r=null)},t),g(e,"keyup",function(e){p[e.keyCode]=null},t),p||(a(),g(window,"focus",a)))},"object"==typeof window&&window.postMessage&&!d.isOldIE&&(c=1,u.nextTick=function(t,n){n=n||window;function i(e){e.data==r&&(u.stopPropagation(e),f(n,"message",i),t())}var r="zero-timeout-message-"+c++;g(n,"message",i),n.postMessage(r,"*")}),u.$idleBlocked=!1,u.onIdle=function(t,e){return setTimeout(function e(){u.$idleBlocked?setTimeout(e,100):t()},e)},u.$idleBlockId=null,u.blockIdle=function(e){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},e||100)},u.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";function s(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}}(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},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: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){var n,i;return this.end.row>t?n={row:t+1,column:0}:this.end.row<e&&(n={row:e,column:0}),this.start.row>t?i={row:t+1,column:0}:this.start.row<e&&(i={row:e,column:0}),s.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n,i,r=this.compare(e,t);return 0==r?this:(-1==r?n={row:e,column:t}:i={row:e,column:t},s.fromPoints(n||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 s.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new s(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new s(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),e=e.documentToScreenPosition(this.end);return new s(t.row,t.column,e.row,e.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(s.prototype),s.fromPoints=function(e,t){return new s(e.row,e.column,t.row,t.column)},s.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},s.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=s}),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="";0<t;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,n={};for(t in e)n[t]=e[t];return n},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t))for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i]);else{if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i])}return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t,n=Object.create(null);for(t in e)n[t]=e[t];return n},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){function t(){i=null,e()}function n(e){return n.cancel(),i=setTimeout(t,e||0),n}var i=null;return(n.schedule=n).call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(i),i=null,n},n.isPending=function(){return i},n},t.delayedCall=function(e,t){function n(){r=null,e()}function i(e){null==r&&(r=setTimeout(n,e||t))}var r=null;return i.delay=function(e){r&&clearTimeout(r),r=setTimeout(n,e||t)},(i.schedule=i).call=function(){this.cancel(),e()},i.cancel=function(){r&&clearTimeout(r),r=null},i.isPending=function(){return r},i}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var z=e("../lib/event"),B=e("../lib/useragent"),N=e("../lib/dom"),H=e("../lib/lang"),W=e("../clipboard"),q=B.isChrome<18,U=B.isIE,V=63<B.isChrome,G=e("../lib/keys"),j=G.KEY_MODS,K=B.isIOS,Y=K?/\s/:/\n/,X=B.isMobile;t.TextInput=function(e,u){function t(){n=!0,d.blur(),d.focus(),n=!1}function a(){clearTimeout(E),E=setTimeout(function(){l&&(d.style.cssText=l,l=""),u.renderer.$isMousePressed=!1,u.renderer.$keepTextAreaAtCursor&&u.renderer.$moveTextAreaToCursor()},0)}var d=N.createElement("textarea"),s=(d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",e.insertBefore(d,e.firstChild),!1),p=!1,o=!1,m=!1,l="",g=(X||(d.style.fontSize="1px"),!1),n=!1,f="",w=0,v=0,y=0;try{var c=document.activeElement===d}catch(e){}z.addListener(d,"blur",function(e){n||(u.onBlur(e),c=!1)},u),z.addListener(d,"focus",function(e){if(!n){if(c=!0,B.isEdge)try{if(!document.hasFocus())return}catch(e){}u.onFocus(e),B.isEdge?setTimeout(b):b()}},u),this.$focusScroll=!1,this.focus=function(){if(l||V||"browser"==this.$focusScroll)return d.focus({preventScroll:!0});var e=d.style.top;d.style.position="fixed",d.style.top="0px";try{var t=0!=d.getBoundingClientRect().top}catch(e){return}var n=[];if(t)for(var i=d.parentElement;i&&1==i.nodeType;)n.push(i),i.setAttribute("ace_nocontext",!0),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;d.focus({preventScroll:!0}),t&&n.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){d.style.position="","0px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return c},u.on("beforeEndOperation",function(){var e=u.curOp,t=e&&e.command&&e.command.name;"insertstring"!=t&&(t=t&&(e.docChanged||e.selectionChanged),o&&t&&(f=d.value="",M()),b())});function i(e){$(e,!0)}function r(e){$(e,!1)}function h(e){var t=C(e);W.pasteCancelled()||("string"==typeof t?(t&&u.onPaste(t,e),B.isIE&&setTimeout(b),z.preventDefault(e)):(d.value="",p=!0))}var b=K?function(e){var t;!c||s&&!e||m||((t="\n ab"+(e=e||"")+"cde fg\n")!=d.value&&(d.value=f=t),t=4+(e.length||(u.selection.isEmpty()?0:1)),4==w&&v==t||d.setSelectionRange(4,t),w=4,v=t)}:function(){if(!o&&!m&&(c||A)){o=!0;var e,t,n=0,i=0,r="",s=(u.session&&(s=(e=u.selection).getRange(),e=e.cursor.row,n=s.start.column,i=s.end.column,r=u.session.getLine(e),s.start.row!=e?(t=u.session.getLine(e-1),n=s.start.row<e-1?0:n,i+=t.length+1,r=t+"\n"+r):s.end.row!=e?(t=u.session.getLine(e+1),i=s.end.row>e+1?t.length:i,i+=r.length+1,r=r+"\n"+t):X&&0<e&&(r="\n"+r,i+=1,n+=1),400<r.length)&&(n<400&&i<400?r=r.slice(0,400):(r="\n",n==i?n=i=0:(n=0,i=1))),r+"\n\n");if(s!=f&&(d.value=f=s,w=v=s.length),A&&(w=d.selectionStart,v=d.selectionEnd),v!=i||w!=n||d.selectionEnd!=v)try{d.setSelectionRange(n,i),w=n,v=i}catch(e){}o=!1}},F=(this.resetSelection=b,c&&u.onFocus(),function(e){return 0===e.selectionStart&&e.selectionEnd>=f.length&&e.value===f&&f&&e.selectionEnd!==v}),x=null,A=(this.setInputHandler=function(e){x=e},!(this.getInputHandler=function(){return x})),k=function(e,t){if(A=A&&!1,p)return b(),e&&u.onPaste(e),p=!1,"";for(var n=d.selectionStart,i=d.selectionEnd,r=w,s=f.length-v,o=e,a=e.length-n,l=e.length-i,c=0;0<r&&f[c]==e[c];)c++,r--;for(o=o.slice(c),c=1;0<s&&f.length-c>w-1&&f[f.length-c]==e[e.length-c];)c++,s--;a-=c-1,l-=c-1;var h=o.length-c+1;return h<0&&(r=-h,h=0),o=o.slice(0,h),t||o||a||r||s||l?(h=!(m=!0),B.isAndroid&&". "==o&&(o=" ",h=!0),o&&!r&&!s&&!a&&!l||g?u.onTextInput(o):u.onTextInput(o,{extendLeft:r,extendRight:s,restoreStart:a,restoreEnd:l}),m=!1,f=e,w=n,v=i,y=l,h?"\n":o):""},S=function(e){if(o)return R();if(e&&e.inputType){if("historyUndo"==e.inputType)return u.execCommand("undo");if("historyRedo"==e.inputType)return u.execCommand("redo")}var e=d.value,t=k(e,!0);(500<e.length||Y.test(t)||X&&w<1&&w==v)&&b()},C=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!q){var r=U||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return C(e,t,!0)}}},$=function(e,t){var n=u.getCopyText();if(!n)return z.preventDefault(e);C(e,n)?(K&&(b(n),s=n,setTimeout(function(){s=!1},10)),t?u.onCut():u.onCopy(),z.preventDefault(e)):(s=!0,d.value=n,d.select(),setTimeout(function(){s=!1,b(),t?u.onCut():u.onCopy()}))},R=(z.addCommandKeyListener(d,u.onCommandKey.bind(u),u),z.addListener(d,"select",function(e){o||(s?s=!1:F(d)?(u.selectAll(),b()):X&&d.selectionStart!=w&&b())},u),z.addListener(d,"input",S,u),z.addListener(d,"cut",i,u),z.addListener(d,"copy",r,u),z.addListener(d,"paste",h,u),"oncut"in d&&"oncopy"in d&&"onpaste"in d||z.addListener(e,"keydown",function(e){if((!B.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:r(e);break;case 86:h(e);break;case 88:i(e)}},u),function(){var e;if(o&&u.onCompositionUpdate&&!u.$readOnly)return g?t():void(o.useTextareaForIME?u.onCompositionUpdate(d.value):(e=d.value,k(e),o.markerRange&&(o.context&&(o.markerRange.start.column=o.selectionStart=o.context.compositionStartOffset),o.markerRange.end.column=o.markerRange.start.column+v-o.selectionStart+y)))}),M=function(e){u.onCompositionEnd&&!u.$readOnly&&(o=!1,u.onCompositionEnd(),u.off("mousedown",t),e)&&S()},T=H.delayedCall(R,50).schedule.bind(null,null);z.addListener(d,"compositionstart",function(e){o||!u.onCompositionStart||u.$readOnly||(o={},g)||(e.data&&(o.useTextareaForIME=!1),setTimeout(R,0),u._signal("compositionStart"),u.on("mousedown",t),(e=u.getSelectionRange()).end.row=e.start.row,e.end.column=e.start.column,o.markerRange=e,o.selectionStart=w,u.onCompositionStart(o),o.useTextareaForIME?(f=d.value="",v=w=0):(d.msGetInputContext&&(o.context=d.msGetInputContext()),d.getInputContext&&(o.context=d.getInputContext())))},u),z.addListener(d,"compositionupdate",R,u),z.addListener(d,"keyup",function(e){27==e.keyCode&&d.value.length<d.selectionStart&&(o||(f=d.value),w=v=-1,b()),T()},u),z.addListener(d,"keydown",T,u),z.addListener(d,"compositionend",M,u),this.getElement=function(){return d},this.setCommandMode=function(e){g=e,d.readOnly=!1},this.setReadOnly=function(e){g||(d.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){A=!0,b(),u._emit("nativecontextmenu",{target:u,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,t){l=l||d.style.cssText,d.style.cssText=(t?"z-index:100000;":"")+(B.isIE?"opacity:0.1;":"")+"text-indent: -"+(w+v)*u.renderer.characterWidth*.5+"px;";function n(e){N.translate(d,e.clientX-s-2,Math.min(e.clientY-r-2,o))}var t=u.container.getBoundingClientRect(),i=N.computedStyle(u.container),r=t.top+(parseInt(i.borderTopWidth)||0),s=t.left+(parseInt(t.borderLeftWidth)||0),o=t.bottom-r-d.clientHeight-2;n(e),"mousedown"==e.type&&(u.renderer.$isMousePressed=!0,clearTimeout(E),B.isWin)&&z.capture(u.container,n,a)},this.onContextMenuClose=a;function L(e){u.textInput.onContextMenu(e),a()}var E,I,_,D,O;function P(e){var t,n,i,r;document.activeElement!==_||O||o||I.$mouseHandler.isMousePressed||s||(t=_.selectionStart,n=_.selectionEnd,i=null,(r=0)==t?i=G.up:1==t?i=G.home:v<n&&"\n"==f[n]?i=G.end:t<w&&" "==f[t-1]?(i=G.left,r=j.option):t<w||t==w&&v!=w&&t==n?i=G.left:v<n&&2<f.slice(0,n).split("\n").length?i=G.down:v<n&&" "==f[n-1]?(i=G.right,r=j.option):(v<n||n==v&&v!=w&&t==n)&&(i=G.right),t!==n&&(r|=j.shift),i&&(!I.onCommandKey({},r,i)&&I.commands&&(i=G.keyCodeToString(i),r=I.commands.findKeyCommand(r,i))&&I.execCommand(r),w=t,v=n,b("")))}z.addListener(d,"mouseup",L,u),z.addListener(d,"mousedown",function(e){e.preventDefault(),a()},u),z.addListener(u.renderer.scroller,"contextmenu",L,u),z.addListener(d,"contextmenu",L,u),K&&(I=u,D=null,O=!1,(_=d).addEventListener("keydown",function(e){D&&clearTimeout(D),O=!0},!0),_.addEventListener("keyup",function(e){D=setTimeout(function(){O=!1},100)},!0),document.addEventListener("selectionchange",P),I.on("destroy",function(){document.removeEventListener("selectionchange",P)}))},t.$setUserAgentForTests=function(e,t){X=e,K=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function i(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function o(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var s=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition(),i=(this.mousedownEvent=e,this.editor),r=e.getButton();if(0!==r)!i.getSelectionRange().isEmpty()&&1!=r||i.selection.moveToPosition(n),2==r&&(i.textInput.onContextMenu(e.domEvent),s.isMozilla||e.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout)||this.$clickSelection||i.inMultiSelectMode)return this.captureMouse(e),this.startSelect(n,1<e.domEvent._clicks),e.preventDefault();this.setState("focusWait"),this.captureMouse(e)}},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(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"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(e=-1==(e=this.$clickSelection.comparePoint(n))?this.$clickSelection.end:1==e?this.$clickSelection.start:(n=(e=o(this.$clickSelection,n)).cursor,e.anchor),t.selection.setSelectionAnchor(e.row,e.column)),t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n,i,r=this.editor,s=r.renderer.screenToTextCoordinates(this.x,this.y),e=r.selection[e](s.row,s.column);this.$clickSelection&&(n=this.$clickSelection.comparePoint(e.start),t=this.$clickSelection.comparePoint(e.end),-1==n&&t<=0?(i=this.$clickSelection.end,e.end.row==s.row&&e.end.column==s.column||(s=e.start)):1==t&&0<=n?(i=this.$clickSelection.start,e.start.row==s.row&&e.start.column==s.column||(s=e.end)):i=-1==n&&1==t?(s=e.end,e.start):(s=(n=o(this.$clickSelection,s)).cursor,n.anchor),r.selection.setSelectionAnchor(i.row,i.column)),r.selection.selectToPosition(s),r.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(){i=this.mousedownEvent.x,e=this.mousedownEvent.y,n=this.x,t=this.y;var e,t,n=Math.sqrt(Math.pow(n-i,2)+Math.pow(t-e,2)),i=Date.now();(0<n||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=t.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=(this.setState("selectByLines"),t.getSelectionRange());n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(n.start.row),this.$clickSelection.end=t.selection.getLineRange(n.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){var t,n,i,r,s,o,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),n=this.$lastScroll,r=(a=(i=e.domEvent.timeStamp)-n.t)?e.wheelX/a:n.vx,s=a?e.wheelY/a:n.vy,a<550&&(r=(r+n.vx)/2,s=(s+n.vy)/2),a=!1,1<=(o=Math.abs(r/s))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=o<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?n.allowed=i:i-n.allowed<550&&(Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(a=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=r,n.vy=s,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}).call(i.prototype),t.DefaultHandlers=i}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var r=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){this.getElement().textContent=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},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(i.prototype),t.Tooltip=i}),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 u(e){o.call(this,e)}var d=e("../lib/dom"),i=e("../lib/oop"),p=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(u,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();n<(e+=15)+r&&(e-=e+r-n),i<(t+=15)+s&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(u.prototype),t.GutterHandler=function(i){function r(){n=n&&clearTimeout(n),a&&(h.hide(),a=null,l._signal("hideGutterTooltip",h),l.off("mousewheel",r))}function s(e){h.setPosition(e.x,e.y)}var n,o,a,l=i.editor,c=l.renderer.$gutterLayer,h=new u(l.container);i.editor.setDefaultHandler("guttermousedown",function(e){if(l.isFocused()&&0==e.getButton()){var t=c.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,n=l.session.selection;if(e.getShiftKey())n.selectTo(t,0);else{if(2==e.domEvent.detail)return l.selectAll(),e.preventDefault();i.$clickSelection=l.selection.getLineRange(t)}return i.setState("selectByLines"),i.captureMouse(e),e.preventDefault()}}}),i.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(d.hasCssClass(t,"ace_fold-widget"))return r();a&&i.$tooltipFollowsMouse&&s(e),o=e,n=n||setTimeout(function(){n=null,(o&&!i.isMousePressed?function(){var e=o.getDocumentPosition().row,t=c.$annotations[e];if(!t)return r();if(e==l.session.getLength()){var e=l.renderer.pixelToScreenCoordinates(0,o.y).row,n=o.$pos;if(e>l.session.documentToScreenRow(n.row,n.column))return r()}a!=t&&(a=t.text.join("<br/>"),h.setHtml(a),h.show(),l._signal("showGutterTooltip",h),l.on("mousewheel",r),i.$tooltipFollowsMouse?s(o):(e=o.domEvent.target.getBoundingClientRect(),(n=h.getElement().style).left=e.right+"px",n.top=e.bottom+"px"))}:r)()},50)}),p.addListener(l.renderer.$gutter,"mouseout",function(e){o=null,a&&(n=n||setTimeout(function(){n=null,r()},50))},l),l.on("changeSession",r)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),e=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(e.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 i(t){function e(){var e,t,n,i,r,s,o,a,l=d;d=v.renderer.screenToTextCoordinates(c,h),r=d,s=l,o=Date.now(),a=!s||r.row!=s.row,s=!s||r.column!=s.column,!f||a||s?(v.moveCursorToPosition(r),f=o,w={x:c,y:h}):5<k(w.x,w.y,c,h)?f=null:200<=o-f&&(v.renderer.scrollCursorIntoView(),f=null),a=d,s=l,r=Date.now(),o=v.renderer.layerConfig.lineHeight,l=v.renderer.layerConfig.characterWidth,e=v.renderer.scroller.getBoundingClientRect(),e={x:{left:c-e.left,right:e.right-c},y:{top:h-e.top,bottom:e.bottom-h}},t=Math.min(e.x.left,e.x.right),n=Math.min(e.y.top,e.y.bottom),i={row:a.row,column:a.column},t/l<=2&&(i.column+=e.x.left<e.x.right?-3:2),n/o<=1&&(i.row+=e.y.top<e.y.bottom?-1:1),t=a.row!=i.row,l=a.column!=i.column,n=!s||a.row!=s.row,t||l&&!n?g?200<=r-g&&v.renderer.scrollCursorIntoView(i):g=r:g=null}function n(){u=v.selection.toOrientedRange(),a=v.session.addMarker(u,"ace_selection",v.getSelectionStyle()),v.clearSelection(),v.isFocused()&&v.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),e(),l=setInterval(e,20),x=0,C.addListener(document,"mousemove",r)}function i(){clearInterval(l),v.session.removeMarker(a),a=null,v.selection.fromOrientedRange(u),v.isFocused()&&!m&&v.$resetCursorStyle(),x=0,f=g=d=u=null,C.removeListener(document,"mousemove",r)}function r(){null==A&&(A=setTimeout(function(){null!=A&&a&&i()},20))}function s(e){e=e.types;return!e||Array.prototype.some.call(e,function(e){return"text/plain"==e||"Text"==e})}function o(e){var t=["copy","copymove","all","uninitialized"],n=$.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&0<=t.indexOf(i)?r="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(i)?r="move":0<=t.indexOf(i)&&(r="copy"),r}var a,c,h,l,u,d,p,m,g,f,w,v=t.editor,y=S.createElement("img"),b=(y.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",$.isOpera&&(y.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),v.on("mousedown",this.onMouseDown.bind(t)),v.container),x=0,A=(this.onDragStart=function(e){var t;if(this.cancelDrag||!b.draggable)return t=this,setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault();u=v.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=v.getReadOnly()?"copy":"copyMove",$.isOpera&&(v.container.appendChild(y),y.scrollTop=0),n.setDragImage&&n.setDragImage(y,0,0),$.isOpera&&v.container.removeChild(y),n.clearData(),n.setData("Text",v.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){b.draggable=!1,m=!1,this.setState(null),v.getReadOnly()||(e=e.dataTransfer.dropEffect,p||"move"!=e||v.session.remove(v.getSelectionRange()),v.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!v.getReadOnly()&&s(e.dataTransfer))return c=e.clientX,h=e.clientY,a||n(),x++,e.dataTransfer.dropEffect=p=o(e),C.preventDefault(e)},this.onDragOver=function(e){if(!v.getReadOnly()&&s(e.dataTransfer))return c=e.clientX,h=e.clientY,a||(n(),x++),null!==A&&(A=null),e.dataTransfer.dropEffect=p=o(e),C.preventDefault(e)},this.onDragLeave=function(e){if(--x<=0&&a)return i(),p=null,C.preventDefault(e)},this.onDrop=function(e){if(d){var t=e.dataTransfer;if(m)switch(p){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:v.moveText(u,d);break;case"copy":u=v.moveText(u,d,!0)}else{t=t.getData("Text");u={start:d,end:v.session.insert(d,t)},v.focus(),p=null}return i(),C.preventDefault(e)}},C.addListener(b,"dragstart",this.onDragStart.bind(t),v),C.addListener(b,"dragend",this.onDragEnd.bind(t),v),C.addListener(b,"dragenter",this.onDragEnter.bind(t),v),C.addListener(b,"dragover",this.onDragOver.bind(t),v),C.addListener(b,"dragleave",this.onDragLeave.bind(t),v),C.addListener(b,"drop",this.onDrop.bind(t),v),null)}function k(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}var S=e("../lib/dom"),C=e("../lib/event"),$=e("../lib/useragent");(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.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),$.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;$.isIE&&"dragReady"==this.state&&3<k(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<k(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){var t,n,i;this.$dragEnabled&&(this.mousedownEvent=e,t=this.editor,n=e.inSelection(),i=e.getButton(),1!==(e.domEvent.detail||1)||0!==i||!n||e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(i=e.domEvent.target||e.domEvent.srcElement)&&(i.unselectable="on"),t.getDragDelay()?($.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0))}}).call(i.prototype),t.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var S=e("./mouse_event").MouseEvent,i=e("../lib/event"),a=e("../lib/dom");t.addTouchListeners=function(e,h){function r(){function t(e){var t,n=e.target.getAttribute("action");"more"!=n&&r?("paste"==n?i.readText().then(function(e){h.execCommand(n,e)}):n&&("cut"!=n&&"copy"!=n||(i?i.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(n)),o.firstChild.style.display="none",r=!1,"openCommandPallete"!=n&&h.focus()):(r=!r,e=h.getCopyText(),t=h.session.getUndoManager().hasUndo(),o.replaceChild(a.buildDom(r?["span",!e&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],e&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],e&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],i&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],t&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),o.firstChild))}var i=window.navigator&&window.navigator.clipboard,r=!1;o=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){y="menu",e.stopPropagation(),e.preventDefault(),h.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),t(e)},onclick:t},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function n(){o||r();var e=h.selection.cursor,e=h.renderer.textToScreenCoordinates(e.row,e.column),t=h.renderer.textToScreenCoordinates(0,0).pageX,n=h.renderer.scrollLeft,i=h.container.getBoundingClientRect();o.style.top=e.pageY-i.top-3+"px",e.pageX-i.left<i.width-70?(o.style.left="",o.style.right="10px"):(o.style.right="",o.style.left=t+n-i.left+"px"),o.style.display="",o.firstChild.style.display="none",h.on("input",s)}function s(e){o&&(o.style.display="none"),h.off("input",s)}function u(){f=null,clearTimeout(f);var e=h.selection.getRange(),t=e.contains(w.row,w.column);!e.isEmpty()&&t||(h.selection.moveToPosition(w),h.selection.selectWord()),y="wait",n()}var d,p,m,g,f,t,w,v,o,y="scroll",b=0,x=0,A=0,k=0;i.addListener(e,"contextmenu",function(e){v&&h.textInput.getElement().focus()},h),i.addListener(e,"touchstart",function(e){var t=e.touches;if(f||1<t.length)clearTimeout(f),f=null,m=-1,y="zoom";else{v=h.$mouseHandler.isMousePressed=!0;var n=h.renderer.layerConfig.lineHeight,i=h.renderer.layerConfig.lineHeight,r=e.timeStamp,s=(g=r,t[0]),o=s.clientX,s=s.clientY,o=(Math.abs(d-o)+Math.abs(p-s)>n&&(m=-1),d=e.clientX=o,p=e.clientY=s,A=k=0,new S(e,h));if(w=o.getDocumentPosition(),r-m<500&&1==t.length&&!b)x++,e.preventDefault(),e.button=0,f=null,clearTimeout(f),h.selection.moveToPosition(w),(s=2<=x?h.selection.getLineRange(w.row):h.session.getBracketRange(w))&&!s.isEmpty()?h.selection.setRange(s):h.selection.selectWord(),y="wait";else{x=0;var o=h.selection.cursor,t=h.selection.isEmpty()?o:h.selection.anchor,s=h.renderer.$cursorLayer.getPixelPosition(o,!0),o=h.renderer.$cursorLayer.getPixelPosition(t,!0),t=h.renderer.scroller.getBoundingClientRect(),a=h.renderer.layerConfig.offset,l=h.renderer.scrollLeft,c=function(e,t){return(e/=i)*e+(t=t/n-.75)*t};if(e.clientX<t.left)return void(y="zoom");s=c(e.clientX-t.left-s.left+l,e.clientY-t.top-s.top+a),c=c(e.clientX-t.left-o.left+l,e.clientY-t.top-o.top+a);s<3.5&&c<3.5&&(y=c<s?"cursor":"anchor"),y=c<3.5?"anchor":s<3.5?"cursor":"scroll",f=setTimeout(u,450)}m=r}},h),i.addListener(e,"touchend",function(e){v=h.$mouseHandler.isMousePressed=!1,t&&clearInterval(t),"zoom"==y?(y="",b=0):(f?(h.selection.moveToPosition(w),b=0,n):"scroll"==y?(b+=60,t=setInterval(function(){b--<=0&&(clearInterval(t),t=null),Math.abs(A)<.01&&(A=0),Math.abs(k)<.01&&(k=0),b<20&&(A*=.9),b<20&&(k*=.9);var e=h.session.getScrollTop();h.renderer.scrollBy(10*A,10*k),e==h.session.getScrollTop()&&(b=0)},10),s):n)(),clearTimeout(f),f=null},h),i.addListener(e,"touchmove",function(e){f&&(clearTimeout(f),f=null);var t=e.touches;if(!(1<t.length||"zoom"==y)){var t=t[0],n=d-t.clientX,i=p-t.clientY;if("wait"==y){if(!(4<n*n+i*i))return e.preventDefault();y="cursor"}d=t.clientX,p=t.clientY,e.clientX=t.clientX,e.clientY=t.clientY;var t=e.timeStamp,r=t-g;g=t,"scroll"==y?((t=new S(e,h)).speed=1,t.wheelX=n,t.wheelY=i,10*Math.abs(n)<Math.abs(i)&&(n=0),10*Math.abs(i)<Math.abs(n)&&(i=0),0!=r&&(A=n/r,k=i/r),h._emit("mousewheel",t),t.propagationStopped||(A=k=0)):(n=new S(e,h).getDocumentPosition(),"cursor"==y?h.selection.moveCursorToPosition(n):"anchor"==y&&h.selection.setSelectionAnchor(n.row,n.column),h.renderer.scrollCursorIntoView(n),e.preventDefault())}},h)}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=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,n){var t=r.getDocumentHead(),i=document.createElement("script");i.src=e,t.appendChild(i),i.onload=i.onreadystatechange=function(e,t){!t&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,t)||n()}},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";function s(){this.propagationStopped=!0}function o(){this.defaultPrevented=!0}var i={};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){(t="object"==typeof t&&t?t:{}).type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o);for(var n=n.slice(),r=0;r<n.length&&(n[r](t,this),!t.propagationStopped);r++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){if(n=(this._eventRegistry||{})[e])for(var n=n.slice(),i=0;i<n.length;i++)n[i](t,this)},i.once=function(t,n){var i=this;if(this.on(t,function e(){i.off(t,e),n.apply(null,arguments)}),!n)return new Promise(function(e){n=e})},i.setDefaultHandler=function(e,t){var n,i,r=this._defaultHandlers;(r=r||(this._defaultHandlers={_disabled_:{}}))[e]&&(i=r[e],(n=r._disabled_[e])||(r._disabled_[e]=n=[]),n.push(i),-1!=(i=n.indexOf(t)))&&n.splice(i,1),r[e]=t},i.removeDefaultHandler=function(e,t){var n,i=this._defaultHandlers;i&&(n=i._disabled_[e],i[e]==t?n&&this.setDefaultHandler(e,n.pop()):n&&-1!=(i=n.indexOf(t))&&n.splice(i,1))},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return-1==(i=i||(this._eventRegistry[e]=[])).indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};e=this._eventRegistry[e];e&&-1!==(t=e.indexOf(t))&&e.splice(t,1)},i.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=i}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){function i(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})}function s(){this.$defaultOptions={}}var o=e("./oop"),a=e("./event_emitter").EventEmitter,l={setOptions:function(t){Object.keys(t).forEach(function(e){this.setOption(e,t[e])},this)},getOptions:function(e){var t,n={};return e?Array.isArray(e)||(n=e,e=Object.keys(n)):(t=this.$options,e=Object.keys(t).filter(function(e){return!t[e].hidden})),e.forEach(function(e){n[e]=this.getOption(e)},this),n},setOption:function(e,t){var n;if(this["$"+e]!==t)return(n=this.$options[e])?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].setOption(e,t):(n.handlesSet||(this["$"+e]=t),void(n&&n.set&&n.set.call(this,t))):i('misspelled option "'+e+'"')},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]:i('misspelled option "'+e+'"')}};(function(){o.implement(this,a),this.defineOptions=function(n,e,i){return n.$options||(this.$defaultOptions[e]=n.$options={}),Object.keys(i).forEach(function(e){var t=i[e];(t="string"==typeof t?{forwardTo:t}:t).name||(t.name=e),"initialValue"in(n.$options[t.name]=t)&&(n["$"+t.name]=t.initialValue)}),o.implement(n,l),this},this.resetOptions=function(n){Object.keys(n.$options).forEach(function(e){var t=n.$options[e];"value"in t&&n.setOption(e,t.value)})},this.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(t,n){Object.keys(n).forEach(function(e){this.setDefaultValue(t,e,n[e])},this)},this.warn=i,this.reportError=r}).call(s.prototype),t.AppConfig=s}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(d,p,m){var e=d("./lib/lang"),r=(d("./lib/oop"),d("./lib/net")),t=d("./lib/app_config").AppConfig,g=(m.exports=p=new t,function(){return this||"undefined"!=typeof window&&window}()),f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1},s=(p.get=function(e){if(f.hasOwnProperty(e))return f[e];throw new Error("Unknown config key: "+e)},p.set=function(e,t){if(f.hasOwnProperty(e))f[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},p.all=function(){return e.copyObject(f)},p.$modes={},p.moduleUrl=function(e,t){var n,i,r;return f.$moduleUrls[e]||(e=e.split("/"),n="snippets"==(t=t||e[e.length-2]||"")?"/":"-",i=e[e.length-1],"worker"==t&&"-"==n&&(r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),i=i.replace(r,"")),(!i||i==t)&&1<e.length&&(i=e[e.length-2]),null==(r=f[t+"Path"])?r=f.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+i+this.get("suffix"))},p.setModuleUrl=function(e,t){return f.$moduleUrls[e]=t},p.$loading={},p.loadModule=function(n,e){var t,i;Array.isArray(n)&&(t=n[0],n=n[1]);try{i=d(n)}catch(e){}return i&&!p.$loading[n]?e&&e(i):(p.$loading[n]||(p.$loading[n]=[]),p.$loading[n].push(e),1<p.$loading[n].length?void 0:(i=function(){d([n],function(t){p._emit("load.module",{name:n,module:t});var e=p.$loading[n];p.$loading[n]=null,e.forEach(function(e){e&&e(t)})})},p.get("packaged")?(r.loadScript(p.moduleUrl(n,t),i),void s()):i()))},function(){f.basePath||f.workerPath||f.modePath||f.themePath||Object.keys(f.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),s=function(){})});p.init=function(e){if(g&&g.document){f.packaged=e||d.packaged||m.packaged||g.define&&define.packaged;for(var t,n={},i="",e=document.currentScript||document._currentScript,r=(e&&e.ownerDocument||document).getElementsByTagName("script"),s=0;s<r.length;s++){var o=r[s],a=o.src||o.getAttribute("src");if(a){for(var l=o.attributes,c=0,h=l.length;c<h;c++){var u=l[c];0===u.name.indexOf("data-ace-")&&(n[u.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=u.value)}o=a.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);o&&(i=o[1])}}for(t in i&&(n.base=n.base||i,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base,n)void 0!==n[t]&&p.set(t,n[t])}},p.version="1.4.12"}),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/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";function i(i){function e(e){document.hasFocus&&document.hasFocus()&&(i.isFocused()||document.activeElement!=(i.textInput&&i.textInput.getElement()))||window.focus(),i.focus()}var r=this,t=(this.editor=i,new s(this),new o(this),new a(this),i.renderer.getMouseEventTarget()),n=(h.addListener(t,"click",this.onMouseEvent.bind(this,"click"),i),h.addListener(t,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),h.addMultiMouseDownListener([t,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),h.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),l(i.container,i),i.renderer.$gutter);h.addListener(n,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),h.addListener(n,"click",this.onMouseEvent.bind(this,"gutterclick"),i),h.addListener(n,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),h.addListener(n,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),h.addListener(t,"mousedown",e,i),h.addListener(n,"mousedown",e,i),u.isIE&&i.renderer.scrollBarV&&(h.addListener(i.renderer.scrollBarV.element,"mousedown",e,i),h.addListener(i.renderer.scrollBarH.element,"mousedown",e,i)),i.on("mousemove",function(e){var t,n;r.state||r.$dragDelay||!r.$dragEnabled||(e=i.renderer.screenToTextCoordinates(e.x,e.y),t=i.session.selection.getRange(),n=i.renderer,!t.isEmpty()&&t.insideStart(e.row,e.column)?n.setCursorStyle("default"):n.setCursorStyle(""))},i)}var h=e("../lib/event"),u=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,e=e("../config");(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new d(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 d(t,this.editor))},this.onMouseWheel=function(e,t){var n=new d(t,this.editor);n.speed=2*this.$scrollSpeed,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;function n(e){if(e)return u.isWebKit&&!e.which&&a.releaseMouse?a.releaseMouse():(a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new d(e,a.editor),void(a.$mouseMoved=!0))}function i(e){s.off("beforeEndOperation",l),clearInterval(c),r(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),s.endOperation()}function r(){a[a.state]&&a[a.state](),a.$mouseMoved=!1}var s=this.editor,o=this.editor.renderer,a=(o.$isMousePressed=!0,this);if(u.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){i(e)});var l=function(e){a.releaseMouse&&s.curOp.command.name&&s.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())},c=(s.on("beforeEndOperation",l),s.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=n,a.releaseMouse=h.capture(this.editor.container,n,i),setInterval(r,20))},this.releaseMouse=null,this.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&h.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(i.prototype),e.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(r){r.on("click",function(e){var t=e.getDocumentPosition(),n=r.session,t=n.getFoldAt(t.row,t.column,1),t=(t&&(e.getAccelKey()?n.removeFold(t):n.expandFold(t),e.stop()),e.domEvent&&e.domEvent.target);t&&i.hasCssClass(t,"ace_inline_button")&&i.hasCssClass(t,"ace_toggle_wrap")&&(n.setOption("wrap",!n.getUseWrapMode()),r.renderer.scrollCursorIntoView())}),r.on("gutterclick",function(e){var t,n;"foldWidgets"==r.renderer.$gutterLayer.getRegion(e)&&(t=e.getDocumentPosition().row,(n=r.session).foldWidgets&&n.foldWidgets[t]&&r.session.onFoldWidgetClick(t,e),r.isFocused()||r.focus(),e.stop())}),r.on("gutterdblclick",function(e){var t,n,i;"foldWidgets"==r.renderer.$gutterLayer.getRegion(e)&&(i=e.getDocumentPosition().row,(n=(n=(t=r.session).getParentFoldRangeData(i,!0)).range||n.firstRange)&&(i=n.start.row,(i=t.getFoldAt(i,t.getLine(i).length,1))?t.removeFold(i):(t.addFold("...",n),r.renderer.scrollCursorIntoView({row:n.start.row,column:0}))),e.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";function i(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}var r=e("../lib/keys"),l=e("../lib/event");(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){var n;e&&("function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e),-1!=(n=this.$handlers.indexOf(e))&&this.$handlers.splice(n,1),null==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 t=this.$data,n=t.editor;return this.$handlers.map(function(e){return e.getStatusText&&e.getStatusText(n,t)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var r,s=!1,o=this.$editor.commands,a=this.$handlers.length;a--&&!((r=this.$handlers[a].handleKeyboard(this.$data,e,t,n,i))&&r.command&&((s="null"==r.command||o.exec(r.command,this.$editor,r.args,i))&&i&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&l.stopEvent(i),s)););return s||-1!=e||(r={command:"insertstring"},s=o.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(i.prototype),t.KeyBinding=i}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,l,t){"use strict";function c(e,t,n,i){var r,s,o,a=g?x:b,l=0,c=-1,h=null,u=null,d=[];if(!i)for(h=0,i=[];h<n;h++)i[h]=m(e[h]);for(f=g,y=v=w=!1,u=0;u<n;u++){if(o=l,d[u]=r=function(e,t,n,i){var r,s,o,a=t[i];switch(a){case A:case k:w=!1;case $:case C:return a;case S:return w?C:S;case T:return w=!0,k;case L:return $;case E:return i<1||i+1>=t.length||(r=n[i-1])!=S&&r!=C||(l=t[i+1])!=S&&l!=C?$:(l=w?C:l)==r?l:$;case I:return(r=0<i?n[i-1]:R)==S&&i+1<t.length&&t[i+1]==S?S:$;case _:if(0<i&&n[i-1]==S)return S;if(w)return $;for(o=i+1,s=t.length;o<s&&t[o]==_;)o++;return o<s&&t[o]==S?S:$;case D:for(s=t.length,o=i+1;o<s&&t[o]==D;)o++;if(o<s){var l=e[i],l=1425<=l&&l<=2303||64286==l;if(r=t[o],l&&(r==k||r==T))return k}return i<1||(r=t[i-1])==R?$:n[i-1];case R:return v=!(w=!1),g;case M:return y=!0,$;case O:case F:case z:case B:case P:w=!1;case N:return $}}(e,i,d,u),o=240&(l=a[o][r]),l&=15,t[u]=s=a[l][5],0<o){if(16==o)for(h=c;h<u;h++)t[h]=1;c=-1}if(a[l][6])-1==c&&(c=u);else if(-1<c){for(h=c;h<u;h++)t[h]=s;c=-1}i[u]==R&&(t[u]=0),f|=s}if(y)for(h=0;h<n;h++)if(i[h]==M){t[h]=g;for(var p=h-1;0<=p&&i[p]==L;p--)t[p]=g}}function h(e,t,n){if(!(f<e))if(1!=e||1!=g||v)for(var i,r,s,o,a=n.length,l=0;l<a;){if(t[l]>=e){for(i=l+1;i<a&&t[i]>=e;)i++;for(r=l,s=i-1;r<s;r++,s--)o=n[r],n[r]=n[s],n[s]=o;l=i}l++}else n.reverse()}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?191<t?A:i[t]:5==n?/[\u0591-\u05f4]/.test(e)?k:A:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?D:/[\u0660-\u0669\u066b-\u066c]/.test(e)?C:1642==t?_:/[\u06f0-\u06f9]/.test(e)?S:T:32==n&&t<=8287?r[255&t]:254==n&&65136<=t?T:$}var g=0,f=0,w=!1,v=!1,y=!1,b=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],x=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],A=0,k=1,S=2,C=3,$=4,R=5,M=6,T=7,L=8,E=9,I=10,_=11,D=12,O=13,F=14,P=15,z=16,B=17,N=18,i=[N,N,N,N,N,N,N,N,N,M,R,M,L,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,M,L,$,$,_,_,_,$,$,$,$,$,I,E,I,E,E,S,S,S,S,S,S,S,S,S,S,E,$,$,$,$,$,$,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,$,$,$,$,$,$,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,$,$,$,$,N,N,N,N,N,N,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,$,_,_,_,_,$,$,$,$,A,$,$,N,$,$,_,_,S,S,$,A,$,$,$,S,A,$,$,$,$,$],r=[L,L,L,L,L,L,L,L,L,L,L,N,N,N,A,k,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,L,R,O,F,P,z,B,E,_,_,_,_,_,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,E,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,L];l.L=A,l.R=k,l.EN=S,l.ON_R=3,l.AN=4,l.R_H=5,l.B=6,l.RLE=7,l.DOT="·",l.doBidiReorder=function(e,t,n){if(e.length<2)return{};var i=e.split(""),r=new Array(i.length),s=new Array(i.length),o=[];g=n?1:0,c(i,o,i.length,t);for(var a=0;a<r.length;r[a]=a,a++);h(2,o,r),h(1,o,r);for(a=0;a<r.length-1;a++)t[a]===C?o[a]=l.AN:o[a]===k&&(t[a]>T&&t[a]<O||t[a]===$||t[a]===N)?o[a]=l.ON_R:0<a&&"ل"===i[a-1]&&/\u0622|\u0623|\u0625|\u0627/.test(i[a])&&(o[a-1]=o[a]=l.R_H,a++);i[i.length-1]===l.DOT&&(o[i.length-1]=l.B),""===i[0]&&(o[0]=l.RLE);for(a=0;a<r.length;a++)s[a]=o[r[a]];return{logicalFromVisual:r,bidiLevels:s}},l.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=m(e.charAt(i)),n||t[i]!=k&&t[i]!=T&&t[i]!=C||(n=!0);return n},l.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";function i(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=a,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())}var a=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;return e=t.length&&0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))?this.session.$docRowCache[t]:e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-e&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){var n,i=(e=void 0===e?this.getDocumentRow():e)===this.session.getLength()-1?this.EOF:this.EOL,r=(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode&&((e=this.session.$wrapData[e])&&(0<(t=void 0===t?this.getSplitIndex():t)&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[a.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t])),t!=e.length)||(this.line+=this.showInvisibles?i:a.DOT),this.session),s=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||r.isFullWidth(e.charCodeAt(0))?(n="\t"===e?r.getScreenTabSize(t+s):2,s+=n-1,o.stringRepeat(a.DOT,n)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==a.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];a.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=a.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){var t;this.characterWidth!==e.$characterSize.width&&(this.fontMetrics=e,t=this.characterWidth=e.$characterSize.width,e=e.$measureCharWidth("ה"),this.charWidths[a.L]=this.charWidths[a.EN]=this.charWidths[a.ON_R]=t,this.charWidths[a.R]=this.charWidths[a.AN]=e,this.charWidths[a.R_H]=.45*e,this.charWidths[a.B]=this.charWidths[a.RLE]=0,this.currentRow=null)},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=t<e?this.session.getOverwrite()?e:e-1:t,i=a.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[i]%2!=0&&i++;for(var o=0;o<i;o++)s+=this.charWidths[r[o]];return!this.session.getOverwrite()&&t<e&&r[i]%2==0&&(s+=this.charWidths[r[i]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,s=[],o=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<r.length;p++)d=i.logicalFromVisual[p],n=r[p],(c=a<=d&&d<l)&&!h?u=o:!c&&h&&s.push({left:u,width:o-u}),o+=this.charWidths[n],h=c;if(c&&p===r.length&&s.push({left:u,width:o-u}),this.isRtlDir)for(var m=0;m<s.length;m++)s[m].left+=this.rtlLineOffset;return s},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,e=Math.max(e,0),n=0,i=0,r=this.bidiMap.bidiLevels,s=this.charWidths[r[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n+s/2<e;){if(n+=s,i===r.length-1){s=0;break}s=this.charWidths[r[++i]]}return 0===(t=0<i&&r[i-1]%2!=0&&r[i]%2==0?(e<n&&i--,this.bidiMap.logicalFromVisual[i]):0<i&&r[i-1]%2==0&&r[i]%2!=0?1+(n<e?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===s&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?1+this.bidiMap.logicalFromVisual[i]:(0<i&&r[i-1]%2!=0&&0!==s&&i--,this.bidiMap.logicalFromVisual[i]))&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(i.prototype),t.BidiHandler=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";function i(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")})}var r=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range;(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},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(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(n.row,n.column,t.row,t.column)},this.$setSelection=function(e,t,n,i){var r,s;!this.$silent&&(r=this.$isEmpty,s=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")},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){var n;return void 0===t&&(e=(n=e||this.lead).row,t=n.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},this.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,n=this.session.getFoldLine(e),n=n?(e=n.start.row,n.end.row):e;return!0===t?new a(e,0,n,this.session.getLine(n).length):new a(e,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(e=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,e,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-e):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(e.end.row,e.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(e=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,e,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,e):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(n,0),e=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);e[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=e[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e,t=this.lead,t=this.session.getDocumentLastRowColumnPosition(t.row,t.column);this.lead.column==t.column&&(e=this.session.getLine(t.row),t.column==e.length)&&0<(e=e.search(/\s+$/))&&(t.column=e),this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(e,t,1));r?this.moveCursorTo(r.end.row,r.end.column):(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;(e=this.session.getFoldAt(t,n,-1))?this.moveCursorTo(e.start.row,e.start.column):(null==(e=this.session.getFoldStringAt(t,n,-1))&&(e=this.doc.getLine(t).substring(0,n)),e=s.stringReverse(e),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(e)&&(n-=this.session.nonTokenRe.lastIndex,e=e.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0?(this.moveCursorTo(t,0),this.moveCursorLeft(),0<t&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(e)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)))},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(2<n){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(2<n)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){for(var s=this.doc.getLength();i=this.doc.getLine(++e),e<s&&/^\s*$/.test(i););/^\s+/.test(i)||(i=""),t=0}r=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+r)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(i=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(i.start.row,i.start.column);var n=this.session.getLine(e).substring(0,t);if(0===t){for(;n=this.doc.getLine(--e),0<e&&/^\s*$/.test(n););t=n.length,/\s+$/.test(n)||(n="")}var i=s.stringReverse(n),i=this.$shortWordEndIndex(i);return this.moveCursorTo(e,t-i)},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,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r=(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(r=this.session.lineWidgets[this.lead.row],e<0?e-=r.rowsAbove||0:0<e&&(e+=r.rowCount-(r.rowsAbove||0))),this.session.screenToDocumentPosition(i.row+e,i.column,n));0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1),i=(i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(e));/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?--t:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){e=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(e.row,e.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(){var e;return this.rangeCount?e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}):(e=this.getRange()).isBackwards=this.isBackwards(),e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&1<e.length){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(i.prototype),t.Selection=i}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";function i(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",a=[],l=0;l<n.length;l++){var c,h,u=n[l];u.defaultToken&&(s.defaultToken=u.defaultToken),u.caseInsensitive&&(o="gi"),null==u.regex||(u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1)),c=u.regex,h=new RegExp("(?:("+c+")|(.))").exec("a").length-2,Array.isArray(u.token)?1==u.token.length||1==h?u.token=u.token[0]:h-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:h-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=1<h?this.$applyToken:u.token),1<h&&(c=/\\\d/.test(u.regex)?u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(h=1,this.removeCapturingGroups(u.regex)),!u.splitRegex)&&"string"!=typeof u.token&&a.push(u),s[r]=l,r+=h,i.push(c),u.onMatch)||(u.onMatch=null)}i.length||(s[0]=0,i.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",o)}}var r=e("./config"),v=2e3;(function(){this.$setMaxTokenCount=function(e){v=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,s=n.length;r<s;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,s=i.length;r<s;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){var o,a,l;return"$"!=(e="^"!=(e=-1!=e.indexOf("(?=")&&(o=0,a=!1,l={},e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,n,i,r,s){return a?a="]"!=r:r?a=!0:i?(o==l.stack&&(l.end=s+1,l.stack=-1),o--):n&&(o++,1!=n.length)&&(l.stack=o,l.start=s),e}),null!=l.end)&&/^\)*$/.test(e.substr(l.end))?e.substring(0,l.start)+e.substr(l.end):e).charAt(0)?"^"+e:e).charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){t&&"string"!=typeof t?"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift()):n=[];for(var n,i,r=t||"start",s=this.states[r],o=(s||(s=this.states[r="start"]),this.matchMappings[r]),a=this.regExps[r],l=[],c=a.lastIndex=0,h=0,u={type:null,value:""};i=a.exec(e);){var d,p=o.defaultToken,m=null,g=i[0],f=a.lastIndex;f-g.length>c&&(d=e.substring(c,f-g.length),u.type==p?u.value+=d:(u.type&&l.push(u),u={type:p,value:d}));for(var w=0;w<i.length-2;w++)if(void 0!==i[w+1]){p=(m=s[o[w]]).onMatch?m.onMatch(g,r,n,e):m.token,m.next&&(r="string"==typeof m.next?m.next:m.next(r,n),(s=this.states[r])||(this.reportError("state doesn't exist",r),s=this.states[r="start"]),o=this.matchMappings[r],(a=this.regExps[r]).lastIndex=c=f),m.consumeLineEnd&&(c=f);break}if(g)if("string"==typeof p)m&&!1===m.merge||u.type!==p?(u.type&&l.push(u),u={type:p,value:g}):u.value+=g;else if(p){u.type&&l.push(u);for(u={type:null,value:""},w=0;w<p.length;w++)l.push(p[w])}if(c==e.length)break;if(c=f,h++>v){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)u.type&&l.push(u),u={value:e.substring(c,c+=500),type:"overflow"};r="start",n=[];break}}return u.type&&l.push(u),1<n.length&&n[0]!==r&&n.unshift("#tmp",r),{tokens:l,state:n.length?n:r}},this.reportError=r.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";function i(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var l=e("../lib/lang");(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var s=i[r];(s.next||s.onMatch)&&("string"==typeof s.next&&0!==s.next.indexOf(t)&&(s.next=t+s.next),s.nextState)&&0!==s.nextState.indexOf(t)&&(s.nextState=t+s.nextState)}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,r){e="function"==typeof e?(new e).getRules():e;if(i)for(var s=0;s<i.length;s++)i[s]=t+i[s];else for(var o in i=[],e)i.push(t+o);if(this.addRules(e,t),n)for(var a=Array.prototype[r?"push":"unshift"],s=0;s<i.length;s++)a.apply(this.$rules[i[s]],l.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};function u(e,t){return"start"==e&&!t.length||t.unshift(this.nextState,e),this.nextState}function d(e,t){return t.shift(),t.shift()||"start"}this.normalizeRules=function(){var c=0,h=this.$rules;Object.keys(h).forEach(function e(t){var n=h[t];n.processed=!0;for(var i=0;i<n.length;i++){var r=n[i],s=null,o=(Array.isArray(r)&&(s=r,r={}),!r.regex&&r.start&&(r.regex=r.start,r.next||(r.next=[]),r.next.push({defaultToken:r.token},{token:r.token+".end",regex:r.end||r.start,next:"pop"}),r.token=r.token+".start",r.push=!0),r.next||r.push);if(o&&Array.isArray(o)?((l=r.stateName)||("string"!=typeof(l=r.token)&&(l=l[0]||""),h[l]&&(l+=c++)),h[l]=o,e(r.next=l)):"pop"==o&&(r.next=d),r.push&&(r.nextState=r.next||r.push,r.next=u,delete r.push),r.rules)for(var a in r.rules)h[a]?h[a].push&&h[a].push.apply(h[a],r.rules[a]):h[a]=r.rules[a];var l="string"==typeof r?r:r.include;(s=l?Array.isArray(l)?l.map(function(e){return h[e]}):h[l]:s)&&(o=[i,1].concat(s),r.noEscape&&(o=o.filter(function(e){return!e.next})),n.splice.apply(n,o),i--),r.keywordMap&&(r.token=this.createKeywordMapper(r.keywordMap,r.defaultToken||"text",r.caseInsensitive),delete r.defaultToken)}},this)},this.createKeywordMapper=function(r,t,s,o){var a=Object.create(null);return this.$keywordList=[],Object.keys(r).forEach(function(e){for(var t=r[e].split(o||"|"),n=t.length;n--;){var i=t[n];this.$keywordList.push(i),s&&(i=i.toLowerCase()),a[i]=e}},this),r=null,s?function(e){return a[e.toLowerCase()]||t}:function(e){return a[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";function i(){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){e=("function"==typeof e?new e:e).getBehaviours(t),this.addBehaviours(e)},this.getBehaviours=function(e){if(!e)return this.$behaviours;for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(i.prototype),t.Behaviour=i}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t),e=e.getTokenAt(t,n),this.$tokenIndex=e?e.index:-1}var r=e("./range").Range;(function(){this.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0===n)for(n=0;0<t;)n+=e[--t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function d(e){var t=-1;if((l=e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount)?{rangeCount:e.multiSelect.rangeCount}:l)[t])return g=l[t];g=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function p(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}}function m(u){this.add("braces","insertion",function(e,t,n,i,r){var s=n.getCursorPosition(),o=i.doc.getLine(s.row);if("{"==r)return d(n),l=n.getSelectionRange(),""!==(c=i.doc.getTextRange(l))&&"{"!==c&&n.getWrapBehavioursEnabled()?p(l,c,"{","}"):m.isSaneInsertion(n,i)?/[\]\}\)]/.test(o[s.column])||n.inMultiSelectMode||u&&u.braces?(m.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]}):void 0;if("}"==r){d(n);var a=o.substring(s.column,s.column+1);if("}"==a)if(null!==i.$findOpeningBracket("}",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){d(n);var l="";if(m.isMaybeInsertedClosing(s,o)&&(l=f.stringRepeat("}",g.maybeInsertedBrackets),m.clearMaybeInsertedClosing()),"}"===(a=o.substring(s.column,s.column+1))){var c=i.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!c)return null;var h=this.$getIndent(i.getLine(c.row))}else{if(!l)return void m.clearMaybeInsertedClosing();h=this.$getIndent(o)}r=h+i.getTabString();return{text:"\n"+r+"\n"+h+l,selection:[1,r.length,1,r.length]}}m.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(d(n),"}"==i.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;g.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,r){if("("==r)return d(n),s=n.getSelectionRange(),""!==(o=i.doc.getTextRange(s))&&n.getWrapBehavioursEnabled()?p(s,o,"(",")"):m.isSaneInsertion(n,i)?(m.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}):void 0;if(")"==r){d(n);var s=n.getCursorPosition(),o=i.doc.getLine(s.row),n=o.substring(s.column,s.column+1);if(")"==n)if(null!==i.$findOpeningBracket(")",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,n,i,r){if("["==r)return d(n),s=n.getSelectionRange(),""!==(o=i.doc.getTextRange(s))&&n.getWrapBehavioursEnabled()?p(s,o,"[","]"):m.isSaneInsertion(n,i)?(m.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}):void 0;if("]"==r){d(n);var s=n.getCursorPosition(),o=i.doc.getLine(s.row),n=o.substring(s.column,s.column+1);if("]"==n)if(null!==i.$findOpeningBracket("]",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,n,i,r){var s=i.$mode.$quotes||w;if(1==r.length&&s[r]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(r))){d(n);var o=n.getSelectionRange(),a=i.doc.getTextRange(o);if(""!==a&&(1!=a.length||!s[a])&&n.getWrapBehavioursEnabled())return p(o,a,r,r);if(!a){var s=n.getCursorPosition(),o=i.doc.getLine(s.row),a=o.substring(s.column-1,s.column),n=o.substring(s.column,s.column+1),l=i.getTokenAt(s.row,s.column),c=i.getTokenAt(s.row,s.column+1);if("\\"==a&&l&&/escape/.test(l.type))return null;var h,l=l&&/string|escape/.test(l.type),u=!c||/string|escape/.test(c.type);if(n==r)(h=l!==u)&&/string\.end/.test(c.type)&&(h=!1);else{if(l&&!u)return null;if(l&&u)return null;c=i.$mode.tokenRe,l=(c.lastIndex=0,c.test(a)),u=(c.lastIndex=0,c.test(a));if(l||u)return null;if(n&&!/[\s;,.})\]\\]/.test(n))return null;i=o[s.column-2];if(a==r&&(i==r||c.test(i)))return null;h=!0}return{text:h?r+r:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var s=i.$mode.$quotes||w,o=i.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})}var g,i=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,f=e("../../lib/lang"),o=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l={},w={'"':'"',"'":"'"};m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",o)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;e=new s(t,n.row,n.column+1);if(!this.$matchTokenType(e.getCurrentToken()||"text",o))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return-1<t.indexOf(e.type||e)},m.recordAutoInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isAutoInsertedClosing(e,t,g.autoInsertedLineEnd[0])||(g.autoInsertedBrackets=0),g.autoInsertedRow=e.row,g.autoInsertedLineEnd=n+t.substr(e.column),g.autoInsertedBrackets++},m.recordMaybeInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isMaybeInsertedClosing(e,t)||(g.maybeInsertedBrackets=0),g.maybeInsertedRow=e.row,g.maybeInsertedLineStart=t.substr(0,e.column)+n,g.maybeInsertedLineEnd=t.substr(e.column),g.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(e,t,n){return 0<g.autoInsertedBrackets&&e.row===g.autoInsertedRow&&n===g.autoInsertedLineEnd[0]&&t.substr(e.column)===g.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(e,t){return 0<g.maybeInsertedBrackets&&e.row===g.maybeInsertedRow&&t.substr(e.column)===g.maybeInsertedLineEnd&&t.substr(0,e.column)==g.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){g.autoInsertedLineEnd=g.autoInsertedLineEnd.substr(1),g.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){g&&(g.maybeInsertedBrackets=0,g.maybeInsertedRow=-1)},i.inherits(m,r),t.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,s=[],o=0;o<i.length;o+=2)s.push(r+=i[o]),i[o+1]&&s.push(45,r+=i[o+1]);t.wordChars=String.fromCharCode.apply(null,s)}),ace.define("ace/mode/text",["require","exports","module","ace/config","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";function i(){this.HighlightRules=s}var o=e("../config"),r=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),x=e("../lib/lang"),g=e("../token_iterator").TokenIterator,f=e("../range").Range;(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,r,n,i){function t(e){for(var t=n;t<=i;t++)e(s.getLine(t),t)}var s=r.doc,o=!0,a=!0,l=1/0,c=r.getTabSize(),h=!1;if(this.lineCommentStart){f=Array.isArray(this.lineCommentStart)?(v=this.lineCommentStart.map(x.escapeRegExp).join("|"),this.lineCommentStart[0]):(v=x.escapeRegExp(this.lineCommentStart),this.lineCommentStart),v=new RegExp("^(\\s*)(?:"+v+") ?"),h=r.getUseSoftTabs();var u=function(e,t){var n,i,r=e.match(v);r&&(n=r[1].length,i=r[0].length,g(e,n,i)||" "!=r[0][i-1]||i--,s.removeInLine(t,n,i))},d=f+" ",p=function(e,t){o&&!/\S/.test(e)||(g(e,l,l)?s.insertInLine({row:t,column:l},d):s.insertInLine({row:t,column:l},f))},m=function(e,t){return v.test(e)},g=function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%c!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return 2<c?i%c!=c-1:i%c==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,w=this.blockComment.end,v=new RegExp("^(\\s*)(?:"+x.escapeRegExp(f)+")"),y=new RegExp("(?:"+x.escapeRegExp(w)+")\\s*$"),p=function(e,t){m(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},w),s.insertInLine({row:t,column:l},f))},u=function(e,t){var n;(n=e.match(y))&&s.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(v))&&s.removeInLine(t,n[1].length,n[0].length)},m=function(e,t){if(v.test(e))return!0;for(var n=r.getTokens(t),i=0;i<n.length;i++)if("comment"===n[i].type)return!0}}var b=1/0;t(function(e,t){var n=e.search(/\S/);-1!==n?(n<l&&(l=n),a&&!m(e,t)&&(a=!1)):b>e.length&&(b=e.length)}),l==1/0&&(l=b,a=o=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),t(a?u:p)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(d=new g(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.start))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,u=new f(c,h,c,h+r.start.length);break}a=d.stepBackward()}for(var d,p,a=(d=new g(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.end))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,m=new f(c,h,c,h+r.end.length);break}a=d.stepForward()}m&&t.remove(m),u&&(t.remove(u),s=u.start.row,o=-r.start.length)}else o=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var i in this.$embeds=[],this.$modes={},e){var t,n,r;e[i]&&(n=(t=e[i]).prototype.$id,(r=o.$modes[n])||(o.$modes[n]=r=new t),o.$modes[i]||(o.$modes[i]=r),this.$embeds.push(i),this.$modes[i]=r)}for(var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],i=0;i<s.length;i++)!function(e){var t=s[i],n=e[t];e[s[i]]=function(){return this.$delegator(t,arguments,n)}}(this)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1];if(o=this.$modes[r])return o[e].apply(o,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var o,a=i.split(this.$embeds[s]);if(!a[0]&&a[1])return t[0]=a[1],(o=this.$modes[this.$embeds[s]])[e].apply(o,t)}r=n.apply(this,t);return n?r:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var s,o=this.$behaviour.getBehaviours();for(s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(i in t)for(var i,r=t[i],s=0,o=r.length;s<o;s++)if("string"==typeof r[s].token)/keyword|support|storage/.test(r[s].token)&&n.push(r[s].regex);else if("object"==typeof r[s].token)for(var a=0,l=r[s].token.length;a<l;a++)/keyword|support|storage/.test(r[s].token[a])&&(i=r[s].regex.match(/\(.+?\)/g)[a],n.push(i.substr(1,i.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),t.Mode=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,s=e[i]||"";switch(t.action){case"insert":1===t.lines.length?e[i]=s.substring(0,r)+t.lines[0]+s.substring(r):(o=[i,1].concat(t.lines),e.splice.apply(e,o),e[i]=s.substring(0,r)+e[i],e[i+t.lines.length-1]+=s.substring(r));break;case"remove":var o=t.end.column,a=t.end.row;i===a?e[i]=s.substring(0,r)+s.substring(o):e.splice(i,a-i+1,s.substring(0,r)+e[a].substring(o))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,e=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};!function(){function a(e,t,n){n=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t,n,i,r,s,o;e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row||(e=e,t={row:this.row,column:this.column},n=this.$insertRight,i=((o="insert"==e.action)?1:-1)*(e.end.row-e.start.row),r=(o?1:-1)*(e.end.column-e.start.column),s=e.start,o=o?s:e.end,e=a(t,s,n)?{row:t.row,column:t.column}:a(o,t,!n)?{row:t.row+i,column:t.column+(t.row==o.row?r:0)}:{row:s.row,column:s.column},this.setPosition(e.row,e.column,!0))},this.setPosition=function(e,t,n){n=n?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==n.row&&this.column==n.column||(e={row:this.row,column:this.column},this.row=n.row,this.column=n.column,this._signal("change",{old:e,value:n}))},this.detach=function(){this.document.off("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(e.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";function i(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)}var r=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,l=e("./anchor").Anchor;(function(){r.implement(this,o),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 l(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){e=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[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,n;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),n=t.length-1,e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))),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),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},this.clippedPos=function(e,t){var n=this.getLength(),n=(void 0===e?e=n:e<0?e=0:n<=e&&(e=n-1,t=void 0),this.getLine(e));return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0,n=(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),0):(t=[""].concat(t),this.$lines[--e].length);this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var e=this.clippedPos(e.row,e.column),n={row:e.row+t.length-1,column:(1==t.length?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),e=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},this.removeInLine=function(e,t,n){t=this.clippedPos(e,t),e=this.clippedPos(e,n);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})},!0),this.clonePos(t)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&0<e,i=t<this.getLength()-1,r=n?e-1:e,n=n?this.getLine(r).length:0,s=i?t+1:t,i=i?0:this.getLine(s).length,r=new a(r,n,s,i),n=this.$lines.slice(e,t+1);return this.applyDelta({start:r.start,end:r.end,action:"remove",lines:this.getLinesForRange(r)}),n},this.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;0<=t;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&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,r=e.start.row,s=e.start.column,o=0,a=0;o<i;o=a){a+=t-1;var l=n.slice(o,a);l.push(""),this.applyDelta({start:this.pos(r+o,s),end:this.pos(r+a,s=0),action:e.action,lines:l},!0)}e.lines=n.slice(o),e.start.row=r+o,e.start.column=s,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,s=n.length;r<s;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:s-1,column:e+n[s-1].length+i}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,s=Math.min(e.row,n.length),o=t||0;o<s;++o)r+=n[o].length+i;return r+e.column}}).call(i.prototype),t.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";function i(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var a=this;this.$worker=function(){if(a.running){for(var e=new Date,t=a.currentLine,n=-1,i=a.doc,r=t;a.lines[t];)t++;var s=i.getLength(),o=0;for(a.running=!1;t<s;){for(a.$tokenizeRow(t),n=t;t++,a.lines[t];);if(++o%5==0&&20<new Date-e){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,r<=(n=-1==n?t:n)&&a.fireUpdateEvent(r,n)}}}var r=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter;(function(){r.implement(this,s),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){this._signal("update",{data:{first:e,last:t}})},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;0==n?this.lines[t]=null:"remove"==e.action?(this.lines.splice(t,1+n,null),this.states.splice(t,1+n,null)):((e=Array(1+n)).unshift(t,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)),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],t=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=t.state+""?(this.states[e]=t.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.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";function i(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"}var c=e("./lib/lang"),h=(e("./lib/oop"),e("./range").Range);(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 r=i.firstRow,s=i.lastRow,o=r;o<=s;o++){var a=this.cache[o];null==a&&(a=(a=(a=c.getMatchOffsets(n.getLine(o),this.regExp)).length>this.MAX_RANGES?a.slice(0,this.MAX_RANGES):a).map(function(e){return new h(o,e.offset,o,e.offset+e.length)}),this.cache[o]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].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 r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},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)}),0<this.range.compareEnd(e.start.row,e.start.column)?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,s=0,o=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<o.length;l++){if(-1==(r=(i=o[l]).range.compareStart(t,n)))return void e(null,t,n,s,a);if(!e(null,i.start.row,i.start.column,s,a)&&e(i.placeholder,i.start.row,i.start.column,s)||0===r)return;a=!i.sameRow,s=i.end.column}e(null,t,n,s,a)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(-1==(i=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r=this.getNextFoldTo(e,t);if(r)if(i=r.fold,"inside"==r.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s,o=(s=this.folds).indexOf(i);for(0===o&&(this.start.column+=n);o<s.length;o++){if((i=s[o]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n,i,e=this.getNextFoldTo(e,t);return e&&"inside"!=e.kind?(t=e.fold,e=this.folds,n=this.foldData,t=e.indexOf(t),i=e[t-1],this.end.row=i.end.row,this.end.column=i.end.column,i=new r(n,e=e.splice(t,e.length-t)),n.splice(n.indexOf(this)+1,0,i),i):null},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach(function(e){t.push(" "+e.toString())}),t.push("]"),t.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(){this.ranges=[],this.$bias=1}var a=e("./range").Range.comparePoints;(function(){this.comparePoints=a,this.pointIndex=function(e,t,n){for(var i=this.ranges,r=n||0;r<i.length;r++){var s=i[r],o=a(e,s.end);if(!(0<o))return s=a(e,s.start),0===o?t&&0!==s?-r-2:r:0<s||0===s&&!t?r:-r-1}return-r-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t),t=this.pointIndex(e.end,t,n=n<0?-n-1:n);return t<0?t=-t-1:t++,this.ranges.splice(n,t-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){e=this.pointIndex(e);if(0<=e)return this.ranges.splice(e,1)},this.merge=function(){for(var e=[],t=this.ranges,n=(t=t.sort(function(e,t){return a(e.start,t.start)}))[0],i=1;i<t.length;i++){var r=n,n=t[i],s=a(r.end,n.start);s<0||(0!=s||r.isEmpty()||n.isEmpty())&&(a(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(i,1),e.push(n),n=r,i--)}return this.ranges=t,e},this.contains=function(e,t){return 0<=this.pointIndex({row:e,column:t})},this.containsPoint=function(e){return 0<=this.pointIndex(e)},this.rangeAtPoint=function(e){e=this.pointIndex(e);if(0<=e)return this.ranges[e]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];for(var e=this.pointIndex({row:e,column:0}),i=this.pointIndex({row:t,column:0},e=e<0?-e-1:e),r=(i<0&&(i=-i-1),[]),s=e;s<i;s++)r.push(n[s]);return r},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){for(var t=e.start,n=e.end,i=t.row,r=n.row,s=this.ranges,o=0,a=s.length;o<a&&!((h=s[o]).end.row>=i);o++);if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;o<a;o++){if((h=s[o]).start.row>i)break;h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column&&(h.end.column==t.column&&this.$bias<0||(h.end.column==t.column&&0<c&&o<a-1&&h.end.column>h.start.column&&h.end.column==s[o+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l))}else for(var h,l=i-r,c=t.column-n.column;o<a;o++){if((h=s[o]).start.row>r)break;h.end.row<r&&(i<h.end.row||i==h.end.row&&t.column<h.end.column)?(h.end.row=i,h.end.column=t.column):h.end.row==r?h.end.column<=n.column?(l||h.end.column>t.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>r&&(h.end.row+=l),h.start.row<r&&(i<h.start.row||i==h.start.row&&t.column<h.start.column)?(h.start.row=i,h.start.column=t.column):h.start.row==r?h.start.column<=n.column?(l||h.start.column>t.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>r&&(h.start.row+=l)}if(0!=l&&o<a)for(;o<a;o++)(h=s[o]).start.row+=l,h.end.row+=l}}).call(i.prototype),t.RangeList=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function u(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function i(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}var r=e("../range_list").RangeList,e=e("../lib/oop"),s=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=[]};e.inherits(s,r),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach(function(e){e.setFoldLine(t)})},this.clone=function(){var e=this.range.clone(),t=new s(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)){s=e,o=this.start,u(s.start,o),u(s.end,o);for(var t=e.start.row,n=e.start.column,i=0,r=-1;i<this.subFolds.length&&1==(r=this.subFolds[i].range.compare(t,n));i++);var s=this.subFolds[i],o=0;if(0==r){if(s.range.containsRange(e))return s.addSubFold(e);o=1}for(var t=e.range.end.row,n=e.range.end.column,a=i,r=-1;a<this.subFolds.length&&1==(r=this.subFolds[a].range.compare(t,n));a++);0==r&&a++;for(var l=this.subFolds.splice(i,a-i,e),c=0==r?l.length-1:l.length,h=o;h<c;h++)e.addSubFold(l[h]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return e=e,t=this.start,i(e.start,t),void i(e.end,t);var t}}.call(s.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";var c=e("../range").Range,d=e("./fold_line").FoldLine,p=e("./fold").Fold,h=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,s=0;s<r.length;s++){var o=r[s].range;if(o.contains(e,t)&&(1!=n||!o.isEnd(e,t)||o.isEmpty())&&(-1!=n||!o.isStart(e,t)||o.isEmpty()))return r[s]}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,--n.column;for(var s=0;s<i.length;s++){var o=i[s].range.compareRange(e);if(2!=o){if(-2==o)break;for(var a=i[s].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(o=c.range.compareRange(e)))break;if(2!=o){if(42==o)break;r.push(c)}}}}return--t.column,n.column+=1,r},this.getFoldsInRangeList=function(e){var t;return Array.isArray(e)?(t=[],e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)):t=this.getFoldsInRange(e),t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,s={end:{column:0}},o=0;o<i.folds.length;o++){var a,l=(a=i.folds[o]).range.compareEnd(e,t);if(-1==l){r=this.getLine(a.start.row).substring(s.end.column,a.start.column);break}if(0===l)return null;s=a}return r=r||this.getLine(a.start.row).substring(s.end.column),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var s=n[r],o=s.end.row,s=s.start.row;if(t<=o){s<t&&(e<=s?i-=t-s:i=0);break}e<=o&&(i-=e<=s?o-s:o-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,i=this.$foldData,r=!1,s=(e instanceof p?n=e:(n=new p(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range),n.start.row),e=n.start.column,o=n.end.row,t=n.end.column,a=this.getFoldAt(s,e,1),l=this.getFoldAt(o,t,-1);if(a&&l==a)return a.addSubFold(n);a&&!a.range.isStart(s,e)&&this.removeFold(a),l&&!l.range.isEnd(o,t)&&this.removeFold(l);e=this.getFoldsInRange(n.range);0<e.length&&(this.removeFolds(e),n.collapseChildren||e.forEach(function(e){n.addSubFold(e)}));for(var c=0;c<i.length;c++){var h=i[c];if(o==h.start.row){h.addFold(n),r=!0;break}if(s==h.end.row){if(h.addFold(n),r=!0,!n.sameRow){var u=i[c+1];if(u&&u.start.row==o){h.merge(u);break}}break}if(o<=h.start.row)break}return r||(h=this.$addFoldLine(new d(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(h.start.row,h.start.row):this.$updateRowLengthCache(h.start.row,h.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,s=t.folds;1==s.length?r.splice(r.indexOf(t),1):t.range.isEnd(e.end.row,e.end.column)?(s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column):t.range.isStart(e.start.row,e.start.column)?(s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column):e.sameRow?s.splice(s.indexOf(e),1):((s=(r=t.split(e.start.row,e.start.column)).folds).shift(),r.start.row=s[0].start.row,r.start.column=s[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach(function(e){t.restoreRange(e),this.addFold(e)},this),0<t.collapseChildren&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n;if(null==e?(n=new c(0,0,this.getLength(),0),null==t&&(t=!0)):n="number"==typeof e?new c(e,0,e,this.getLine(e).length):"row"in e?c.fromPoints(e,e):e,e=this.getFoldsInRangeList(n),0!=t?this.removeFolds(e):this.expandFolds(e),e.length)return e},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){t=this.getFoldLine(e,t);return t?t.end.row:e},this.getRowFoldStart=function(e,t){t=this.getFoldLine(e,t);return t?t.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,s){null==r&&(r=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,i){if(!(t<r)){if(t==r){if(n<s)return;i=Math.max(s,i)}a+=null!=e?e:o.getLine(t).substring(i,n)}},t,n),a},this.getDisplayLine=function(e,t,n,i){var r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,n,i):(r=this.doc.getLine(e)).substring(i||0,t||r.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(e){e=e.folds.map(function(e){return e.clone()});return new d(t,e)})},this.toggleFold=function(e){var t=this.selection.getRange();if(t.isEmpty()){var n,i=t.start;if(n=this.getFoldAt(i.row,i.column))return void this.expandFold(n);(r=this.findMatchingBracket(i))?1==t.comparePoint(r)?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==t.comparePoint(r)?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var r=this.getFoldsInRange(t);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(n=r[0])}if((n=n||this.getFoldAt(t.start.row,t.start.column))&&n.range.toString()==t.toString())this.expandFold(n);else{i="...";if(!t.isMultiLine()){if((i=this.getTextRange(t)).length<4)return;i=i.trim().substring(0,2)+".."}this.addFold(i,t)}},this.getCommentFoldRange=function(e,t,n){var i=new h(this,e,t),r=i.getCurrentToken(),s=r&&r.type;if(r&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start");var o=new RegExp(s),s=new c;if(1!=n){for(;(r=i.stepBackward())&&o.test(r.type););i.stepForward()}if(s.start.row=i.getCurrentTokenRow(),s.start.column=i.getCurrentTokenColumn()+2,i=new h(this,e,t),-1!=n){var a=-1;do{if(r=i.stepForward(),-1==a){var l=this.getState(i.$row);o.test(l)||(a=i.$row)}else if(i.$row>a)break}while(r&&o.test(r.type));r=i.stepBackward()}else r=i.getCurrentToken();return s.end.row=i.getCurrentTokenRow(),s.end.column=i.getCurrentTokenColumn()+r.value.length-2,s}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var s,o=e=e||0;o<t;o++)null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"!=r[o]||i&&!i(o)||(s=this.getFoldWidgetRange(o))&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}},this.foldToLevel=function(e){for(this.foldAll();0<e--;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(e){for(var t=r.getTokens(e),n=0;n<t.length;n++){var i=t[n];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}})},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(", ")+"]");this.$foldStyle!=e&&("manual"==(this.$foldStyle=e)&&this.unfold(),e=this.$foldMode,this.$setFolding(null),this.$setFolding(e))},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i=e-1;0<=i;){var r=n[i];if("start"==(r=null==r?n[i]=this.getFoldWidget(i):r)){var s=this.getFoldWidgetRange(i),o=o||s;if(s&&s.end.row>=e)break}i--}return{range:-1!==i&&s,firstRange:o}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,n)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var n,i,r,s;if(this.getFoldWidget)return n=this.getFoldWidget(e),i=this.getLine(e),(i=this.getFoldAt(e,-1==(n="end"===n?-1:1)?0:i.length,n))?(t.children||t.all?this.removeFold(i):this.expandFold(i),i):(n=this.getFoldWidgetRange(e,!0))&&!n.isMultiLine()&&(i=this.getFoldAt(n.start.row,n.start.column,1))&&n.isEqual(i.range)?(this.removeFold(i),i):(t.siblings?((i=this.getParentFoldRangeData(e)).range&&(r=i.range.start.row+1,s=i.range.end.row),this.foldAll(r,s,t.all?1e4:0)):t.children?(s=n?n.end.row:this.getLength(),this.foldAll(e+1,s,t.all?1e4:0)):n&&(t.all&&(n.collapseChildren=1e4),this.addFold("...",n)),n)},this.toggleFoldWidget=function(e){var t,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),!this.$toggleFoldWidget(n,{})&&(t=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=t.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+n,null):((e=Array(1+n)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var u=e("../token_iterator").TokenIterator,a=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,n,i=this.getLine(e.row),r=!0,s=i.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=i.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),r=!1),!o)return null;if(o[1]){if(!(n=this.$findClosingBracket(o[1],e)))return null;t=a.fromPoints(e,n),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(n=this.$findOpeningBracket(o[2],e)))return null;t=a.fromPoints(n,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);return i||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),i?(t=new a(e.row,e.column-1,e.row,e.column),(n=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e))?[t,new a(n.row,n.column,n.row,n.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],r=1,s=new u(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){n=n||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn()-2,l=o.value;;){for(;0<=a;){var c=l.charAt(a);if(c==i){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else c==e&&(r+=1);--a}for(;(o=s.stepBackward())&&!n.test(o.type););if(null==o)break;a=(l=o.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],r=1,s=new u(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){n=n||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn();;){for(var l=o.value,c=l.length;a<c;){var h=l.charAt(a);if(h==i){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else h==e&&(r+=1);a+=1}for(;(o=s.stepForward())&&!n.test(o.type););if(null==o)break;a=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","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";function i(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++i.$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 d(e)),this.setDocument(e),this.selection=new a(this),this.$bidiHandler=new o(this),l.resetOptions(this),this.setMode(t),l._signal("session",this)}var r=e("./lib/oop"),s=e("./lib/lang"),o=e("./bidihandler").BidiHandler,l=e("./config"),c=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,h=e("./mode/text").Mode,u=e("./range").Range,d=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight;i.$uid=0,function(){function a(e){return!(e<4352)&&(4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12288<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510)}r.implement(this,c),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),(this.doc=e).on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){var t;e?(t=this.$docRowCache.length,(e=this.$getRowCacheIndex(this.$docRowCache,e)+1)<t&&(this.$docRowCache.splice(e,t),this.$screenRowCache.splice(e,t))):(this.$docRowCache=[],this.$screenRowCache=[])},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,s=e[r];if(s<t)n=1+r;else{if(!(t<s))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){e=e.data;this.$resetRowCache(e.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,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.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=this.bgTokenizer.getTokens(e),i=0;if(null==t)var r=n.length-1,i=this.getLine(e).length;else for(r=0;r<n.length&&!(t<=(i+=n[r].value.length));r++);return(e=n[r])?(e.index=r,e.start=i-e.value.length,e):null},this.setUndoManager=function(e){var t;this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e?(e.addSession(t=this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){(t=void 0===t?"ace_breakpoint":t)?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,e={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=e,this._signal("changeFrontMarker")):(this.$backMarkers[r]=e,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){var n;if(e.update)return n=this.$markerId++,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];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){var t;this.$searchHighlight||(t=new f(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(t)),this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n=n||"ace_step";e=new u(e,0,t,1/0);return e.id=this.addMarker(e,n,"fullLine",i),e},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){e=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},this.getWordRange=function(e,t){var n,i=this.getLine(e),r=!1,s=(n=(r=(r=0<t?!!i.charAt(t-1).match(this.tokenRe):r)||!!i.charAt(t).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(i.slice(t-1,t+1))?/\s/:this.nonTokenRe,t);if(0<s){for(;0<=--s&&i.charAt(s).match(n););s++}for(var o=t;o<i.length&&i.charAt(o).match(n);)o++;return new u(e,s,e,o)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=l.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[i]&&!n?(this.$onChangeMode(this.$modes[i]),t&&t()):(this.$modeId=i,l.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||((this.$modes[i]=e).$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},this.$onChangeMode=function(e,t){var n,i,r,s;t||(this.$modeId=e.$id),this.$mode===e||(n=this.$mode,this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(i=e.getTokenizer()).on&&(r=this.onReloadTokenizer.bind(this),i.on("update",r)),this.bgTokenizer?this.bgTokenizer.setTokenizer(i):(this.bgTokenizer=new p(i),(s=this).bgTokenizer.on("update",function(e){s._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",{oldMode:n,mode:e}))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){l.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(){var t;return null!=this.lineWidgetsWidth?this.lineWidgetsWidth:(t=0,this.lineWidgets.forEach(function(e){e&&e.screenWidth>t&&(t=e.screenWidth)}),this.lineWidgetWidth=t)},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=t.length,l=0;l<a;l++){if(o<l){if(a<=(l=s.end.row+1))break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,r,s=0;s<e.length;s++){var o=e[s];o.start&&(i?n(o)?(r=o.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=o.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=o.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(o.start,o.start))):i=n(o)?u.fromPoints(o.start,o.end):u.fromPoints(o.start,o.start))}return i},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i,r,s,o=this.getTextRange(e),a=this.getFoldsInRange(e),t=u.fromPoints(t,t);return n||(this.remove(e),r=e.start.row-e.end.row,(s=r?-e.end.column:e.start.column-e.end.column)&&(t.start.row==e.end.row&&t.start.column>e.end.column&&(t.start.column+=s),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=s),r&&t.start.row>=e.end.row&&(t.start.row+=r,t.end.row+=r)),t.end=this.insert(t.start,o),a.length&&(i=e.start,n=t.start,r=n.row-i.row,s=n.column-i.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==i.row&&(e.start.column+=s),e.end.row==i.row&&(e.end.column+=s),e.start.row+=r,e.end.row+=r,e}))),t},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var s=this.getLine(r);n.start.row=r,n.end.row=r;for(var o=0;o<i&&" "==s.charAt(o);++o);o<i&&"\t"==s.charAt(o)?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(0<n){if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new u(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),n=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,n),r.length&&this.addFolds(r),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){var n;return t=Math.max(0,t),t=e<0?e=0:(n=this.doc.getLength())<=e?this.doc.getLine(e=n-1).length:Math.min(this.doc.getLine(e).length,t),{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){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-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.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange,t=(n.max<0&&(n={min:t,max:t}),this.$constrainWrapLimit(e,n.min,n.max));return t!=this.$wrapLimit&&1<t&&(this.$wrapLimit=t,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)),e=n?Math.min(n,e):e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,s=i.row,o=r.row,a=o-s,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(s,a);var c=this.$foldData,l=this.getFoldsInRange(e);this.removeFolds(l);var h=0;for((p=this.getFoldLine(r.row))&&(p.addRemoveChars(r.row,r.column,i.column-r.column),p.shiftRow(-a),(u=this.getFoldLine(s))&&u!==p&&(u.merge(p),p=u),h=c.indexOf(p)+1);h<c.length;h++)(p=c[h]).start.row>=r.row&&p.shiftRow(-a);o=s}else{var u=Array(a),d=(u.unshift(s,0),t?this.$wrapData:this.$rowLengthCache),c=(d.splice.apply(d,u),this.$foldData),h=0;for((p=this.getFoldLine(s))&&(0==(d=p.range.compareInside(i.row,i.column))?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(o,0,r.column-i.column)):-1==d&&(p.addRemoveChars(s,0,r.column-i.column),p.shiftRow(a)),h=c.indexOf(p)+1);h<c.length;h++)(p=c[h]).start.row>=s&&p.shiftRow(a)}else{var p,a=Math.abs(e.start.column-e.end.column);"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(s))&&p.addRemoveChars(s,i.column,a)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var o,n,a=this.doc.getAllLines(),i=this.getTabSize(),r=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(n=this.getFoldLine(l,n))?(o=[],n.walk(function(e,t,n,i){var r;if(null!=e){(r=this.$getDisplayTokens(e,o.length))[0]=m;for(var s=1;s<r.length;s++)r[s]=g}else r=this.$getDisplayTokens(a[t].substring(i,n),o.length);o=o.concat(r)}.bind(this),n.end.row,a[n.end.row].length+1),r[n.start.row]=this.$computeWrapSplits(o,s,i),l=n.end.row+1):(o=this.$getDisplayTokens(a[l]),r[l]=this.$computeWrapSplits(o,s,i),l++)};var m=3,g=4;this.$computeWrapSplits=function(r,e,s){function t(e){for(var t=e-a,n=a;n<e;n++){var i=r[n];12!==i&&2!==i||--t}o.length||(d=function(){var e=0;if(0===u)return e;if(h)for(var t=0;t<r.length;t++){var n=r[t];if(10==n)e+=1;else{if(11!=n){if(12==n)continue;break}e+=s}}return c&&!1!==h&&(e+=s),Math.min(e,u)}(),o.indent=d),l+=t,o.push(l),a=e}if(0==r.length)return[];for(var o=[],n=r.length,a=0,l=0,c=this.$wrapAsCode,h=this.$indentedSoftWrap,u=e<=Math.max(2*s,8)||!1===h?0:Math.floor(e/2),d=0;e-d<n-a;){var i=a+e-d;if(10<=r[i-1]&&10<=r[i])t(i);else if(r[i]==m||r[i]==g){for(;i!=a-1&&r[i]!=m;i--);if(a<i);else{for(i=a+e;i<r.length&&r[i]==g;i++);if(i==r.length)break}t(i)}else{for(var p=Math.max(i-(e-(e>>2)),a-1);p<i&&r[i]<m;)i--;if(c){for(;p<i&&r[i]<m;)i--;for(;p<i&&9==r[i];)i--}else for(;p<i&&r[i]<10;)i--;p<i?t(++i):(2==r[i=a+e]&&i--,t(i-d))}}return o},this.$getDisplayTokens=function(e,t){var n,i=[];t=t||0;for(var r=0;r<e.length;r++){var s=e.charCodeAt(r);if(9==s){n=this.getScreenTabSize(i.length+t),i.push(11);for(var o=1;o<n;o++)i.push(12)}else 32==s?i.push(10):39<s&&s<48||57<s&&s<64?i.push(9):4352<=s&&a(s)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,r;for(null==t&&(t=1/0),n=n||0,r=0;r<e.length&&(9==(i=e.charCodeAt(r))?n+=this.getScreenTabSize(n):4352<=i&&a(i)?n+=2:n+=1,!(t<n));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){var t;return this.$useWrapMode&&(e=this.screenToDocumentPosition(e,Number.MAX_VALUE),(t=this.$wrapData[e.row]).length)&&t[0]<e.column?t.indent:0},this.getScreenLastRowColumn=function(e){e=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(e,t){e=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(e)},this.getDocumentLastRowColumnPosition=function(e,t){e=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(e,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|0)},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,n){if(e<0)return{row:0,column:0};for(var i,r,s,o=0,a=0,l=0,c=0,h=this.$screenRowCache,u=this.$getRowCacheIndex(h,e),d=h.length,p=(s=d&&0<=u?(l=h[u],o=this.$docRowCache[u],e>h[d-1]):!d,this.getLength()-1),m=this.getNextFoldLine(o),g=m?m.start.row:1/0;l<=e&&!(e<l+(c=this.getRowLength(o))||p<=o);)l+=c,g<++o&&(o=m.end.row+1,g=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),s&&(this.$docRowCache.push(o),this.$screenRowCache.push(l));if(m&&m.start.row<=o)i=this.getFoldDisplayLine(m),o=m.start.row;else{if(l+c<=e||p<o)return{row:p,column:this.getLine(p).length};i=this.getLine(o),m=null}u=0,h=Math.floor(e-l);return this.$useWrapMode&&(d=this.$wrapData[o])&&(r=d[h],0<h)&&d.length&&(u=d.indent,a=d[h-1]||d[d.length-1],i=i.substring(a)),void 0!==n&&this.$bidiHandler.isBidiRow(l+h,o,h)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(i,t-u)[1],this.$useWrapMode&&r<=a&&(a=r-1),m?m.idxToPosition(a):{row:o,column:a}},this.documentToScreenPosition=function(e,t){var n=void 0===t?this.$clipPositionToDocument(e.row,e.column):this.$clipPositionToDocument(e,t),i=(e=n.row,t=n.column,0),n=null;(a=this.getFoldAt(e,t,1))&&(e=a.start.row,t=a.start.column);for(var r,s,o=0,a=this.$docRowCache,l=this.$getRowCacheIndex(a,e),c=a.length,h=(s=c&&0<=l?(o=a[l],i=this.$screenRowCache[l],e>a[c-1]):!c,this.getNextFoldLine(o)),u=h?h.start.row:1/0;o<e;){if(u<=o){if(e<(r=h.end.row+1))break;u=(h=this.getNextFoldLine(r,h))?h.start.row:1/0}else r=o+1;i+=this.getRowLength(o),o=r,s&&(this.$docRowCache.push(o),this.$screenRowCache.push(i))}var d="",n=h&&u<=o?(d=this.getFoldDisplayLine(h,e,t),h.start.row):(d=this.getLine(e).substring(0,t),e),l=0;if(this.$useWrapMode){var p=this.$wrapData[n];if(p){for(var m=0;d.length>=p[m];)i++,m++;d=d.substring(p[m-1]||0,d.length),l=0<m?p.indent:0}}return this.lineWidgets&&this.lineWidgets[o]&&this.lineWidgets[o].rowsAbove&&(i+=this.lineWidgets[o].rowsAbove),{row:i,column:l+this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,s=(t=this.$foldData[r++])?t.start.row:1/0;i<n;){var o=this.$wrapData[i];e+=o?o.length+1:1,s<++i&&(i=t.end.row+1,s=(t=this.$foldData[r++])?t.start.row:1/0)}else for(var e=this.getLength(),a=this.$foldData,r=0;r<a.length;r++)e-=(t=a[r]).end.row-t.start.row;return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(s){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,t,n){if(0===t)return[0,0];var i,r;for(t=t||1/0,n=n||0,r=0;r<e.length&&!(t<(n+="\t"===(i=e.charAt(r))?this.getScreenTabSize(n):s.getCharacterWidth(i)));r++);return[n,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=a}.call(i.prototype),e("./edit_session/folding").Folding.call(i.prototype),e("./edit_session/bracket_match").BracketMatch.call(i.prototype),l.defineOptions(i.prototype,"session",{wrap:{set:function(e){e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e&&((this.$wrap=e)?(this.setWrapLimitRange(e="number"==typeof e?e:null,e),this.setUseWrapMode(!0)):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.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},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){0<(e=parseInt(e))&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},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},handlesSet:!0}}),t.EditSession=i}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function i(){this.$options={}}var v=e("./lib/lang"),r=e("./lib/oop"),y=e("./range").Range;(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return v.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var r,s=this.$options,e=this.$matchIterator(e,s);return!!e&&(r=null,e.forEach(function(e,t,n,i){return r=new y(e,t,n,i),!(t==i&&s.start&&s.start.start&&0!=s.skipCurrent&&r.isEqual(s.start)&&(r=null,1))}),r)},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),r=[],s=t.re;if(t.$isMultiLine){var o,a=s.length,l=i.length-a;e:for(var c=s.offset||0;c<=l;c++){for(var h=0;h<a;h++)if(-1==i[c+h].search(s[h]))continue e;var u=i[c],d=i[c+a-1],u=u.length-u.match(s[0])[0].length,d=d.match(s[a-1])[0].length;o&&o.end.row===c&&o.end.column>u||(r.push(o=new y(c,u,c+a-1,d)),2<a&&(c=c+a-2))}}else for(var p=0;p<i.length;p++)for(var m=v.getMatchOffsets(i[p],s),h=0;h<m.length;h++){var g=m[h];r.push(new y(p,g.offset,p,g.offset+g.length))}if(n){for(var f=n.start.column,w=n.start.column,p=0,h=r.length-1;p<h&&r[p].start.column<f&&r[p].start.row==n.start.row;)p++;for(;p<h&&r[h].end.column>w&&r[h].end.row==n.end.row;)h--;for(r=r.slice(p,h+1),p=0,h=r.length;p<h;p++)r[p].start.row+=n.start.row,r[p].end.row+=n.start.row}return r},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n,i=e.needle;if(!e.needle)return e.re=!1;function r(e){return/\w/.test(e)||n.regExp?"\\b":""}e.regExp||(i=v.escapeRegExp(i)),e.wholeWord&&(n=e,i=r((s=i)[0])+s+r(s[s.length-1]));var s=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,s);try{var o=new RegExp(i,s)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},this.$matchIterator=function(h,n){var a,e,t,i,r,s,l,o,u=this.$assembleRegExp(n);return!!u&&(a=1==n.backwards,e=0!=n.skipCurrent,t=n.range,(i=(i=n.start)||(t?t[a?"end":"start"]:h.selection.getRange())).start&&(i=i[e!=a?"end":"start"]),r=t?t.start.row:0,s=t?t.end.row:h.getLength()-1,o=n.$isMultiLine?(l=u.length,function(e,t,n){var i=a?e-l+1:e;if(!(i<0)){var r=h.getLine(i),e=r.search(u[0]);if(!(!a&&e<t||-1===e)){for(var s=1;s<l;s++)if(-1==(r=h.getLine(i+s)).search(u[s]))return;var o=r.match(u[l-1])[0].length;if(!(a&&t<o))return!!n(i,e,i+l-1,o)||void 0}}}):a?function(e,t,n){var i,r=h.getLine(e),s=[];for(u.lastIndex=0;i=u.exec(r);){var o=i[0].length,a=i.index;if(!o){if(a>=r.length)break;u.lastIndex=a+=1}if(i.index+o>t)break;s.push(i.index,o)}for(var l=s.length-1;0<=l;l-=2){var c=s[l-1];if(n(e,c,e,c+(o=s[l])))return!0}}:function(e,t,n){var i=h.getLine(e);for(u.lastIndex=t;r=u.exec(i);){var r,s=r[0].length;if(n(e,r=r.index,e,r+s))return!0;if(!s&&(u.lastIndex=r+=1,r>=i.length))return!1}},{forEach:a?function(e){var t=i.row;if(!o(t,i.column,e)){for(t--;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return;if(0!=n.wrap)for(t=s,r=i.row;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return}}:function(e){var t=i.row;if(!o(t,i.column,e)){for(t+=1;t<=s;t++)if(o(t,0,e))return;if(0!=n.wrap)for(t=r,s=i.row;t<=s;t++)if(o(t,0,e))return}}})}}).call(i.prototype),t.Search=i}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){i.call(this,e,t),this.$singleCommand=!1}var a=e("../lib/keys"),s=e("../lib/useragent"),l=a.KEY_MODS;r.prototype=i.prototype,function(){function o(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n,i=e&&("string"==typeof e?e:e.name),r=(e=this.commands[i],t||delete this.commands[i],this.commandKeyBinding);for(n in r){var s,o=r[n];o==e?delete r[n]:Array.isArray(o)&&-1!=(s=o.indexOf(e))&&(o.splice(s,1),1==o.length)&&(r[n]=o[0])}},this.bindKey=function(e,i,r){if("object"==typeof e&&e&&(null==r&&(r=e.position),e=e[this.platform]),e)return"function"==typeof i?this.addCommand({exec:i,bindKey:e,name:i.name||e}):void e.split("|").forEach(function(e){var t="",n=(-1!=e.indexOf(" ")&&(e=(n=e.split(/\s+/)).pop(),n.forEach(function(e){e=this.parseKeys(e),e=l[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=l[n.hashId]+n.key;this._addCommandToBinding(t+e,i,r)},this)},this._addCommandToBinding=function(e,t,n){var i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(s=i[e].indexOf(t))&&i[e].splice(s,1):i[e]=[i[e]],"number"!=typeof n&&(n=o(t));for(var r=i[e],s=0;s<r.length;s++)if(n<o(r[s]))break;r.splice(s,0,t)}else delete i[e]},this.addCommands=function(n){n&&Object.keys(n).forEach(function(e){var t=n[e];if(t){if("string"==typeof t)return this.bindKey(t,e);"object"==typeof(t="function"==typeof t?{exec:t}:t)&&(t.name||(t.name=e),this.addCommand(t))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},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(),i=a[n];if(a.FUNCTION_KEYS[i])n=a.FUNCTION_KEYS[i].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,s=t.length;s--;){var o=a.KEY_MODS[t[s]];if(null==o)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=o}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){e=l[e]+t;return this.commandKeyBinding[e]},this.handleKeyboard=function(e,t,n,i){var r,s;if(!(i<0))return r=l[t]+n,s=this.commandKeyBinding[r],e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||0<i)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(i.prototype),t.HashHandler=i,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";function i(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})}var r=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter;r.inherits(i,s),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}var r;return!!(e="string"==typeof e?this.commands[e]:e)&&!(t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t)||((r={editor:t,command:e,args:n}).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.off("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(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[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=e[1]?e:e[0]})}}.call(i.prototype),t.CommandManager=i}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function i(e,t){return{win:e,mac:t}}var l=e("../lib/lang"),r=e("../config"),c=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:i("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:i("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:i("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:i("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:i("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:i("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:i("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:i("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:i("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",description:"Go to start",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:i("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:i("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:i("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",description:"Go to end",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:i("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:i("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:i("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:i("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:i("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:i("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",description:"Go to line end",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:i("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:i(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:i("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:i("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:i("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:i("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:i(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:i("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:i("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:i("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:i("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(l.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:i("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:i(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:i("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",description:"Join lines",bindKey:i(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),t=e.session.doc.getLine(n.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,s=e.session.doc.getLine(n.row),o=n.row+1;o<=i.row+1;o++){var a=l.stringTrimLeft(l.stringTrimRight(e.session.doc.getLine(o)));s+=a=0!==a.length?" "+a:a}i.row+1<e.session.doc.getLength()-1&&(s+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new c(n.row,0,i.row+2,0),s),0<r?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+r)):(t=e.session.doc.getLine(n.row).length>t?t+1:t,e.selection.moveCursorTo(n.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s!=i.length-1||i[s].end.row===t&&i[s].end.column===n||r.push(new c(i[s].end.row,i[s].end.column,t,n)),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new c(0,0,i[s].start.row,i[s].start.column)):r.push(new c(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:i("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:i(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var s=1;s<9;s++)t.commands.push({name:"foldToLevel"+s,description:"Fold To Level "+s,level:s,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),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","ace/clipboard"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");function r(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++r.$uid,this.commands=new m(o.isMac?"mac":"win",w),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new h(this),this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=g.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||n&&n.session||new u("")),v.resetOptions(this),n&&this.setOptions(n),v._signal("editor",this)}var s=e("./lib/oop"),i=e("./lib/dom"),g=e("./lib/lang"),o=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,u=e("./edit_session").EditSession,d=e("./search").Search,f=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,w=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,b=e("./clipboard"),x=(r.$uid=0,function(){s.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=g.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),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=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if((1!=e||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var e=this.curOp.command,t=e&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),i=this.renderer.layerConfig;(n.start.row>=i.lastRow||n.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){var t,n,i,r;this.$mergeUndoDeltas&&(t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(r=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0):i=i&&-1!==n.indexOf(e.command.name),(i="always"!=this.$mergeUndoDeltas&&2e3<Date.now()-this.sequenceStartTime?!1:i)?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now()))},this.setKeyboardHandler=function(t,n){var i;t&&"string"==typeof t&&"ace"!=t?(this.$keybindingId=t,i=this,v.loadModule(["keybinding",t],function(e){i.$keybindingId==t&&i.keyBinding.setKeyboardHandler(e&&e.handler),n&&n()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),n&&n())},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){var t,n;this.session!=e&&(this.curOp&&this.endOperation(),this.curOp={},(t=this.session)&&(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),(n=this.session.getSelection()).off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)),(this.session=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.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e)&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){var i;this.$highlightPending||((i=this).$highlightPending=!0,setTimeout(function(){i.$highlightPending=!1;var e,t,n=i.session;n&&n.bgTokenizer&&(n.$bracketHighlight&&(n.$bracketHighlight.markerIds.forEach(function(e){n.removeMarker(e)}),n.$bracketHighlight=null),e=!(e=n.getMatchingBracketRanges(i.getCursorPosition()))&&n.$mode.getMatching?n.$mode.getMatching(i.session):e)&&(t="ace_bracket",Array.isArray(e)?1==e.length&&(t="ace_error_bracket"):e=[e],2==e.length&&(0==f.comparePoints(e[0].end,e[1].start)?e=[f.fromPoints(e[0].start,e[1].end)]:0==f.comparePoints(e[0].start,e[1].end)&&(e=[f.fromPoints(e[1].start,e[0].end)])),n.$bracketHighlight={ranges:e,markerIds:e.map(function(e){return n.addMarker(e,t,"text")})})},50))},this.$highlightTags=function(){var d;this.$highlightTagPending||((d=this).$highlightTagPending=!0,setTimeout(function(){d.$highlightTagPending=!1;var e=d.session;if(e&&e.bgTokenizer){var t=d.getCursorPosition(),n=new y(d.session,t.row,t.column),i=n.getCurrentToken();if(i&&/\b(?:tag-open|tag-name)/.test(i.type)){if(-1===i.type.indexOf("tag-open")||(i=n.stepForward())){var r,s=i.value,o=i.value,a=0,l=n.stepBackward();if("<"===l.value)for(;l=i,(i=n.stepForward())&&(-1!==i.type.indexOf("tag-name")?s===(o=i.value)&&("<"===l.value?a++:"</"===l.value&&a--):s===o&&"/>"===i.value&&a--),i&&0<=a;);else{do{if(i=l,l=n.stepBackward(),i)if(-1!==i.type.indexOf("tag-name"))s===i.value&&("<"===l.value?a++:"</"===l.value&&a--);else if("/>"===i.value){for(var c=0,h=l;h;){if(-1!==h.type.indexOf("tag-name")&&h.value===s){a--;break}if("<"===h.value)break;h=n.stepBackward(),c++}for(var u=0;u<c;u++)n.stepForward()}}while(l&&a<=0);n.stepForward()}i?(t=n.getCurrentTokenRow(),r=n.getCurrentTokenColumn(),t=new f(t,r,t,r+i.value.length),r=e.$backMarkers[e.$tagHighlight],e.$tagHighlight&&null!=r&&0!==t.compareRange(r.range)&&(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null),e.$tagHighlight||(e.$tagHighlight=e.addMarker(t,"ace_bracket","text"))):(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null)}}else e.removeMarker(e.$tagHighlight),e.$tagHighlight=null}},50))},this.focus=function(){var e=this;setTimeout(function(){e.isFocused()||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.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},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.onTokenizerUpdate=function(e){e=e.data;this.renderer.updateLines(e.first,e.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._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t,n=this.getSession();this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||1<this.renderer.$minLines||(e=!1)),n.$highlightLineMarker&&!e?(n.removeMarker(n.$highlightLineMarker.id),n.$highlightLineMarker=null):!n.$highlightLineMarker&&e?((t=new f(e.row,e.column,e.row,1/0)).id=n.addMarker(t,"ace_active-line","screenLine"),n.$highlightLineMarker=t):e&&(n.$highlightLineMarker.start.row=e.row,n.$highlightLineMarker.end.row=e.row,n.$highlightLineMarker.start.column=e.column,n._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t,n,i=this.session,i=(i.$selectionMarker&&i.removeMarker(i.$selectionMarker),i.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),n=this.getSelectionStyle(),i.$selectionMarker=i.addMarker(t,"ace_selection",n)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,e=e.getLine(t.start.row),t=e.substring(n,i);if(!(5e3<t.length)&&/[\w\d]/.test(t)){t=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t}),e=e.substring(n-1,i+1);if(t.test(e))return t}}},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(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection)for(var n=!0,i=this.selection.getAllRanges(),r=0;r<i.length;r++){var s=i[r];r&&i[r-1].start.row==s.start.row||(e+=this.session.getLine(s.start.row)+t)}var o={text:e};return this._signal("copy",o),b.lineMode=n?o.text:"",o.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){this.commands.exec("paste",this,{text:e,event:t})},this.$handlePaste=function(e){this._signal("paste",e="string"==typeof e?{text:e}:e);var t=e.text,e=t==b.lineMode,n=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)e?n.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(e)this.selection.rangeList.ranges.forEach(function(e){n.insert({row:e.start.row,column:0},t)});else{var i=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges,e=!(2!=i.length||i[0]&&i[1]);if(i.length!=r.length||e)return this.commands.exec("insertstring",this,t);for(var s=r.length;s--;){var o=r[s];o.isEmpty()||n.remove(o),n.insert(o.start,i[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n,i=this.session,r=i.getMode(),s=this.getCursorPosition(),o=(this.getBehavioursEnabled()&&!t&&(n=r.transformAction(i.getState(s.row),"insertion",this,i,e))&&(e===n.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),e=n.text),"\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==e.indexOf("\n")&&((o=new f.fromPoints(s,s)).end.column+=e.length,this.session.remove(o)):(o=this.getSelectionRange(),s=this.session.remove(o),this.clearSelection()),"\n"!=e&&"\r\n"!=e||(a=i.getLine(s.row),s.column>a.search(/\S|$/)&&(t=a.substr(s.column).search(/\S|$/),i.doc.removeInLine(s.row,s.column,s.column+t))),this.clearSelection(),s.column),t=i.getState(s.row),a=i.getLine(s.row),l=r.checkOutdent(t,a,e);i.insert(s,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new f(s.row,o+n.selection[0],s.row,o+n.selection[1])):this.selection.setSelectionRange(new f(s.row+n.selection[0],n.selection[1],s.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent&&(i.getDocument().isNewLine(e)&&(o=r.getNextLineIndent(t,a.slice(0,s.column),i.getTabString()),i.insert({row:s.row+1,column:0},o)),l)&&r.autoOutdent(t,i,s.row)},this.autoIndent=function(){for(var e,t,n,i,r,s=this.session,o=s.getMode(),a=(n=this.selection.isEmpty()?(t=0,s.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row),""),l="",c=s.getTabString(),h=t;h<=n;h++)0<h&&(a=s.getState(h-1),i=s.getLine(h-1),l=o.getNextLineIndent(a,i,c)),i=s.getLine(h),l!==(r=o.$getIndent(i))&&(0<r.length&&(r=new f(h,0,h,r.length),s.remove(r)),0<l.length)&&s.insert({row:h,column:0},l),o.autoOutdent(a,s,h)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});e=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(e):e(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return 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,n,i,e=this.getSelectionRange();this.getBehavioursEnabled()&&(n=(t=this.session).getState(e.start.row),n=t.getMode().transformAction(n,"deletion",this,t,e),0===e.end.column&&"\n"==(i=t.getTextRange(e))[i.length-1]&&(i=t.getLine(e.end.row),/^\s+$/.test(i))&&(e.end.column=i.length),n)&&(e=n),this.session.remove(e),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.selection.isEmpty()&&this.selection.selectLeft(),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(){var e,t,n,i;this.selection.isEmpty()&&0!==(t=(e=this.getCursorPosition()).column)&&(i=t<(i=this.session.getLine(e.row)).length?(n=i.charAt(t)+i.charAt(t-1),new f(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),new f(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end))},this.toLowerCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n,i=e.getTextRange(t);if(!/^\s+$/.test(i))return n=this.$getSelectedRows(),void e.indentRows(n.first,n.last,"\t")}var r=e.getLine(t.start.row),i=t.start,s=e.getTabSize(),i=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var o=s-i%s,a=g.stringRepeat(" ",o);else{for(o=i%s;" "==r[t.start.column-1]&&o;)t.start.column--,o--;this.selection.setSelectionRange(t),a="\t"}return this.insert(a)}n=this.$getSelectedRows(),e.indentRows(n.first,n.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var r=new f(0,0,0,0),i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-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){for(var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g,i=(n.lastIndex=0,this.session.getLine(e));n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t,n,i,r=this.selection.getCursor().row,s=this.selection.getCursor().column,o=new f(r,s-1,r,s),o=this.session.getTextRange(o);!isNaN(parseFloat(o))&&isFinite(o)?(o=this.getNumberAt(r,s))&&(i=0<=o.value.indexOf(".")?o.start+o.value.indexOf(".")+1:o.end,t=o.start+o.value.length-i,n=parseFloat(o.value),n*=Math.pow(10,t),i!==o.end&&s<i?e*=Math.pow(10,o.end-s-1):e*=Math.pow(10,o.end-s),i=(n=(n+=e)/Math.pow(10,t)).toFixed(t),e=new f(r,o.start,r,o.end),this.session.replace(e,i),this.moveCursorTo(r,Math.max(o.start+1,s+i.length-o.value.length))):this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){for(var n,i=this.selection.getCursor().row,e=this.selection.getCursor().column,r=(this.selection.selectWord(),this.getSelectedText()),s=this.selection.getWordRange().start.column,t=r.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-s-1,a=(o<0&&(o=0),0),l=this,c=(r.match(/[A-Za-z0-9_]+/)&&t.forEach(function(e,t){n=a+e.length,a<=o&&o<=n&&(r=e,l.selection.clearSelection(),l.moveCursorTo(i,a+s),l.selection.selectTo(i,n+s)),a=n}),this.$toggleWordPairs),h=0;h<c.length;h++)for(var u=c[h],d=0;d<=1;d++){var p=+!d,m=r.match(new RegExp("^\\s?_?("+g.escapeRegExp(u[d])+")\\s?$","i"));m&&r.match(new RegExp("([_]|^|\\s)("+g.escapeRegExp(m[1])+")($|\\s)","g"))&&(m=r.replace(new RegExp(g.escapeRegExp(u[d]),"i"),function(e){var t=u[p];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+u[p].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(m))}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e,t=this.selection,n=this.session,i=t.getRange(),r=t.isBackwards();i.isEmpty()?(e=i.start.row,n.duplicateLines(e,e)):(e=r?i.start:i.end,n=n.insert(e,n.getTextRange(i),!1),i.start=e,i.end=n,t.setSelectionRange(i,r))},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=this.selection;if(!n.inMultiSelectMode||this.inVirtualSelectionMode){var i=n.toOrientedRange(),r=this.$getSelectedRows(i),s=this.session.$moveLines(r.first,r.last,t?0:e);i.moveBy(s=t&&-1==e?0:s,0),n.fromOrientedRange(i)}else{for(var o=n.rangeList.ranges,a=(n.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),l=0,c=o.length,h=0;h<c;h++){for(var u=h,d=(o[h].moveBy(a,0),(r=this.$getSelectedRows(o[h])).first),p=r.last;++h<c;){l&&o[h].moveBy(l,0);var m=this.$getSelectedRows(o[h]);if(t&&m.first!=p)break;if(!t&&m.first>p+1)break;p=m.last}for(h--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(u=h+1);u<=h;)o[u].moveBy(a,0),u++;l+=a=t?a:0}n.fromOrientedRange(n.ranges[0]),n.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(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),n.scrollTop);n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(e)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),e={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(e,.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.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),s=r||i.stepForward();if(s){var o,a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u<s.value.length&&!c;u++)if(d[s.value[u]])switch(a=d[s.value[u]]+"."+s.type.replace("rparen","lparen"),isNaN(h[a])&&(h[a]=0),s.value[u]){case"(":case"[":case"{":h[a]++;break;case")":case"]":case"}":h[a]--,-1===h[a]&&(o="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(h[s.value])&&(h[s.value]=0),"<"===r.value?h[s.value]++:"</"===r.value&&h[s.value]--,-1===h[s.value])&&(o="tag",c=!0)}while(c||(r=s,s=i.stepForward(),u=0),s&&!c);if(o){if("bracket"===o)!(p=this.session.getBracketRange(n))&&(l=(p=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1)).start,t||l.row===n.row&&Math.abs(l.column-n.column)<2)&&(p=this.session.getBracketRange(l));else if("tag"===o){if(!s||-1===s.type.indexOf("tag-name"))return;var p,m=s.value;if(0===(p=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column))for(c=!1;s=r,(r=i.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&p.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),s.value===m)&&-1!==s.type.indexOf("tag-name")&&("<"===r.value?h[m]++:"</"===r.value&&h[m]--,0===h[m])&&(c=!0),r&&!c;);s&&s.type.indexOf("tag-name")&&(l=p.start).row==n.row&&Math.abs(l.column-n.column)<2&&(l=p.end)}(l=p&&p.cursor||l)&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(l.row,l.column):this.selection.moveTo(l.row,l.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){var t;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){var t;if(this.selection.isMultiLine()&&this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var t=this.$search.find(this.session),n=0;return t&&(this.$tryReplace(t,e)&&(n=1),this.selection.setSelectionRange(t),this.renderer.scrollSelectionIntoView(t.start,t.end)),n},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(n.length){t=this.getSelectionRange();this.selection.moveTo(0,0);for(var r=n.length-1;0<=r;--r)this.$tryReplace(n[r],e)&&i++;this.selection.setSelectionRange(t)}return i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t=t||{},"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&s.mixin(t,e);var i=this.selection.getRange(),e=(null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i}),this.$search.find(this.session));return t.preventScroll?e:e?(this.revealRange(e,n),e):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){var i,r,s,o,t,n,a;e&&(s=!1,(r=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(o=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild),t=this.on("changeSelection",function(){s=!0}),n=this.renderer.on("beforeRender",function(){s&&(i=r.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){var e,t,n;s&&i&&(r.isFocused()||r.searchBox&&r.searchBox.isFocused())&&(e=(t=r.renderer).$cursorLayer.$pixelPos,t=t.layerConfig,n=e.top-t.offset,null!=(s=0<=e.top&&n+i.top<0||!(e.top<t.height&&e.top+i.top+t.lineHeight>window.innerHeight)&&null)&&(o.style.top=n+"px",o.style.left=e.left+"px",o.style.height=t.lineHeight+"px",o.scrollIntoView(s)),s=i=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",n))})},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(t,n,i){var r=this;v.loadModule("./ext/prompt",function(e){e.prompt(r,t,n,i)})}}.call(r.prototype),v.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder"),(e=i.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),{getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}});t.Editor=r}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function r(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n<t-1;){var r=function(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!o(e[n],t[i])){for(;n<e.length;){for(;i--;)o(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}(e[n],e[n+1]);e[n]=r[0],e[n+1]=r[1],n++}return 1}}}function a(e){return{row:e.row,column:e.column}}function i(e){var t;return e=e||this,Array.isArray(e)?e.map(i).join("\n"):(t="",e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(s).join("\n"):s(e.value)),e.start&&(t+=s(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t)}function s(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function o(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(n&&!i)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}else if(!n&&i)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(!n&&!i)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,n){c(e.start,t.start,t.end,n),c(e.end,t.start,t.end,n)}function c(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function h(e,t){var n=e.lines,i=e.end,r=(e.end=a(t),e.end.row-e.start.row),s=n.splice(r,n.length),r=r?t.column:t.column-e.start.column;return n.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:i,lines:s,action:e.action}}function u(e,t){var n;t={start:a((n=t).start),end:a(n.end),action:n.action,lines:n.lines.slice()};for(var i=e.length;i--;){for(var r=e[i],s=0;s<r.length;s++){var o=function(e,t){var n,i,r="insert"==e.action,s="insert"==t.action;if(r&&s)m(e.start,t.start)<0?l(t,e,1):l(e,t,1);else if(r&&!s)0<=m(e.start,t.end)?l(e,t,-1):(m(e.start,t.start)<=0||l(e,p.fromPoints(t.start,e.start),-1),l(t,e,1));else if(!r&&s)0<=m(t.start,e.end)?l(t,e,-1):(m(t.start,e.start)<=0||l(t,p.fromPoints(e.start,t.start),-1),l(e,t,1));else if(!r&&!s)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return m(e.start,t.start)<0&&(e=h(n=e,t.start)),0<m(e.end,t.end)&&(i=h(e,t.end)),c(t.end,e.start,e.end,-1),i&&!n&&(e.lines=i.lines,e.start=i.start,e.end=i.end,i=e),[t,n,i].filter(Boolean);l(e,t,-1)}return[t,e]}(r[s],t);t=o[0],2!=o.length&&(o[2]?(r.splice(s+1,1,o[1],o[2]),s++):o[1]||(r.splice(s,1),s--))}r.length||e.splice(i,1)}}function d(){this.$maxRev=0,this.$fromUndo=!1,this.reset()}!function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id<t&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<e)return r=t?n[i+1]:r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,s=n.length;s--;){var o=n[s][0];if(o.id<t&&!i&&(i=s+1),o.id<=e){r=s+1;break}}return n.slice(r,i)},this.getChangedRanges=function(e,t){null==t&&this.$rev},this.getChangedLines=function(e,t){null==t&&this.$rev},this.undo=function(e,t){this.lastDeltas=null;var n,i=this.$undoStack;if(r(i,i.length))return e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,n=null,(i=i.pop())&&(n=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,n},this.redo=function(e,t){if(this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),i=this.$redoStack,r=n,s=0;s<r.length;s++)for(var o=r[s],a=0;a<o.length;a++)u(i,o[a]);this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var n=this.$redoStack.pop(),l=null;return n&&(l=e.redoChanges(n,t),this.$undoStack.push(n),this.$syncRev()),this.$fromUndo=!1,l},this.$syncRev=function(){var e=this.$undoStack,e=e[e.length-1],e=e&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return 0<this.$undoStack.length},this.canRedo=function(){return 0<this.$redoStack.length},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?i(e):i(this.$undoStack)+"\n---\n"+i(this.$redoStack)}}.call(d.prototype);var p=e("./range").Range,m=p.comparePoints;p.comparePoints;t.UndoManager=d}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}var o=e("../lib/dom");(function(){this.moveContainer=function(e){o.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,i=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,n,i){var r,s=this.cellCache.pop();return s||(r=o.createElement("div"),i&&i(r),this.element.appendChild(r),s={element:r,text:"",row:e}),s.row=e,s}}).call(i.prototype),t.Lines=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],function(e,t,n){"use strict";function c(e){var t=document.createTextNode(""),t=(e.appendChild(t),f.createElement("span"));return e.appendChild(t),e}function i(e){this.element=f.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}var f=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines;(function(){r.implement(this,o),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=(r=this.$annotations[i])||(this.$annotations[i]={text:[]}),i=(i=n.text)?s.escapeHTML(i):n.html||"",i=(-1===r.text.indexOf(i)&&r.text.push(i),n.type);"error"==i?r.className=" ace_error":"warning"==i&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=i||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){var t,n;this.$annotations.length&&(t=e.start.row,0!=(n=e.end.row-t))&&("remove"==e.action?this.$annotations.splice(t,1+n,null):((e=new Array(1+n)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,e)))},this.update=function(e){this.config=e;for(var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),r=(this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow(),t.getNextFoldLine(n)),s=r?r.start.row:1/0,o=null,a=-1,l=n;;){if(s<l&&(l=r.end.row+1,s=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),i<l){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,e,this.session,c),this.$lines.push(o)),this.$renderCell(o,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"",i=((this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1),n?n.getWidth(t,r,e):r.toString().length*e.characterWidth),n=this.$padding||this.$computePadding();(i+=n.left+n.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var i=t[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0<n&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(n<i)for(r=this.session.getFoldedRowCount(n+1,i);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),i<n&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o<r&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(n<r);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,s,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,i){var r,s=e.element,o=this.session,a=s.childNodes[0],l=s.childNodes[1],c=o.$firstLineNumber,h=o.$breakpoints,u=o.$decorations,d=o.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&o.foldWidgets,m=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ",u=(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&m<=i&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=e)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e),h[i]&&(g+=h[i]),u[i]&&(g+=u[i]),this.$annotations[i]&&(g+=this.$annotations[i].className),s.className!=g&&(s.className=g),(r=p&&null==(r=p[i])?p[i]=o.getFoldWidget(i):r)?(g="ace_fold-widget ace_"+r,"start"==r&&i==m&&i<n.end.row?g+=" ace_closed":g+=" ace_open",l.className!=g&&(l.className=g),h=t.lineHeight+"px",f.setStyle(l.style,"height",h),f.setStyle(l.style,"display","inline-block")):l&&f.setStyle(l.style,"display","none"),(d?d.getText(o,i):i+c).toString());return u!==a.data&&(a.data=u),f.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,o)+"px"),f.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,o)+"px"),e.text=u,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?f.addCssClass(this.element,"ace_folding-enabled"):f.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){var e;return this.element.firstChild?(e=f.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding):{left:0,right:0}},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(i.prototype),t.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}var p=e("../range").Range,r=e("../lib/dom");(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t,n;for(n in this.config=e,this.i=0,this.markers){var i,r,s,o=this.markers[n];o.range?(s=o.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(s=s.toScreenRange(this.session),o.renderer?(i=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth,o.renderer(t,s,r,i,e)):"fullLine"==o.type?this.drawFullLineMarker(t,s,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,s,o.clazz,e):s.isMultiLine()?"text"==o.type?this.drawTextMarker(t,s,o.clazz,e):this.drawMultiLineMarker(t,s,o.clazz,e):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",e)):o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,r){for(var s,o=this.session,a=t.start.row,l=t.end.row,c=a,h=0,u=o.getScreenLastRowColumn(c),d=new p(c,t.start.column,c,h);c<=l;c++)d.start.row=d.end.row=c,d.start.column=c==a?t.start.column:o.getRowWrapIndent(c),d.end.column=u,s=h,h=u,u=c+1<l?o.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,d,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(s<h?2:0)|(u<h?4:0)|(c==l?8:0)),i,c==l?0:1,r)},this.drawMultiLineMarker=function(e,t,n,i,r){var s,o=this.$padding,a=i.lineHeight,l=this.$getTop(t.start.row,i),c=o+t.start.column*i.characterWidth;r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((s=t.clone()).end.row=s.start.row,s.end.column=this.session.getLine(s.start.row).length,this.drawBidiSingleLineMarker(e,s,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((s=t.clone()).start.row=s.end.row,s.start.column=0,this.drawBidiSingleLineMarker(e,s,n+" ace_br12",i,null,r)):(l=this.$getTop(t.end.row,i),c=t.end.column*i.characterWidth,this.elt(n+" ace_br12","height:"+a+"px;width:"+c+"px;top:"+l+"px;left:"+o+"px;"+(r||""))),(a=(t.end.row-t.start.row-1)*i.lineHeight)<=0||(l=this.$getTop(t.start.row+1,i),e=(t.start.column?1:0)|(t.end.column?0:8),this.elt(n+(e?" ace_br"+e:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+o+"px;"+(r||"")))},this.drawSingleLineMarker=function(e,t,n,i,r,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,s);var e=i.lineHeight,r=(t.end.column+(r||0)-t.start.column)*i.characterWidth,o=this.$getTop(t.start.row,i),t=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+e+"px;width:"+r+"px;top:"+o+"px;left:"+t+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,s){var o=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,"height:"+o+"px;width:"+e.width+(r||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(s||""))},this)},this.drawFullLineMarker=function(e,t,n,i,r){var s=this.$getTop(t.start.row,i),o=i.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,i)-s),this.elt(n,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){t=this.$getTop(t.start.row,i),i=i.lineHeight;this.elt(n,"height:"+i+"px;top:"+t+"px;left:0;right:0;"+(r||""))}}).call(i.prototype),t.Marker=i}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(e,t,n){"use strict";function i(e){this.dom=c,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}var r=e("../lib/oop"),c=e("../lib/dom"),w=e("../lib/lang"),s=e("./lines").Lines,o=e("../lib/event_emitter").EventEmitter;(function(){r.implement(this,o),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,e="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){(this.session=e)&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&("string"==typeof(this.showInvisibles=e)?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){for(var e,t,n,i,r,s,o=this.session.getTabSize(),a=(this.tabSize=o,this.$tabStrings=[0]),l=1;l<o+1;l++)this.showTabs?((s=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",s.textContent=w.stringRepeat(this.TAB_CHAR,l),a.push(s)):a.push(this.dom.createTextNode(w.stringRepeat(" ",l),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,e="ace_indent-guide",t=this.showSpaces?" ace_invisible ace_invisible_space":"",n=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),i=this.showTabs?" ace_invisible ace_invisible_tab":"",r=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):n,(s=this.dom.createElement("span")).className=e+t,s.textContent=n,this.$tabStrings[" "]=s,(s=this.dom.createElement("span")).className=e+i,s.textContent=r,this.$tabStrings["\t"]=s)},this.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),s=this.element.childNodes,o=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}o++}for(var l,c=!1,a=i,h=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;h<a&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(r<a);){var u,d=s[o++];d&&(this.dom.removeChildren(d),this.$renderLine(d,a,a==h&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px"),u=e.lineHeight*this.session.getRowLength(a)+"px",d.style.height!=u)&&(c=!0,d.style.height=u),a++}if(c)for(;o<this.$lines.cells.length;){var p=this.$lines.cells[o++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,i=t?t.lastRow:-1;if(!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o<r&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(n<r);){var a=this.$lines.createCell(r,e,this.session),l=a.element;this.dom.removeChildren(l),c.setStyle(l.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),c.setStyle(l.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(l,r,r==o&&s),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",i.push(a),r++}return i},this.update=function(e){this.$lines.moveContainer(e);for(var t=(this.config=e).firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,s,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var h,u,d=r[1],p=r[2],m=r[3],g=r[4],f=r[5];!o.showSpaces&&p||(h=c!=r.index?i.slice(c,r.index):"",c=r.index+r[0].length,h&&l.appendChild(this.dom.createTextNode(h,this.element)),d?(h=o.session.getScreenTabSize(t+r.index),l.appendChild(o.$tabStrings[h].cloneNode(!0)),t+=h-1):p?o.showSpaces?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",u.textContent=w.stringRepeat(o.SPACE_CHAR,p.length),l.appendChild(u)):l.appendChild(this.com.createTextNode(p,this.element)):m?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",u.textContent=w.stringRepeat(o.SPACE_CHAR,m.length),l.appendChild(u)):g?(t+=1,(u=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",u.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=o.showSpaces?o.SPACE_CHAR:g,l.appendChild(u)):f&&(t+=1,(u=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",u.className="ace_cjk",u.textContent=f,l.appendChild(u)))}return l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type]?e.appendChild(l):(s="ace_"+n.type.replace(/\./g," ace_"),u=this.dom.createElement("span"),"fold"==n.type&&(u.style.width=n.value.length*this.config.characterWidth+"px"),u.className=s,u.appendChild(l),e.appendChild(u)),t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||n<=i)return t;if(" "==t[0])for(var r=(i-=i%this.tabSize)/this.tabSize,s=0;s<r;s++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));else{if("\t"!=t[0])return t;for(s=0;s<i;s++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0))}return t.substr(i)},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,n){var i=0,r=0,s=n[0],o=0,a=this.$createLineElement();e.appendChild(a);for(var l=0;l<t.length;l++){var c=t[l],h=c.value;if(0==l&&this.displayIndentGuides){if(i=h.length,!(h=this.renderIndentGuide(a,h,s)))continue;i-=h.length}if(i+h.length<s)o=this.$renderToken(a,o,c,h),i+=h.length;else{for(;i+h.length>=s;)o=this.$renderToken(a,o,c,h.substring(0,s-i)),h=h.substring(s-i),i=s,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(w.stringRepeat(" ",n.indent),this.element)),o=0,s=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,o=this.$renderToken(a,o,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,o,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;(r=this.displayIndentGuides?this.renderIndentGuide(e,r):r)&&(n=this.$renderToken(e,n,i,r));for(var s=1;s<t.length;s++){if(n+(r=(i=t[s]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,r);n=this.$renderToken(e,n,i,r)}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));n=this.dom.createElement("span");n.className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=r?"<hide>":"<click to see more...>",e.appendChild(n)},this.$renderLine=function(e,t,n){var i,r,s=e;(i=(n=n||0==n?n:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,n):this.session.getTokens(t)).length?(r=this.session.getRowSplitData(t))&&r.length?(this.$renderWrappedLine(e,i,r),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,i)):this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.showEOL&&s&&(n&&(t=n.end.row),(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(r))},this.$getFoldLineTokens=function(e,t){var u=this.session,d=[],p=u.getTokens(e);return t.walk(function(e,t,n,i,r){if(null!=e)d.push({type:"fold",value:e});else if((p=r?u.getTokens(t):p).length){for(var s,o=p,a=i,l=n,c=0,h=0;h+o[c].value.length<a;)if(h+=o[c].value.length,++c==o.length)return;for(h!=a&&((s=o[c].value.substring(a-h)).length>l-a&&(s=s.substring(0,l-a)),d.push({type:o[c].type,value:s}),h=a+s.length,c+=1);h<l&&c<o.length;)(s=o[c].value).length+h>l?d.push({type:o[c].type,value:s.substring(0,l-h)}):d.push(o[c]),h+=s.length,c+=1}},t.end.row,this.session.getLine(t.end.row).length),d},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(i.prototype),t.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}var c=e("../lib/dom");(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)c.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){c.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){c.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,c.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=c.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){var e;if(1<this.cursors.length)return(e=this.cursors.pop()).parentNode.removeChild(e),e},this.hideCursor=function(){this.isVisible=!1,c.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,c.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e,t=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&c.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&setTimeout(function(){c.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),c.HAS_CSS_ANIMATION?this.$startCssAnimation():(e=function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e())):this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e=e||this.session.selection.getCursor();var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return 0<=e.top&&e.top<t.maxHeight},this.update=function(e){this.config=e;for(var t=this.session.$selectionMarkers,n=0,i=0,n=0,r=(t=void 0!==t&&0!==t.length?t:[{cursor:null}]).length;n<r;n++){var s,o,a=this.getPixelPosition(t[n].cursor,!0);(a.top>e.height+e.offset||a.top<0)&&1<n||(o=(s=this.cursors[i++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(c.setStyle(o,"display","block"),c.translate(s,a.left,a.top),c.setStyle(o,"width",Math.round(e.characterWidth)+"px"),c.setStyle(o,"height",e.lineHeight+"px")):c.setStyle(o,"display","none"))}for(;this.cursors.length>i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";function i(e){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}function r(e,t){i.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=a.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}function s(e,t){i.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"}var o=e("./lib/oop"),a=e("./lib/dom"),l=e("./lib/event"),c=e("./lib/event_emitter").EventEmitter;!function(){o.implement(this,c),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}.call(i.prototype),o.inherits(r,i),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(r.prototype);o.inherits(s,i),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(s.prototype),t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=s,t.VScrollBar=r,t.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";function i(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}var r=e("./lib/event");(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,e=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};!function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e}))},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){var t;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(t=this).$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=r.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},this.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function o(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&s(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l=o(this.els[0]),c=o(this.els[1]),h=o(this.els[2]),u=o(this.els[3]),u=n(i(u,c),i(u,h),i(r(c,h),r(u,l))),c=s(1+u[0],i(c,l)),h=s(1+u[1],i(h,l));return t?(a=u[0]*t[0]/200+u[1]*t[1]/200+1,t=r(s(t[0],c),s(t[1],h)),r(s(1/a/200,t),l)):(a=i(e,l),t=n(i(c,s(u[0],a)),i(h,s(u[1],a)),a),s(200,t))}}.call(e.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){var n=this,e=(this.container=e||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),this.$textLayer=new c(this.content));this.canvas=e.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)}var r=e("./lib/oop"),a=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,f='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',w=e("./lib/useragent"),v=w.isIE;a.importCssString(f,"ace_editor.css");(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=e?1:0;var r=this.container,r=(i=i||r.clientHeight||r.scrollHeight,n=n||r.clientWidth||r.scrollWidth,this.$updateCachedSize(e,t,n,i));if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};return i&&(e||s.height!=i)&&(s.height=i,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||s.width!=n)&&(r|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,a.setStyle(this.scrollBarH.element.style,"left",t+"px"),a.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),a.setStyle(this.$gutter.style,"left",this.margin.left+"px"),t=this.scrollBarV.getWidth()+"px",a.setStyle(this.scrollBarH.element.style,"right",t),a.setStyle(this.scroller.style,"right",t),a.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL),s.$dirty=!n||!i,r&&this._signal("resize",o),r},this.onGutterResize=function(e){e=this.$showGutter?e:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){var e;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((e=a.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=a.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)),(e=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&-1==this.session.$wrap&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){var e,t,n,i,r,s,o;this.$isMousePressed||(e=this.textarea.style,s=this.$composition,this.$keepTextAreaAtCursor||s?(n=this.$cursorLayer.$pixelPos)&&(s&&s.markerRange&&(n=this.$cursorLayer.getPixelPosition(s.markerRange.start,!0)),o=this.layerConfig,t=n.top,n=n.left,t-=o.offset,i=s&&s.useTextareaForIME?this.lineHeight:v?0:1,t<0||t>o.height-i?a.translate(this.textarea,0,0):(o=1,r=this.$size.height-i,s?s.useTextareaForIME?(s=this.textarea.value,o=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",i+"px"),a.setStyle(e,"width",o+"px"),a.translate(this.textarea,Math.min(n,this.$size.scrollerWidth-o),Math.min(t,r)))):a.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t)&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n,i,t=this.layerConfig;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(n=this.scrollTop+(t.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=n,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),n=t.width+2*this.$padding+"px",i=t.minHeight+"px",a.setStyle(this.content.style,"width",n),a.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(t):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());t=!((n=this.$maxPixelHeight&&n>this.$maxPixelHeight?this.$maxPixelHeight:n)<=2*this.lineHeight)&&t<e;n==this.desiredHeight&&this.$size.height==this.desiredHeight&&t==this.$vScroll||(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),e=this.container.clientWidth,this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,n),this.desiredHeight=n,this._signal("autosize"))},this.$computeLayerConfig=function(){var e,t=this.session,n=this.$size,i=n.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!i&&(this.$hScrollBarAlwaysVisible||n.scrollerWidth-s-2*this.$padding<0),a=this.$horizScroll!==o,o=(a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o)),this.$vScroll),l=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),n.scrollerHeight+this.lineHeight),c=!this.$maxLines&&this.$scrollPastEnd?(n.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,h=(r+=c,this.scrollMargin),i=(this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,r-n.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,s+2*this.$padding-n.scrollerWidth+h.right))),!i&&(this.$vScrollBarAlwaysVisible||n.scrollerHeight-r+c<0||this.scrollTop>h.top)),c=o!==i,h=(c&&(this.$vScroll=i,this.scrollBarV.setVisible(i)),this.scrollTop%this.lineHeight),o=Math.ceil(l/this.lineHeight)-1,o=(i=Math.max(0,Math.round((this.scrollTop-h)/this.lineHeight)))+o,u=this.lineHeight,i=t.screenToDocumentRow(i,0),d=t.getFoldLine(i),t=(d&&(i=d.start.row),d=t.documentToScreenRow(i,0),e=t.getRowLength(i)*u,o=Math.min(t.screenToDocumentRow(o,0),t.getLength()-1),l=n.scrollerHeight+t.getRowLength(o)*u+e,h=this.scrollTop-d*u,0);return this.layerConfig.width==s&&!a||(t=this.CHANGE_H_SCROLL),(a||c)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,n.width,n.height),this._signal("scrollbarVisibilityChanged"),c)&&(s=this.$getLongestLine()),this.layerConfig={width:s,padding:this.$padding,firstRow:i,firstRowScreen:d,lastRow:o,lineHeight:u,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:h,gutterOffset:u?Math.max(0,Math.ceil((h+n.height-n.scrollerHeight)/u)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),t},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n=(this.$changedLines=null,this.layerConfig);if(!(e>n.lastRow+1||t<n.firstRow)){if(t!==1/0)return this.$textLayer.updateLines(n,e,t),!0;this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n)}}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){var i,r,s;0!==this.$size.scrollerHeight&&(i=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,s=n&&n.top||0,n=n&&n.bottom||0,e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+s?(t&&r+s>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-n<e+this.lineHeight&&(t&&r+this.$size.scrollerHeight-n<e-this.lineHeight&&(e+=t*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight+n-this.$size.scrollerHeight)),i<(s=this.scrollLeft)?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):s+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):s<=this.$padding&&i-s<this.characterWidth&&this.session.setScrollLeft(0))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){var e=this.$cursorLayer.getPixelPosition(e="number"==typeof e?{row:e,column:0}:e),n=this.$size.scrollerHeight-this.lineHeight,e=e.top-n*(t||0);return this.session.setScrollTop(e),e},this.STEPS=8,this.$calcSteps=function(e,t){for(var n,i,r=0,s=this.STEPS,o=[],r=0;r<s;++r)o.push((n=r/this.STEPS,(t-(i=e))*(Math.pow(n-1,3)+1)+i));return o},this.scrollToLine=function(e,t,n,i){e=this.$cursorLayer.getPixelPosition({row:e,column:0}).top,t&&(e-=this.$size.scrollerHeight/2),t=this.scrollTop;this.session.setScrollTop(e),!1!==n&&this.animateScrolling(t,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var s=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),i.session.setScrollTop(s.shift()),i.session.$scrollTop=n,this.$timer=setInterval(function(){if(!i.session)return clearInterval(i.$timer);s.length?(i.session.setScrollTop(s.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<t&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<e&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){this.$hasCssTransforms?(i={top:0,left:0},e=(n=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=n[0]):i=this.scroller.getBoundingClientRect();var n=e+this.scrollLeft-i.left-this.$padding,e=n/this.characterWidth,t=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),i=this.$blockCursor?Math.floor(e):Math.round(e);return{row:t,column:i,side:0<e-i?1:-1,offsetX:n}},this.screenToTextCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var n,i=e+this.scrollLeft-n.left-this.$padding,e=i/this.characterWidth,e=this.$blockCursor?Math.floor(e):Math.round(e),t=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(t,Math.max(e,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),t=this.session.documentToScreenPosition(e,t),e=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,e)?this.session.$bidiHandler.getPosLeft(t.column):Math.round(t.column*this.characterWidth)),t=t.row*this.lineHeight;return{pageX:n.left+e-this.scrollLeft,pageY:n.top+t-this.scrollTop}},this.visualizeFocus=function(){a.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){a.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){(this.$composition=e).cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(a.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){var e;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),a.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,e=this.session.selection.cursor,this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(e,t,n,i){var r=this.session,s=(r.bgTokenizer.lines[n]=null,{type:t,value:e}),o=r.getTokens(n);if(null==i)o.push(s);else for(var a=0,l=0;l<o.length;l++){var c=o[l];if(i<=(a+=c.value.length)){var h=c.value.length-(a-i),u=c.value.slice(0,h),h=c.value.slice(h);o.splice(l,1,{type:c.type,value:u},s,{type:c.type,value:h});break}}this.updateLines(n,n)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(n,i){function e(e){if(r.$themeId!=n)return i&&i();if(!e||!e.cssClass)throw new Error("couldn't load module "+n+" or it didn't call define");e.$id&&(r.$themeId=e.$id),a.importCssString(e.cssText,e.cssClass,r.container),r.theme&&a.removeCssClass(r.container,r.theme.cssClass);var t="padding"in e?e.padding:"padding"in(r.theme||{})?4:r.$padding;r.$padding&&t!=r.$padding&&r.setPadding(t),r.$theme=e.cssClass,r.theme=e,a.addCssClass(r.container,e.cssClass),a.setCssClass(r.container,"ace_dark",e.isDark),r.$size&&(r.$size.width=0,r.$updateSizeAsync()),r._dispatchEvent("themeLoaded",{theme:e}),i&&i()}var t,r=this;this.$themeId=n,r._dispatchEvent("themeChange",{theme:n}),n&&"string"!=typeof n?e(n):(t=n||this.$options.theme.initialValue,s.loadModule(["theme",t],e))},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){a.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){a.removeCssClass(this.container,e)},this.setCursorStyle=function(e){a.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){a.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){a.importCssString(f,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(i.prototype),s.defineOptions(i.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){a.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){this.$scrollPastEnd!=(e=+e||0)&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=i}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,e,t){"use strict";function l(e){var t;return"undefined"==typeof Worker?{postMessage:function(){},terminate:function(){}}:u.get("loadWorkerFromBlob")?(t=function(t){t="importScripts('"+i.qualifyURL(t)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),t=(window.URL||window.webkitURL).createObjectURL(t),new Worker(t)):new Worker(e)}function c(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage}var n=a("../lib/oop"),i=a("../lib/net"),h=a("../lib/event_emitter").EventEmitter,u=a("../config");(function(){n.implement(this,h),this.$createWorkerFromOldConfig=function(e,t,n,i,r){var s,o;return a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),u.get("packaged")||!a.toUrl?i=i||u.moduleUrl(t,"worker"):(s=this.$normalizePath,i=i||s(a.toUrl("ace/worker/worker.js",null,"_")),o={},e.forEach(function(e){o[e]=s(a.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=l(i),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:o,module:t,classname:n}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){var i;n&&(i=this.callbackId++,this.callbacks[i]=n,t.push(i)),this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,50<e.length&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);e.UIWorkerClient=function(e,t,n){var i=null,r=!1,s=Object.create(h),o=[],a=new c({messageBuffer:o,terminate:function(){},postMessage:function(e){o.push(e),i&&(r?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){r=e},function(){var e=o.shift();e.command?i[e.command].apply(i,e.args):e.event&&s._signal(e.event,e.data)});return s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},u.loadModule(["worker",t],function(e){for(i=new e[n](s);o.length;)l()}),a},e.WorkerClient=c,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";function i(e,t,n,i,r,s){var o=this,t=(this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n,e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}var l=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop");(function(){s.implement(this,r),this.setup=function(){var t=this,n=this.doc,e=this.session,i=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column),this.pos);i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new l(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=n.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){var t,n;this.othersActive||(t=this.session,(n=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+n.length),n.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var o={row:(a=this.others[s]).row,column:a.column+r};this.doc.insertMergedLines(o,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var a,o={row:(a=this.others[s]).row,column:a.column+r};this.doc.remove(new l(o.row,o.column,o.row,o.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,e=function(e,t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new l(e.row,e.column,e.row,e.column+n.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},this.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e)))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(i.prototype),t.PlaceHolder=i}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function C(e,t){return e.row==t.row&&e.column==t.column}var $=e("../lib/event"),R=e("../lib/useragent");t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,i=t.shiftKey,r=t.ctrlKey,s=e.getAccelKey(),o=e.getButton();if(r&&R.isMac&&(o=t.button),e.editor.inMultiSelectMode&&2==o)e.editor.textInput.onContextMenu(e.domEvent);else if(r||n||s){if(0===o){var a,l,c,h,u,d,p,m,g=e.editor,f=g.selection,w=g.inMultiSelectMode,v=e.getDocumentPosition(),y=f.getCursor(),y=e.inSelection()||f.isEmpty()&&C(v,y),b=e.x,x=e.y,A=g.session,k=g.renderer.pixelToScreenCoordinates(b,x),S=k;if(g.$mouseHandler.$enableJumpToDef)r&&n||s&&n?a=i?"block":"add":n&&g.$blockSelectEnabled&&(a="block");else if(s&&!n){if(a="add",!w&&i)return}else n&&g.$blockSelectEnabled&&(a="block");if(a&&R.isMac&&t.ctrlKey&&g.$mouseHandler.cancelContextMenu(),"add"==a)!w&&y||(w||(l=f.toOrientedRange(),g.addSelectionMarker(l)),c=f.rangeList.rangeAtPoint(v),g.inVirtualSelectionMode=!0,i&&(c=null,l=f.ranges[0]||l,g.removeSelectionMarker(l)),g.once("mouseup",function(){var e=f.toOrientedRange();c&&e.isEmpty()&&C(c.cursor,e.cursor)?f.substractPoint(e.cursor):(i?f.substractPoint(l.cursor):l&&(g.removeSelectionMarker(l),f.addRange(l)),f.addRange(e)),g.inVirtualSelectionMode=!1}));else if("block"==a)return e.stop(),g.inVirtualSelectionMode=!0,u=[],d=function(){var e=g.renderer.pixelToScreenCoordinates(b,x),t=A.screenToDocumentPosition(e.row,e.column,e.offsetX);C(S,e)&&C(t,f.lead)||(S=e,g.selection.moveToPosition(t),g.renderer.scrollCursorIntoView(),g.removeSelectionMarkers(u),u=f.rectangularRangeBlock(S,k),g.$mouseHandler.$clickSelection&&1==u.length&&u[0].isEmpty()&&(u[0]=g.$mouseHandler.$clickSelection.clone()),u.forEach(g.addSelectionMarker,g),g.updateSelectionMarkers())},w&&!s?f.toSingleRange():!w&&s&&(h=f.toOrientedRange(),g.addSelectionMarker(h)),i?k=A.documentToScreenPosition(f.lead):f.moveToPosition(v),S={row:-1,column:-1},p=d,$.capture(g.container,function(e){b=e.clientX,x=e.clientY},function(e){d(),clearInterval(m),g.removeSelectionMarkers(u),u.length||(u=[f.toOrientedRange()]),h&&(g.removeSelectionMarker(h),f.toSingleRange(h));for(var t=0;t<u.length;t++)f.addRange(u[t]);g.inVirtualSelectionMode=!1,g.$mouseHandler.$clickSelection=null}),m=setInterval(function(){p()},20),e.preventDefault()}}else 0===o&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){1<e.multiSelect.rangeCount?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];e=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new e(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,t){function n(e){var t,n;function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=r.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(a.defaultCommands),(t=e).textInput&&(e=t.textInput.getElement(),n=!1,o.addListener(e,"keydown",function(e){e=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&e?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()},t),o.addListener(e,"keyup",i,t),o.addListener(e,"blur",i,t)))}var i=e("./range_list").RangeList,b=e("./range").Range,d=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,o=e("./lib/event"),p=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var l=new(e("./search").Search),c=e("./edit_session").EditSession,c=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(c.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){e=this.rangeList.substractPoint(e);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){var t;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),e.push(t),this.rangeCount=0);for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var i=e[n],r=i.start.row,s=i.end.row;if(r===s)t.push(i.clone());else{for(t.push(new b(r,i.start.column,r,this.session.getLine(r).length));++r<s;)t.push(this.getLineRange(r,!0));t.push(new b(s,0,s,i.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],e=b.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=b.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,n){var i,r,s,o,a,l,c,h=[],u=e.column<t.column,d=(o=(u?(i=e.column,r=t.column,s=e.offsetX,t):(i=t.column,r=e.column,s=t.offsetX,e)).offsetX,e.row<t.row);l=(d?(a=e.row,t):(a=t.row,e)).row,i<0&&(i=0),(a=a<0?0:a)==l&&(n=!0);for(var p,m,g=a;g<=l;g++){var f=b.fromPoints(this.session.screenToDocumentPosition(g,i,s),this.session.screenToDocumentPosition(g,r,o));if(f.isEmpty()){if(c&&(p=f.end,m=c,p.row==m.row)&&p.column==m.column)break;c=f.end}f.cursor=u?f.start:f.end,h.push(f)}if(d&&h.reverse(),!n){for(var w=h.length-1;h[w].isEmpty()&&0<w;)w--;if(0<w)for(var v=0;h[v].isEmpty();)v++;for(var y=w;v<=y;y--)h[y].isEmpty()&&h.splice(y,1)}return h}}.call(d.prototype),e("./editor").Editor);(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){e.marker&&(this.session.removeMarker(e.marker),-1!=(e=this.session.$selectionMarkers.indexOf(e))&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];i.marker&&(this.session.removeMarker(i.marker),-1!=(i=t.indexOf(i)))&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,n=e.command,i=e.editor;if(i.multiSelect)return n.multiSelectAction?t="forEach"==n.multiSelectAction?i.forEachSelection(n,e.args):"forEachLine"==n.multiSelectAction?i.forEachSelection(n,e.args,!0):"single"==n.multiSelectAction?(i.exitMultiSelectMode(),n.exec(i,e.args||{})):n.multiSelectAction(i,e.args||{}):(t=n.exec(i,e.args||{}),i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,o=this.session,n=this.selection,a=n.rangeList,l=(r?n:a).ranges;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var r=n._eventRegistry,c=(n._eventRegistry={},new d(o));this.inVirtualSelectionMode=!0;for(var h=l.length;h--;){if(s)for(;0<h&&l[h].start.row==l[h-1].end.row;)h--;c.fromOrientedRange(l[h]),c.index=h,this.selection=o.selection=c;var u=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===u||(i=u),c.toOrientedRange(l[h])}c.detach(),this.selection=o.selection=n,this.inVirtualSelectionMode=!1,n._eventRegistry=r,n.mergeOverlappingRanges(),n.ranges[0]&&n.fromOrientedRange(n.ranges[0]);a=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),a&&a.from==a.to&&this.renderer.animateScrolling(a.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var n;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(n=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((n=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor).row!=t.row||this.session.$clipPositionToDocument(n.row,n.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,n){(t=t||{}).needle=e||t.needle,null==t.needle&&(i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(i)),this.$search.set(t);var i,r=this.$search.findAll(this.session);if(!r.length)return 0;var s=this.multiSelect;n||s.toSingleRange(r[0]);for(var o=r.length;o--;)s.addRange(r[o],!0);return i&&s.rangeList.rangeAtPoint(i.start)&&s.addRange(i,!0),r.length},this.selectMoreLines=function(e,t){var n,i,r,s=this.selection.toOrientedRange(),o=s.cursor==s.end,a=this.session.documentToScreenPosition(s.cursor),l=(this.selection.$desiredColumn&&(a.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(a.row+e,a.column));e=s.isEmpty()?l:(n=this.session.documentToScreenPosition(o?s.end:s.start),this.session.screenToDocumentPosition(n.row+e,n.column)),o?(i=b.fromPoints(l,e)).cursor=i.start:(i=b.fromPoints(e,l)).cursor=i.end,i.desiredColumn=a.column,this.selection.inMultiSelectMode?t&&(r=s.cursor):this.selection.addRange(s),this.selection.addRange(i),r&&this.selection.substractPoint(r)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;)(o=i[r]).isEmpty()&&(a=t.getWordRange(o.start.row,o.start.column),o.start.row=a.start.row,o.start.column=a.start.column,o.end.row=a.end.row,o.end.column=a.end.column);n.mergeOverlappingRanges();for(var s=[],r=i.length;r--;){var o=i[r];s.unshift(t.getTextRange(o))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=i.length;r--;){var a=(o=i[r]).clone();t.replace(o,s[r]),o.start.row=a.start.row,o.start.column=a.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var i,r=this.session,s=r.multiSelect.toOrientedRange();s.isEmpty()&&((s=r.getWordRange(s.start.row,s.start.column)).cursor=-1==e?s.start:s.end,this.multiSelect.addRange(s),n)||(n=r.getTextRange(s),r=r,n=n,i=e,l.$options.wrap=!0,l.$options.needle=n,l.$options.backwards=-1==i,(n=l.find(r))&&(n.cursor=-1==e?n.start:n.end,this.session.unfold(n),this.multiSelect.addRange(n),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor))},this.alignCursors=function(){var r=this.session,t=r.multiSelect,e=t.ranges,n=-1,i=e.filter(function(e){if(e.cursor.row==n)return!0;n=e.cursor.row});if(e.length&&i.length!=e.length-1){i.forEach(function(e){t.substractPoint(e.cursor)});var s=0,o=1/0,a=e.map(function(e){var e=e.cursor,t=r.getLine(e.row).substr(e.column).search(/\S/g);return e.column>s&&(s=e.column),(t=-1==t?0:t)<o&&(o=t),t});e.forEach(function(e,t){var n=e.cursor,i=s-n.column,t=a[t]-o;t<i?r.insert(n,p.stringRepeat(" ",i-t)):r.remove(new b(n.row,n.column,n.row,n.column-i+t)),e.start.column=e.end.column=s,e.start.row=e.end.row=n.row,e.cursor=e.end}),t.fromOrientedRange(e[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var i=this.selection.getRange(),l=i.start.row,c=i.end.row,e=l==c;if(e){for(var h,u=this.session.getLength();h=this.session.getLine(c),/[=:]/.test(h)&&++c<u;);for(;h=this.session.getLine(l),/[=:]/.test(h)&&0<--l;);l<0&&(l=0),u<=c&&(c=u-1)}var d=this.session.removeFullLines(l,c),d=this.$reAlignText(d,e);this.session.insert({row:l,column:0},d.join("\n")+"\n"),e||(i.start.column=0,i.end.column=d[d.length-1].length),this.selection.setRange(i)}},this.$reAlignText=function(e,t){function n(e){return p.stringRepeat(" ",e)}function i(e){return e[2]?n(r)+e[2]+n(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,s,o,a=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?(null==r?(r=t[1].length,s=t[2].length,o=t[3].length):(r+s+o!=t[1].length+t[2].length+t[3].length&&(l=!1),r!=t[1].length&&(a=!1),r>t[1].length&&(r=t[1].length),s<t[2].length&&(s=t[2].length),o>t[3].length&&(o=t[3].length)),t):[e]}).map(t?i:a?l?function(e){return e[2]?n(r+s-e[2].length)+e[2]+n(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:i:function(e){return e[2]?n(r)+e[2]+n(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(c.prototype),r.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},r.MultiSelect=n,e("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var h=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){e=e.getLine(n);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,r=e.getLine(t),s=r.search(i);if(-1!=s){for(var o,n=n||r.length,a=e.getLength(),r=t,l=t;++t<a;){var c=e.getLine(t).search(i);if(-1!=c){if(c<=s){c=e.getTokenAt(t,0);if(!c||"string"!==c.type)break}l=t}}return r<l?(o=e.getLine(l).length,new h(r,n,l,o)):void 0}},this.openingBracketBlock=function(e,t,n,i,r){n={row:n,column:i+1},i=e.$findClosingBracket(t,n,r);if(i)return"start"==(t=null==(t=e.foldWidgets[i.row])?e.getFoldWidget(i.row):t)&&i.row>n.row&&(i.row--,i.column=e.getLine(i.row).length),h.fromPoints(n,i)},this.closingBracketBlock=function(e,t,n,i,r){n={row:n,column:i},i=e.$findOpeningBracket(t,n);if(i)return i.column++,n.column--,h.fromPoints(i,n)}}.call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/dom");(function(){this.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var t=e.data,i=t.start.row,r=t.end.row,s="add"==e.action,o=i+1;o<r;o++)n[o]&&(n[o].hidden=s);n[r]&&(s?n[i]?n[r].hidden=s:n[i]=n[r]:(n[i]==n[r]&&(n[i]=void 0),n[r].hidden=s))}},this.updateOnChange=function(e){var t,n,i,r=this.session.lineWidgets;r&&(t=e.start.row,0!=(n=e.end.row-t))&&("remove"==e.action?(i=r.splice(t+1,n),!r[t]&&i[i.length-1]&&(r[t]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this)):(i=new Array(n),r[t]&&null!=r[t].column&&e.start.column>r[t].column&&t++,i.unshift(t,0),r.splice.apply(r,i)),this.$updateRows())},this.$updateRows=function(){var n,e=this.session.lineWidgets;e&&(n=!0,e.forEach(function(e,t){if(e)for(n=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),n)&&(this.session.lineWidgets=null)},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},this.addLineWidget=function(e){var t,n,i;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight)&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),n=this.session.getFoldAt(e.row,0),(e.$fold=n)&&(i=this.session.lineWidgets,e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,s=0;s<n.length;s++){var o=n[s];if(o&&o.el&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,t.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/i.characterWidth));var a=o.h/i.lineHeight;o.coverLine&&(a-=this.session.getRowLineCount(o.row))<0&&(a=0),o.rowCount!=a&&(o.rowCount=a,o.row<r)&&(r=o.row)}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,i.length);0<r&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=r;o<=s;o++){var a,l=i[o];l&&l.el&&(l.hidden?l.el.style.top=-100-(l.pixelHeight||0)+"px":(l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el)),a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top,l.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=a-n.offset+"px",a=l.coverGutter?0:t.gutterWidth,l.fixedWidth||(a-=t.scrollLeft),l.el.style.left=a+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=n.width+2*n.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""))}}}}).call(i.prototype),t.LineWidgets=i}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function c(e,t,n){var i=e.getAnnotations().sort(a.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var s=i+r>>1,o=n(t,e[s]);if(0<o)i=1+s;else{if(!(o<0))return s;r=s-1}}return-(i+1)}(i,{row:t,column:-1},a.comparePoints),s=((r=r<0?-r-1:r)>=i.length?r=0<n?0:i.length-1:0===r&&n<0&&(r=i.length-1),i[r]);if(s&&n){if(s.row===t){for(;(s=i[r+=n])&&s.row===t;);if(!s)return i.slice()}var o=[];for(t=s.row;o[n<0?"unshift":"push"](s),(s=i[r+=n])&&s.row==t;);return o.length&&o}}}var h=e("../line_widgets").LineWidgets,u=e("../lib/dom"),a=e("../range").Range;t.showErrorMarker=function(e,t){var n,i=e.session,r=(i.widgetManager||(i.widgetManager=new h(i),i.widgetManager.attach(e)),e.getCursorPosition()),s=r.row,o=i.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0],s=(o?o.destroy():s-=t,c(i,s,t));if(s){t=s[0];r.column=(t.pos&&"number"!=typeof t.column?t.pos.sc:t.column)||0,r.row=t.row,n=e.renderer.$gutterLayer.$annotations[r.row]}else{if(o)return;n={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);function a(e,t,n){if(0===t&&("esc"===n||"return"===n))return l.destroy(),{command:"null"}}var l={row:r.row,fixedWidth:!0,coverGutter:!0,el:u.createElement("div"),type:"errorMarker"},s=l.el.appendChild(u.createElement("div")),t=l.el.appendChild(u.createElement("div")),o=(t.className="error_widget_arrow "+n.className,e.renderer.$cursorLayer.getPixelPosition(r).left);t.style.left=o+e.renderer.gutterWidth-5+"px",l.el.className="error_widget_wrapper",s.className="error_widget "+n.className,s.innerHTML=n.text.join("<br>"),s.appendChild(u.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),i.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},u.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,s,t){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),a=e("./lib/event"),n=e("./range").Range,l=e("./editor").Editor,i=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),s.config=e("./config"),s.require=e,"function"==typeof define&&(s.define=define),s.edit=function(e,t){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}var i,r;return e&&e.env&&e.env.editor instanceof l?e.env.editor:(n="",e&&/input|textarea/i.test(e.tagName)?(n=(i=e).value,e=o.createElement("pre"),i.parentNode.replaceChild(e,i)):e&&(n=e.textContent,e.innerHTML=""),n=s.createEditSession(n),e=new l(new c(e),n,t),r={document:n,editor:e,onResize:e.resize.bind(e,null)},i&&(r.textarea=i),a.addListener(window,"resize",r.onResize),e.on("destroy",function(){a.removeListener(window,"resize",r.onResize),r.editor.container.env=null}),e.container.env=e.env=r,e)},s.createEditSession=function(e,t){e=new i(e,t);return e.setUndoManager(new r),e},s.Range=n,s.Editor=l,s.EditSession=i,s.UndoManager=r,s.VirtualRenderer=c,s.version=s.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace.default=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(n){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",require:"?ngModel",link:function(o,e,a,i){function r(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);angular.isDefined(e)&&o.$evalAsync(function(){if(!angular.isFunction(e))throw new Error("ui-ace use a function as callback.");e(t)})}function t(e,t){if(e!==t){(u=angular.extend({},h,o.$eval(a.uiAce))).callbacks=[u.onLoad],u.onLoad!==h.onLoad&&u.callbacks.unshift(h.onLoad),p.removeListener("change",l),l=m(u.onChange),p.on("change",l),d.removeListener("blur",c),c=g(u.onBlur),d.on("blur",c);var n,i,r=d,e=p,s=u;if(angular.isDefined(s.workerPath)&&window.ace.require("ace/config").set("workerPath",s.workerPath),angular.isDefined(s.require)&&s.require.forEach(function(e){window.ace.require(e)}),angular.isDefined(s.showGutter)&&r.renderer.setShowGutter(s.showGutter),angular.isDefined(s.useWrapMode)&&e.setUseWrapMode(s.useWrapMode),angular.isDefined(s.showInvisibles)&&r.renderer.setShowInvisibles(s.showInvisibles),angular.isDefined(s.showIndentGuides)&&r.renderer.setDisplayIndentGuides(s.showIndentGuides),angular.isDefined(s.useSoftTabs)&&e.setUseSoftTabs(s.useSoftTabs),angular.isDefined(s.showPrintMargin)&&r.setShowPrintMargin(s.showPrintMargin),angular.isDefined(s.disableSearch)&&s.disableSearch&&r.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isString(s.theme)&&r.setTheme("ace/theme/"+s.theme),angular.isString(s.mode)&&e.setMode("ace/mode/"+s.mode),angular.isDefined(s.firstLineNumber)&&(angular.isNumber(s.firstLineNumber)?e.setOption("firstLineNumber",s.firstLineNumber):angular.isFunction(s.firstLineNumber)&&e.setOption("firstLineNumber",s.firstLineNumber())),angular.isDefined(s.advanced))for(n in s.advanced)i={name:n,value:s.advanced[n]},r.setOption(i.name,i.value);if(angular.isDefined(s.rendererOptions))for(n in s.rendererOptions)i={name:n,value:s.rendererOptions[n]},r.renderer.setOption(i.name,i.value);angular.forEach(s.callbacks,function(e){angular.isFunction(e)&&e(r)})}}var l,c,h=n.ace||{},u=angular.extend({},h,o.$eval(a.uiAce)),d=window.ace.edit(e[0]),p=d.getSession(),m=function(n){return function(e){var t=p.getValue();!i||t===i.$viewValue||o.$$phase||o.$root.$$phase||o.$evalAsync(function(){i.$setViewValue(t)}),r(n,e,d)}},g=function(e){return function(){r(e,d)}};a.$observe("readonly",function(e){d.setReadOnly(!!e||""===e)}),i&&(i.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-ace cannot use an object or an array as a model");return e}),i.$render=function(){p.setValue(i.$viewValue)});o.$watch(a.uiAce,t,!0),t(h),e.on("$destroy",function(){d.session.$stopWorker(),d.destroy()}),o.$watch(function(){return[e[0].offsetWidth,e[0].offsetHeight]},function(){d.resize(),d.renderer.updateFull()},!0)}}}]),angular.module("anonymous-github",["ngRoute","ngSanitize","ui.ace","ngPDFViewer","pascalprecht.translate","admin"]).config(["$routeProvider","$locationProvider","$translateProvider",function(e,t,n){n.useStaticFilesLoader({prefix:"/i18n/locale-",suffix:".json"}),n.preferredLanguage("en"),e.when("/",{templateUrl:"/partials/home.htm",controller:"homeController",title:"Anonymous GitHub Share the code, not the author"}).when("/dashboard",{templateUrl:"/partials/dashboard.htm",controller:"unifiedDashboardController",title:"Your anonymizations Anonymous GitHub"}).when("/pr-dashboard",{redirectTo:"/dashboard"}).when("/anonymize/:repoId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"New anonymization Anonymous GitHub"}).when("/pull-request-anonymize/:pullRequestId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a pull request Anonymous GitHub"}).when("/gist-anonymize/:gistId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a gist Anonymous GitHub"}).when("/status/:repoId",{templateUrl:"/partials/status.htm",controller:"statusController",title:"Repository status Anonymous GitHub"}).when("/conferences",{templateUrl:"/partials/conferences.htm",controller:"conferencesController",title:"Your conferences Anonymous GitHub"}).when("/conference/new",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"New conference Anonymous GitHub"}).when("/conference/:conferenceId/edit",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"Edit conference Anonymous GitHub"}).when("/conference/:conferenceId",{templateUrl:"/partials/conference.htm",controller:"conferenceController",title:"Conference Anonymous GitHub"}).when("/faq",{templateUrl:"/partials/faq.htm",controller:"faqController",title:"FAQ Anonymous GitHub"}).when("/profile",{templateUrl:"/partials/profile.htm",controller:"profileController",title:"Your settings Anonymous GitHub"}).when("/claim",{templateUrl:"/partials/claim.htm",controller:"claimController",title:"Claim an anonymization Anonymous GitHub"}).when("/pr/:pullRequestId",{templateUrl:"/partials/pullRequest.htm",controller:"pullRequestController",title:"Anonymous pull request Anonymous GitHub",reloadOnUrl:!1}).when("/gist/:gistId",{templateUrl:"/partials/gist.htm",controller:"gistController",title:"Anonymous gist Anonymous GitHub",reloadOnUrl:!1}).when("/r/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository Anonymous GitHub",reloadOnUrl:!1}).when("/repository/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository Anonymous GitHub",reloadOnUrl:!1}).when("/admin/",{templateUrl:"/partials/admin/overview.htm",controller:"overviewAdminController",title:"Admin · Overview Anonymous GitHub"}).when("/admin/repositories",{templateUrl:"/partials/admin/repositories.htm",controller:"repositoriesAdminController",title:"Admin · Repositories Anonymous GitHub"}).when("/admin/users",{templateUrl:"/partials/admin/users.htm",controller:"usersAdminController",title:"Admin · Users Anonymous GitHub"}).when("/admin/users/:username",{templateUrl:"/partials/admin/user.htm",controller:"userAdminController",title:"Admin · User details Anonymous GitHub"}).when("/admin/conferences",{templateUrl:"/partials/admin/conferences.htm",controller:"conferencesAdminController",title:"Admin · Conferences Anonymous GitHub"}).when("/admin/queues",{templateUrl:"/partials/admin/queues.htm",controller:"queuesAdminController",title:"Admin · Queues Anonymous GitHub"}).when("/admin/errors",{templateUrl:"/partials/admin/errors.htm",controller:"errorsAdminController",title:"Admin · Errors Anonymous GitHub"}).when("/404",{templateUrl:"/partials/404.htm",title:"Page not found Anonymous GitHub"}).otherwise({templateUrl:"/partials/404.htm",title:"Page not found Anonymous GitHub"}),t.html5Mode(!0)}]).filter("humanFileSize",function(){return humanFileSize}).filter("bigNum",function(){return function(e){var e=Number(e)||0,t=Math.abs(e);return t<1e3?String(e):t<1e4?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":t<1e6?Math.round(e/1e3)+"k":t<1e7?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(e/1e6)+"M"}}).filter("humanTime",function(){return function(e){if(!e)return"never";var t,n=(e="string"!=typeof(e=e instanceof Date?Math.round((Date.now()-e)/1e3):e)&&"number"!=typeof e?e:Math.round((Date.now()-new Date(e))/1e3))<0?"from now":"ago";if(172800<Math.abs(e))return(t=new Date).setSeconds(t.getSeconds()-e),"on "+t.toLocaleDateString();for(var i=[(e=Math.abs(e))/60/60/24/365,e/60/60/24/30,e/60/60/24/7,e/60/60/24,e/60/60,e/60,e],r=["year","month","week","day","hour","minute","second"],s=0;s<r.length;s++){var o=Math.floor(i[s]),a=r[s];if(1<o&&(a+="s"),1<=o)return o+" "+a+" "+n}return"0 seconds "+n}}).filter("title",function(){return function(e){return e&&(e=e.toLowerCase()).split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.substring(1,e.length)}).join(" ")}}).filter("statusMsg",function(){return function(e){var t,n;return e&&((t=e.match(/^rate_limited:(\d+)$/))?(t=Math.max(0,Math.ceil((parseInt(t[1],10)-Date.now())/1e3)))<=0?"Rate limited — resuming soon":(n=t%60,"Rate limited — retrying in "+(0<(t=Math.floor(t/60))?t+"m "+n+"s":n+"s")):e)}}).filter("diff",["$sce",function(h){const s=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function u(e,t){if(t){var n=t.newPath&&"/dev/null"!==t.newPath?t.newPath:t.oldPath||"",i="/dev/null"===t.oldPath?"added":"/dev/null"===t.newPath?"deleted":t.oldPath&&t.newPath&&t.oldPath!==t.newPath?"renamed":"modified";if(e.push('<div class="diff-file-block">'),e.push('<div class="diff-file-header"><span class="diff-file-icon"><i class="far fa-file-code"></i></span><span class="diff-file-name">'+s(n)+'</span><span class="diff-file-status diff-file-status-'+i+'">'+i+"</span></div>"),t.lines.length){e.push('<table class="diff-file-table"><tbody>');for(const r of t.lines)e.push('<tr class="diff-row diff-row-'+r.kind+'"><td class="diff-gutter diff-gutter-old">'+(r.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(r.newNo||"")+'</td><td class="diff-sign">'+("add"===r.kind?"+":"remove"===r.kind?"-":"hunk"===r.kind?"@":"")+'</td><td class="diff-code">'+s(r.text)+"</td></tr>");e.push("</tbody></table>")}e.push("</div>")}}return function(e){if(!e)return e;const t=[];let n=null,i=0,r=0;var s=()=>n=n||{oldPath:"",newPath:"",lines:[]},o=()=>{n&&(n.lines.length||n.oldPath||n.newPath)&&(u(t,n),n=null)},a=e.split("\n");for(let e=0;e<a.length;e++){var l,c=a[e];c.startsWith("diff --git")?(o(),s()):c.startsWith("--- ")?(n&&n.lines.length&&o(),s().oldPath=c.replace(/^--- (a\/)?/,"").trim()):c.startsWith("+++ ")?s().newPath=c.replace(/^\+\+\+ (b\/)?/,"").trim():c.startsWith("index ")||c.startsWith("similarity index")||c.startsWith("rename ")||c.startsWith("new file mode")||c.startsWith("deleted file mode")||c.startsWith("Binary files")||(c.startsWith("@@")?((l=c.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/))&&(i=parseInt(l[1],10),r=parseInt(l[2],10)),s().lines.push({kind:"hunk",oldNo:"",newNo:"",text:c})):n&&(c.startsWith("+")?(n.lines.push({kind:"add",oldNo:"",newNo:r,text:c.slice(1)}),r++):c.startsWith("-")?(n.lines.push({kind:"remove",oldNo:i,newNo:"",text:c.slice(1)}),i++):(n.lines.push({kind:"ctx",oldNo:i,newNo:r,text:c.startsWith(" ")?c.slice(1):c}),i++,r++)))}return u(t,n),h.trustAsHtml(t.join(""))}}]).directive("gistFile",["$location","$timeout","$sce",function(e,r,t){const s={javascript:"javascript",js:"javascript",typescript:"javascript",ts:"javascript",jsx:"javascript",tsx:"javascript",python:"python",py:"python",ipynb:"json",r:"r",julia:"julia",html:"markup",xml:"markup",svg:"markup",json:"json",yaml:"yaml",yml:"yaml",bash:"bash",sh:"bash",shell:"bash",css:"css",scss:"css",c:"c","c++":"cpp",cpp:"cpp",java:"java",go:"go",rust:"rust",ruby:"ruby",php:"php",sql:"sql",diff:"diff"};function o(e){var t=(e||"").lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()}return{restrict:"E",scope:{file:"=",terms:"=",options:"="},template:'<div ng-if="kind === \'md\'"><markdown content="file.content" terms="terms" options="options"></markdown></div><pre ng-if="kind === \'code\'" class="line-numbers"><code class="{{prismClass}}" ng-bind="file.content"></code></pre>',link:function(n,i){function e(){var e,t;n.file&&(n.kind=(e=n.file,"md"===(t=o(e&&e.filename))||"markdown"===t||e&&"Markdown"===e.language?"md":"code"),n.prismClass="language-"+(t=n.file,t&&t.language&&s[t.language.toLowerCase()]||s[o(t&&t.filename)]||"none"),r(()=>{i[0].querySelectorAll("pre code").forEach(e=>{window.Prism&&Prism.highlightElement(e)})},50))}n.$watch("file",e),n.$watch("file.content",e),n.$watch("terms",e),n.$watch("options",e,!0)}}}]).directive("markdown",["$location",function(r){return{restrict:"E",scope:{terms:"=",options:"=",content:"="},link:function(e,t,n){function i(){t.html(renderMD(e.content,r.url()+"/../"))}e.$watch(n.terms,i),e.$watch("terms",i),e.$watch("options",i),e.$watch("content",i)}}}]).directive("tree",[function(){return{restrict:"E",scope:{file:"=",parent:"@",searchQuery:"=",searchResults:"="},controller:["$element","$scope","$routeParams","$compile",function(n,g,i,r){if(g.repoId=document.location.pathname.split("/")[2],g.opens={},i.path){let t="";i.path.split("/").forEach(e=>{g.opens[t+"/"+e]=!0,t=t+"/"+e})}function s(e){var t,n=[];const i={"":{child:n}};for(t of e){if(t.path&&!i[t.path]){o=a=s=r=void 0;var r=t.path;if(!i[r]){var s=r.split("/");let t="";for(let e=0;e<s.length;e++){var o,a=t;t=t?t+"/"+s[e]:s[e],i[t]||(o={name:s[e],child:[]},i[t]=o,i[a].child.push(o))}}}var l,r=i[t.path||""].child;let e=t.path+"/"+t.name;e.startsWith("/")&&(e=e.substring(1)),null!=t.size?r.push({name:t.name,size:t.size,sha:t.sha}):i[e]||(l={name:t.name,child:[]},i[e]=l,r.push(l))}return n}const f=(e,t)=>{var n=!!e.child,i=!!t.child;return n&&i?e.name.localeCompare(t.name):n?-1:i?1:e.name.localeCompare(t.name)};function w(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function v(e,t,o){if(!e)return"";let a="<ul>";for(var l of e=e.sort(f))if(!o||function t(e,n,i){if(!i)return!0;const r=n?n+"/"+e.name:e.name;return e.child?!!i.folders.has(r)||e.child.some(e=>t(e,r,i)):i.paths.has(r)}(l,t?t.substring(1):"",o)){let n=!!l.child,i=l.name,r=l.size,s=l;if(n){let e=i,t=l.child;for(;t&&1==t.length;)e+="/"+t[0].name,r=t[0].size,t=t[0].child;i=e,s=t?{child:t}:l,null!=r&&0<=r&&(n=!1)}var l=null!=r?"Size: "+humanFileSize(r||0):"",c=t+"/"+i,h=n&&(u=c,h=void 0,h=g.$parent.fileCounts)&&h[u.startsWith("/")?u.substring(1):u]||0,u=o?!1!==g.opens[c]:g.opens[c],d=["file"],p=(n&&d.push("folder"),u&&d.push("open"),g.isActive(c)&&d.push("active"),n&&(m=c,p=void 0,!!(p=g.$parent.options&&g.$parent.options.truncatedFolders||[]).length)&&(m=m.startsWith("/")?m.substring(1):m,-1!==p.indexOf(m)));if(p&&d.push("truncated"),a+=`<li class="${d.join(" ")}" ng-class="{active: isActive('${c}'), open: ${o?"opens['"+c+"'] !== false":"opens['"+c+"']"}}" title="${w(l)}">`,n?(a+=`<a ng-click="openFolder('${c}', $event)"><span class="tree-toggle"></span><span class="tree-icon-folder"></span><span class="tree-name">${w(i)}</span>`,p&&(a+=`<span class="truncated-warning" title="{{ 'WARNINGS.folder_truncated' | translate }}"><i class="fas fa-exclamation-triangle"></i></span>`),0<h&&(a+=`<span class="tree-count">${h}</span>`),a+="</a>"):(m=""!==t,a+=`<a href='/r/${g.repoId}${encodePathForUrl(c)}'>${m?'<span class="tree-spacer"></span>':""}<span class="tree-icon-file"></span><span class="tree-name">${w(i)}</span></a>`),u&&s.child){d=s.child;if(1<d.length)a+=v(d,c,o);else if(n){let e=d;for(;e&&1==e.length;)e=e[0].child;a+=v(e,c,o)}}a+="</li>"}var m,p,u,h;return a+"</ul>"}function o(){n.html("");var e=g.searchQuery?function(){var e=g.searchResults;if(!e||!e.length)return null;var t=new Set,n=new Set;for(const r of e){var i=r.path?r.path+"/"+r.name:r.name;if(t.add(i),r.path){let e="";for(const s of r.path.split("/").filter(Boolean))e=e?e+"/"+s:s,n.add(e)}}return{paths:t,folders:n}}():null;let t;t=null!==e&&0===e.paths.size?'<div class="tree-search-empty">No files found</div>':v(s(g.file).sort(f),"",e),r(t)(g,e=>{n.append(e),a&&(e=function(e){if(e)for(var t=l(),n=0;n<t.length;n++)if(h(t[n])===e)return t[n];return null}(a))&&(e.classList.add("tree-focused"),n[0].focus())})}g.$watch("file",e=>{if(null!=e){if(0==e.length)return n.html("Empty repository");!function e(t,n){if(t)for(const r of t){var i;r.child&&0!==r.child.length&&((i=n+"/"+r.name)in g.opens||(g.opens[i]=!0),e(r.child,i))}}(s(e),""),o()}},!0),g.$watch("searchResults",(e,t)=>{e!==t&&g.file&&g.file.length&&o()}),g.$watch("searchQuery",(e,t)=>{e!==t&&!e&&g.file&&g.file.length&&o()}),g.isActive=function(e){return i.path==e.substring(1)},g.openFolder=function(e,t){var n=g.opens[e],n=(void 0===n&&g.searchQuery&&(n=!0),g.opens[e]=!n,t.target.closest("li")),t=n?n.querySelector(":scope > ul"):null;null!=t&&0!==t.children.length||g.$parent.getFiles(e.substring(1))};var a=i.path?"/"+i.path:null;function l(){return Array.from(n[0].querySelectorAll("li > a"))}function c(){return n[0].querySelector("a.tree-focused")}function h(e){var t,n;return e?(t=e.getAttribute("href"))?(n="/r/"+g.repoId,0===t.indexOf(n)?decodeURIComponent(t.substring(n.length)):null):(t=e.getAttribute("ng-click"))&&(n=t.match(/openFolder\('([^']+)'/))?n[1]:null:null}function u(e){var t=c();t&&t.classList.remove("tree-focused"),a=e?(e.classList.add("tree-focused"),e.scrollIntoView({block:"nearest"}),h(e)):null}n[0].setAttribute("tabindex","0"),n[0].addEventListener("keydown",function(e){var t,n,i,r=l();r.length&&(i=(t=c())?r.indexOf(t):-1,"ArrowDown"===e.key?(e.preventDefault(),u(r[i<r.length-1?i+1:0])):"ArrowUp"===e.key?(e.preventDefault(),u(r[0<i?i-1:r.length-1])):"ArrowRight"===e.key?(e.preventDefault(),t&&(n=t.closest("li"))&&n.classList.contains("folder")&&(n.classList.contains("open")?(i=n.querySelector(":scope > ul > li > a"))&&u(i):t.click())):"ArrowLeft"===e.key?(e.preventDefault(),t&&((n=t.closest("li"))&&n.classList.contains("folder")&&n.classList.contains("open")?t.click():(r=n&&n.parentElement?n.parentElement.closest("li.folder"):null)&&(i=r.querySelector(":scope > a"))&&u(i))):"Enter"===e.key&&(e.preventDefault(),t)&&t.click())}),n[0].addEventListener("click",function(e){e=e.target.closest("a");e&&n[0].contains(e)&&u(e)})}]}}]).directive("notebook",[function(){return{restrict:"E",scope:{file:"="},controller:["$element","$scope","$http",function(t,e,n){function i(e){e=nb.parse(e);try{t.html(""),t.append(e.render()),Prism.highlightAll()}catch(e){t.html("Unable to render the notebook.")}}function r(){if(e.$parent.content)try{i(JSON.parse(e.$parent.content))}catch(e){t.html("Unable to render the notebook invalid notebook format.")}else e.file&&n.get(e.file.download_url).then(e=>i(e.data))}e.$watch("file",e=>{r()}),r()}]}}]).directive("loc",[function(){return{restrict:"E",scope:{stats:"="},template:"<div class='lang' ng-repeat='lang in elements' title='{{lang.lang|title}}: {{lang.loc | number}} lines' data-toggle='tooltip' data-placement='bottom' style='width:{{lang.loc*100/total}}%;background:{{lang.color}};'></div>",controller:["$scope",function(n){function t(){for(var e in n.elements=[],n.total=0,n.stats){var t=n.stats[e].code;t&&(n.total+=t,n.elements.push({lang:e,loc:t,color:langColors[e]}))}setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},100)}n.$watch("stats",e=>{t()}),t()}]}}]).controller("mainController",["$scope","$http","$location","$timeout",function(r,e,n,t){function i(e,t){t&&(r.title=t.title),r.path=n.url(),r.paths=n.path().substring(1).split("/")}r.title="Main",r.user={status:"connection"},r.site_options,r.toasts=[],r.removeToast=function(e){e=r.toasts.indexOf(e);-1!==e&&r.toasts.splice(e,1)},r.addToast=function(e){return r.toasts.push(e),t(function(){r.removeToast(e)},8e3),e},r.path=n.url(),r.paths=n.path().substring(1).split("/"),r.darkMode=function(e){localStorage.setItem("darkMode",e);var t,n="/css/prism-okaidia.css",i="/css/prism.css",i=(((r.isDarkMode=e)?($("body").addClass("dark-mode"),(t=document.createElement("link")).href=n,t.rel="stylesheet",document.head.append(t),$(`link[href='${i}']`)):($("body").removeClass("dark-mode"),(t=document.createElement("link")).href=i,t.rel="stylesheet",document.head.append(t),$(`link[href='${n}']`))).remove(),document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap"));i&&(i.style.backgroundColor=e?"#FAF9F6":"#1A1815",i.style.color=e?"#1A1815":"#FAF9F6"),r.$broadcast("dark-mode",e)},r.darkMode("true"==localStorage.getItem("darkMode")),e.get("/api/user").then(e=>{e&&(r.user=e.data)},()=>{r.user=null}),e.get("/api/options").then(e=>{e&&(r.site_options=e.data)},()=>{r.site_options=null}),e.get("/api/message").then(e=>{e&&(r.generalMessage=e.data)},()=>{r.generalMessage=null}),r.$on("$routeChangeSuccess",i),r.$on("$routeUpdate",i)}]).controller("faqController",["$scope","$http",function(e,t){}]).controller("profileController",["$scope","$http",function(t,n){function i(){n.get("/api/user/default").then(e=>{e=e.data;e.terms&&(t.terms=e.terms.join("\n")),t.option=Object.assign({},t.option,e.options)})}t.terms="",t.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},i(),t.saveDefault=()=>{var e={terms:t.terms.trim().split("\n"),options:t.options};n.post("/api/user/default",e).then(()=>{i(),t.message="Saved"},e=>{$translate("ERRORS."+e.data.error).then(e=>{t.error=e},console.error)})}}]).controller("claimController",["$scope","$http","$location",function(t,e,n){t.repoId=null,t.repoUrl=null,t.claim=()=>{e.post("/api/repo/claim",{repoId:t.repoId,repoUrl:t.repoUrl}).then(e=>{n.url("/dashboard")},e=>{t.error=e.data,t.claimForm.repoUrl.$setValidity("not_found",!1),t.claimForm.repoId.$setValidity("not_found",!1)})}}]).controller("homeController",["$scope","$http","$location",function(t,e,n){function i(t){var n={series:t,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(t&&!(t.length<2)){var i=new Array(t.length-1);for(let e=1;e<t.length;e++)i[e-1]=t[e]-t[e-1];var r=i.length,e=Math.max.apply(null,i),s=Math.min.apply(null,i),o=Math.min(0,s),a=e-o||1;n.viewW=2*r,n.bars=new Array(r);for(let e=0;e<r;e++){var l=(i[e]-o)/a,l=Math.max(1.5,34*l);n.bars[e]={x:(2*e+.25).toFixed(2),y:(36-l).toFixed(2),w:"1.5",h:l.toFixed(2)}}n.deltaToday=i[r-1],2<=r&&(s=i[r-2])&&(n.pctChange=(n.deltaToday-s)/s*100),n.pctAbs=Math.round(Math.abs(n.pctChange)),n.isUp=0<=n.pctChange}return n}t.user&&!t.user.status&&n.url("/dashboard"),t.$watch("user.status",()=>{t.user&&!t.user.status&&n.url("/dashboard")}),t.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.get("/api/stat/").then(e=>{t.stat=e.data,t.cards[0].total=e.data.nbRepositories,t.cards[1].total=e.data.nbUsers,t.cards[2].total=e.data.nbPageViews,t.cards[3].total=e.data.nbPullRequests}),t.history={repositories:i([]),users:i([]),pageViews:i([]),pullRequests:i([])},e.get("/api/stat/history?days=60").then(e=>{e=e.data||[];t.history={repositories:i(e.map(e=>e.nbRepositories||0)),users:i(e.map(e=>e.nbUsers||0)),pageViews:i(e.map(e=>e.nbPageViews||0)),pullRequests:i(e.map(e=>e.nbPullRequests||0))}})}]).controller("unifiedDashboardController",["$scope","$http","$location",function(r,s,e){r.$on("$routeChangeStart",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),r.$watch("user.status",()=>{null==r.user&&e.url("/")}),null==r.user&&e.url("/"),setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),r.items=[],r.search="";const t="dashboard.filterPrefs",n="all",i={status:{ready:!0,expired:!0,removed:!1}},o="-anonymizeDate";var a=loadFilterPrefs(t)||{};r.typeFilter=a.typeFilter||n,r.filters={status:Object.assign({},i.status,a.filters&&a.filters.status||{})},r.orderBy=a.orderBy||o,r.$watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})}),r.$watch("filters",()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})},!0),s.get("/api/user/quota").then(e=>{r.quota=e.data,r.quota.storage.percent=r.quota.storage.total?100*r.quota.storage.used/r.quota.storage.total:100,r.quota.file.percent=r.quota.file.total?100*r.quota.file.used/r.quota.file.total:100,r.quota.repository.percent=r.quota.repository.total?100*r.quota.repository.used/r.quota.repository.total:100},console.error);let l=null,c=null,h=null;function u(){r.items=(l||[]).concat(c||[]).concat(h||[])}function d(){l=null,c=null,h=null,s.get("/api/user/anonymized_repositories").then(e=>{l=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="repo",e._id=e.repoId,e._name=e.repoId,e._source=e.source.fullName,e._editUrl="/anonymize/"+e.repoId,e._viewUrl="/r/"+e.repoId+"/",e)),u()},e=>{console.error(e)}),s.get("/api/user/anonymized_pull_requests").then(e=>{c=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="pr",e._id=e.pullRequestId,e._name=e.pullRequestId,e._source=e.source.repositoryFullName+"#"+e.source.pullRequestId,e._editUrl="/pull-request-anonymize/"+e.pullRequestId,e._viewUrl="/pr/"+e.pullRequestId+"/",e)),u()},e=>{console.error(e)}),s.get("/api/user/anonymized_gists").then(e=>{h=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=(e.options.terms||[]).filter(e=>e),e._type="gist",e._id=e.gistId,e._name=e.gistId,e._source=e.source.gistId,e._editUrl="/gist-anonymize/"+e.gistId,e._viewUrl="/gist/"+e.gistId+"/",e)),u()},e=>{console.error(e)})}function p(n,i){s.get("/api/repo/"+n).then(e=>{for(const t of r.items)if("repo"===t._type&&t.repoId==n){t.status=e.data.status;break}"ready"==e.data.status||"error"==e.data.status||"removed"==e.data.status||"expired"==e.data.status?i(e.data):setTimeout(()=>p(n,i),2500)})}d();const m=e=>"repo"===e?"repository":"gist"===e?"gist":"pull request",g=e=>"repo"===e?"/api/repo":"gist"===e?"/api/gist":"/api/pr";r.removeItem=t=>{const e=m(t._type);if(confirm(`Are you sure that you want to remove the ${e} ${t._id}?`)){const i={title:`Removing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be removed.`};r.addToast(i);var n=g(t._type)+"/"+t._id;s.delete(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is removed.",i.body=`The ${e} ${t._id} is removed.`,r.$apply()}):(i.title=t._id+" is removed.",i.body=`The ${e} ${t._id} is removed.`,d())},e=>{i.title=`Error during the removal of ${t._id}.`,i.body=e.body,d()})}},r.refreshItem=t=>{const e=m(t._type),n={title:`Refreshing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be refreshed.`};r.addToast(n);var i=`${g(t._type)}/${t._id}/refresh`;s.post(i).then(()=>{"repo"===t._type?p(t._id,()=>{n.title=t._id+" is refreshed.",n.body=`The ${e} ${t._id} is refreshed.`,r.$apply()}):(n.title=t._id+" is refreshed.",n.body=`The ${e} ${t._id} is refreshed.`,d())},e=>{n.title=`Error during the refresh of ${t._id}.`,n.body=e.body,d()})},r.itemFilter=e=>("all"===r.typeFilter||e._type===r.typeFilter)&&0!=r.filters.status[e.status]&&(0==r.search.trim().length||!!(e._source&&-1<e._source.indexOf(r.search))||-1<e._id.indexOf(r.search))}]).controller("dashboardController",["$scope","$location",function(e,t){t.url("/dashboard")}]).controller("prDashboardController",["$scope","$location",function(e,t){t.url("/dashboard")}]).controller("statusController",["$scope","$http","$routeParams",function(i,e,t){i.repoId=t.repoId,i.repo=null,i.progress=0,i.rateLimitResetAt=0,i.rateLimitCountdown="";var r=null;function n(n){function e(){var e,t=Math.max(0,Math.ceil((n-Date.now())/1e3));t<=0?(i.rateLimitCountdown="",i.rateLimitResetAt=0,clearInterval(r),r=null):(e=Math.floor(t/60),t=t%60,i.rateLimitCountdown=0<e?e+"m "+t+"s":t+"s"),i.$applyAsync()}i.rateLimitResetAt=n,r&&clearInterval(r),e(),r=setInterval(e,1e3)}i.$on("$destroy",function(){r&&clearInterval(r)}),i.getStatus=()=>{e.get("/api/repo/"+i.repoId,{repoId:i.repoId,repoUrl:i.repoUrl}).then(e=>{i.repo=e.data,e.data.rateLimitResetAt?n(e.data.rateLimitResetAt):i.repo.statusMessage=function(e){if(e){var t=e.match(/^rate_limited:(\d+)$/);if(t)return n(parseInt(t[1],10)),null;i.rateLimitResetAt=0}return e}(i.repo.statusMessage),"ready"==i.repo.status?i.progress=100:"queue"==i.repo.status?i.progress=10:"downloaded"==i.repo.status?i.progress=50:"download"==i.repo.status||"preparing"==i.repo.status?i.progress=25:"anonymizing"==i.repo.status&&(i.progress=75);e="ready"!=i.repo.status;(e="error"!=i.repo.status||i.rateLimitResetAt?e:!1)&&setTimeout(i.getStatus,2e3)},e=>{i.error=e.data.error})},i.getStatus()}]).controller("anonymizeController",["$scope","$http","$sce","$routeParams","$location","$translate","$timeout",function(s,o,r,e,t,a,l){function c(e,t,n){s.anonymize&&s.anonymize[e]&&s.anonymize[e].$setValidity(t,n)}var n;async function h(){var e=parseGithubUrl(s.sourceUrl);try{k();var t=await o.get(`/api/repo/${e.owner}/${e.repo}/`,{params:{repositoryID:s.repositoryID,force:"1"}});s.details=t.data,s.repoId||(s.repoId=s.details.repo+"-"+generateRandomId(4)),await s.getBranches()}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),S(e.data.error)),c("sourceUrl","missing",!1),e}}async function u(e){if(s.readme&&!e)return s.readme;var t=parseGithubUrl(s.sourceUrl);try{var n=await o.get(`/api/repo/${t.owner}/${t.repo}/readme`,{params:{force:!0===e?"1":"0",branch:s.source.branch,repositoryID:s.repositoryID}});s.readme=n.data}catch(e){s.readme=""}}function i(){var e={terms:s.terms?s.terms.split("\n"):[],image:!!s.options.image,link:!!s.options.link,repoId:s.repoId};s.source&&s.source.branch&&(e.branchName=s.source.branch);try{var t=parseGithubUrl(s.sourceUrl);e.repoName=t.owner+"/"+t.repo}catch(e){}return e}function d(n,i){let r=null,s=0;return function(){r&&l.cancel(r),r=l(()=>{r=null;const t=++s;var e=n();e&&o.post("/api/anonymize-preview",e).then(e=>{t===s&&i(e.data)},()=>{})},200)}}s.sourceUrl="",s.detectedType=null,s.repoId="",s.pullRequestId="",s.gistId="",s.terms="",s.defaultTerms="",s.branches=[],s.source={branch:"",commit:""},s.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0},s.options.expirationDate.setDate(s.options.expirationDate.getDate()+90),s.anonymize_readme="",s.readme="",s.html_readme="",s.isUpdate=!1,n=()=>{e.repoId&&""!=e.repoId&&(s.isUpdate=!0,s.detectedType="repo",s.repoId=e.repoId,o.get("/api/repo/"+s.repoId).then(async e=>{s.sourceUrl="https://github.com/"+e.data.source.fullName,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.role=e.data.role||"owner",s.coauthors=e.data.coauthors||[],s._originalBranch=e.data.source.branch,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,s.repositoryID=e.data.source.repositoryID,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),await Promise.all([h(),u()]),m(),s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.repoId&&(s.anonymize.repoId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)})),e.pullRequestId&&""!=e.pullRequestId&&(s.isUpdate=!0,s.detectedType="pr",s.pullRequestId=e.pullRequestId,o.get("/api/pr/"+s.pullRequestId).then(async t=>{s.sourceUrl="https://github.com/"+t.data.source.repositoryFullName+"/pull/"+t.data.source.pullRequestId,s.terms=t.data.options.terms.filter(e=>e).join("\n"),s.source=t.data.source,s.options=Object.assign({},s.options,t.data.options),s.conference=t.data.conference,t.data.options.expirationDate&&(s.options.expirationDate=new Date(t.data.options.expirationDate));try{s.details=(await o.get(`/api/pr/${t.data.source.repositoryFullName}/`+t.data.source.pullRequestId)).data}catch(e){t=e&&e.data&&e.data.error;t&&(a("ERRORS."+t).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),S(t))}s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.pullRequestId&&(s.anonymize.pullRequestId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)})),e.gistId&&""!=e.gistId&&(s.isUpdate=!0,s.detectedType="gist",s.gistId=e.gistId,o.get("/api/gist/"+s.gistId).then(async e=>{s.sourceUrl="https://gist.github.com/"+e.data.source.gistId,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),s.details=(await o.get("/api/gist/source/"+e.data.source.gistId)).data,s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.gistId&&(s.anonymize.gistId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)}))},o.get("/api/user/default").then(e=>{e=e.data;e.terms&&(s.defaultTerms=e.terms.join("\n")),s.options=Object.assign({},s.options,e.options),s.options.expirationDate=new Date(s.options.expirationDate),s.options.expirationDate.setDate(s.options.expirationDate.getDate()+90),n&&n()}),s.urlSelected=async()=>{s.terms=s.defaultTerms,s.repoId="",s.pullRequestId="",s.gistId="",s.details=null,s.branches=[],s.source={type:"GitHubStream",branch:"",commit:""},s.anonymize_readme="",s.readme="",s.html_readme="",s.detectedType=null;let e;try{e=parseGithubUrl(s.sourceUrl)}catch(e){return void c("sourceUrl","github",!1)}c("sourceUrl","github",!0);try{if(e.gistId&&!e.repo){s.detectedType="gist",s.source={gistId:e.gistId};var t=parseGithubUrl(s.sourceUrl);try{k();var n=await o.get("/api/gist/source/"+t.gistId);s.details=n.data,s.gistId||(s.gistId="gist-"+t.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),S(e.data.error)),c("sourceUrl","missing",!1),e}await 0}else if(e.pullRequestId){s.detectedType="pr",s.source={repositoryFullName:e.owner+"/"+e.repo,pullRequestId:e.pullRequestId};var i=parseGithubUrl(s.sourceUrl);try{k();var r=await o.get(`/api/pr/${i.owner}/${i.repo}/`+i.pullRequestId);s.details=r.data,s.pullRequestId||(s.pullRequestId=i.repo+"-PR"+i.pullRequestId+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),S(e.data.error)),c("sourceUrl","missing",!1),e}await 0}else s.detectedType="repo",await Promise.all([h(),u()]),m()}catch(e){return}s.$apply(),$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),s.$watch("options.update",e=>{"repo"===s.detectedType&&s.anonymize&&s.anonymize.commit&&(s.anonymize.commit.$$element[0].disabled=!!e)}),s.$watch("source.branch",async()=>{var e;"repo"===s.detectedType&&(e=s.branches.filter(e=>e.name==s.source.branch)[0])&&(s.isUpdate&&s._originalBranch===s.source.branch&&!!s.source.commit||(s.source.commit=e.commit),s.readme=e.readme,await u(),m(),s.$apply())}),s.getBranches=async e=>{var t=parseGithubUrl(s.sourceUrl);try{var n=await o.get(`/api/repo/${t.owner}/${t.repo}/branches`,{params:{force:!0===e?"1":"0",repositoryID:s.repositoryID}}),i=(s.branches=n.data,s.sourceUnreachable=!1,s.source.branch||(s.source.branch=s.details.defaultBranch),s.branches.filter(e=>e.name==s.source.branch));0<i.length&&(!e&&s.isUpdate&&!s.options.update&&s._originalBranch===s.source.branch&&s.source.commit||(s.source.commit=i[0].commit),s.readme=i[0].readme,await u(e))}catch(e){s.branches=[],s.sourceUnreachable=e&&(404===e.status||e.data&&"repo_not_found"===e.data.error);t=e&&e.data&&e.data.error||(e&&404===e.status?"repo_not_found":"unknown_error");a("ERRORS."+t).then(e=>{s.toasts=s.toasts||[],s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),c("sourceUrl","missing",!1)}s.$apply()};const p=d(()=>s.readme?{content:s.readme,options:i()}:null,e=>{s.anonymize_readme=e.content||"";let t="";try{var n=parseGithubUrl(s.sourceUrl),i=s.source.branch||s.details&&s.details.defaultBranch||"main";t=`https://github.com/${n.owner}/${n.repo}/raw/${i}/`}catch(e){}e=renderMD(s.anonymize_readme,t);s.html_readme=r.trustAsHtml(e),l(Prism.highlightAll,150)});function m(){s.anonymize&&s.anonymize.terms&&(s.termsRegexWarning=!!s.terms&&!!s.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),p())}let g=new Map,f=new Set;const w=d(()=>{var e=function(){var e=new Set,t=s.details&&s.details.pullRequest;if(t){"string"==typeof t.title&&e.add(t.title),"string"==typeof t.body&&e.add(t.body),"string"==typeof t.diff&&e.add(t.diff);for(const n of s.details&&s.details.comments||[])"string"==typeof n.author&&e.add(n.author),"string"==typeof n.body&&e.add(n.body)}return e}(),e=(f=e,Array.from(e));return 0===e.length?null:{contents:e,options:i()}},t=>{if(t&&Array.isArray(t.contents)){var n=Array.from(f),i=new Map;for(let e=0;e<n.length&&e<t.contents.length;e++)i.set(n[e],t.contents[e]);g=i}});s.anonymizePrContent=function(e){if(e){if(g.has(e))return g.get(e);f.has(e)||w()}return e};let v=new Map,y=new Set,b=0;const x=d(()=>{var e=function(){var e=new Set,t=s.details&&s.details.gist;if(t){"string"==typeof t.description&&e.add(t.description),"string"==typeof t.ownerLogin&&e.add(t.ownerLogin);for(const n of t.files||[])"string"==typeof n.filename&&e.add(n.filename),"string"==typeof n.content&&e.add(n.content);for(const i of t.comments||[])"string"==typeof i.author&&e.add(i.author),"string"==typeof i.body&&e.add(i.body)}return e}(),e=(y=e,Array.from(e));return 0===e.length?null:{contents:e,options:i()}},t=>{if(t&&Array.isArray(t.contents)){var n=Array.from(y),i=new Map;for(let e=0;e<n.length&&e<t.contents.length;e++)i.set(n[e],t.contents[e]);v=i,b++,A()}});function A(){var e=s.details&&s.details.gist&&s.details.gist.files||[];s.previewGistFiles=e.map(e=>({filename:s.anonymizeGistContent(e.filename),content:s.anonymizeGistContent(e.content),language:e.language}))}function k(){c("repoId","used",!0),c("repoId","format",!0),c("pullRequestId","used",!0),c("pullRequestId","format",!0),c("gistId","used",!0),c("gistId","format",!0),c("sourceUrl","used",!0),c("sourceUrl","missing",!0),c("sourceUrl","access",!0),c("sourceUrl","github",!0),c("commit","exists",!0),c("conference","activated",!0),c("terms","format",!0),s.termsRegexWarning=!1}function S(e){var t="pr"===s.detectedType?"pullRequestId":"gist"===s.detectedType?"gistId":"repoId";switch(e){case"repoId_already_used":c(t,"used",!1);break;case"invalid_repoId":case"options_not_provided":c(t,"format",!1);break;case"repo_already_anonymized":c("sourceUrl","used",!1);break;case"invalid_terms_format":c("terms","format",!1);break;case"repo_not_found":c("sourceUrl","missing",!1);break;case"repo_not_accessible":c("sourceUrl","access",!1);break;case"commit_not_found":c("commit","exists",!1);break;case"conf_not_activated":c("conference","activated",!1)}}s.anonymizeGistContent=function(e){if(e){if(v.has(e))return v.get(e);y.has(e)||x()}return e},s.previewGistFiles=[],s.$watch("details.gist.files",A,!0),s.$watch("terms",A),s.coauthors=s.coauthors||[],s.coauthorResults=[],s.coauthorError="",s.searchCoauthors=()=>{var e=(s.coauthorSearch||"").trim();s.coauthorError="",e.length<2?s.coauthorResults=[]:o.get("/api/user/search/github-users",{params:{q:e}}).then(e=>{const t=new Set((s.coauthors||[]).map(e=>(e.username||"").toLowerCase()));s.coauthorResults=(e.data||[]).filter(e=>!t.has((e.username||"").toLowerCase()))},()=>{s.coauthorResults=[]})},s.addCoauthor=(e,t)=>{t&&t.preventDefault(),e&&e.username&&o.post("/api/repo/"+s.repoId+"/coauthors",{username:e.username}).then(e=>{s.coauthors=e.data||[],s.coauthorResults=[],s.coauthorSearch="",s.coauthorError=""},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.removeCoauthor=e=>{e&&e.username&&confirm("Remove co-author "+e.username+"?")&&o.delete("/api/repo/"+s.repoId+"/coauthors/"+encodeURIComponent(e.username)).then(e=>{s.coauthors=e.data||[]},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.anonymizeRepo=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={repoId:s.repoId,terms:s.terms.trim().split("\n").filter(e=>e),fullName:t.owner+"/"+t.repo,repository:s.sourceUrl,options:s.options,source:s.source,conference:s.conference},n=(s.details&&(t.options.pageSource=s.details.pageSource),k(),s.isUpdate?"/api/repo/"+s.repoId:"/api/repo/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+s.repoId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),S(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.anonymizeGist=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={gistId:s.gistId,terms:s.terms.trim().split("\n").filter(e=>e),source:{gistId:t.gistId},options:s.options,conference:s.conference},n=(k(),s.isUpdate?"/api/gist/"+s.gistId:"/api/gist/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+s.gistId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),S(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.anonymizePullRequest=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={pullRequestId:s.pullRequestId,terms:s.terms.trim().split("\n").filter(e=>e),source:{repositoryFullName:t.owner+"/"+t.repo,pullRequestId:t.pullRequestId},options:s.options,conference:s.conference},n=(k(),s.isUpdate?"/api/pr/"+s.pullRequestId:"/api/pr/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+s.pullRequestId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),S(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.$watch("conference",()=>{s.conference&&o.get("/api/conferences/"+s.conference).then(e=>{s.conference_data=e.data,s.conference_data.startDate=new Date(s.conference_data.startDate),s.conference_data.endDate=new Date(s.conference_data.endDate),s.options.expirationDate=new Date(s.conference_data.endDate),s.options.expirationMode="remove",s.options.update=s.conference_data.options.update,s.options.image=s.conference_data.options.image,s.options.pdf=s.conference_data.options.pdf,s.options.notebook=s.conference_data.options.notebook,s.options.link=s.conference_data.options.link},()=>{s.conference_data=null})}),s.$watch("terms",()=>{"repo"===s.detectedType&&m(),"pr"===s.detectedType&&w(),"gist"===s.detectedType&&x()}),s.$watch("options.image",()=>{"repo"===s.detectedType&&m(),"pr"===s.detectedType&&w(),"gist"===s.detectedType&&x()}),s.$watch("options.link",()=>{"repo"===s.detectedType&&m(),"pr"===s.detectedType&&w(),"gist"===s.detectedType&&x()}),s.$watch("details",()=>{"pr"===s.detectedType&&w(),"gist"===s.detectedType&&x()},!0)}]).controller("exploreController",["$scope","$http","$location","$routeParams","$sce","$q","PDFViewerService",function(g,s,o,i,a,r,l){g.files=[],g.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),g.fileSearchQuery="",g.fileSearchResults=null,g.fileSearchLoading=!1,document.addEventListener("keydown",function(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),e=document.querySelector(".tree-search-input"))&&(e.focus(),e.select())});var f=null;g.onFileSearchChange=function(){f&&(f.resolve(),f=null);var e=g.fileSearchQuery;!e||e.length<2?(g.fileSearchResults=null,g.fileSearchLoading=!1):(g.fileSearchLoading=!0,f=r.defer(),s.get(`/api/repo/${g.repoId}/files/search?q=`+encodeURIComponent(e),{timeout:f.promise}).then(function(e){f=null,g.fileSearchLoading=!1;for(var t={},n=(g.files.forEach(function(e){t[(e.path||"")+"/"+e.name]=!0}),[]),i={},r=0;r<e.data.length;r++){var s=e.data[r];if(s.path)for(var o=s.path.split("/"),a="",l=0;l<o.length;l++){var c=a,a=a?a+"/"+o[l]:o[l],h=c+"/"+o[l];t[h]||i[h]||(i[h]=!0,n.push({name:o[l],path:c}))}}n.sort(function(e,t){return(e.path||"").split("/").length-(t.path||"").split("/").length}),0<n.length&&g.files.push.apply(g.files,n);for(var u=[],d=0;d<e.data.length;d++){var p=e.data[d],m=(p.path||"")+"/"+p.name;t[m]||null==p.size||(u.push(p),t[m]=!0)}0<u.length&&g.files.push.apply(g.files,u),g.fileSearchResults=e.data},function(){f||(g.fileSearchLoading=!1,g.fileSearchResults=[])}))};const c={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},h=["license","txt"],u=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],d=["wav","mp3","ogg","wma","flac","aac","m4a"],p=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];g.$on("$routeUpdate",function(e,t){if((i.path||"")!=g.filePath){if(g.filePath=i.path||"",g.paths=g.filePath.split("/").filter(e=>e&&0<e.trim().length),g.repoId!=i.repoId)return v();w();for(let e=0;e<g.paths.length-1;e++){const n=0<e?g.paths.slice(0,e).join("/"):"";g.files.some(e=>e.path===n)||g.getFiles(n)}}}),g.fileCounts=null,g.getFiles=function(n){return s.get(`/api/repo/${g.repoId}/files/?path=${encodeURIComponent(n)}&v=`+g.options.lastUpdateDate).then(function(e){const t=n||"";return g.files=g.files.filter(e=>e.path!==t),g.files.push(...e.data),e.data},function(e){g.type="error",g.content=e&&e.data&&e.data.error||"unknown_error",g.files=[]})};var m=null;function w(){g.content="",g.file=g.files.filter(e=>e.name==g.paths[g.paths.length-1]&&e.path==g.paths.slice(0,g.paths.length-1).join("/"))[0];let e="0",t=(g.file&&g.file.sha&&(e=g.file.sha),g.url=`/api/repo/${g.repoId}/file/${encodePathForUrl(g.filePath)}?v=`+e,g.filePath.toLowerCase());var n=t.lastIndexOf("."),n=(-1<n&&(t=t.substring(n+1)),g.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,showPrintMargin:!1,tabSize:2,highlightSelectedWord:!1,fontSize:15,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!0,enableBehaviours:!0,fadeFoldWidgets:!1,mode:(n=t,c[n]||n),onLoad:function(i){const n=ace.require("ace/range").Range;let r=null;function s(e,t){null!==r&&(i.session.removeMarker(r),r=null),null!=e&&(r=i.session.addMarker(new n(e,0,t,1),"highlighted-line","fullLine"))}function e(e){var t=window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(t){const n=parseInt(t[1])-1;t=t[2]?parseInt(t[2])-1:n;s(n,t),e&&setTimeout(()=>{i.scrollToLine(n,!0,!0,function(){})},100)}else s(null)}e(!0);let o=null;i.on("guttermousedown",function(e){var t=e.getDocumentPosition().row;let n=t,i=t;e.domEvent&&e.domEvent.shiftKey&&null!==o?(n=Math.min(o,t),i=Math.max(o,t)):o=t;t=n===i?"#L"+(n+1):`#L${n+1}-L`+(i+1),t=window.location.pathname+window.location.search+t;window.history.replaceState(null,"",t),s(n,i),e.stop()}),window.addEventListener("hashchange",()=>e(!1)),i.setFontSize(g.aceOption.fontSize),i.setReadOnly(g.aceOption.readOnly),i.setKeyboardHandler(g.aceOption.keyBinding),i.setSelectionStyle(g.aceOption.fullLineSelection?"line":"text"),i.setOption("displayIndentGuides",!0),i.setHighlightActiveLine(g.aceOption.highlightActiveLine),"hide"==g.aceOption.cursor&&(i.renderer.$cursorLayer.element.style.display="none"),i.setHighlightGutterLine(g.aceOption.highlightGutterLine),i.setShowInvisibles(g.aceOption.showInvisibles),i.setDisplayIndentGuides(g.aceOption.showIndentGuides),i.renderer.setShowPrintMargin(g.aceOption.showPrintMargin),i.setHighlightSelectedWord(g.aceOption.highlightSelectedWord),i.session.setUseSoftTabs(g.aceOption.useSoftTab),i.session.setTabSize(g.aceOption.tabSize),i.setBehavioursEnabled(g.aceOption.enableBehaviours),i.setFadeFoldWidgets(g.aceOption.fadeFoldWidgets)}},g.$on("dark-mode",(e,t)=>{g.aceOption.theme=t?"nord_dark":"chrome"}),g.isDarkMode&&(g.aceOption.theme="nord_dark"),g.type="pdf"==(n=t)?(g.instance=l.Instance("viewer"),"pdf"):"md"==n?"md":"org"==n?"org":"ipynb"==n?"IPython":-1<h.indexOf(n)?"text":-1<u.indexOf(n)?"image":-1<p.indexOf(n)?"media":-1<d.indexOf(n)?"audio":"code",g.filePath),i=g.file;if(n){const r=g.type;g.type="loading",g.content="loading";i=i&&i.sha||"0";s.get(`/api/repo/${g.repoId}/file/${encodePathForUrl(n)}?v=`+i,{transformResponse:e=>e}).then(e=>{var t;g.type=r,g.content=e.data,""==g.content&&(g.content=null),"md"==g.type&&(g.content=a.trustAsHtml(renderMD(e.data,o.url()+"/../")),g.type="html"),"org"==g.type&&(t=contentAbs2Relative(e.data),t=(new Org.Parser).parse(t).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1}),g.content=a.trustAsHtml(t.toString()),g.type="html"),"code"==g.type&&"application/octet-stream"==e.headers("content-type")&&(g.type="binary",g.content="binary"),setTimeout(()=>{Prism.highlightAll()},50)},t=>{g.type="error",g.content="unknown_error";try{t.data=JSON.parse(t.data),t.data.error?g.content=t.data.error:g.content=t.data}catch(e){console.log(t),-1==t.status?g.content="request_error":502==t.status&&(g.content="unreachable")}})}else g.type="error",g.content="no_file_selected"}function v(){g.repoId=i.repoId,g.type="loading",g.filePath=i.path||"",g.paths=g.filePath.split("/"),function n(i){s.get(`/api/repo/${g.repoId}/options`).then(e=>{g.options=e.data,g.options.url?window.location=g.options.url:i&&i(e.data)},e=>{function t(){var e,t=Math.max(0,Math.ceil((g.rateLimitResetAt-Date.now())/1e3));t<=0?(g.rateLimitCountdown="",g.rateLimitResetAt=0,m&&(clearInterval(m),m=null),n(i)):(e=Math.floor(t/60),t%=60,g.rateLimitCountdown=0<e?e+"m "+t+"s":t+"s"),g.$applyAsync()}"rate_limited"===(e=e.data||{}).error&&e.resetAt?(g.type="rate_limited",g.rateLimitResetAt=e.resetAt,m&&clearInterval(m),t(),m=setInterval(t,1e3)):"repository_not_ready"===e.error?(g.type="loading",setTimeout(function(){n(i)},3e3)):(g.type="error",g.content=e.error)})}(function(e){s.get(`/api/repo/${g.repoId}/files/counts`).then(function(e){g.fileCounts=e.data},function(){g.fileCounts={}});var t=r.resolve();for(let e=0;e<g.paths.length;e++){const n=0<e?g.paths.slice(0,e).join("/"):"";t=t.then(function(){return g.getFiles(n)}).then(function(){if("error"===g.type)return r.reject("error")})}t.then(function(){if(1==g.files.length&&""==g.files[0].name)g.files=[],g.type="empty";else{if(""==g.paths[0]){var n={};for(const e of g.files)-1<e.name.toLowerCase().indexOf("readme")&&(n[e.name.toLowerCase()]=e.name);let t=null;for(const i of["readme.md","readme.txt","readme.org","readme.1st","readme"])if(n[i]){t=i;break}if(t=!t&&0<Object.keys(n).length?Object.keys(n)[0]:t){let e=o.url();"/"!=e[e.length-1]&&(e+="/"),o.url(e+encodePathForUrl(n[t]))}}w()}})})}g.$on("$destroy",function(){m&&clearInterval(m)}),v()}]).controller("pullRequestController",["$scope","$http","$location","$routeParams","$sce",function(n,i,e,t,r){n.pullRequestId=t.pullRequestId,n.type="loading",async function(t){i.get(`/api/pr/${n.pullRequestId}/options`).then(e=>{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(e=>{!async function(t){i.get(`/api/pr/${n.pullRequestId}/content`).then(e=>{n.details=e.data,t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("gistController",["$scope","$http","$location","$routeParams","$sce",function(n,e,t,i,r){n.gistId=i.gistId,n.type="loading",async function(t){e.get(`/api/gist/${n.gistId}/options`).then(e=>{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(()=>{!async function(t){e.get(`/api/gist/${n.gistId}/content`).then(e=>{n.details=e.data,t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("conferencesController",["$scope","$http","$location",function(n,i,e){n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.conferences=[],n.search="";const t="conferences.filterPrefs",r={status:{ready:!0,expired:!1,removed:!1}},s="name";var o=loadFilterPrefs(t)||{};function a(){i.get("/api/conferences/").then(e=>{n.conferences=e.data||[]},e=>{console.error(e)})}n.filters={status:Object.assign({},r.status,o.filters&&o.filters.status||{})},n.orderBy=o.orderBy||s,n.$watch("orderBy",()=>{saveFilterPrefs(t,{filters:n.filters,orderBy:n.orderBy})}),n.$watch("filters",()=>{saveFilterPrefs(t,{filters:n.filters,orderBy:n.orderBy})},!0),n.removeConference=function(e){if(confirm(`Are you sure that you want to remove the conference ${e.name}? All the repositories linked to this conference will expire.`)){const t={title:`Removing ${e.name}...`,date:new Date,body:`The conference ${e.name} is going to be removed.`};n.addToast(t),i.delete("/api/conferences/"+e.conferenceID).then(()=>{t.title=e.name+" is removed.",t.body=`The conference ${e.name} is removed.`,a()})}},a(),n.conferenceFilter=e=>0!=n.filters.status[e.status]&&(0==n.search.trim().length||-1<e.name.indexOf(n.search)||-1<e.conferenceID.indexOf(n.search))}]).controller("newConferenceController",["$scope","$http","$location","$routeParams",function(n,e,i,t){n.$watch("user.status",()=>{null==n.user&&i.url("/")}),null==n.user&&i.url("/"),n.plans=[],n.editionMode=!1,t.conferenceId&&(n.editionMode=!0,e.get("/api/conferences/"+t.conferenceId).then(e=>{n.options=e.data,n.options.startDate=new Date(n.options.startDate),n.options.endDate=new Date(n.options.endDate)})),e.get("/api/conferences/plans").then(e=>{n.plans=e.data,n.plan=n.plans.filter(e=>e.id==n.options.plan.planID)[0]});var t=new Date,r=(t.setDate(1),t.setMonth(t.getMonth()+1),new Date);r.setMonth(t.getMonth()+7,0),n.options={startDate:t,endDate:r,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},n.plan=null,n.$watch("options.plan.planID",()=>{n.plan=n.plans.filter(e=>e.id==n.options.plan.planID)[0]}),n.submit=function(){const t={title:`Creating ${n.options.name}...`,date:new Date,body:`The conference ${n.options.conferenceID} is in creation.`};n.editionMode&&(t.title=`Updating ${n.options.name}...`,t.body=`The conference '${n.options.conferenceID}' is updating.`),n.addToast(t),n.conference.name.$setValidity("required",!0),n.conference.conferenceID.$setValidity("pattern",!0),n.conference.conferenceID.$setValidity("required",!0),n.conference.conferenceID.$setValidity("used",!0),n.conference.startDate.$setValidity("required",!0),n.conference.startDate.$setValidity("invalid",!0),n.conference.endDate.$setValidity("required",!0),n.conference.endDate.$setValidity("invalid",!0),n.conference.$setValidity("error",!0),e.post("/api/conferences/"+(n.editionMode?n.options.conferenceID:""),n.options).then(()=>{n.editionMode?(t.title=n.options.name+" updated",t.body=`The conference '${n.options.conferenceID}' is updated.`):(t.title=n.options.name+" created",t.body=`The conference '${n.options.conferenceID}' is created.`),i.url("/conference/"+n.options.conferenceID)},e=>{switch(e.data.error){case"conf_name_missing":n.conference.name.$setValidity("required",!1);break;case"conf_id_missing":n.conference.conferenceID.$setValidity("required",!1);break;case"conf_id_format":n.conference.conferenceID.$setValidity("pattern",!1);break;case"conf_id_used":n.conference.conferenceID.$setValidity("used",!1);break;case"conf_start_date_missing":n.conference.startDate.$setValidity("required",!1);break;case"conf_end_date_missing":n.conference.endDate.$setValidity("required",!1);break;case"conf_start_date_invalid":n.conference.startDate.$setValidity("invalid",!1);break;case"conf_end_date_invalid":n.conference.endDate.$setValidity("invalid",!1);break;default:n.conference.$setValidity("error",!1)}n.removeToast(t)})}}]).controller("conferenceController",["$scope","$http","$location","$routeParams",function(t,e,n,i){t.$watch("user.status",()=>{null==t.user&&n.url("/")}),null==t.user&&n.url("/"),t.conference=null,t.search="",t.filters={status:{ready:!0,expired:!1,removed:!1}},t.orderBy="-anonymizeDate",t.repoFiler=e=>0!=t.filters.status[e.status]&&(0==t.search.trim().length||-1<e.source.fullName.indexOf(t.search)||-1<e.repoId.indexOf(t.search)),e.get("/api/conferences/"+i.conferenceId).then(e=>{t.conference=e.data})}]),$(document).on("click","#navbarSupportedContent .nav-link",function(e){var t;"dropdown"!==$(this).attr("data-toggle")&&(t=$("#navbarSupportedContent")).hasClass("show")&&t.collapse("hide")}),angular.module("admin",[]).controller("repositoriesAdminController",["$scope","$http","$location",function(i,r,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.repositories=[],i.total=-1,i.totalPage=0,i.statusCounts=[],i.totalSize=0,i.selected={},i.allSelected=!1;const t=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},s=(document.addEventListener("keydown",t),i.$on("$destroy",()=>document.removeEventListener("keydown",t)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];i.query.owner&&e.push({key:"owner",label:"Owner",value:i.query.owner}),i.query.conference&&e.push({key:"conference",label:"Conference",value:i.query.conference}),i.chips=e}),o=(i.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},i.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("<pre>Loading GitHub info for "+e.repoId+"...</pre>"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"&lt;":"&gt;")+"</pre>"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+e+"</pre>")})},i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.statusStorageFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.storage:0},i.isErrorsOnly=()=>i.query&&i.query.error&&!i.query.ready&&!i.query.preparing&&!i.query.expired&&!i.query.removed,i.toggleErrorsOnly=()=>{i.isErrorsOnly()?Object.assign(i.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(i.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),i.query.page=1},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.repos.filterPrefs");var n=loadFilterPrefs(o)||{},n=(i.query=Object.assign({},{page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},n,{page:1,search:""}),e.search());n.owner&&(i.query.owner=n.owner),n.conference&&(i.query.conference=n.conference),n.search&&(i.query.search=n.search);const a="admin.repos.presets";function l(){i.fetchError=null,r.get("/api/admin/repos",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.repositories=e.data.results,i.statusCounts=e.data.statusCounts||[],i.totalSize=e.data.totalSize||0,i.allSelected=!1},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load repositories",console.error(e)})}i.presets=JSON.parse(localStorage.getItem(a)||"[]"),i.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},i.query)).page,i.presets=(i.presets||[]).filter(e=>e.name!==t),i.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(i.presets)))},i.applyPreset=e=>{Object.assign(i.query,e.query,{page:1})},i.deletePreset=t=>{i.presets=(i.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(i.presets))},i.selectAllOnPage=()=>{i.allSelected=!i.allSelected,i.repositories.forEach(e=>{i.selected[e.repoId]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedRepos=()=>i.repositories.filter(e=>i.selected[e.repoId]),i.bulkRefresh=()=>{var e=i.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>i.updateRepository(e))},i.bulkRemoveCache=()=>{var e=i.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>i.removeCache(e))},i.clearSelection=()=>{i.selected={},i.allSelected=!1},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/repos?"+e.toString(),"_blank")},i.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>l(),e=>console.error(e))},i.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>l(),e=>console.error(e))},i.updateRepository=t=>{const n={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};i.toasts.push(n),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?n.title=t.repoId+" is refreshed.":n.title=`Refreshing of ${t.repoId}.`},e=>{n.title=`Error during the refresh of ${t.repoId}.`,n.body=e.body})},i.fetchError=null,l();let c=null;i.$watch("query",()=>{clearTimeout(c),c=setTimeout(l,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(o,n),s()},!0),s()}]).controller("usersAdminController",["$scope","$http","$location",function(i,t,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.users=[],i.total=-1,i.totalPage=0,i.statusCounts=[],i.selected={},i.allSelected=!1;const n=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",n),i.$on("$destroy",()=>document.removeEventListener("keydown",n)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];i.query.role&&e.push({key:"role",label:"Role",value:i.query.role}),i.chips=e}),s=(i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.users.filterPrefs");var o=loadFilterPrefs(s)||{};function a(){i.fetchError=null,t.get("/api/admin/users",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.users=e.data.results,i.statusCounts=e.data.statusCounts||[],i.allSelected=!1,i.$apply()},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load users",console.error(e)})}i.query=Object.assign({},{page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},o,{page:1,search:""}),i.selectAllOnPage=()=>{i.allSelected=!i.allSelected,i.users.forEach(e=>{i.selected[e.username]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedUsers=()=>i.users.filter(e=>i.selected[e.username]),i.banUser=e=>{confirm(`Ban user ${e.username}?`)&&t.post(`/api/admin/users/${e.username}/ban`).then(a,e=>console.error(e))},i.activateUser=e=>{t.post(`/api/admin/users/${e.username}/activate`).then(a,e=>console.error(e))},i.bulkBan=()=>{var e=i.selectedUsers();e.length&&confirm(`Ban ${e.length} users?`)&&e.forEach(e=>i.banUser(e))},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/users?"+e.toString(),"_blank")},i.fetchError=null,a();let l=null;i.$watch("query",()=>{clearTimeout(l),l=setTimeout(a,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(s,n),r()},!0),r()}]).controller("userAdminController",["$scope","$http","$location","$routeParams",function(i,r,e,n){i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.userInfo,i.repositories=[],i.search="",i.selected={},i.allSelected=!1;const t="admin.user.filterPrefs",s={status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},o="anonymizeDate",a="desc";var l=loadFilterPrefs(t)||{};function c(e){r.get("/api/admin/users/"+e+"/repos",{}).then(e=>{i.repositories=e.data},e=>{console.error(e)})}function h(e){r.get("/api/admin/users/"+e,{}).then(e=>{i.userInfo=e.data},e=>{console.error(e)})}function u(){r.get("/api/admin/tokens").then(e=>{i.tokens=e.data||[]},e=>{401!==e.status&&403!==e.status&&console.error(e)})}i.filters={status:Object.assign({},s.status,l.filters&&l.filters.status||{})},i.query={sort:l.sort||o,direction:l.direction||a},i.orderBy=("asc"===i.query.direction?"":"-")+i.query.sort,i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.orderBy=("asc"===i.query.direction?"":"-")+i.query.sort},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"",i.$watch("query",()=>{saveFilterPrefs(t,{filters:i.filters,sort:i.query.sort,direction:i.query.direction})},!0),i.$watch("filters",()=>{saveFilterPrefs(t,{filters:i.filters,sort:i.query.sort,direction:i.query.direction})},!0),i.statusCountFor=t=>(i.repositories||[]).filter(e=>e.status===t).length,i.repoFiler=e=>0!=i.filters.status[e.status]&&(0==i.search.trim().length||-1<e.source.fullName.indexOf(i.search)||-1<e.repoId.indexOf(i.search)||!!(e.statusMessage&&-1<e.statusMessage.indexOf(i.search))||!!(e.conference&&-1<e.conference.indexOf(i.search))),i.selectAllOnPage=()=>{i.allSelected=!i.allSelected,(i.filteredRepositories||i.repositories).forEach(e=>{i.selected[e.repoId]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedRepos=()=>i.repositories.filter(e=>i.selected[e.repoId]),i.bulkRefresh=()=>{var e=i.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>i.updateRepository(e))},i.bulkRemoveCache=()=>{var e=i.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>i.removeCache(e))},i.clearSelection=()=>{i.selected={},i.allSelected=!1},i.exportCsv=()=>{var e=i.filteredRepositories||i.repositories,t=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),e=e.map(e=>[e.repoId,e.status,e.statusMessage||"",e.pageView||0,e.anonymizeDate||"",e.source&&e.source.fullName||"",e.conference||"",e.size&&e.size.storage||0].map(e=>{e=String(null==e?"":e);return/[",\n\r]/.test(e)?'"'+e.replace(/"/g,'""')+'"':e}).join(",")),t=new Blob([t+"\n"+e.join("\n")],{type:"text/csv"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.download=n.username+"-repositories.csv",e.click()},i.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},i.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("<pre>Loading GitHub info for "+e.repoId+"...</pre>"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"&lt;":"&gt;")+"</pre>"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+e+"</pre>")})},h(n.username),c(n.username),i.banUser=()=>{confirm(`Ban user ${n.username}?`)&&r.post(`/api/admin/users/${n.username}/ban`).then(()=>h(n.username),e=>console.error(e))},i.activateUser=()=>{r.post(`/api/admin/users/${n.username}/activate`).then(()=>h(n.username),e=>console.error(e))},i.promoteUser=()=>{confirm(`Promote ${n.username} to admin?`)&&r.post(`/api/admin/users/${n.username}/promote`).then(()=>h(n.username),e=>console.error(e))},i.demoteUser=()=>{confirm(`Remove admin privileges from ${n.username}?`)&&r.post(`/api/admin/users/${n.username}/demote`).then(()=>h(n.username),e=>console.error(e))},i.tokens=[],i.tokenForm={name:"",plaintext:null},u(),i.createToken=()=>{i.tokenForm.name&&r.post("/api/admin/tokens",{name:i.tokenForm.name}).then(e=>{i.tokenForm.plaintext=e.data.token,i.tokenForm.name="",u()},e=>console.error(e))},i.revokeToken=e=>{confirm(`Revoke token "${e.name}"?`)&&r.delete("/api/admin/tokens/"+e.id).then(()=>u(),e=>console.error(e))},i.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>c(n.username),e=>console.error(e))},i.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>c(n.username),e=>console.error(e))},i.updateRepository=t=>{const n={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};i.toasts.push(n),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?n.title=t.repoId+" is refreshed.":n.title=`Refreshing of ${t.repoId}.`},e=>{n.title=`Error during the refresh of ${t.repoId}.`,n.body=e.body})},i.getGitHubRepositories=e=>{r.get(`/api/user/${i.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(e=>{i.userInfo.repositories=e.data})};let d=null;i.$watch("query",()=>{clearTimeout(d),d=setTimeout(()=>{c(n.username)},500)},!0)}]).controller("conferencesAdminController",["$scope","$http","$location",function(i,t,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.conferences=[],i.total=-1,i.totalPage=0,i.statusCounts=[];const n=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",n),i.$on("$destroy",()=>document.removeEventListener("keydown",n)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];(i.query.dateFrom||i.query.dateTo)&&e.push({key:"dateRange",label:"Date",value:(i.query.dateFrom||"…")+" "+(i.query.dateTo||"…")}),i.chips=e}),s=(i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.conferences.filterPrefs");var o=loadFilterPrefs(s)||{},o=(i.query=Object.assign({},{page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},o,{page:1,search:""}),e.search());o.search&&(i.query.search=o.search);const a="admin.conferences.presets";function l(){i.fetchError=null,t.get("/api/admin/conferences",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.conferences=e.data.results,i.statusCounts=e.data.statusCounts||[]},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load conferences",console.error(e)})}i.presets=JSON.parse(localStorage.getItem(a)||"[]"),i.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},i.query)).page,i.presets=(i.presets||[]).filter(e=>e.name!==t),i.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(i.presets)))},i.applyPreset=e=>{Object.assign(i.query,e.query,{page:1})},i.deletePreset=t=>{i.presets=(i.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(i.presets))},i.removeConference=e=>{confirm("Remove conference "+e.conferenceID+"?")&&t.delete("/api/admin/conferences/"+e.conferenceID).then(()=>l(),e=>console.error(e))},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/conferences?"+e.toString(),"_blank")},i.fetchError=null,l();let c=null;i.$watch("query",()=>{clearTimeout(c),c=setTimeout(l,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(s,n),r()},!0),r()}]).controller("queuesAdminController",["$scope","$http","$location","$interval","$timeout",function(R,t,e,n,i){function r(){var e={queue:R.selectedQueue,search:R.query.search};t.get("/api/admin/queues",{params:e}).then(e=>{R.queueList=e.data.queues||[],R.jobs=e.data.jobs||[],R.selectedStats=R.queueList.find(e=>e.key===R.selectedQueue)||R.queueList[0]||null},e=>console.error(e))}function s(){t.get("/api/admin/queues/metrics",{params:{queue:R.selectedQueue,range:R.range}}).then(e=>{R.metricsPoints=e.data.points||[],i(c,0)},e=>console.error(e))}R.$watch("user.status",()=>{null==R.user&&e.url("/")}),null==R.user&&e.url("/"),R.queueList=[],R.jobs=[],R.selectedQueue="download",R.selectedStats=null,R.range="1h",R.allStates=["active","waiting","delayed","failed","completed"],R.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},R.query={search:"",autoRefresh:!0},R.filteredJobs=()=>(R.jobs||[]).filter(e=>R.stateFilter[e._state]),R.jobProgressPct=e=>e&&e.progress&&"object"==typeof e.progress&&"number"==typeof e.progress.percent?Math.max(0,Math.min(100,Math.round(e.progress.percent))):"number"==typeof e.progress?Math.max(0,Math.min(100,Math.round(e.progress))):null,R.jobDuration=e=>{return e.processedOn?(e=(e.finishedOn||Date.now())-e.processedOn)<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-"},R.metricsPoints=[],R.selectQueue=e=>{R.selectedQueue=e,r(),s()},R.setRange=e=>{R.range=e,s()},r(),s();const o=n(()=>{R.query.autoRefresh&&(r(),s())},5e3);function a(e){var t=e&&e.data&&(e.data.message||e.data.error)||"Request failed";R.actionError=t,i(()=>{R.actionError=null},5e3),console.error(e)}R.$on("$destroy",()=>n.cancel(o)),R.refreshNow=function(){r(),s()},R.actionError=null,R.removeJob=e=>{t.delete(`/api/admin/queue/${R.selectedQueue}/`+e.id).then(r,a)},R.retryJob=e=>{t.post(`/api/admin/queue/${R.selectedQueue}/`+e.id).then(r,a)},R.retryFailed=()=>{confirm(`Retry all failed jobs in ${R.selectedQueue}?`)&&t.post(`/api/admin/queue/${R.selectedQueue}/retry-failed`).then(r,e=>console.error(e))},R.drainSelected=()=>{confirm(`Drain the ${R.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${R.selectedQueue}/drain`).then(r,e=>console.error(e))},R.togglePause=()=>{var e=R.selectedStats&&R.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${R.selectedQueue}/`+e).then(r,e=>console.error(e))},R.emptyQueue=()=>{confirm(`Empty the ${R.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${R.selectedQueue}/empty`).then(r,e=>console.error(e))},R.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(r,e=>console.error(e))};let l=null;function M(e){if(e<=0)return{ticks:[0],niceMax:1};var t=Math.pow(10,Math.floor(Math.log10(e)));let n=t;e/n<2?n=t/2:5<e/n&&(n=2*t);var i=Math.ceil(e/n)*n,r=[];for(let e=0;e<=i;e+=n)r.push(e);return{ticks:r,niceMax:i}}function c(){var e=document.getElementById("q-throughput-chart");if(e){var o=e.getContext("2d"),t=window.devicePixelRatio||1,n=e.parentElement.getBoundingClientRect(),i=n.width-40,n=i-44-50,e=(e.width=i*t,e.height=180*t,e.style.width=i+"px",e.style.height="180px",o.setTransform(t,0,0,t,0,0),document.body.classList.contains("dark-mode")),r="#8A857C",s=e?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",t=e?"#A7B2FF":"#3B4AD6",a=e?"rgba(167,178,255,0.12)":"rgba(59,74,214,0.08)",l=e?"#F08A82":"#B42318",c=e?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",h=e?"#F5C842":"#B8860B",u=R.metricsPoints||[];if(0===u.length)o.fillStyle=r,o.font="12px monospace",o.textAlign="center",o.fillText("No metrics data yet",i/2,90),T=null;else{function d(e){return 160-e/y.niceMax*150}function p(e){return 160-e/b.niceMax*150}function m(e){return 44+e*v}var e=u.map(function(e){return e.completed}),g=u.map(function(e){return e.failed}),f=u.map(function(e){return e.avgMs}),w=u.length,v=n/(w-1||1),y=M(Math.max(1,Math.max.apply(null,e),Math.max.apply(null,g))),n=Math.max.apply(null,f),b=0<n?M(n):{ticks:[0],niceMax:1},x=(o.textAlign="right",o.textBaseline="middle",o.font="10px monospace",y.ticks.forEach(function(e){var t=d(e);o.strokeStyle=s,o.lineWidth=1,o.beginPath(),o.moveTo(44,t),o.lineTo(i-50,t),o.stroke(),o.fillStyle=r,o.fillText(1e3<=e?(e/1e3).toFixed(1)+"k":String(e),38,t)}),0<n&&(o.textAlign="left",b.ticks.forEach(function(e){var t=p(e);o.fillStyle=h,o.fillText(1e3<=e?(e/1e3).toFixed(1)+"s":e+"ms",i-50+6,t)})),Date.now()),A=Math.min(6,w);o.textAlign="center",o.textBaseline="top";for(var k=0;k<A;k++){var S=Math.round(k/(A-1)*(w-1)),C=Math.round((x-u[S].ts)/6e4),S=m(S),C=C<=0?"now":C<60?C+"m":C<1440?Math.round(C/60)+"h":Math.round(C/1440)+"d";o.fillStyle=r,o.fillText(C,S,164)}$(e,d,a,t),$(g,d,c,l),0<n&&(o.beginPath(),f.forEach(function(e,t){var n,i=m(t),e=p(e);0===t?o.moveTo(i,e):(n=(m(t-1)+i)/2,o.bezierCurveTo(n,p(f[t-1]),n,e,i,e))}),o.strokeStyle=h,o.lineWidth=1,o.setLineDash([4,3]),o.stroke(),o.setLineDash([])),T={pts:u,maxLen:w,marginLeft:44,step:v,totalW:i,toX:m}}}function $(r,s,e,t){0!==r.length&&(o.beginPath(),o.moveTo(m(0),160),r.forEach(function(e,t){var n,i=m(t),e=s(e);0===t?o.lineTo(i,e):(n=(m(t-1)+i)/2,o.bezierCurveTo(n,s(r[t-1]),n,e,i,e))}),o.lineTo(m(r.length-1),160),o.closePath(),o.fillStyle=e,o.fill(),o.beginPath(),r.forEach(function(e,t){var n,i=m(t),e=s(e);0===t?o.moveTo(i,e):(n=(m(t-1)+i)/2,o.bezierCurveTo(n,s(r[t-1]),n,e,i,e))}),o.strokeStyle=t,o.lineWidth=1.5,o.stroke())}}R.$watch("query.search",()=>{clearTimeout(l),l=setTimeout(r,350)}),R.expanded={},R.toggleJob=e=>{R.expanded[e.id]=!R.expanded[e.id]},R.humanTime=e=>{return e?(e=new Date(e)).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+e.toLocaleDateString([],{month:"short",day:"numeric"}):""},R.delayCountdown=e=>{var t;return e?(e=Math.max(0,Math.ceil((e-Date.now())/1e3)))<=0?"resuming soon":(t=e%60,"in "+(0<(e=Math.floor(e/60))?e+"m "+t+"s":t+"s")):""};var T=null;function h(){var s,o,a=document.getElementById("q-throughput-chart");a&&!a._tipBound&&(a._tipBound=!0,s=document.getElementById("q-chart-tooltip"),o=document.getElementById("q-chart-crosshair"),a.addEventListener("mousemove",function(e){var t,n,i,r;T&&s&&o&&(t=T,n=a.getBoundingClientRect(),e=e.clientX-n.left,(n=Math.round((e-t.marginLeft)/t.step))<0||n>=t.maxLen?(s.style.display="none",o.style.display="none"):(e=t.pts[n],i=Date.now(),r='<div class="q-tip-time">'+((i=Math.round((i-e.ts)/6e4))<=0?"now":i<60?i+"m ago":i<1440?(r=i%60,Math.floor(i/60)+"h"+(r?" "+r+"m":"")+" ago"):Math.round(i/1440)+"d ago")+'</div><div class="q-tip-completed">&#9679; completed: '+e.completed+'/min</div><div class="q-tip-failed">&#9679; failed: '+e.failed+"/min</div>",0<e.avgMs&&(r+='<div class="q-tip-exec">&#9679; avg time: '+(1e3<=e.avgMs?(e.avgMs/1e3).toFixed(1)+"s":e.avgMs+"ms")+"</div>"),s.innerHTML=r,(e=(i=t.toX(n))+10)+(r=s.offsetWidth)>t.totalW&&(e=i-r-10),s.style.display="block",s.style.left=e+"px",s.style.top="8px",o.style.display="block",o.style.left=i+"px"))}),a.addEventListener("mouseleave",function(){s&&(s.style.display="none"),o&&(o.style.display="none")}))}R.$watch("metricsPoints",function(){i(h,50)})}]).controller("errorsAdminController",["$scope","$http","$location","$interval",function(h,i,e,t){h.$watch("user.status",()=>{null==h.user&&e.url("/")}),null==h.user&&e.url("/"),h.entries=[],h.visible=[],h.available=!0,h.cap=1e3,h.total=0,h.pageSize=250,h.expanded={},h.detailTab={},h.copyHint="",h.parsedFilterCount=0,h.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},h.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},h.relTime=e=>{var t;return e?(t=new Date(e).getTime(),isNaN(t)?e:(t=Math.max(0,Date.now()-t),(t=Math.floor(t/1e3))<5?"just now":t<60?t+"s ago":(t=Math.floor(t/60))<60?t+"m ago":(t=Math.floor(t/60))<24?t+"h ago":(t=Math.floor(t/24))<7?t+"d ago":new Date(e).toLocaleDateString())):""},h.absTime=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleString()):""},h.absTimeShort=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})):""};const o=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function r(t){var n=(t.raw||[]).find(e=>e&&"object"==typeof e&&!Array.isArray(e));if(n){n.message&&o.test(n.message)?(t.displayMessage=n.message,t.displayContext=t.message):n.code&&o.test(String(n.code))?(t.displayMessage=String(n.code),t.displayContext=t.message):n.name&&"AnonymousError"!==n.name&&"Error"!==n.name?(t.displayMessage=n.name,t.displayContext=n.message||t.message):t.displayMessage=t.message,t._status=n.httpStatus||n.status||null,t._url=n.url||null,t._method=n.method||null,t._repoId=n.repoId||n.detail||null,t._detail=n.detail&&n.detail!==t._repoId?n.detail:null;let e="string"==typeof n.stack?n.stack:null;for(var i=[n.cause,n.err].filter(Boolean),r=0;!e&&r<i.length;r++)for(var s=i[r];!e&&s&&"object"==typeof s;)"string"==typeof s.stack&&(e=s.stack),s=s.cause;t._stack=e}else t.displayMessage=t.message,t._status=null,t._url=null,t._stack=null;return t._bucket=function(e,t){if("number"==typeof(e=e&&(e.httpStatus||e.status)||null)){if(500<=e)return"error";if(401===e||403===e||404===e)return"info";if(400<=e)return"warn"}return"error"===t?"error":"warn"===t?"warn":"info"}(n,t.level),t._detailJson=function(e,t){const s=[],n=(e,t)=>{null!=t&&""!==t&&s.push([e,t])};n("name",t&&t.name),n("code",e.displayMessage||t&&t.message),e._bucket&&n("kind",e._bucket);n("httpStatus",t&&t.httpStatus),t&&t.status&&!t.httpStatus&&n("status",t.status);n("module",e.module);let i=t&&t.detail;if("string"==typeof i){var r=i.trim();if("{"===r[0]||"["===r[0])try{i=JSON.parse(i)}catch{}}if(n("detail",i),n("repoId",t&&t.repoId),n("filePath",t&&t.filePath),n("upstreamStatus",t&&t.upstreamStatus),n("upstreamBody",t&&t.upstreamBody),n("url",e._url),n("err",t&&t.err),n("cause",t&&!t.err&&t.cause),n("ts",e.ts),!s.length)return JSON.stringify(e,null,2);const o=s.reduce((e,t)=>Math.max(e,t[0].length),0),a=["{"];return s.forEach(([e,t],n)=>{e=` ${`"${e}":`.padEnd(o+3," ")} `,n=n<s.length-1?",":"";let i;if(t&&"object"==typeof t){const r=" ".repeat(e.length);i=JSON.stringify(t,null,2).split("\n").map((e,t)=>0===t?e:r+e).join("\n")}else i="number"==typeof t||"boolean"==typeof t?String(t):JSON.stringify(t);a.push(e+i+n)}),a.push("}"),a.join("\n")}(t,n),t}function u(t,e){for(const a of e.filters){let e;if("code"===a.key)e=t.displayMessage;else if("module"===a.key)e=t.module;else if("status"===a.key)e=t._status;else if("url"===a.key)e=t._url;else if("repo"===a.key)e=t._repoId;else{if("level"!==a.key)continue;e=t.level}if(null==e)return!1;if(n=e,i=a.val,r=a.op,o=s=void 0,s=parseFloat(n),o=parseFloat(i),!("="===r?String(n)===String(i):"!="===r?String(n)!==String(i):">="===r?o<=s:"<="===r?s<=o:">"===r?o<s:"<"!==r||s<o))return!1}var n,i,r,s,o;if(e.free&&-1===((t.displayMessage||"")+" "+(t.module||"")+" "+(t._url||"")+" "+JSON.stringify(t.raw||[])).toLowerCase().indexOf(e.free))return!1;return!0}function s(){const t=function(e){var t=[];let n="";var i,r=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g;let s=0;for(;i=r.exec(e);)n+=e.slice(s,i.index),s=r.lastIndex,t.push({key:i[1],op:i[2]||"=",val:i[3]});return{filters:t,free:(n+=e.slice(s)).trim().toLowerCase()}}(h.query.search||""),n=(h.parsedFilterCount=t.filters.length,h.query.bucket);let e=h.entries.filter(e=>(!n||e._bucket===n)&&u(e,t));const i=h.query.group;if(i){var r=new Map;for(const l of e){o=l;var s,o="module"===i?o.module:o.displayMessage||o.message||"_";r.has(o)?((s=r.get(o)).count++,s._related.push(l),new Date(l.ts)>new Date(s.ts)&&(s.ts=l.ts,s._url=l._url,s._status=l._status),new Date(l.ts)<new Date(s._firstSeen)&&(s._firstSeen=l.ts)):((s=Object.assign({},l))._key=i+":"+o,s._related=[l],s._firstSeen=l.ts,s._lastHourCount=0,s.count=1,r.set(o,s))}const a=Date.now()-36e5;for(const c of r.values())c._lastHourCount=c._related.filter(e=>new Date(e.ts).getTime()>=a).length;e=Array.from(r.values())}else e=e.map((e,t)=>(e._key="row:"+t+":"+e.ts,e._related=[e],e._firstSeen=e.ts,e._lastHourCount=0,e.count=1,e));var o;"count"===h.query.sort?e.sort((e,t)=>t.count-e.count||new Date(t.ts)-new Date(e.ts)):e.sort((e,t)=>new Date(t.ts)-new Date(e.ts)),h.visible=e}function n(n){var e=n?h.entries.length:0,t=n?h.pageSize:Math.max(h.pageSize,h.entries.length||h.pageSize);i.get("/api/admin/errors",{params:{offset:e,limit:t}}).then(e=>{var t=(e.data.entries||[]).map(r);h.entries=n?h.entries.concat(t):t,h.available=!!e.data.available,h.cap=e.data.max||h.cap,h.total=e.data.total||h.entries.length,s()},e=>console.error(e))}function a(){n(),i.get("/api/admin/errors/stats").then(e=>{var e=e.data||{},t=e.prev24h?Math.round((e.last24h-e.prev24h)/e.prev24h*100):0;h.stats={last24h:e.last24h||0,prev24h:e.prev24h||0,delta:t,severity:e.severity||{error:0,warn:0,info:0},unique:e.unique||{error:0,warn:0,info:0},buckets:e.buckets||[],dropped:e.dropped||0}},e=>console.error(e))}function l(e){h.copyHint=e+" copied",setTimeout(()=>{h.copyHint="",h.$apply()},1500)}h.loadMore=()=>n(!0),h.canLoadMore=()=>h.entries.length<h.total,h.barPx=(e,t)=>{var n,i;let r=0;for(const s of h.stats.buckets||[])r=Math.max(r,(s.error||0)+(s.warn||0)+(s.info||0));return r&&(n=(e.error||0)+(e.warn||0)+(e.info||0))?(i=Math.round(n/r*60),e=e[t]||0,Math.round(e/n*i)):0},h.bucketTitle=e=>{return`${new Date(e.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} · ${e.error||0} err · ${e.warn||0} warn · ${e.info||0} info`},h.toggle=e=>{h.expanded[e._key]=!h.expanded[e._key]},h.setBucket=e=>{h.query.bucket=e},h.refreshNow=a,h.clearAll=()=>{confirm("Clear all captured errors?")&&i.delete("/api/admin/errors").then(a,e=>console.error(e))},h.exportCsv=()=>{var e=["ts","level","module","displayMessage","_status","_url","_repoId"],t=[e.join(",")];for(const r of h.visible)t.push(e.map(e=>{e=null==r[e]?"":String(r[e]);return/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}).join(","));var n=new Blob([t.join("\n")],{type:"text/csv;charset=utf-8"}),n=URL.createObjectURL(n),i=document.createElement("a");i.href=n,i.download=`errors-${(new Date).toISOString().slice(0,19)}.csv`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)},h.copyJson=e=>{navigator.clipboard.writeText(e._detailJson).then(()=>l("JSON"))},h.copyCurl=e=>{e._url&&(e=`curl -X ${e._method||"GET"} '${window.location.origin}${e._url}'`,navigator.clipboard.writeText(e).then(()=>l("curl")))},a();const c=t(()=>{h.query.autoRefresh&&a()},5e3);h.$on("$destroy",()=>t.cancel(c)),h.$watch("query.search",s),h.$watch("query.bucket",s),h.$watch("query.sort",s),h.$watch("query.group",s)}]).controller("overviewAdminController",["$scope","$http","$location","$interval",function(r,e,t,n){var i,s;function o(){e.get("/api/admin/overview").then(function(e){r.data=e.data,r.loading=!1,r.error=null,i={},(e.data.history||[]).forEach(function(t){["nbPageViews","nbRepositories","nbUsers"].forEach(function(e){(!i[e]||t[e]>i[e])&&(i[e]=t[e])})})},function(e){r.loading=!1,r.error=e.data&&e.data.error||"Failed to load overview"})}r.Math=Math,r.$watch("user.status",()=>{null==r.user&&t.url("/")}),null==r.user?t.url("/"):(r.data=null,r.loading=!0,r.error=null,r.range="24h",r.setRange=function(e){r.range=e},r.humanBytes=function(e){if(null==e)return"—";for(var t=["B","KB","MB","GB","TB"],n=0,i=e;1024<=i&&n<t.length-1;)i/=1024,n++;return i.toFixed(0<n?1:0)+" "+t[n]},r.humanDuration=function(e){var t,n;return e?(t=Math.floor(e/86400),n=Math.floor(e%86400/3600),e=Math.floor(e%3600/60),0<t?t+"d "+(n<10?"0":"")+n+"h":0<n?n+"h "+(e<10?"0":"")+e+"m":e+"m"):"—"},r.humanNum=function(e){return null==e?"—":1e6<=e?(e/1e6).toFixed(1)+"M":1e3<=e?(e/1e3).toFixed(1)+"K":String(e)},r.queueTotal=function(e){return e?(e.waiting||0)+(e.active||0)+(e.delayed||0)+(e.failed||0):0},r.statusCount=function(e){if(r.data&&r.data.repos)for(var t=r.data.repos.statusBreakdown||[],n=0;n<t.length;n++)if(t[n]._id===e)return t[n].count;return 0},r.barPct=function(e){var t,n,i=r.data&&r.data.repos?r.data.repos.total:0;return i?(t=[e],"expired"===e&&t.push("expiring"),"removed"===e&&t.push("removing"),"preparing"===e&&t.push("download"),n=0,t.forEach(function(e){n+=r.statusCount(e)}),Math.max(.4,n/i*100)):0},r.errPct=function(e){var t;return r.data&&r.data.errors?(t=Math.max(r.data.errors.severity.error,r.data.errors.severity.warn,r.data.errors.severity.info,1),r.data.errors.severity[e]/t*100):0},i={},r.historyBarH=function(e,t){return e&&i[t]?Math.max(1,Math.round(e[t]/i[t]*140)):0},r.historyLabel=function(e){return e&&e.date?(e=new Date(e.date)).getUTCMonth()+1+"/"+e.getUTCDate():""},o(),s=n(o,3e4),r.$on("$destroy",function(){n.cancel(s)}))}]);