openc3-cosmos-tool-admin 6.4.1 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/admin/{ArrayWidget-CeyoPOhk-8ea7b632593c35810356.js → ArrayWidget-CC3iwyQc-581e617eccbe68bbb1af.js} +2 -2
- data/tools/admin/{ArrayplotWidget-BEw4fJPY-71f6c92368b58aadc396.js → ArrayplotWidget-CiQdsmVy-859543a10edfa3592fff.js} +1 -1
- data/tools/admin/{BarColumn-CIWppEH6-a3633391aa327ddafa04.js → BarColumn-BhjcS87D-8298f9c72f1f57694f66.js} +1 -1
- data/tools/admin/BlockWidget-LLPHBYVU-7d355eeaa43df376e7d3.js +2 -0
- data/tools/admin/{ButtonWidget-4GORf9BG-519845e2d153ab9765a1.js → ButtonWidget-Co0KMkIG-ac76564a2d47d87aefb4.js} +1 -1
- data/tools/admin/CanvasWidget-DPrxnI7M-37d0ad98197e46edd19f.js +1 -0
- data/tools/admin/CanvasdotWidget-s1ALDR4k-84c7695ba707edab97e8.js +1 -0
- data/tools/admin/{CanvasimageWidget-CNPV5Ale-274c4d4918a85219b99a.js → CanvasimageWidget-Cs-KjdqK-b873acfda15b467afe38.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-DsQbSZt_-b98aafce41a7d9b567b8.js → CanvasimagevalueWidget-B-wBQisl-38a1aaecf7ac0c399680.js} +1 -1
- data/tools/admin/CanvaslabelWidget-CLBK52pP-194e97a305f00fc1e4ee.js +1 -0
- data/tools/admin/{CanvaslabelvalueWidget-DX-b_55r-c9b5a632ef436edcfe83.js → CanvaslabelvalueWidget-CAa70y_o-c43ce9ba98d4a4f16068.js} +1 -1
- data/tools/admin/CanvaslineWidget-PdwVJOQ5-6f063c05e5c69cee895b.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-Du9pwAN7-8d6cc178cae899ff3dc2.js → CanvaslinevalueWidget-CKrp1f3Z-f1551999d3dad2b122e2.js} +1 -1
- data/tools/admin/CheckbuttonWidget-CTSfH4NN-71b8c8474c541be28c32.js +1 -0
- data/tools/admin/ComboboxWidget-BQzv9zk5-9d77f62e586ae18b4b8e.js +1 -0
- data/tools/admin/{DateWidget-BCmQNavZ-46eedcd0b36fe7772da9.js → DateWidget-DKXxXT1g-a8af81dd994d4d59a35a.js} +1 -1
- data/tools/admin/{DetailsDialog-OMd7LWdZ-e4667069bfc2c36ab7b8.js → DetailsDialog-DEjAO6yp-c970cd409e3c60a2cfb0.js} +1 -1
- data/tools/admin/{DynamicWidget-CfMtj7H8-799b0bcd4823001ad0e5.js → DynamicWidget-CfMtj7H8-829f9b990afd83ce5713.js} +1 -1
- data/tools/admin/{FormatvalueWidget-CPn5mDHY-8cefd2de9c4859d273f5.js → FormatvalueWidget-7Yp9jfgX-edadfe8dc88f95cda3d6.js} +1 -1
- data/tools/admin/{Graph-vUcIyyTp-60abf5db1fe851c9ba02.js → Graph-hzxapkW--a6bec09943fe565d2e42.js} +1 -1
- data/tools/admin/{GraphWidget-Cl97QQYm-6313a738e0fa08ffbf3d.js → GraphWidget-Dn0ZaxHo-d05f42adc8e9aa5e5219.js} +1 -1
- data/tools/admin/{HorizontalWidget-CtTkQHl--da176709f39afbd654f3.js → HorizontalWidget-BFzi3rMl-96af6b9c2e1d7667e92c.js} +1 -1
- data/tools/admin/{HorizontalboxWidget-Dn9zVn4r-7807148ca02cba10041e.js → HorizontalboxWidget-DIagyace-b3069aff2e4657d6cdc7.js} +1 -1
- data/tools/admin/HorizontallineWidget-BOZNWM3a-53d1205c5a16674a8f96.js +1 -0
- data/tools/admin/{IframeWidget-BmZOip3U-2f175491a2f1180724e5.js → IframeWidget-BU24bhc2-6ecb4335c709e54ca8da.js} +1 -1
- data/tools/admin/{ImageLoader-wYNaGuuz-4ef857ad1bedbead0efa.js → ImageLoader-xxDrxPAX-8ce2c10d88b8d3cfc1ac.js} +1 -1
- data/tools/admin/{ImageviewerWidget-ByuTqBHq-41307f6afe95f5e97eda.js → ImageviewerWidget-YMA4CVsl-4e57a23289aea71289e2.js} +1 -1
- data/tools/admin/{InterfacesTab-BbsiYwEX-a1272be0222003209c48.js → InterfacesTab-Cv50gOTl-af03b3a32df3bf9bb68c.js} +1 -1
- data/tools/admin/{LabelWidget-Dmb5F5j--e8c731db792aa9fc1f22.js → LabelWidget-2402SA18-cad254101a69584c6290.js} +1 -1
- data/tools/admin/LabelledWidget-Cbubzj_g-ce3bf5c2bcb90ef75b37.js +1 -0
- data/tools/admin/LabelprogressbarWidget-s8V7w6LJ-fe2d791eebe3fbeee1fd.js +1 -0
- data/tools/admin/LabelsparklineWidget-qbM_OXLh-f4b66d7d95ea2df54502.js +1 -0
- data/tools/admin/LabelvalueWidget-B5Ihc2yP-960ee83b3dcae90f3480.js +1 -0
- data/tools/admin/{LabelvaluedescWidget-BBHwqvj4-100d1070cba0d7cb262e.js → LabelvaluedescWidget-Cl3JHPGR-43830e3e8dd8a007d5c3.js} +1 -1
- data/tools/admin/LabelvaluelimitsbarWidget-DnpfRyHl-453a5db741548c187f25.js +1 -0
- data/tools/admin/LabelvaluelimitscolumnWidget-D4L9L5oa-d1ace11d4eec94b9100a.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-B83Jj5Q1-9b0a187e5bddc226a149.js → LabelvaluerangebarWidget-BivnHCbE-fce7d2c515011c094b7f.js} +1 -1
- data/tools/admin/{Layout-ByQC7nQ3-7726143bd94f70763b01.js → Layout-B7KU2jmu-1986d22d1dc12510c12c.js} +1 -1
- data/tools/admin/{LedWidget-Cccb8YTk-a1b44ab6d05e9062c2cf.js → LedWidget-DpdthKEd-e8cc1479defba776ae7a.js} +1 -1
- data/tools/admin/{LimitsbarWidget-D1EBBwX1-6f70115baa4eb203ec21.js → LimitsbarWidget-CLyj3Kb--906cca8ff1bf51ab12ec.js} +1 -1
- data/tools/admin/{LimitscolorWidget--1aPSNVB-8fde0f21185dc0a3c26b.js → LimitscolorWidget-ChvzYoug-a3e71b7a308085e50c6c.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-swnMNApm-e2ac1266a1fa444d84ce.js → LimitscolumnWidget-IOhsLFZ1-0363e0f7dc874050da92.js} +1 -1
- data/tools/admin/LinegraphWidget-DZdqMqjw-6a57fc795406bbe9edf1.js +1 -0
- data/tools/admin/MatrixbycolumnsWidget-BzGYMhJ2-7bd5d04031a6fafb7bba.js +1 -0
- data/tools/admin/{MicroservicesTab-CtI7BEt0-e2afd0376a926dd8283b.js → MicroservicesTab-DrqUNTBZ-89c4923b60a2a7a46223.js} +1 -1
- data/tools/admin/{OutputDialog-CqD5uI0m-2e8ab0e0d807540d9c62.js → OutputDialog-B6i5yvkr-a443a0a6240c33e68744.js} +1 -1
- data/tools/admin/{PackagesTab-DhMk-fi5-a6a584a69343a604b511.js → PackagesTab-CjcBp95A-b1a616601b1391e35dcc.js} +1 -1
- data/tools/admin/{PluginsTab-DxxEqPCA-99526335866ac2db06c9.js → PluginsTab-Diu6vzUR-f034b5fc22864596cf17.js} +2 -2
- data/tools/admin/{ProgressbarWidget-7rJeuX6H-2c9818646471e0e5f2fc.js → ProgressbarWidget-Bre-0zcS-bd24a237e1f96d1ed242.js} +1 -1
- data/tools/admin/RadiobuttonWidget-CLbfhrkc-d6c883f689cdf48c55d8.js +1 -0
- data/tools/admin/{RadiogroupWidget-DhfbTvQ8-c5d29075abdd7d1bbec7.js → RadiogroupWidget-DvRc70_Q-96beebc8d864908ff2b3.js} +1 -1
- data/tools/admin/{RangebarWidget-BEGvSL_K-dc527fb829ec4b096101.js → RangebarWidget-BvzVWcfZ-84f51b2e633d105638f6.js} +1 -1
- data/tools/admin/{RedisTab-Bq8Frctp-13289a5f5dce7293f02c.js → RedisTab-BWYQfcqX-ca89cb81591e8f373dec.js} +1 -1
- data/tools/admin/{RollupWidget-BZhspgWd-c68862920c24f26b53b7.js → RollupWidget-KT243Ed8-d2d04263bc64617f43cc.js} +1 -1
- data/tools/admin/RoutersTab-CLwJ6J7T-4b2a45df9eba7d0107b1.js +1 -0
- data/tools/admin/{ScrollwindowWidget-qZ3nhhVU-6995118a165af7de17b3.js → ScrollwindowWidget-DcpdXyrP-61cf502cc8e4590c630c.js} +1 -1
- data/tools/admin/{SecretsTab-vdm8oj9_-58532e33aa1f6b531a68.js → SecretsTab-CQNTFJAM-d87c77862ed8f0edbeea.js} +1 -1
- data/tools/admin/{SettingsTab-C05e6-Xm-55f623022d0526a57892.js → SettingsTab-BAOaLzuc-c2761e5fc0e91c016160.js} +1 -1
- data/tools/admin/{SignalWidget-Bh14Zrch-86baecda974d0f2beea3.js → SignalWidget-CoTi0Uzy-b369e6623de47e6e3d9b.js} +1 -1
- data/tools/admin/{SimpleTextDialog-plHG7LGh-e2d304dd585e83495723.js → SimpleTextDialog-BqVdFj1n-861ab665aa0fe3c8f397.js} +1 -1
- data/tools/admin/SpacerWidget-CTekSgNO-1231f8bb7aab613445cd.js +1 -0
- data/tools/admin/{SparklineWidget-CJEEJdZ--683d49903532fdc6294b.js → SparklineWidget-BxwPKrIr-de9c14c6b396549e8270.js} +1 -1
- data/tools/admin/TabbookWidget-B6Nx3Kmt-94db5ac8af9b8cae4231.js +1 -0
- data/tools/admin/{TargetsTab-DyfyM9sC-83df720c2d443d9288b2.js → TargetsTab-u-6nY7FX-dd5cfdb20f201fd1344d.js} +1 -1
- data/tools/admin/TextboxWidget-DJgAfLFU-7c5683c20169aa6432a3.js +1 -0
- data/tools/admin/{TextfieldWidget-C0C7NL53-506b09a01c12358f9c62.js → TextfieldWidget-Bc2xGs8v-156afeec5be0d510de36.js} +1 -1
- data/tools/admin/{TimeWidget-AFOTVB4w-84ff9a2525b008004635.js → TimeWidget-DO6ZuMLO-74d012d09ac38ea7855e.js} +1 -1
- data/tools/admin/TitleWidget-CkZhMme1-d8b9e6f29a438ef388ce.js +1 -0
- data/tools/admin/{ToolsTab-BvpoO0wt-56b24e1988bd20abd1b5.js → ToolsTab-BI6lImcw-4dcdfcc74f90390a9900.js} +2 -2
- data/tools/admin/{VWidget-BlF_o-7Z-6b1257ad54ea4764ca57.js → VWidget-DzhcRBQe-1e634a435a0fde2b4e06.js} +1 -1
- data/tools/admin/{ValueWidget-DFUfM5tw-d3b7bc9030c661cfa0f7.js → ValueWidget-tieHz2H1-b5c769505bd3f691ba23.js} +1 -1
- data/tools/admin/ValuelimitsbarWidget-oFqxZu0t-119b6bc83470c4518630.js +1 -0
- data/tools/admin/{ValuelimitscolumnWidget-Bs91VFLz-9ec35655c41f2cff409b.js → ValuelimitscolumnWidget-DYBv8POg-151ddaef24d784faba9e.js} +1 -1
- data/tools/admin/{ValuerangebarWidget-C7WHyR2h-70411bc4e3d7e408a2e5.js → ValuerangebarWidget-m3gFyG4v-1caba7e8ec9ae994114a.js} +1 -1
- data/tools/admin/{VerticalWidget-COP5oVCK-bd3e33f8df586f380b29.js → VerticalWidget-CcdRZmQK-426a549005de0ca8db13.js} +1 -1
- data/tools/admin/VerticalboxWidget-DfsCYhrX-4bc593f181e61289ca28.js +1 -0
- data/tools/admin/{Widget-cmJ76_g1-85e46e52eeb022e9f097.js → Widget-B5HKasz2-18f1e8c7c1ca6a1342a2.js} +1 -1
- data/tools/admin/main-41c0fc29de7ff689758e.js +1507 -0
- data/tools/admin/main.js +1 -1
- metadata +79 -79
- data/tools/admin/BlockWidget-DRtBkPat-a9d42884732728e4b270.js +0 -2
- data/tools/admin/CanvasWidget-VW1uHIU0-5e5d09f96ff4d23c33f7.js +0 -1
- data/tools/admin/CanvasdotWidget-unc83V9l-d977ced0ed1cdde04c7a.js +0 -1
- data/tools/admin/CanvaslabelWidget-B-5KAkZr-f2245ef1ddab7ed67acf.js +0 -1
- data/tools/admin/CanvaslineWidget-DiNWzbpu-33be32a956c15c0fd339.js +0 -1
- data/tools/admin/CheckbuttonWidget--QM-segm-c00b507f3ab562115629.js +0 -1
- data/tools/admin/ComboboxWidget-BDpHIcCo-382adc994cce09b48370.js +0 -1
- data/tools/admin/HorizontallineWidget-BBvYWaP7-3045a4fec6c63c26293e.js +0 -1
- data/tools/admin/LabelledWidget-DV1IbbPS-2cb8856db466547fe844.js +0 -1
- data/tools/admin/LabelprogressbarWidget-BHBDYVZp-1c1edc21835e5428e220.js +0 -1
- data/tools/admin/LabelsparklineWidget-BaoIdd7s-8ccc692ec52719f92489.js +0 -1
- data/tools/admin/LabelvalueWidget-wuW55zQP-ac9981c279ec88f43c96.js +0 -1
- data/tools/admin/LabelvaluelimitsbarWidget-77Rc3lCf-36a5488278befa15a608.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-nounrACl-ef27fecb6d659993c819.js +0 -1
- data/tools/admin/LinegraphWidget-BbI-wOnq-39097c4223cebf5ac139.js +0 -1
- data/tools/admin/MatrixbycolumnsWidget-Bx2qMr8P-6f2fbb10e70fc2069931.js +0 -1
- data/tools/admin/RadiobuttonWidget-DsEw3JiU-cefc6ff7fb359306778c.js +0 -1
- data/tools/admin/RoutersTab-Bg6dpAXr-aacbc4001fe20b74fe08.js +0 -1
- data/tools/admin/SpacerWidget-D_NE46jZ-5844d43f68165519b0fa.js +0 -1
- data/tools/admin/TabbookWidget-C-SU65IF-31247ab231091e93ad86.js +0 -1
- data/tools/admin/TextboxWidget-Dn1Ds-b0-5fff20e0a492cdda0d93.js +0 -1
- data/tools/admin/TitleWidget-CbS_wrQw-2be205566bbec9fec93d.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-CALgABsT-feadf80c982192b912ca.js +0 -1
- data/tools/admin/VerticalboxWidget-CDPoOx4C-228ed55898573e03a4ed.js +0 -1
- data/tools/admin/main-07edeb44f4f599ab14ba.js +0 -1512
@@ -0,0 +1,1507 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(ar,nt){"use strict";var He,Yt,ot,Fe,We,un,gr,xp,Cp,kp,yn,ii,Zi,Ft,ml,lu,Ur,ss,Us,Aa,Sp,_p,Ap,$p,cu,Tp,Mp,Ep,Ip,uu,Lp,Rp,Op,Np,Dp,Fp,Pp;return{setters:[Mt=>{He=Mt.resolveComponent,Yt=Mt.createBlock,ot=Mt.openBlock,Fe=Mt.withCtx,We=Mt.createVNode,un=Mt.createElementBlock,gr=Mt.createElementVNode,xp=Mt.useCssVars,Cp=Mt.defineAsyncComponent,kp=Mt.Teleport,yn=Mt.toDisplayString,ii=Mt.Fragment,Zi=Mt.renderList,Ft=Mt.createTextVNode,ml=Mt.mergeProps,lu=Mt.createSlots,Ur=Mt.createCommentVNode,ss=Mt.normalizeStyle,Us=Mt.h,Aa=Mt.withModifiers,Sp=Mt.toRaw,_p=Mt.defineComponent,Ap=Mt.warn,$p=Mt.inject,cu=Mt.computed,Tp=Mt.shallowRef,Mp=Mt.watchEffect,Ep=Mt.getCurrentInstance,Ip=Mt.provide,uu=Mt.createApp,Lp=Mt.withDirectives,Rp=Mt.vShow},Mt=>{Op=Mt.createRouter,Np=Mt.createWebHistory},Mt=>{Dp=Mt.getMountedApps},Mt=>{Fp=Mt.createStore},Mt=>{Pp=Mt.createVuetify}],execute:function(){ar({$:qp,c:jM,l:$n,m:Ar,p:Po,y:tr,z:fd});var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wp(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),t.push.apply(t,r)}return t}function as(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Wp(Object(t),!0).forEach(function(r){yw(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Wp(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function yw(n,e,t){return(e=function(r){var d=function(p,g){if(ls(p)!=="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var h=b.call(p,g);if(ls(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)}(r,"string");return ls(d)==="symbol"?d:String(d)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ls(n){return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var e=function(t){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,d=String(t),p=d.length,g=-1,b="",h=d.charCodeAt(0);++g<p;)(r=d.charCodeAt(g))!=0?b+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":g==0&&p==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+d.charAt(g):d.charAt(g):b+="�";return b};n.CSS||(n.CSS={}),n.CSS.escape=e})(Mt);var bw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function ww(n){if(ls(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=as(as({},bw),n);if(!e.Vue&&!e.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!e.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(e.appOptions.el&&typeof e.appOptions.el!="string"&&!(e.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ls(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var t={};return{bootstrap:xw.bind(null,e,t),mount:Cw.bind(null,e,t),unmount:Sw.bind(null,e,t),update:kw.bind(null,e,t)}}function xw(n){return n.loadRootComponent?n.loadRootComponent().then(function(e){return n.rootComponent=e}):Promise.resolve()}function Cw(n,e,t){var r={};return Promise.resolve().then(function(){return function(d,p){return typeof d.appOptions=="function"?d.appOptions(p):Promise.resolve(as({},d.appOptions))}(n,t).then(function(d){var p;if(t.domElement&&!d.el&&(d.el=t.domElement),d.el)if(typeof d.el=="string"){if(!(p=document.querySelector(d.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(d.el))}else(p=d.el).id||(p.id="single-spa-application:".concat(t.name)),d.el="#".concat(CSS.escape(p.id));else{var g="single-spa-application:".concat(t.name);d.el="#".concat(CSS.escape(g)),(p=document.getElementById(g))||((p=document.createElement("div")).id=g,document.body.appendChild(p))}if(!n.replaceMode&&(d.el=d.el+" .single-spa-container",!p.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",p.appendChild(b)}r.domEl=p,d.render||d.template||!n.rootComponent||(d.render=function(f){return f(n.rootComponent)}),d.data||(d.data={});var h=d.data;if(d.data=function(){return as(as({},typeof h=="function"?h.call(this,this):h),t)},n.createApp){if(r.vueInstance=n.createApp(d),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,t)).then(function(){return r.root=r.vueInstance.mount(d.el),e[t.name]=r,r.vueInstance});r.root=r.vueInstance.mount(d.el)}else if(r.vueInstance=new n.Vue(d),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,t)).then(function(){return e[t.name]=r,r.vueInstance});return e[t.name]=r,r.vueInstance})})}function kw(n,e,t){return Promise.resolve().then(function(){var r=e[t.name],d=as(as({},n.appOptions.data||{}),t),p=r.root||r.vueInstance;for(var g in d)p[g]=d[g]})}function Sw(n,e,t){return Promise.resolve().then(function(){var r=e[t.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const _w=(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t},Aw={};function $w(n,e){const t=He("router-view"),r=He("v-app");return ot(),Yt(r,{id:"innerapp"},{default:Fe(()=>[We(t)]),_:1})}const Tw=_w(Aw,[["render",$w]]),Bp=function(n){var e;!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),(e=n.children)==null||e.forEach(Bp)},LD="modulepreload",RD=function(n){return"/"+n},OD={},rt=function(e,t,r){let d=Promise.resolve();function p(g){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=g,window.dispatchEvent(b),!b.defaultPrevented)throw g}return d.then(g=>{for(const b of g||[])b.status==="rejected"&&p(b.reason);return e().catch(p)})},Ni=ar("d",(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t}),Mw="/icons/customIcons.svg",hu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Mw+"#"+this.icon}}},zp=()=>{xp(n=>({"259824e2":n.color}))},jp=hu.setup;hu.setup=jp?(n,e)=>(zp(),jp(n,e)):zp;const Ew={class:"cosmos-custom-icon"},Iw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Lw=["href"];function Rw(n,e,t,r,d,p){return ot(),un("span",Ew,[(ot(),un("svg",Iw,[gr("use",{href:p.iconSrc},null,8,Lw)]))])}const Ow=Ni(hu,[["render",Rw],["__scopeId","data-v-4b6f1199"]]),vl=6e4,du=36e5,Nw=1e3,Hp=Symbol.for("constructDateFrom");function tr(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&Hp in n?n[Hp](e):n instanceof Date?new n.constructor(e):new Date(e)}function $n(n,e){return tr(e||n,n)}let Dw={};function Vs(){return Dw}function Do(n,e){var t,r,d,p;const g=Vs(),b=(e==null?void 0:e.weekStartsOn)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.weekStartsOn)??g.weekStartsOn??((p=(d=g.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,h=$n(n,e==null?void 0:e.in),f=h.getDay(),o=(f<b?7:0)+f-b;return h.setDate(h.getDate()-o),h.setHours(0,0,0,0),h}function qs(n,e){return Do(n,{...e,weekStartsOn:1})}function Up(n,e){const t=$n(n,void 0),r=t.getFullYear(),d=tr(t,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const p=qs(d),g=tr(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const b=qs(g);return t.getTime()>=p.getTime()?r+1:t.getTime()>=b.getTime()?r:r-1}function yl(n){const e=$n(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function Fw(n,...e){const t=tr.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Vp(n,e){const t=$n(n,void 0);return t.setHours(0,0,0,0),t}function Pw(n,e,t){const[r,d]=Fw(void 0,n,e),p=Vp(r),g=Vp(d),b=+p-yl(p),h=+g-yl(g);return Math.round((b-h)/864e5)}function Ww(n,e){const t=Up(n),r=tr(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),qs(r)}function Bw(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function qp(n){return!(!Bw(n)&&typeof n!="number"||isNaN(+$n(n)))}function zw(n,e){const t=$n(n,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const jw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Hw=(n,e,t)=>{let r;const d=jw[n];return typeof d=="string"?r=d:e===1?r=d.one:r=d.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function pu(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const Uw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Kw={date:pu({formats:Uw,defaultWidth:"full"}),time:pu({formats:Vw,defaultWidth:"full"}),dateTime:pu({formats:qw,defaultWidth:"full"})},Gw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Yw=(n,e,t,r)=>Gw[n];function $a(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let d;if(r==="formatting"&&n.formattingValues){const g=n.defaultFormattingWidth||n.defaultWidth,b=t!=null&&t.width?String(t.width):g;d=n.formattingValues[b]||n.formattingValues[g]}else{const g=n.defaultWidth,b=t!=null&&t.width?String(t.width):n.defaultWidth;d=n.values[b]||n.values[g]}const p=n.argumentCallback?n.argumentCallback(e):e;return d[p]}}const Xw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Zw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},e1={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},t1={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},n1=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},r1={ordinalNumber:n1,era:$a({values:Xw,defaultWidth:"wide"}),quarter:$a({values:Qw,defaultWidth:"wide",argumentCallback:n=>n-1}),month:$a({values:Zw,defaultWidth:"wide"}),day:$a({values:Jw,defaultWidth:"wide"}),dayPeriod:$a({values:e1,defaultWidth:"wide",formattingValues:t1,defaultFormattingWidth:"wide"})};function Ta(n){return(e,t={})=>{const r=t.width,d=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],p=e.match(d);if(!p)return null;const g=p[0],b=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(b)?o1(b,a=>a.test(g)):i1(b,a=>a.test(g));let f;f=n.valueCallback?n.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const o=e.slice(g.length);return{value:f,rest:o}}}function i1(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function o1(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function s1(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const d=r[0],p=e.match(n.parsePattern);if(!p)return null;let g=n.valueCallback?n.valueCallback(p[0]):p[0];g=t.valueCallback?t.valueCallback(g):g;const b=e.slice(d.length);return{value:g,rest:b}}}const a1=/^(\d+)(th|st|nd|rd)?/i,l1=/\d+/i,c1={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},u1={any:[/^b/i,/^(a|c)/i]},h1={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},d1={any:[/1/i,/2/i,/3/i,/4/i]},p1={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},g1={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f1={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},m1={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},v1={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},y1={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},b1={ordinalNumber:s1({matchPattern:a1,parsePattern:l1,valueCallback:n=>parseInt(n,10)}),era:Ta({matchPatterns:c1,defaultMatchWidth:"wide",parsePatterns:u1,defaultParseWidth:"any"}),quarter:Ta({matchPatterns:h1,defaultMatchWidth:"wide",parsePatterns:d1,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ta({matchPatterns:p1,defaultMatchWidth:"wide",parsePatterns:g1,defaultParseWidth:"any"}),day:Ta({matchPatterns:f1,defaultMatchWidth:"wide",parsePatterns:m1,defaultParseWidth:"any"}),dayPeriod:Ta({matchPatterns:v1,defaultMatchWidth:"any",parsePatterns:y1,defaultParseWidth:"any"})},Kp={code:"en-US",formatDistance:Hw,formatLong:Kw,formatRelative:Yw,localize:r1,match:b1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function w1(n,e){const t=$n(n,void 0);return Pw(t,zw(t))+1}function Gp(n,e){const t=$n(n,void 0),r=+qs(t)-+Ww(t);return Math.round(r/6048e5)+1}function gu(n,e){var t,r,d,p;const g=$n(n,e==null?void 0:e.in),b=g.getFullYear(),h=Vs(),f=(e==null?void 0:e.firstWeekContainsDate)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((p=(d=h.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=tr((e==null?void 0:e.in)||n,0);o.setFullYear(b+1,0,f),o.setHours(0,0,0,0);const a=Do(o,e),c=tr((e==null?void 0:e.in)||n,0);c.setFullYear(b,0,f),c.setHours(0,0,0,0);const l=Do(c,e);return+g>=+a?b+1:+g>=+l?b:b-1}function x1(n,e){var t,r,d,p;const g=Vs(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.firstWeekContainsDate)??g.firstWeekContainsDate??((p=(d=g.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,h=gu(n,e),f=tr((e==null?void 0:e.in)||n,0);return f.setFullYear(h,0,b),f.setHours(0,0,0,0),Do(f,e)}function Yp(n,e){const t=$n(n,e==null?void 0:e.in),r=+Do(t,e)-+x1(t,e);return Math.round(r/6048e5)+1}function hn(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Fo={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return hn(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):hn(t+1,2)},d(n,e){return hn(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return hn(n.getHours()%12||12,e.length)},H(n,e){return hn(n.getHours(),e.length)},m(n,e){return hn(n.getMinutes(),e.length)},s(n,e){return hn(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),d=Math.trunc(r*Math.pow(10,t-3));return hn(d,e.length)}},Ks={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xp={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),d=r>0?r:1-r;return t.ordinalNumber(d,{unit:"year"})}return Fo.y(n,e)},Y:function(n,e,t,r){const d=gu(n,r),p=d>0?d:1-d;if(e==="YY"){const g=p%100;return hn(g,2)}return e==="Yo"?t.ordinalNumber(p,{unit:"year"}):hn(p,e.length)},R:function(n,e){const t=Up(n);return hn(t,e.length)},u:function(n,e){const t=n.getFullYear();return hn(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return hn(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return hn(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Fo.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return hn(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const d=Yp(n,r);return e==="wo"?t.ordinalNumber(d,{unit:"week"}):hn(d,e.length)},I:function(n,e,t){const r=Gp(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):hn(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Fo.d(n,e)},D:function(n,e,t){const r=w1(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):hn(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const d=n.getDay(),p=(d-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(p);case"ee":return hn(p,2);case"eo":return t.ordinalNumber(p,{unit:"day"});case"eee":return t.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(d,{width:"short",context:"formatting"});case"eeee":default:return t.day(d,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const d=n.getDay(),p=(d-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(p);case"cc":return hn(p,e.length);case"co":return t.ordinalNumber(p,{unit:"day"});case"ccc":return t.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(d,{width:"narrow",context:"standalone"});case"cccccc":return t.day(d,{width:"short",context:"standalone"});case"cccc":default:return t.day(d,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),d=r===0?7:r;switch(e){case"i":return String(d);case"ii":return hn(d,e.length);case"io":return t.ordinalNumber(d,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const r=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let d;switch(r===12?d=Ks.noon:r===0?d=Ks.midnight:d=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(d,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let d;switch(r>=17?d=Ks.evening:r>=12?d=Ks.afternoon:r>=4?d=Ks.morning:d=Ks.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(d,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Fo.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Fo.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Fo.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Fo.s(n,e)},S:function(n,e){return Fo.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Zp(r);case"XXXX":case"XX":return cs(r);case"XXXXX":case"XXX":default:return cs(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return Zp(r);case"xxxx":case"xx":return cs(r);case"xxxxx":case"xxx":default:return cs(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Qp(r,":");case"OOOO":default:return"GMT"+cs(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Qp(r,":");case"zzzz":default:return"GMT"+cs(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return hn(r,e.length)},T:function(n,e,t){return hn(+n,e.length)}};function Qp(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=Math.trunc(r/60),p=r%60;return p===0?t+String(d):t+String(d)+e+hn(p,2)}function Zp(n,e){return n%60===0?(n>0?"-":"+")+hn(Math.abs(n)/60,2):cs(n,e)}function cs(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=hn(Math.trunc(r/60),2),p=hn(r%60,2);return t+d+e+p}const Jp=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},eg=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},C1=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],d=t[2];if(!d)return Jp(n,e);let p;switch(r){case"P":p=e.dateTime({width:"short"});break;case"PP":p=e.dateTime({width:"medium"});break;case"PPP":p=e.dateTime({width:"long"});break;case"PPPP":default:p=e.dateTime({width:"full"});break}return p.replace("{{date}}",Jp(r,e)).replace("{{time}}",eg(d,e))},fu={p:eg,P:C1},k1=/^D+$/,S1=/^Y+$/,_1=["D","DD","YY","YYYY"];function tg(n){return k1.test(n)}function ng(n){return S1.test(n)}function mu(n,e,t){const r=A1(n,e,t);if(console.warn(r),_1.includes(n))throw new RangeError(r)}function A1(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,T1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,M1=/^'([^]*?)'?$/,E1=/''/g,I1=/[a-zA-Z]/;function Po(n,e,t){var r,d,p,g,b,h,f,o;const a=Vs(),c=(t==null?void 0:t.locale)??a.locale??Kp,l=(t==null?void 0:t.firstWeekContainsDate)??((d=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((g=(p=a.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,s=(t==null?void 0:t.weekStartsOn)??((h=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((o=(f=a.locale)==null?void 0:f.options)==null?void 0:o.weekStartsOn)??0,u=$n(n,t==null?void 0:t.in);if(!qp(u))throw new RangeError("Invalid time value");let m=e.match(T1).map(x=>{const E=x[0];if(E==="p"||E==="P"){const $=fu[E];return $(x,c.formatLong)}return x}).join("").match($1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:L1(x)};if(Xp[E])return{isToken:!0,value:x};if(E.match(I1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});c.localize.preprocessor&&(m=c.localize.preprocessor(u,m));const w={firstWeekContainsDate:l,weekStartsOn:s,locale:c};return m.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&ng(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&tg(E))&&mu(E,e,String(n));const $=Xp[E[0]];return $(u,E,c.localize,w)}).join("")}function L1(n){const e=n.match(M1);return e?e[1].replace(E1,"'"):n}var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rg={exports:{}},ig;function R1(){return ig||(ig=1,function(n,e){(function(){var t="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var d=function(o,a,c){if(typeof o!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),d.modules[o]||(d.payloads[o]=c,d.modules[o]=null)};d.modules={},d.payloads={};var p=function(o,a,c){if(typeof a=="string"){var l=h(o,a);if(l!=null)return c&&c(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var s=[],u=0,m=a.length;u<m;++u){var w=h(o,a[u]);if(w==null&&g.original)return;s.push(w)}return c&&c.apply(null,s)||!0}},g=function(o,a){var c=p("",o,a);return c==null&&g.original?g.original.apply(this,arguments):c},b=function(o,a){if(a.indexOf("!")!==-1){var c=a.split("!");return b(o,c[0])+"!"+b(o,c[1])}if(a.charAt(0)=="."){var l=o.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&s!=a;){var s=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(o,a){a=b(o,a);var c=d.modules[a];if(!c){if(c=d.payloads[a],typeof c=="function"){var l={},s={id:a,uri:"",exports:l,packaged:!0},u=function(w,x){return p(a,w,x)},m=c(u,l,s);l=m||s.exports,d.modules[a]=l,delete d.payloads[a]}c=d.modules[a]=l||c}return c};function f(o){var a=r;r[o]||(r[o]={}),a=r[o],(!a.define||!a.define.packaged)&&(d.original=a.define,a.define=d,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(g.original=a.require,a.require=g,a.require.packaged=!0)}f(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,r,d){function p(g,b,h){Object.defineProperty(g,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||p(String.prototype,"startsWith",function(g,b){return b=b||0,this.lastIndexOf(g,b)===b}),String.prototype.endsWith||p(String.prototype,"endsWith",function(g,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=g.length;var f=h.indexOf(g,b);return f!==-1&&f===b}),String.prototype.repeat||p(String.prototype,"repeat",function(g){for(var b="",h=this;g>0;)g&1&&(b+=h),(g>>=1)&&(h+=h);return b}),String.prototype.includes||p(String.prototype,"includes",function(g,b){return this.indexOf(g,b)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(g),h=1;h<arguments.length;h++){var f=arguments[h];f!=null&&Object.keys(f).forEach(function(o){b[o]=f[o]})}return b}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(b){return g[b]})}),Array.prototype.find||p(Array.prototype,"find",function(g){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var o=this[f];if(g.call(h,o,f,this))return o}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(g){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var o=this[f];if(g.call(h,o,f,this))return f}}),Array.prototype.includes||p(Array.prototype,"includes",function(g,b){return this.indexOf(g,b)!=-1}),Array.prototype.fill||p(Array.prototype,"fill",function(g){for(var b=this,h=b.length>>>0,f=arguments[1],o=f>>0,a=o<0?Math.max(h+o,0):Math.min(o,h),c=arguments[2],l=c===void 0?h:c>>0,s=l<0?Math.max(h+l,0):Math.min(l,h);a<s;)b[a]=g,a++;return b}),Array.of||p(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,r,d){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,r,d){r.deepCopy=function p(g){if(typeof g!="object"||!g)return g;var b;if(Array.isArray(g)){b=[];for(var h=0;h<g.length;h++)b[h]=p(g[h]);return b}if(Object.prototype.toString.call(g)!=="[object Object]")return g;b={};for(var h in g)b[h]=p(g[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,r,d){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,h){for(var f="";h>0;)h&1&&(f+=b),(h>>=1)&&(b+=b);return f};var p=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(p,"")},r.stringTrimRight=function(b){return b.replace(g,"")},r.copyObject=function(b){var h={};for(var f in b)h[f]=b[f];return h},r.copyArray=function(b){for(var h=[],f=0,o=b.length;f<o;f++)b[f]&&typeof b[f]=="object"?h[f]=this.copyObject(b[f]):h[f]=b[f];return h},r.deepCopy=t("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var h={},f=0;f<b.length;f++)h[b[f]]=1;return h},r.createMap=function(b){var h=Object.create(null);for(var f in b)h[f]=b[f];return h},r.arrayRemove=function(b,h){for(var f=0;f<=b.length;f++)h===b[f]&&b.splice(f,1)},r.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(b){return(""+b).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(b,h){var f=[];return b.replace(h,function(o){f.push({offset:arguments[arguments.length-2],length:o.length})}),f},r.deferredCall=function(b){var h=null,f=function(){h=null,b()},o=function(a){return o.cancel(),h=setTimeout(f,a||0),o};return o.schedule=o,o.call=function(){return this.cancel(),b(),o},o.cancel=function(){return clearTimeout(h),h=null,o},o.isPending=function(){return h},o},r.delayedCall=function(b,h){var f=null,o=function(){f=null,b()},a=function(c){f==null&&(f=setTimeout(o,c||h))};return a.delay=function(c){f&&clearTimeout(f),f=setTimeout(o,c||h)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){f&&clearTimeout(f),f=null},a.isPending=function(){return f},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,h,f){return f&&b.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,r,d){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var p=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(p.platform)||["other"])[0].toLowerCase(),b=p.userAgent||"",h=p.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=b.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(b.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,r.isAIR=b.indexOf("AdobeAIR")>=0,r.isAndroid=b.indexOf("Android")>=0,r.isChromeOS=b.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(b)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,r,d){var p=t("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function c(l,s,u){if(typeof l=="string"&&l){var m=document.createTextNode(l);return s&&s.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&s&&s.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var E=c(l[x],s,u);E&&w.push(E)}return w}var $=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<l.length;x++)c(l[x],$,u);return C==2&&Object.keys(k).forEach(function(L){var R=k[L];L==="class"?$.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||L=="value"||L[0]=="$"?$[L]=R:L==="ref"?u&&(u[R]=$):L==="style"?typeof R=="string"&&($.style.cssText=R):R!=null&&$.setAttribute(L,R)}),s&&s.appendChild($),$},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,l){return document.createElementNS?document.createElementNS(l||g,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,l){var s=l?l.ownerDocument:document;return s.createTextNode(c)},r.createFragment=function(c){var l=c?c.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(c,l){var s=(c.className+"").split(/\s+/g);return s.indexOf(l)!==-1},r.addCssClass=function(c,l){r.hasCssClass(c,l)||(c.className+=" "+l)},r.removeCssClass=function(c,l){for(var s=c.className.split(/\s+/g);;){var u=s.indexOf(l);if(u==-1)break;s.splice(u,1)}c.className=s.join(" ")},r.toggleCssClass=function(c,l){for(var s=c.className.split(/\s+/g),u=!0;;){var m=s.indexOf(l);if(m==-1)break;u=!1,s.splice(m,1)}return u&&s.push(l),c.className=s.join(" "),u},r.setCssClass=function(c,l,s){s?r.addCssClass(c,l):r.removeCssClass(c,l)},r.hasCssString=function(c,l){var s=0,u;if(l=l||document,u=l.querySelectorAll("style")){for(;s<u.length;)if(u[s++].id===c)return!0}},r.removeElementById=function(c,l){l=l||document,l.getElementById(c)&&l.getElementById(c).remove()};var b,h=[];r.useStrictCSP=function(c){b=c,c==!1?f():h||(h=[])};function f(){var c=h;h=null,c&&c.forEach(function(l){o(l[0],l[1])})}function o(c,l,s){if(!(typeof document>"u")){if(h){if(s)f();else if(s===!1)return h.push([c,l])}if(!b){var u=s;!s||!s.getRootNode?u=document:(u=s.getRootNode(),(!u||u==s)&&(u=document));var m=u.ownerDocument||u;if(l&&r.hasCssString(l,u))return null;l&&(c+=`
|
2
|
+
/*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(c)),l&&(w.id=l),u==m&&(u=r.getDocumentHead(m)),u.insertBefore(w,u.firstChild)}}}if(r.importCssString=o,r.importCssStylsheet=function(c,l){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(l))},r.scrollbarWidth=function(c){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var s=r.createElement("ace_outer"),u=s.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",s.appendChild(l);var m=c&&c.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(s);var w=l.offsetWidth;u.overflow="scroll";var x=l.offsetWidth;return w===x&&(x=s.clientWidth),m.removeChild(s),w-x},r.computedStyle=function(c,l){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,l,s){c[l]!==s&&(c[l]=s)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=p.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,p.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!p.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,l,s){c.style.transform="translate("+Math.round(l)+"px, "+Math.round(s)+"px)"}:r.translate=function(c,l,s){c.style.top=Math.round(s)+"px",c.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,r,d){/*
|
3
|
+
* based on code from:
|
4
|
+
*
|
5
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
+
* Available via the MIT or new BSD license.
|
7
|
+
* see: http://github.com/jrburke/requirejs for details
|
8
|
+
*/var p=t("./dom");r.get=function(g,b){var h=new XMLHttpRequest;h.open("GET",g,!0),h.onreadystatechange=function(){h.readyState===4&&b(h.responseText)},h.send(null)},r.loadScript=function(g,b){var h=p.getDocumentHead(),f=document.createElement("script");f.src=g,h.appendChild(f),f.onload=f.onreadystatechange=function(o,a){(a||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,a||b())}},r.qualifyURL=function(g){var b=document.createElement("a");return b.href=g,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,r,d){r.inherits=function(p,g){p.super_=g,p.prototype=Object.create(g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(p,g){for(var b in g)p[b]=g[b];return p},r.implement=function(p,g){r.mixin(p,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,r,d){var p={},g=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};p._emit=p._dispatchEvent=function(h,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!o.length&&!a)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=h),f.stopPropagation||(f.stopPropagation=g),f.preventDefault||(f.preventDefault=b),o=o.slice();for(var c=0;c<o.length&&(o[c](f,this),!f.propagationStopped);c++);if(a&&!f.defaultPrevented)return a(f,this)}},p._signal=function(h,f){var o=(this._eventRegistry||{})[h];if(o){o=o.slice();for(var a=0;a<o.length;a++)o[a](f,this)}},p.once=function(h,f){var o=this;if(this.on(h,function a(){o.off(h,a),f.apply(null,arguments)}),!f)return new Promise(function(a){f=a})},p.setDefaultHandler=function(h,f){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[h]){var a=o[h],c=o._disabled_[h];c||(o._disabled_[h]=c=[]),c.push(a);var l=c.indexOf(f);l!=-1&&c.splice(l,1)}o[h]=f},p.removeDefaultHandler=function(h,f){var o=this._defaultHandlers;if(o){var a=o._disabled_[h];if(o[h]==f)a&&this.setDefaultHandler(h,a.pop());else if(a){var c=a.indexOf(f);c!=-1&&a.splice(c,1)}}},p.on=p.addEventListener=function(h,f,o){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(f)==-1&&a[o?"unshift":"push"](f),f},p.off=p.removeListener=p.removeEventListener=function(h,f){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[h];if(o){var a=o.indexOf(f);a!==-1&&o.splice(a,1)}},p.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=p}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,r,d){r.reportError=function(p,g){var b=new Error(p);b.data=g,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,r,d){var p={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=p}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(t,r,d){"no use strict";var p=t("./oop"),g=t("./event_emitter").EventEmitter,b=t("./report_error").reportError,h=t("./default_english_messages").defaultEnglishMessages,f={setOptions:function(s){Object.keys(s).forEach(function(u){this.setOption(u,s[u])},this)},getOptions:function(s){var u={};if(s)Array.isArray(s)||(u=s,s=Object.keys(u));else{var m=this.$options;s=Object.keys(m).filter(function(w){return!m[w].hidden})}return s.forEach(function(w){u[w]=this.getOption(w)},this),u},setOption:function(s,u){if(this["$"+s]!==u){var m=this.$options[s];if(!m)return o('misspelled option "'+s+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(s,u);m.handlesSet||(this["$"+s]=u),m&&m.set&&m.set.call(this,u)}},getOption:function(s){var u=this.$options[s];return u?u.forwardTo?this[u.forwardTo]&&this[u.forwardTo].getOption(s):u&&u.get?u.get.call(this):this["$"+s]:o('misspelled option "'+s+'"')}};function o(s){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,c,l=function(){function s(){this.$defaultOptions={},a=h,c="dollarSigns"}return s.prototype.defineOptions=function(u,m,w){return u.$options||(this.$defaultOptions[m]=u.$options={}),Object.keys(w).forEach(function(x){var E=w[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),u.$options[E.name]=E,"initialValue"in E&&(u["$"+E.name]=E.initialValue)}),p.implement(u,f),this},s.prototype.resetOptions=function(u){Object.keys(u.$options).forEach(function(m){var w=u.$options[m];"value"in w&&u.setOption(m,w.value)})},s.prototype.setDefaultValue=function(u,m,w){if(!u){for(u in this.$defaultOptions)if(this.$defaultOptions[u][m])break;if(!this.$defaultOptions[u][m])return!1}var x=this.$defaultOptions[u]||(this.$defaultOptions[u]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},s.prototype.setDefaultValues=function(u,m){Object.keys(m).forEach(function(w){this.setDefaultValue(u,w,m[w])},this)},s.prototype.setMessages=function(u,m){a=u,m&&m.placeholders&&(c=m.placeholders)},s.prototype.nls=function(u,m,w){a[u]||(o("No message found for the key '"+u+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||o("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[u]||a[m]||m;return w&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":w[$]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,$){return w[$]}))),x},s}();l.prototype.warn=o,l.prototype.reportError=b,p.implement(l.prototype,g),r.AppConfig=l}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,r,d){d.exports=`.ace-tm .ace_gutter {
|
9
|
+
background: #f0f0f0;
|
10
|
+
color: #333;
|
11
|
+
}
|
12
|
+
|
13
|
+
.ace-tm .ace_print-margin {
|
14
|
+
width: 1px;
|
15
|
+
background: #e8e8e8;
|
16
|
+
}
|
17
|
+
|
18
|
+
.ace-tm .ace_fold {
|
19
|
+
background-color: #6B72E6;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ace-tm {
|
23
|
+
background-color: #FFFFFF;
|
24
|
+
color: black;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ace-tm .ace_cursor {
|
28
|
+
color: black;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ace-tm .ace_invisible {
|
32
|
+
color: rgb(191, 191, 191);
|
33
|
+
}
|
34
|
+
|
35
|
+
.ace-tm .ace_storage,
|
36
|
+
.ace-tm .ace_keyword {
|
37
|
+
color: blue;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ace-tm .ace_constant {
|
41
|
+
color: rgb(197, 6, 11);
|
42
|
+
}
|
43
|
+
|
44
|
+
.ace-tm .ace_constant.ace_buildin {
|
45
|
+
color: rgb(88, 72, 246);
|
46
|
+
}
|
47
|
+
|
48
|
+
.ace-tm .ace_constant.ace_language {
|
49
|
+
color: rgb(88, 92, 246);
|
50
|
+
}
|
51
|
+
|
52
|
+
.ace-tm .ace_constant.ace_library {
|
53
|
+
color: rgb(6, 150, 14);
|
54
|
+
}
|
55
|
+
|
56
|
+
.ace-tm .ace_invalid {
|
57
|
+
background-color: rgba(255, 0, 0, 0.1);
|
58
|
+
color: red;
|
59
|
+
}
|
60
|
+
|
61
|
+
.ace-tm .ace_support.ace_function {
|
62
|
+
color: rgb(60, 76, 114);
|
63
|
+
}
|
64
|
+
|
65
|
+
.ace-tm .ace_support.ace_constant {
|
66
|
+
color: rgb(6, 150, 14);
|
67
|
+
}
|
68
|
+
|
69
|
+
.ace-tm .ace_support.ace_type,
|
70
|
+
.ace-tm .ace_support.ace_class {
|
71
|
+
color: rgb(109, 121, 222);
|
72
|
+
}
|
73
|
+
|
74
|
+
.ace-tm .ace_keyword.ace_operator {
|
75
|
+
color: rgb(104, 118, 135);
|
76
|
+
}
|
77
|
+
|
78
|
+
.ace-tm .ace_string {
|
79
|
+
color: rgb(3, 106, 7);
|
80
|
+
}
|
81
|
+
|
82
|
+
.ace-tm .ace_comment {
|
83
|
+
color: rgb(76, 136, 107);
|
84
|
+
}
|
85
|
+
|
86
|
+
.ace-tm .ace_comment.ace_doc {
|
87
|
+
color: rgb(0, 102, 255);
|
88
|
+
}
|
89
|
+
|
90
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
91
|
+
color: rgb(128, 159, 191);
|
92
|
+
}
|
93
|
+
|
94
|
+
.ace-tm .ace_constant.ace_numeric {
|
95
|
+
color: rgb(0, 0, 205);
|
96
|
+
}
|
97
|
+
|
98
|
+
.ace-tm .ace_variable {
|
99
|
+
color: rgb(49, 132, 149);
|
100
|
+
}
|
101
|
+
|
102
|
+
.ace-tm .ace_xml-pe {
|
103
|
+
color: rgb(104, 104, 91);
|
104
|
+
}
|
105
|
+
|
106
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
107
|
+
color: #0000A2;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
.ace-tm .ace_heading {
|
112
|
+
color: rgb(12, 7, 255);
|
113
|
+
}
|
114
|
+
|
115
|
+
.ace-tm .ace_list {
|
116
|
+
color:rgb(185, 6, 144);
|
117
|
+
}
|
118
|
+
|
119
|
+
.ace-tm .ace_meta.ace_tag {
|
120
|
+
color:rgb(0, 22, 142);
|
121
|
+
}
|
122
|
+
|
123
|
+
.ace-tm .ace_string.ace_regex {
|
124
|
+
color: rgb(255, 0, 0)
|
125
|
+
}
|
126
|
+
|
127
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
128
|
+
background: rgb(181, 213, 255);
|
129
|
+
}
|
130
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
131
|
+
box-shadow: 0 0 3px 0px white;
|
132
|
+
}
|
133
|
+
.ace-tm .ace_marker-layer .ace_step {
|
134
|
+
background: rgb(252, 255, 0);
|
135
|
+
}
|
136
|
+
|
137
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
138
|
+
background: rgb(164, 229, 101);
|
139
|
+
}
|
140
|
+
|
141
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
142
|
+
margin: -1px 0 0 -1px;
|
143
|
+
border: 1px solid rgb(192, 192, 192);
|
144
|
+
}
|
145
|
+
|
146
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
147
|
+
background: rgba(0, 0, 0, 0.07);
|
148
|
+
}
|
149
|
+
|
150
|
+
.ace-tm .ace_gutter-active-line {
|
151
|
+
background-color : #dcdcdc;
|
152
|
+
}
|
153
|
+
|
154
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
155
|
+
background: rgb(250, 250, 255);
|
156
|
+
border: 1px solid rgb(200, 200, 250);
|
157
|
+
}
|
158
|
+
|
159
|
+
.ace-tm .ace_indent-guide {
|
160
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
161
|
+
}
|
162
|
+
|
163
|
+
.ace-tm .ace_indent-guide-active {
|
164
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
165
|
+
}
|
166
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,r,d){r.isDark=!1,r.cssClass="ace-tm",r.cssText=t("./textmate-css"),r.$id="ace/theme/textmate";var p=t("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,r,d){"no use strict";var p=t("./lib/lang"),g=t("./lib/net"),b=t("./lib/dom"),h=t("./lib/app_config").AppConfig;d.exports=r=new h;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(l){if(!f.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return f[l]},r.set=function(l,s){if(f.hasOwnProperty(l))f[l]=s;else if(this.setDefaultValue("",l,s)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&b.useStrictCSP(s)},r.all=function(){return p.copyObject(f)},r.$modes={},r.moduleUrl=function(l,s){if(f.$moduleUrls[l])return f.$moduleUrls[l];var u=l.split("/");s=s||u[u.length-2]||"";var m=s=="snippets"?"/":"-",w=u[u.length-1];if(s=="worker"&&m=="-"){var x=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");w=w.replace(x,"")}(!w||w==s)&&u.length>1&&(w=u[u.length-2]);var E=f[s+"Path"];return E==null?E=f.basePath:m=="/"&&(s=m=""),E&&E.slice(-1)!="/"&&(E+="/"),E+s+m+w+this.get("suffix")},r.setModuleUrl=function(l,s){return f.$moduleUrls[l]=s};var o=function(l,s){if(l==="ace/theme/textmate"||l==="./theme/textmate")return s(null,t("./theme/textmate"));if(a)return a(l,s);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,s){var u;if(Array.isArray(l))var m=l[0],w=l[1];else if(typeof l=="string")var w=l;var x=function(E){if(E&&!r.$loading[w])return s&&s(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(s),!(r.$loading[w].length>1)){var $=function(){o(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var L=r.$loading[w];r.$loading[w]=null,L.forEach(function(R){R&&R(C)})})};if(!r.get("packaged"))return $();g.loadScript(r.moduleUrl(w,m),$),c()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?x(E.default):x(E)});else{try{u=this.$require(w)}catch{}x(u||r.$loaded[w])}},r.$require=function(l){if(typeof d.require=="function"){var s="require";return d[s](l)}},r.setModuleLoader=function(l,s){r.dynamicModules[l]=s};var c=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"),c=function(){})};r.version="1.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,r,d){t("./lib/fixoldbrowsers");var p=t("./config");p.setLoader(function(f,o){t([f],function(a){o(null,a)})});var g=function(){return this||typeof window<"u"&&window}();d.exports=function(f){p.init=b,p.$require=t,f.require=t},b(!0);function b(f){if(!(!g||!g.document)){p.set("packaged",f||t.packaged||d.packaged||g.define&&(void 0).packaged);var o={},a="",c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=l.getElementsByTagName("script"),u=0;u<s.length;u++){var m=s[u],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,E=0,$=x.length;E<$;E++){var k=x[E];k.name.indexOf("data-ace-")===0&&(o[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(o.base=o.base||a,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var L in o)typeof o[L]<"u"&&p.set(L,o[L])}}function h(f){return f.replace(/-(.)/g,function(o,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,r,d){var p=function(){function g(b,h,f,o){this.start={row:b,column:h},this.end={row:f,column:o}}return g.prototype.isEqual=function(b){return this.start.row===b.start.row&&this.end.row===b.end.row&&this.start.column===b.start.column&&this.end.column===b.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(b,h){return this.compare(b,h)==0},g.prototype.compareRange=function(b){var h,f=b.end,o=b.start;return h=this.compare(f.row,f.column),h==1?(h=this.compare(o.row,o.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(o.row,o.column),h==-1?-1:h==1?42:0)},g.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},g.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},g.prototype.intersects=function(b){var h=this.compareRange(b);return h==-1||h==0||h==1},g.prototype.isEnd=function(b,h){return this.end.row==b&&this.end.column==h},g.prototype.isStart=function(b,h){return this.start.row==b&&this.start.column==h},g.prototype.setStart=function(b,h){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=h)},g.prototype.setEnd=function(b,h){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=h)},g.prototype.inside=function(b,h){return this.compare(b,h)==0?!(this.isEnd(b,h)||this.isStart(b,h)):!1},g.prototype.insideStart=function(b,h){return this.compare(b,h)==0?!this.isEnd(b,h):!1},g.prototype.insideEnd=function(b,h){return this.compare(b,h)==0?!this.isStart(b,h):!1},g.prototype.compare=function(b,h){return!this.isMultiLine()&&b===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?h>=this.start.column?0:-1:this.end.row===b?h<=this.end.column?0:1:0},g.prototype.compareStart=function(b,h){return this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},g.prototype.compareEnd=function(b,h){return this.end.row==b&&this.end.column==h?1:this.compare(b,h)},g.prototype.compareInside=function(b,h){return this.end.row==b&&this.end.column==h?1:this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},g.prototype.clipRows=function(b,h){if(this.end.row>h)var f={row:h+1,column:0};else if(this.end.row<b)var f={row:b,column:0};if(this.start.row>h)var o={row:h+1,column:0};else if(this.start.row<b)var o={row:b,column:0};return g.fromPoints(o||this.start,f||this.end)},g.prototype.extend=function(b,h){var f=this.compare(b,h);if(f==0)return this;if(f==-1)var o={row:b,column:h};else var a={row:b,column:h};return g.fromPoints(o||this.start,a||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(b){var h=b.documentToScreenPosition(this.start),f=b.documentToScreenPosition(this.end);return new g(h.row,h.column,f.row,f.column)},g.prototype.moveBy=function(b,h){this.start.row+=b,this.start.column+=h,this.end.row+=b,this.end.column+=h},g}();p.fromPoints=function(g,b){return new p(g.row,g.column,b.row,b.column)},p.comparePoints=function(g,b){return g.row-b.row||g.column-b.column},r.Range=p}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,r,d){for(var p=t("./oop"),g={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","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},b={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},h=0;h<10;h++)b["Digit"+h]=48+h,b["Numpad"+h]=96+h,g.PRINTABLE_KEYS[48+h]=""+h,g.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var f=String.fromCharCode(h+32);b["Key"+f.toUpperCase()]=h,g.PRINTABLE_KEYS[h]=f}for(var h=1;h<13;h++)b["F"+h]=111+h,g.FUNCTION_KEYS[111+h]="F"+h;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var a in o)b[a]=b[a+"Left"]=b[a+"Right"]=o[a];r.$codeToKeyCode=b,g.PRINTABLE_KEYS[173]="-";for(var c in g.FUNCTION_KEYS){var l=g.FUNCTION_KEYS[c].toLowerCase();g[l]=parseInt(c,10)}for(var c in g.PRINTABLE_KEYS){var l=g.PRINTABLE_KEYS[c].toLowerCase();g[l]=parseInt(c,10)}p.mixin(g,g.MODIFIER_KEYS),p.mixin(g,g.PRINTABLE_KEYS),p.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,function(){for(var s=["cmd","ctrl","alt","shift"],u=Math.pow(2,s.length);u--;)g.KEY_MODS[u]=s.filter(function(m){return u&g.KEY_MODS[m]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",p.mixin(r,g),r.default=r,r.keyCodeToString=function(s){var u=g[s];return typeof u!="string"&&(u=String.fromCharCode(s)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,d){var p=t("./keys"),g=t("./useragent"),b=null,h=0,f;function o(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function a(){return f==null&&o(),f}function c(E,$,k){this.elem=E,this.type=$,this.callback=k}c.prototype.destroy=function(){s(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(E,$,k,C){E.addEventListener($,k,a()),C&&C.$toDestroy.push(new c(E,$,k))},s=r.removeListener=function(E,$,k){E.removeEventListener($,k,a())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||g.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,$,k){var C=E&&E.ownerDocument||document;function L(R){$&&$(R),k&&k(R),s(C,"mousemove",$),s(C,"mouseup",L),s(C,"dragstart",L)}return l(C,"mousemove",$),l(C,"mouseup",L),l(C,"dragstart",L),L},r.addMouseWheelListener=function(E,$,k){l(E,"wheel",function(C){var L=.15,R=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=R*L,C.wheelY=F*L;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=R*I,C.wheelY=F*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=R*H,C.wheelY=F*H;break}$(C)},k)},r.addMultiMouseDownListener=function(E,$,k,C,L){var R=0,F,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(r.getButton(A)!==0?R=0:A.detail>1?(R++,R>4&&(R=1)):R=1,g.isIE){var _=Math.abs(A.clientX-F)>5||Math.abs(A.clientY-I)>5;(!H||_)&&(R=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},$[R-1]||600),R==1&&(F=A.clientX,I=A.clientY)}if(A._clicks=R,k[C]("mousedown",A),R>4)R=0;else if(R>1)return k[C](P[R],A)}Array.isArray(E)||(E=[E]),E.forEach(function(A){l(A,"mousedown",O,L)})};function u(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return p.KEY_MODS[u(E)]};function m(E,$,k){var C=u($);if(!k&&$.code&&(k=p.$codeToKeyCode[$.code]||k),!g.isMac&&b){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(k===18||k===17){var L=$.location;if(k===17&&L===1)b[k]==1&&(h=$.timeStamp);else if(k===18&&C===3&&L===2){var R=$.timeStamp-h;R<50&&(b.altGr=!0)}}}if(k in p.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&$.location===3&&(E($,C,-k),$.defaultPrevented))){if(g.isChromeOS&&C&8){if(E($,C,k),$.defaultPrevented)return;C&=-9}return!C&&!(k in p.FUNCTION_KEYS)&&!(k in p.PRINTABLE_KEYS)?!1:E($,C,k)}}r.addCommandKeyListener=function(E,$,k){var C=null;l(E,"keydown",function(L){b[L.keyCode]=(b[L.keyCode]||0)+1;var R=m($,L,L.keyCode);return C=L.defaultPrevented,R},k),l(E,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},k),l(E,"keyup",function(L){b[L.keyCode]=null},k),b||(w(),l(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(E,$){$=$||window;var k="zero-timeout-message-"+x++,C=function(L){L.data==k&&(r.stopPropagation(L),s($,"message",C),E())};l($,"message",C),$.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,$){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):E()},$)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,r,d){var p;d.exports={lineMode:!1,pasteCancelled:function(){return p&&p>Date.now()-50?!0:p=!1},cancel:function(){p=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,r,d){var p=t("../lib/event"),g=t("../config").nls,b=t("../lib/useragent"),h=t("../lib/dom"),f=t("../lib/lang"),o=t("../clipboard"),a=b.isChrome<18,c=b.isIE,l=b.isChrome>63,s=400,u=t("../lib/keys"),m=u.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,E=b.isMobile,$;$=function(k,C){var L=h.createElement("textarea");L.className="ace_text-input",L.setAttribute("wrap","off"),L.setAttribute("autocorrect","off"),L.setAttribute("autocapitalize","off"),L.setAttribute("spellcheck","false"),L.style.opacity="0",k.insertBefore(L,k.firstChild);var R=!1,F=!1,I=!1,H=!1,P="";E||(L.style.fontSize="1px");var O=!1,A=!1,_="",N=0,B=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===L}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var Ue=C.session.selection.cursor.row;ke+=g("text-input.aria-label","Cursor at row $0",[Ue+1])}L.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(L.setAttribute("aria-haspopup","true"),L.setAttribute("aria-autocomplete",ke.inline?"both":"list"),L.setAttribute("aria-activedescendant",ke.activeDescendant)):(L.setAttribute("aria-haspopup","false"),L.setAttribute("aria-autocomplete","both"),L.removeAttribute("aria-activedescendant")),ke.role&&L.setAttribute("role",ke.role),ke.setLabel&&(L.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),p.addListener(L,"blur",function(ke){A||(C.onBlur(ke),he=!1)},C),p.addListener(L,"focus",function(ke){if(!A){if(he=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),b.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||l||this.$focusScroll=="browser")return L.focus({preventScroll:!0});var ke=L.style.top;L.style.position="fixed",L.style.top="0px";try{var Ue=L.getBoundingClientRect().top!=0}catch{return}var Ze=[];if(Ue)for(var mt=L.parentElement;mt&&mt.nodeType==1;)Ze.push(mt),mt.setAttribute("ace_nocontext","true"),!mt.parentElement&&mt.getRootNode?mt=mt.getRootNode().host:mt=mt.parentElement;L.focus({preventScroll:!0}),Ue&&Ze.forEach(function(At){At.removeAttribute("ace_nocontext")}),setTimeout(function(){L.style.position="",L.style.top=="0px"&&(L.style.top=ke)},0)},this.blur=function(){L.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,Ue=ke&&ke.command&&ke.command.name;if(Ue!="insertstring"){var Ze=Ue&&(ke.docChanged||ke.selectionChanged);I&&Ze&&(_=L.value="",Zt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,Ue){for(var Ze=Ue,mt=1;mt<=ke-K&&mt<2*te+1;mt++)Ze+=C.session.getLine(ke-mt).length+1;return Ze},ae=w?function(ke){if(!(!he||R&&!ke||H)){ke||(ke="");var Ue=`
|
167
|
+
ab`+ke+`cde fg
|
168
|
+
`;Ue!=L.value&&(L.value=_=Ue);var Ze=4,mt=4+(ke.length||(C.selection.isEmpty()?0:1));(N!=Ze||B!=mt)&&L.setSelectionRange(Ze,mt),N=Ze,B=mt}}:function(){if(!(I||H)&&!(!he&&!$e)){I=!0;var ke=0,Ue=0,Ze="";if(C.session){var mt=C.selection,At=mt.getRange(),_t=mt.cursor.row;_t===Z+1?(K=Z+1,Z=K+2*te):_t===K-1?(Z=K-1,K=Z-2*te):(_t<K-1||_t>Z+1)&&(K=_t>te?_t-te:0,Z=_t>te?_t+te:2*te);for(var Pt=[],Nt=K;Nt<=Z;Nt++)Pt.push(C.session.getLine(Nt));if(Ze=Pt.join(`
|
169
|
+
`),ke=ne(At.start.row,At.start.column),Ue=ne(At.end.row,At.end.column),At.start.row<K){var pt=C.session.getLine(K-1);ke=At.start.row<K-1?0:ke,Ue+=pt.length+1,Ze=pt+`
|
170
|
+
`+Ze}else if(At.end.row>Z){var Ct=C.session.getLine(Z+1);Ue=At.end.row>Z+1?Ct.length:At.end.column,Ue+=Ze.length+1,Ze=Ze+`
|
171
|
+
`+Ct}else E&&_t>0&&(Ze=`
|
172
|
+
`+Ze,Ue+=1,ke+=1);Ze.length>s&&(ke<s&&Ue<s?Ze=Ze.slice(0,s):(Ze=`
|
173
|
+
`,ke==Ue?ke=Ue=0:(ke=0,Ue=1)));var Tn=Ze+`
|
174
|
+
|
175
|
+
`;Tn!=_&&(L.value=_=Tn,N=B=Tn.length)}if($e&&(N=L.selectionStart,B=L.selectionEnd),B!=Ue||N!=ke||L.selectionEnd!=B)try{L.setSelectionRange(ke,Ue),N=ke,B=Ue}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=_.length&&ke.value===_&&_&&ke.selectionEnd!==B},ce=function(ke){I||(R?R=!1:ue(L)?(C.selectAll(),ae()):E&&L.selectionStart!=N&&ae())},fe=null;this.setInputHandler=function(ke){fe=ke},this.getInputHandler=function(){return fe};var $e=!1,Te=function(ke,Ue){if($e&&($e=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ze=L.selectionStart,mt=L.selectionEnd,At=N,_t=_.length-B,Pt=ke,Nt=ke.length-Ze,pt=ke.length-mt,Ct=0;At>0&&_[Ct]==ke[Ct];)Ct++,At--;for(Pt=Pt.slice(Ct),Ct=1;_t>0&&_.length-Ct>N-1&&_[_.length-Ct]==ke[ke.length-Ct];)Ct++,_t--;Nt-=Ct-1,pt-=Ct-1;var Tn=Pt.length-Ct+1;if(Tn<0&&(At=-Tn,Tn=0),Pt=Pt.slice(0,Tn),!Ue&&!Pt&&!Nt&&!At&&!_t&&!pt)return"";H=!0;var Tr=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",Tr=!0),Pt&&!At&&!_t&&!Nt&&!pt||O?C.onTextInput(Pt):C.onTextInput(Pt,{extendLeft:At,extendRight:_t,restoreStart:Nt,restoreEnd:pt}),H=!1,_=ke,N=Ze,B=mt,U=pt,Tr?`
|
176
|
+
`:Pt},Ee=function(ke){if(I)return wn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var Ue=L.value,Ze=Te(Ue,!0);(Ue.length>s+100||x.test(Ze)||E&&N<1&&N==B)&&ae()},Qe=function(ke,Ue,Ze){var mt=ke.clipboardData||window.clipboardData;if(!(!mt||a)){var At=c||Ze?"Text":"text/plain";try{return Ue?mt.setData(At,Ue)!==!1:mt.getData(At)}catch(_t){if(!Ze)return Qe(_t,Ue,!0)}}},Ye=function(ke,Ue){var Ze=C.getCopyText();if(!Ze)return p.preventDefault(ke);Qe(ke,Ze)?(w&&(ae(Ze),R=Ze,setTimeout(function(){R=!1},10)),Ue?C.onCut():C.onCopy(),p.preventDefault(ke)):(R=!0,L.value=Ze,L.select(),setTimeout(function(){R=!1,ae(),Ue?C.onCut():C.onCopy()}))},gt=function(ke){Ye(ke,!0)},at=function(ke){Ye(ke,!1)},ft=function(ke){var Ue=Qe(ke);o.pasteCancelled()||(typeof Ue=="string"?(Ue&&C.onPaste(Ue,ke),b.isIE&&setTimeout(ae),p.preventDefault(ke)):(L.value="",F=!0))};p.addCommandKeyListener(L,function(ke,Ue,Ze){if(!I)return C.onCommandKey(ke,Ue,Ze)},C),p.addListener(L,"select",ce,C),p.addListener(L,"input",Ee,C),p.addListener(L,"cut",gt,C),p.addListener(L,"copy",at,C),p.addListener(L,"paste",ft,C),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&p.addListener(k,"keydown",function(ke){if(!(b.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:at(ke);break;case 86:ft(ke);break;case 88:gt(ke);break}},C);var on=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(wn,0),C._signal("compositionStart"),C.on("mousedown",wr);var Ue=C.getSelectionRange();Ue.end.row=Ue.start.row,Ue.end.column=Ue.start.column,I.markerRange=Ue,I.selectionStart=N,C.onCompositionStart(I),I.useTextareaForIME?(_=L.value="",N=0,B=0):(L.msGetInputContext&&(I.context=L.msGetInputContext()),L.getInputContext&&(I.context=L.getInputContext()))}},wn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return wr();if(I.useTextareaForIME)C.onCompositionUpdate(L.value);else{var ke=L.value;Te(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+B-I.selectionStart+U)}}},Zt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",wr),ke&&Ee())};function wr(){A=!0,L.blur(),L.focus(),A=!1}var xn=f.delayedCall(wn,50).schedule.bind(null,null);function Pn(ke){ke.keyCode==27&&L.value.length<L.selectionStart&&(I||(_=L.value),N=B=-1,ae()),xn()}p.addListener(L,"compositionstart",on,C),p.addListener(L,"compositionupdate",wn,C),p.addListener(L,"keyup",Pn,C),p.addListener(L,"keydown",xn,C),p.addListener(L,"compositionend",Zt,C),this.getElement=function(){return L},this.setCommandMode=function(ke){O=ke,L.readOnly=!1},this.setReadOnly=function(ke){O||(L.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){$e=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,Ue){P||(P=L.style.cssText),L.style.cssText=(Ue?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ze=C.container.getBoundingClientRect(),mt=h.computedStyle(C.container),At=Ze.top+(parseInt(mt.borderTopWidth)||0),_t=Ze.left+(parseInt(mt.borderLeftWidth)||0),Pt=Ze.bottom-At-L.clientHeight-2,Nt=function(pt){h.translate(L,pt.clientX-_t-2,Math.min(pt.clientY-At-2,Pt))};Nt(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Wn),b.isWin&&p.capture(C.container,Nt,rr))},this.onContextMenuClose=rr;var Wn;function rr(){clearTimeout(Wn),Wn=setTimeout(function(){P&&(L.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var xt=function(ke){C.textInput.onContextMenu(ke),rr()};p.addListener(L,"mouseup",xt,C),p.addListener(L,"mousedown",function(ke){ke.preventDefault(),rr()},C),p.addListener(C.renderer.scroller,"contextmenu",xt,C),p.addListener(L,"contextmenu",xt,C),w&&qe(k,C,L);function qe(ke,Ue,Ze){var mt=null,At=!1;Ze.addEventListener("keydown",function(Pt){mt&&clearTimeout(mt),At=!0},!0),Ze.addEventListener("keyup",function(Pt){mt=setTimeout(function(){At=!1},100)},!0);var _t=function(Pt){if(document.activeElement===Ze&&!(At||I||Ue.$mouseHandler.isMousePressed)&&!R){var Nt=Ze.selectionStart,pt=Ze.selectionEnd,Ct=null,Tn=0;if(Nt==0?Ct=u.up:Nt==1?Ct=u.home:pt>B&&_[pt]==`
|
177
|
+
`?Ct=u.end:Nt<N&&_[Nt-1]==" "?(Ct=u.left,Tn=m.option):Nt<N||Nt==N&&B!=N&&Nt==pt?Ct=u.left:pt>B&&_.slice(0,pt).split(`
|
178
|
+
`).length>2?Ct=u.down:pt>B&&_[pt-1]==" "?(Ct=u.right,Tn=m.option):(pt>B||pt==B&&B!=N&&Nt==pt)&&(Ct=u.right),Nt!==pt&&(Tn|=m.shift),Ct){var Tr=Ue.onCommandKey({},Tn,Ct);if(!Tr&&Ue.commands){Ct=u.keyCodeToString(Ct);var Xr=Ue.commands.findKeyCommand(Tn,Ct);Xr&&Ue.execCommand(Xr)}N=Nt,B=pt,ae("")}}};document.addEventListener("selectionchange",_t),Ue.on("destroy",function(){document.removeEventListener("selectionchange",_t)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},r.TextInput=$,r.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,d){var p=t("../lib/useragent"),g=0,b=550,h=function(){function a(c){c.$clickSelection=null;var l=c.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(u){c[u]=this[u]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return a.prototype.onMouseDown=function(c){var l=c.inSelection(),s=c.getDocumentPosition();this.mousedownEvent=c;var u=this.editor,m=c.getButton();if(m!==0){var w=u.getSelectionRange(),x=w.isEmpty();(x||m==1)&&u.selection.moveToPosition(s),m==2&&(u.textInput.onContextMenu(c.domEvent),p.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(s,c.domEvent._clicks>1),c.preventDefault()},a.prototype.startSelect=function(c,l){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(c):l||s.selection.moveToPosition(c),l||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,l=this.editor,s=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(s);if(u==-1)c=this.$clickSelection.end;else if(u==1)c=this.$clickSelection.start;else{var m=o(this.$clickSelection,s);s=m.cursor,c=m.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(s),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var l,s=this.editor,u=s.renderer.screenToTextCoordinates(this.x,this.y),m=s.selection[c](u.row,u.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(m.end.row!=u.row||m.end.column!=u.column)&&(u=m.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(m.start.row!=u.row||m.start.column!=u.column)&&(u=m.end);else if(w==-1&&x==1)u=m.end,l=m.start;else{var E=o(this.$clickSelection,u);u=E.cursor,l=E.anchor}s.selection.setSelectionAnchor(l.row,l.column)}s.selection.selectToPosition(u),s.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(c>g||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var l=c.getDocumentPosition(),s=this.editor,u=s.session,m=u.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=s.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(c){var l=c.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var u=s.getSelectionRange();u.isMultiLine()&&u.contains(l.row,l.column)?(this.$clickSelection=s.selection.getLineRange(u.start.row),this.$clickSelection.end=s.selection.getLineRange(u.end.row).end):this.$clickSelection=s.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(c){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,u=c.domEvent.timeStamp,m=u-s.t,w=m?c.wheelX/m:s.vx,x=m?c.wheelY/m:s.vy;m<b&&(w=(w+s.vx)/2,x=(x+s.vy)/2);var E=Math.abs(w/x),$=!1;if(E>=1&&l.renderer.isScrollableBy(c.wheelX*c.speed,0)&&($=!0),E<=1&&l.renderer.isScrollableBy(0,c.wheelY*c.speed)&&($=!0),$)s.allowed=u;else if(u-s.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(s.vx)&&Math.abs(x)<=1.5*Math.abs(s.vy);k?($=!0,s.allowed=u):s.allowed=0}if(s.t=u,s.vx=w,s.vy=x,$)return l.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function f(a,c,l,s){return Math.sqrt(Math.pow(l-a,2)+Math.pow(s-c,2))}function o(a,c){if(a.start.row==a.end.row)var l=2*c.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=c.column-4;else var l=2*c.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,d){r.preventParentScroll=function(p){p.stopPropagation();var g=p.currentTarget,b=g.scrollHeight>g.clientHeight;b||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,d){var p=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(x[$]=E[$])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),g=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("./lib/dom");t("./lib/event");var h=t("./range").Range,f=t("./lib/scroll").preventParentScroll,o="ace_tooltip",a=function(){function u(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return u.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(m){this.getElement().textContent=m},u.prototype.setHtml=function(m){this.getElement().innerHTML=m},u.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},u.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},u.prototype.setTheme=function(m){this.$element.className=o+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},u.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),c=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},u.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},u.prototype.updatePopups=function(){var m,w,x,E;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var k=g(this.popups),C=k.next();!C.done;C=k.next()){var L=C.value,R=!0;try{for(var F=(x=void 0,g($)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,L)){R=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(x)throw x.error}}R?$.push(L):L.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},u.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},u}(),l=new c;r.popupManager=l,r.Tooltip=a;var s=function(u){p(m,u);function m(w){w===void 0&&(w=document.body);var x=u.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",f),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,E=w.getDocumentPosition(),$=x.session.getLine(E.row);if(E.column==$.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,E,$){var k=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=h.fromPoints(x.start,x.end);var L=C.textToScreenCoordinates(x.start.row,x.start.column),R=C.scroller.getBoundingClientRect();L.pageX<R.left&&(L.pageX=R.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-L.pageY-C.lineHeight,O=!0;L.pageY-I<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-k+"px",F.style.top=O?"":L.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-H-k)+"px"}},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(a);r.HoverTooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(t,r,d){var p=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(x[$]=E[$])},u(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),g=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("../lib/dom"),h=t("../lib/event"),f=t("../tooltip").Tooltip,o=t("../config").nls,a=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function l(u){var m=u.editor,w=m.renderer.$gutterLayer,x=new s(m,!0);u.editor.setDefaultHandler("guttermousedown",function(R){if(!(!m.isFocused()||R.getButton()!=0)){var F=w.getRegion(R);if(F!="foldWidgets"){var I=R.getDocumentPosition().row,H=m.session.selection;if(R.getShiftKey())H.selectTo(I,0);else{if(R.domEvent.detail==2)return m.selectAll(),R.preventDefault();u.$clickSelection=m.selection.getLineRange(I)}return u.setState("selectByLines"),u.captureMouse(R),R.preventDefault()}}});var E,$;function k(){var R=$.getDocumentPosition().row,F=m.session.getLength();if(R==F){var I=m.renderer.pixelToScreenCoordinates(0,$.y).row,H=$.$pos;if(I>m.session.documentToScreenRow(H.row,H.column))return C()}if(x.showTooltip(R),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),u.$tooltipFollowsMouse)L($);else{var P=$.getGutterRow(),O=w.$lines.get(P);if(O){var A=O.element.querySelector(".ace_gutter_annotation"),_=A.getBoundingClientRect(),N=x.getElement().style;N.left=_.right-a+"px",N.top=_.bottom-c+"px"}else L($)}}function C(R){R&&R.type==="keydown"&&(R.ctrlKey||R.metaKey)||R&&R.type==="mouseout"&&(!R.relatedTarget||x.getElement().contains(R.relatedTarget))||(E&&(E=clearTimeout(E)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function L(R){x.setPosition(R.x,R.y)}u.editor.setDefaultHandler("guttermousemove",function(R){var F=R.domEvent.target||R.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget")||b.hasCssClass(F,"ace_custom-widget"))return C();x.isOpen&&u.$tooltipFollowsMouse&&L(R),$=R,!E&&(E=setTimeout(function(){E=null,$&&!u.isMousePressed&&k()},50))}),h.addListener(m.renderer.$gutter,"mouseout",function(R){$=null,x.isOpen&&(E=setTimeout(function(){E=null,C(R)},50))},m)}r.GutterHandler=l;var s=function(u){p(m,u);function m(w,x){x===void 0&&(x=!1);var E=u.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var $=E.getElement();return $.setAttribute("role","tooltip"),$.style.pointerEvents="auto",x&&(E.onMouseOut=E.onMouseOut.bind(E),$.addEventListener("mouseout",E.onMouseOut)),E}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,x){var E=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>E&&(w-=w+k-E),x+C>$&&(x-=20+C),f.prototype.setPosition.call(this,w,x)},Object.defineProperty(m,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),m.prototype.showTooltip=function(w){var x,E=this.editor.renderer.$gutterLayer,$=E.$annotations[w],k;$?k={displayText:Array.from($.displayText),type:Array.from($.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];L[P].push(E.$annotations[I].text[H]),(!F||R[P]<R[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(m.annotationsToSummaryString(L)," in folded code.");k.displayText.push(O),k.type.push(F+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},_=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var N=b.createElement("span"),B=b.createElement("span");(x=B.classList).add.apply(x,["ace_".concat(k.type[I]),_]),B.setAttribute("aria-label","".concat(m.annotationLabels[k.type[I].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(b.createTextNode(" ")),N.appendChild(B),N.appendChild(b.createTextNode(k.displayText[I])),N.appendChild(b.createElement("br")),A[k.type[I].replace("_fold","")].push(N)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(K){return U.appendChild(K)}),A.security.forEach(function(K){return U.appendChild(K)}),A.warning.forEach(function(K){return U.appendChild(K)}),A.info.forEach(function(K){return U.appendChild(K)}),A.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var x,E,$=[],k=["error","security","warning","info","hint"];try{for(var C=g(k),L=C.next();!L.done;L=C.next()){var R=L.value;if(w[R].length){var F=w[R].length===1?m.annotationLabels[R].singular:m.annotationLabels[R].plural;$.push("".concat(w[R].length," ").concat(F))}}}catch(I){x={error:I}}finally{try{L&&!L.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return $.join(", ")},m}(f);r.GutterTooltip=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,d){var p=t("../lib/event"),g=t("../lib/useragent"),b=function(){function h(f,o){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=o,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){p.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){p.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(f,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,o=f.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=o.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return p.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,d){var p=t("../lib/dom"),g=t("../lib/event"),b=t("../lib/useragent"),h=200,f=200,o=5;function a(l){var s=l.editor,u=p.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){l[ne]=this[ne]},this),s.on("mousedown",this.onMouseDown.bind(l));var w=s.container,x,E,$,k,C,L,R=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=s.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(u),ue.setDragImage&&ue.setDragImage(u,0,0),setTimeout(function(){s.container.removeChild(u)}),ue.clearData(),ue.setData("Text",s.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!s.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(s.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,x||B(),R++,ne.dataTransfer.dropEffect=F=he(ne),g.preventDefault(ne)},this.onDragOver=function(ne){if(!(s.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,x||(B(),R++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),g.preventDefault(ne)},this.onDragLeave=function(ne){if(R--,R<=0&&x)return U(),F=null,g.preventDefault(ne)},this.onDrop=function(ne){if(L){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=s.moveText(C,L);break;case"copy":C=s.moveText(C,L,!0);break}else{var ue=ae.getData("Text");C={start:L,end:s.session.insert(L,ue)},s.focus(),F=null}return U(),g.preventDefault(ne)}},g.addListener(w,"dragstart",this.onDragStart.bind(l),s),g.addListener(w,"dragend",this.onDragEnd.bind(l),s),g.addListener(w,"dragenter",this.onDragEnter.bind(l),s),g.addListener(w,"dragover",this.onDragOver.bind(l),s),g.addListener(w,"dragleave",this.onDragLeave.bind(l),s),g.addListener(w,"drop",this.onDrop.bind(l),s);function A(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,fe=!ae||ne.column!=ae.column;if(!P||ce||fe)s.moveCursorToPosition(ne),P=ue,O={x:E,y:$};else{var $e=c(O.x,O.y,E,$);$e>o?P=null:ue-P>=f&&(s.renderer.scrollCursorIntoView(),P=null)}}function _(ne,ae){var ue=Date.now(),ce=s.renderer.layerConfig.lineHeight,fe=s.renderer.layerConfig.characterWidth,$e=s.renderer.scroller.getBoundingClientRect(),Te={x:{left:E-$e.left,right:$e.right-E},y:{top:$-$e.top,bottom:$e.bottom-$}},Ee=Math.min(Te.x.left,Te.x.right),Qe=Math.min(Te.y.top,Te.y.bottom),Ye={row:ne.row,column:ne.column};Ee/fe<=2&&(Ye.column+=Te.x.left<Te.x.right?-3:2),Qe/ce<=1&&(Ye.row+=Te.y.top<Te.y.bottom?-1:1);var gt=ne.row!=Ye.row,at=ne.column!=Ye.column,ft=!ae||ne.row!=ae.row;gt||at&&!ft?H?ue-H>=h&&s.renderer.scrollCursorIntoView(Ye):H=ue:H=null}function N(){var ne=L;L=s.renderer.screenToTextCoordinates(E,$),A(L,ne),_(L,ne)}function B(){C=s.selection.toOrientedRange(),x=s.session.addMarker(C,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),N(),k=setInterval(N,20),R=0,g.addListener(document,"mousemove",Z)}function U(){clearInterval(k),s.session.removeMarker(x),x=null,s.selection.fromOrientedRange(C),s.isFocused()&&!I&&s.$resetCursorStyle(),C=null,L=null,R=0,H=null,P=null,g.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=b.isMac?ne.altKey:ne.ctrlKey,fe="uninitialized";try{fe=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return ce&&ae.indexOf(fe)>=0?$e="copy":ue.indexOf(fe)>=0?$e="move":ae.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,s=l.container;s.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var u=b.isWin?"default":"move";l.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(l){var s=this.editor.container;if(b.isIE&&this.state=="dragReady"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&s.dragDrop()}if(this.state==="dragWait"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var s=this.editor,u=l.inSelection(),m=l.getButton(),w=l.domEvent.detail||1;if(w===1&&m===0&&u){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),s.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=s.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function c(l,s,u,m){return Math.sqrt(Math.pow(u-l,2)+Math.pow(m-s,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,d){var p=t("./mouse_event").MouseEvent,g=t("../lib/event"),b=t("../lib/dom");r.addTouchListeners=function(h,f){var o="scroll",a,c,l,s,u,m,w=0,x,E=0,$=0,k=0,C,L;function R(){var A=window.navigator&&window.navigator.clipboard,_=!1,N=function(){var K=f.getCopyText(),Z=f.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(_?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},B=function(K){return f.commands.canExecute(K,f)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!_)return _=!_,N();Z=="paste"?A.readText().then(function(te){f.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(Z)),L.firstChild.style.display="none",_=!1,Z!="openCommandPalette"&&f.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){o="menu",K.stopPropagation(),K.preventDefault(),f.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container)}function F(){if(!f.getOption("enableMobileMenu")){L&&I();return}L||R();var A=f.selection.cursor,_=f.renderer.textToScreenCoordinates(A.row,A.column),N=f.renderer.textToScreenCoordinates(0,0).pageX,B=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();L.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=N+B-U.left+"px"),L.style.display="",L.firstChild.style.display="none",f.on("input",I)}function I(A){L&&(L.style.display="none"),f.off("input",I)}function H(){u=null,clearTimeout(u);var A=f.selection.getRange(),_=A.contains(x.row,x.column);(A.isEmpty()||!_)&&(f.selection.moveToPosition(x),f.selection.selectWord()),o="wait",F()}function P(){u=null,clearTimeout(u),f.selection.moveToPosition(x);var A=E>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);A&&!A.isEmpty()?f.selection.setRange(A):f.selection.selectWord(),o="wait"}g.addListener(h,"contextmenu",function(A){if(C){var _=f.textInput.getElement();_.focus()}},f),g.addListener(h,"touchstart",function(A){var _=A.touches;if(u||_.length>1){clearTimeout(u),u=null,l=-1,o="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var N=f.renderer.layerConfig.lineHeight,B=f.renderer.layerConfig.lineHeight,U=A.timeStamp;s=U;var K=_[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(c-te)>N&&(l=-1),a=A.clientX=Z,c=A.clientY=te,$=k=0;var he=new p(A,f);if(x=he.getDocumentPosition(),U-l<500&&_.length==1&&!w)E++,A.preventDefault(),A.button=0,P();else{E=0;var ne=f.selection.cursor,ae=f.selection.isEmpty()?ne:f.selection.anchor,ue=f.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=f.renderer.$cursorLayer.getPixelPosition(ae,!0),fe=f.renderer.scroller.getBoundingClientRect(),$e=f.renderer.layerConfig.offset,Te=f.renderer.scrollLeft,Ee=function(gt,at){return gt=gt/B,at=at/N-.75,gt*gt+at*at};if(A.clientX<fe.left){o="zoom";return}var Qe=Ee(A.clientX-fe.left-ue.left+Te,A.clientY-fe.top-ue.top+$e),Ye=Ee(A.clientX-fe.left-ce.left+Te,A.clientY-fe.top-ce.top+$e);Qe<3.5&&Ye<3.5&&(o=Qe>Ye?"cursor":"anchor"),Ye<3.5?o="anchor":Qe<3.5?o="cursor":o="scroll",u=setTimeout(H,450)}l=U},f),g.addListener(h,"touchend",function(A){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),o=="zoom"?(o="",w=0):u?(f.selection.moveToPosition(x),w=0,F()):o=="scroll"?(O(),I()):F(),clearTimeout(u),u=null},f),g.addListener(h,"touchmove",function(A){u&&(clearTimeout(u),u=null);var _=A.touches;if(!(_.length>1||o=="zoom")){var N=_[0],B=a-N.clientX,U=c-N.clientY;if(o=="wait")if(B*B+U*U>4)o="cursor";else return A.preventDefault();a=N.clientX,c=N.clientY,A.clientX=N.clientX,A.clientY=N.clientY;var K=A.timeStamp,Z=K-s;if(s=K,o=="scroll"){var te=new p(A,f);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&($=B/Z,k=U/Z),f._emit("mousewheel",te),te.propagationStopped||($=k=0)}else{var he=new p(A,f),ne=he.getDocumentPosition();o=="cursor"?f.selection.moveCursorToPosition(ne):o=="anchor"&&f.selection.setSelectionAnchor(ne.row,ne.column),f.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},f);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(k)<.01&&(k=0),w<20&&($=.9*$),w<20&&(k=.9*k);var A=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*k),A==f.session.getScrollTop()&&(w=0)},10)}}}),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(t,r,d){var p=t("../lib/event"),g=t("../lib/useragent"),b=t("./default_handlers").DefaultHandlers,h=t("./default_gutter_handler").GutterHandler,f=t("./mouse_event").MouseEvent,o=t("./dragdrop_handler").DragdropHandler,a=t("./touch_handler").addTouchListeners,c=t("../config"),l=function(){function s(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=u,new b(this),new h(this),new o(this);var w=function($){var k=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());k&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},x=u.renderer.getMouseEventTarget();p.addListener(x,"click",this.onMouseEvent.bind(this,"click"),u),p.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),p.addMultiMouseDownListener([x,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),p.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),a(u.container,u);var E=u.renderer.$gutter;p.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),p.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),p.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),p.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),p.addListener(x,"mousedown",w,u),p.addListener(E,"mousedown",w,u),g.isIE&&u.renderer.scrollBarV&&(p.addListener(u.renderer.scrollBarV.element,"mousedown",w,u),p.addListener(u.renderer.scrollBarH.element,"mousedown",w,u)),u.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=u.renderer.screenToTextCoordinates($.x,$.y),C=u.session.selection.getRange(),L=u.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},u)}return s.prototype.onMouseEvent=function(u,m){this.editor.session&&this.editor._emit(u,new f(m,this.editor))},s.prototype.onMouseMove=function(u,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(u,new f(m,this.editor))},s.prototype.onMouseWheel=function(u,m){var w=new f(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(u,w)},s.prototype.setState=function(u){this.state=u},s.prototype.captureMouse=function(u,m){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,$=function(F){if(F){if(g.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,m&&m(F),E.mouseEvent=new f(F,E.editor),E.$mouseMoved=!0}},k=function(F){w.off("beforeEndOperation",L),clearInterval(R),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(g.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){k(u)});var L=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=$,E.releaseMouse=p.capture(this.editor.container,$,k);var R=setInterval(C,20)},s.prototype.cancelContextMenu=function(){var u=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),m&&m.domEvent&&p.stopEvent(m.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},s}();l.prototype.releaseMouse=null,c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=function(){function b(h){h.on("click",function(f){var o=f.getDocumentPosition(),a=h.session,c=a.getFoldAt(o.row,o.column,1);c&&(f.getAccelKey()?a.removeFold(c):a.expandFold(c),f.stop());var l=f.domEvent&&f.domEvent.target;l&&p.hasCssClass(l,"ace_inline_button")&&p.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(f){var o=h.renderer.$gutterLayer.getRegion(f);if(o=="foldWidgets"){var a=f.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[a]&&h.session.onFoldWidgetClick(a,f),h.isFocused()||h.focus(),f.stop()}}),h.on("gutterdblclick",function(f){var o=h.renderer.$gutterLayer.getRegion(f);if(o=="foldWidgets"){var a=f.getDocumentPosition().row,c=h.session,l=c.getParentFoldRangeData(a,!0),s=l.range||l.firstRange;if(s){a=s.start.row;var u=c.getFoldAt(a,c.getLine(a).length,1);u?c.removeFold(u):(c.addFold("...",s),h.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}f.stop()}})}return b}();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,d){var p=t("../lib/keys"),g=t("../lib/event"),b=function(){function h(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return h.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},h.prototype.setKeyboardHandler=function(f){var o=this.$handlers;if(o[o.length-1]!=f){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(f,1)}},h.prototype.addKeyboardHandler=function(f,o){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var a=this.$handlers.indexOf(f);a!=-1&&this.$handlers.splice(a,1),o==null?this.$handlers.push(f):this.$handlers.splice(o,0,f),a==-1&&f.attach&&f.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(f){var o=this.$handlers.indexOf(f);return o==-1?!1:(this.$handlers.splice(o,1),f.detach&&f.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var f=this.$data,o=f.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(o,f)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(f,o,a,c){for(var l,s=!1,u=this.$editor.commands,m=this.$handlers.length;m--&&(l=this.$handlers[m].handleKeyboard(this.$data,f,o,a,c),!(!(!l||!l.command)&&(l.command=="null"?s=!0:s=u.exec(l.command,this.$editor,l.args,c),s&&c&&f!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&g.stopEvent(c),s))););return!s&&f==-1&&(l={command:"insertstring"},s=u.exec("insertstring",this.$editor,o)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),s},h.prototype.onCommandKey=function(f,o,a){var c=p.keyCodeToString(a);return this.$callKeyboardHandlers(o,c,a,f)},h.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},h}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,d){var p=0,g=0,b=!1,h=!1,f=!1,o=[[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]],a=[[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]],c=0,l=1,s=0,u=1,m=2,w=3,x=4,E=5,$=6,k=7,C=8,L=9,R=10,F=11,I=12,H=13,P=14,O=15,A=16,_=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,E,$,C,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,E,E,$,C,x,x,F,F,F,x,x,x,x,x,R,L,R,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,N,N,N,N,N,N,E,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,L,x,F,F,F,F,x,x,x,x,s,x,x,N,x,x,F,F,m,m,x,s,x,x,x,m,s,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,s,u,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,H,P,O,A,_,L,F,F,F,F,F,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function K(ne,ae,ue,ce){var fe=p?a:o,$e=null,Te=null,Ee=null,Qe=0,Ye=null,gt=null,at=-1,ft=null,on=null,wn=[];if(!ce)for(ft=0,ce=[];ft<ue;ft++)ce[ft]=he(ne[ft]);for(g=p,b=!1,h=!1,f=!1,on=0;on<ue;on++){if($e=Qe,wn[on]=Te=te(ne,ce,wn,on),Qe=fe[$e][Te],Ye=Qe&240,Qe&=15,ae[on]=Ee=fe[Qe][5],Ye>0)if(Ye==16){for(ft=at;ft<on;ft++)ae[ft]=1;at=-1}else at=-1;if(gt=fe[Qe][6],gt)at==-1&&(at=on);else if(at>-1){for(ft=at;ft<on;ft++)ae[ft]=Ee;at=-1}ce[on]==E&&(ae[on]=0),g|=Ee}if(f){for(ft=0;ft<ue;ft++)if(ce[ft]==$){ae[ft]=p;for(var Zt=ft-1;Zt>=0&&ce[Zt]==C;Zt--)ae[Zt]=p}}}function Z(ne,ae,ue){if(!(g<ne)){if(ne==1&&p==l&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,$e,Te,Ee,Qe;fe<ce;){if(ae[fe]>=ne){for($e=fe+1;$e<ce&&ae[$e]>=ne;)$e++;for(Te=fe,Ee=$e-1;Te<Ee;Te++,Ee--)Qe=ue[Te],ue[Te]=ue[Ee],ue[Ee]=Qe;fe=$e}fe++}}}function te(ne,ae,ue,ce){var fe=ae[ce],$e,Te,Ee,Qe;switch(fe){case s:case u:b=!1;case x:case w:return fe;case m:return b?w:m;case k:return b=!0,u;case C:return x;case L:return ce<1||ce+1>=ae.length||($e=ue[ce-1])!=m&&$e!=w||(Te=ae[ce+1])!=m&&Te!=w?x:(b&&(Te=w),Te==$e?Te:x);case R:return $e=ce>0?ue[ce-1]:E,$e==m&&ce+1<ae.length&&ae[ce+1]==m?m:x;case F:if(ce>0&&ue[ce-1]==m)return m;if(b)return x;for(Qe=ce+1,Ee=ae.length;Qe<Ee&&ae[Qe]==F;)Qe++;return Qe<Ee&&ae[Qe]==m?m:x;case I:for(Ee=ae.length,Qe=ce+1;Qe<Ee&&ae[Qe]==I;)Qe++;if(Qe<Ee){var Ye=ne[ce],gt=Ye>=1425&&Ye<=2303||Ye==64286;if($e=ae[Qe],gt&&($e==u||$e==k))return u}return ce<1||($e=ae[ce-1])==E?x:ue[ce-1];case E:return b=!1,h=!0,p;case $:return f=!0,x;case H:case P:case A:case _:case O:b=!1;case N:return x}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?s:B[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?u:s:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:k:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?k:x}r.L=s,r.R=u,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),$e=new Array(ce.length),Te=[];p=ue?l:c,K(ce,Te,ce.length,ae);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);Z(2,Te,fe),Z(1,Te,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ae[Ee]===w?Te[Ee]=r.AN:Te[Ee]===u&&(ae[Ee]>k&&ae[Ee]<H||ae[Ee]===x||ae[Ee]===N)?Te[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&(Te[Ee-1]=Te[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&(Te[ce.length-1]=r.B),ce[0]===""&&(Te[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Te[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==u||ae[ce]==k||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,d){var p=t("./lib/bidiutil"),g=t("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function f(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=p,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=b.test(o.getValue())}return f.prototype.isBidiRow=function(o,a,c){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(a,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&b.test(o.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var o=0,a=this.session.$screenRowCache;if(a.length){var c=this.session.$getRowCacheIndex(a,this.currentRow);c>=0&&(o=this.session.$docRowCache[c])}return o},f.prototype.getSplitIndex=function(){var o=0,a=this.session.$screenRowCache;if(a.length)for(var c,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-o>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-o-1),c===l);)l=c,o++;else o=this.currentRow;return o},f.prototype.updateRowLine=function(o,a){o===void 0&&(o=this.getDocumentRow());var c=o===this.session.getLength()-1,l=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[o];s&&(a===void 0&&(a=this.getSplitIndex()),a>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=a<s.length?this.line.substring(s[a-1],s[a]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[a]),a==s.length&&(this.line+=this.showInvisibles?l:p.DOT))}else this.line+=this.showInvisibles?l:p.DOT;var u=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||u.isFullWidth(x.charCodeAt(0))?(w=x===" "?u.getScreenTabSize(E+m):2,m+=w-1,g.stringRepeat(p.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==p.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var o=[];p.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var a=this.characterWidth=o.$characterSize.width,c=o.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=a,this.charWidths[p.R]=this.charWidths[p.AN]=c,this.charWidths[p.R_H]=c*.45,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},f.prototype.setEolChar=function(o){this.EOL=o},f.prototype.setContentWidth=function(o){this.contentWidth=o},f.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(o,a){for(var c=o.getCursorPosition(),l=o.selection.getSelectionAnchor().row;l<=c.row;l++)!a&&o.session.getLine(l).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(l,0,1):a&&o.session.getLine(l).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:l},o.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(o){o-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,c=o>a?this.session.getOverwrite()?o:o-1:a,l=p.getVisualFromLogicalIdx(c,this.bidiMap),s=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&o<=a&&s[l]%2!==0&&l++;for(var m=0;m<l;m++)u+=this.charWidths[s[m]];return!this.session.getOverwrite()&&o>a&&s[l]%2===0&&(u+=this.charWidths[s[l]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},f.prototype.getSelections=function(o,a){var c=this.bidiMap,l=c.bidiLevels,s,u=[],m=0,w=Math.min(o,a)-this.wrapIndent,x=Math.max(o,a)-this.wrapIndent,E=!1,$=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<l.length;L++)C=c.logicalFromVisual[L],s=l[L],E=C>=w&&C<x,E&&!$?k=m:!E&&$&&u.push({left:k,width:m-k}),m+=this.charWidths[s],$=E;if(E&&L===l.length&&u.push({left:k,width:m-k}),this.isRtlDir)for(var R=0;R<u.length;R++)u[R].left+=this.rtlLineOffset;return u},f.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var a=0,c=Math.max(c,0),l=0,s=0,u=this.bidiMap.bidiLevels,m=this.charWidths[u[s]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>l+m/2;){if(l+=m,s===u.length-1){m=0;break}m=this.charWidths[u[++s]]}return s>0&&u[s-1]%2!==0&&u[s]%2===0?(c<l&&s--,a=this.bidiMap.logicalFromVisual[s]):s>0&&u[s-1]%2===0&&u[s]%2!==0?a=1+(c>l?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===u.length-1&&m===0&&u[s-1]%2===0||!this.isRtlDir&&s===0&&u[s]%2!==0?a=1+this.bidiMap.logicalFromVisual[s]:(s>0&&u[s-1]%2!==0&&m!==0&&s--,a=this.bidiMap.logicalFromVisual[s]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},f}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/lang"),b=t("./lib/event_emitter").EventEmitter,h=t("./range").Range,f=function(){function o(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(l){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(a,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var a=this.anchor,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},o.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?h.fromPoints(c,c):this.isBackwards()?h.fromPoints(c,a):h.fromPoints(a,c)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(a,c){var l=c?a.end:a.start,s=c?a.start:a.end;this.$setSelection(l.row,l.column,s.row,s.column)},o.prototype.$setSelection=function(a,c,l,s){if(!this.$silent){var u=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(l,s),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||m)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},o.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},o.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},o.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},o.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(a,c){if(typeof c>"u"){var l=a||this.lead;a=l.row,c=l.column}return this.session.getWordRange(a,c)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},o.prototype.getLineRange=function(a,c){var l=typeof a=="number"?a:this.lead.row,s,u=this.session.getFoldLine(l);return u?(l=u.start.row,s=u.end.row):s=l,c===!0?new h(l,0,s,this.session.getLine(s).length):new h(l,0,s+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(a,c,l){var s=a.column,u=a.column+c;return l<0&&(s=a.column-c,u=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(s,u).split(" ").length-1==c},o.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var a=this.lead.row,c=this.lead.column,l=this.session.documentToScreenRow(a,c),s=this.session.screenToDocumentPosition(l,0),u=this.session.getDisplayLine(a,null,s.row,s.column),m=u.match(/^\s*/);m[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(s.column+=m[0].length),this.moveCursorToPosition(s)},o.prototype.moveCursorLineEnd=function(){var a=this.lead,c=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==c.column){var l=this.session.getLine(c.row);if(c.column==l.length){var s=l.search(/\s+$/);s>0&&(c.column=s)}}this.moveCursorTo(c.row,c.column)},o.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),s=l.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(a,c,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(s)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=l.substring(c)),c>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(s)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},o.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var s=this.session.getFoldStringAt(a,c,-1);s==null&&(s=this.doc.getLine(a).substring(0,c));var u=g.stringReverse(s);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(c-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},o.prototype.$shortWordEndIndex=function(a){var c=0,l,s=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(l=a[c])&&s.test(l);)c++;if(c<1){for(u.lastIndex=0;(l=a[c])&&!u.test(l);)if(u.lastIndex=0,c++,s.test(l))if(c>2){c--;break}else{for(;(l=a[c])&&s.test(l);)c++;if(c>2)break}}}return u.lastIndex=0,c},o.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),s=l.substring(c),u=this.session.getFoldAt(a,c,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(c==l.length){var m=this.doc.getLength();do a++,s=this.doc.getLine(a);while(a<m&&/^\s*$/.test(s));/^\s+/.test(s)||(s=""),c=0}var w=this.$shortWordEndIndex(s);this.moveCursorTo(a,c+w)},o.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1))return this.moveCursorTo(l.start.row,l.start.column);var s=this.session.getLine(a).substring(0,c);if(c===0){do a--,s=this.doc.getLine(a);while(a>0&&/^\s*$/.test(s));c=s.length,/\s+$/.test(s)||(s="")}var u=g.stringReverse(s),m=this.$shortWordEndIndex(u);return this.moveCursorTo(a,c-m)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(a,c){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];a<0?a-=u.rowsAbove||0:a>0&&(a+=u.rowCount-(u.rowsAbove||0))}var m=this.session.screenToDocumentPosition(l.row+a,l.column,s);a!==0&&c===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+c,c===0)},o.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},o.prototype.moveCursorTo=function(a,c,l){var s=this.session.getFoldAt(a,c,1);s&&(a=s.start.row,c=s.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(u.charAt(c))&&u.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(a,c,l){var s=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(s.row,s.column,l)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(a){var c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},o.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var l=this.getCursor();return h.fromPoints(c,l)}catch{return h.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},o.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var l=c.clone();return l.isBackwards=c.cursor==c.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},o.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var c=a.length;c--;){var l=h.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},o.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},o}();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,p.implement(f.prototype,b),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,d){var p=t("./lib/report_error").reportError,g=2e3,b=function(){function h(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var o in this.states){for(var a=this.states[o],c=[],l=0,s=this.matchMappings[o]={defaultToken:"text"},u="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(s.defaultToken=x.defaultToken),x.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),x.unicode&&u.indexOf("u")===-1&&(u+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+l+1)}):($=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),s[l]=w,l+=$,c.push(E),x.onMatch||(x.onMatch=null)}}c.length||(s[0]=0,c.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,u)},this),this.regExps[o]=new RegExp("("+c.join(")|(")+")|($)",u)}}return h.prototype.$setMaxTokenCount=function(f){g=f|0},h.prototype.$applyToken=function(f){var o=this.splitRegex.exec(f).slice(1),a=this.token.apply(this,o);if(typeof a=="string")return[{type:a,value:f}];for(var c=[],l=0,s=a.length;l<s;l++)o[l]&&(c[c.length]={type:a[l],value:o[l]});return c},h.prototype.$arrayTokens=function(f){if(!f)return[];var o=this.splitRegex.exec(f);if(!o)return"text";for(var a=[],c=this.tokenArray,l=0,s=c.length;l<s;l++)o[l+1]&&(a[a.length]={type:c[l],value:o[l+1]});return a},h.prototype.removeCapturingGroups=function(f){var o=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,c){return c?"(?:":a});return o},h.prototype.createSplitterRegexp=function(f,o){if(f.indexOf("(?=")!=-1){var a=0,c=!1,l={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,u,m,w,x,E){return c?c=x!="]":x?c=!0:w?(a==l.stack&&(l.end=E+1,l.stack=-1),a--):m&&(a++,m.length!=1&&(l.stack=a,l.start=E)),s}),l.end!=null&&/^\)*$/.test(f.substr(l.end))&&(f=f.substring(0,l.start)+f.substr(l.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(o||"").replace("g",""))},h.prototype.getLineTokens=function(f,o){if(o&&typeof o!="string"){var a=o.slice(0);o=a[0],o==="#tmp"&&(a.shift(),o=a.shift())}else var a=[];var c=o||"start",l=this.states[c];l||(c="start",l=this.states[c]);var s=this.matchMappings[c],u=this.regExps[c];u.lastIndex=0;for(var m,w=[],x=0,E=0,$={type:null,value:""};m=u.exec(f);){var k=s.defaultToken,C=null,L=m[0],R=u.lastIndex;if(R-L.length>x){var F=f.substring(x,R-L.length);$.type==k?$.value+=F:($.type&&w.push($),$={type:k,value:F})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=l[s[I]],C.onMatch?k=C.onMatch(L,c,a,f):k=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,a),l=this.states[c],l||(this.reportError("state doesn't exist",c),c="start",l=this.states[c]),s=this.matchMappings[c],x=R,u=this.regExps[c],u.lastIndex=R),C.consumeLineEnd&&(x=R);break}if(L){if(typeof k=="string")(!C||C.merge!==!1)&&$.type===k?$.value+=L:($.type&&w.push($),$={type:k,value:L});else if(k){$.type&&w.push($),$={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(x==f.length)break;if(x=R,E++>g){for(E>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:f});x<f.length;)$.type&&w.push($),$={value:f.substring(x,x+=500),type:"overflow"};c="start",a=[];break}}return $.type&&w.push($),a.length>1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:w,state:a.length?a:c}},h}();b.prototype.reportError=p,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,d){var p=t("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,o){if(!o){for(var a in f)this.$rules[a]=f[a];return}for(var a in f){for(var c=f[a],l=0;l<c.length;l++){var s=c[l];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(o)!==0&&(s.next=o+s.next),s.nextState&&s.nextState.indexOf(o)!==0&&(s.nextState=o+s.nextState))}this.$rules[o+a]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(f,o,a,c,l){var s=typeof f=="function"?new f().getRules():f;if(c)for(var u=0;u<c.length;u++)c[u]=o+c[u];else{c=[];for(var m in s)c.push(o+m)}if(this.addRules(s,o),a)for(var w=Array.prototype[l?"push":"unshift"],u=0;u<c.length;u++)w.apply(this.$rules[c[u]],p(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var b=function(f,o){return(f!="start"||o.length)&&o.unshift(this.nextState,f),this.nextState},h=function(f,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var f=0,o=this.$rules;function a(c){var l=o[c];l.processed=!0;for(var s=0;s<l.length;s++){var u=l[s],m=null;Array.isArray(u)&&(m=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var w=u.next||u.push;if(w&&Array.isArray(w)){var x=u.stateName;x||(x=u.token,typeof x!="string"&&(x=x[0]||""),o[x]&&(x+=f++)),o[x]=w,u.next=x,a(x)}else w=="pop"&&(u.next=h);if(u.push&&(u.nextState=u.next||u.push,u.next=b,delete u.push),u.rules)for(var E in u.rules)o[E]?o[E].push&&o[E].push.apply(o[E],u.rules[E]):o[E]=u.rules[E];var $=typeof u=="string"?u:u.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(C){return o[C]}):m=o[$]),m){var k=[s,1].concat(m);u.noEscape&&(k=k.filter(function(C){return!C.next})),l.splice.apply(l,k),s--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(o).forEach(a,this)},this.createKeywordMapper=function(f,o,a,c){var l=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(s){for(var u=f[s],m=u.split(c||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),l[x]=s}},this),f=null,a?function(s){return l[s.toLowerCase()]||o}:function(s){return l[s]||o}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,d){var p;p=function(){this.$behaviours={}},(function(){this.add=function(g,b,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][b]=h},this.addBehaviours=function(g){for(var b in g)for(var h in g[b])this.add(b,h,g[b][h])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,b){if(typeof g=="function")var h=new g().getBehaviours(b);else var h=g.getBehaviours(b);this.addBehaviours(h)},this.getBehaviours=function(g){if(g){for(var b={},h=0;h<g.length;h++)this.$behaviours[g[h]]&&(b[g[h]]=this.$behaviours[g[h]]);return b}else return this.$behaviours}}).call(p.prototype),r.Behaviour=p}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,d){var p=t("./range").Range,g=function(){function b(h,f,o){this.$session=h,this.$row=f,this.$rowTokens=h.getTokens(f);var a=h.getTokenAt(f,o);this.$tokenIndex=a?a.index:-1}return b.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},b.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,f=this.$tokenIndex,o=h[f].start;if(o!==void 0)return o;for(o=0;f>0;)f-=1,o+=h[f].value.length;return o},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new p(this.$row,f,this.$row,f+h.value.length)},b}();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,r,d){var p=t("../../lib/oop"),g=t("../behaviour").Behaviour,b=t("../../token_iterator").TokenIterator,h=t("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},l={'"':'"',"'":"'"},s=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,c.rangeCount!=w.multiSelect.rangeCount&&(c={rangeCount:w.multiSelect.rangeCount})),c[x])return a=c[x];a=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(w,x,E,$){var k=w.end.row-w.start.row;return{text:E+x+$,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,E,$,k,C){var L=$.getCursorPosition(),R=k.doc.getLine(L.row);if(C=="{"){s($);var F=$.getSelectionRange(),I=k.doc.getTextRange(F),H=k.getTokenAt(L.row,L.column);if(I!==""&&I!=="{"&&$.getWrapBehavioursEnabled())return u(F,I,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[L.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,k))return/[\]\}\)]/.test(R[L.column])||$.inMultiSelectMode||w.braces?(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){s($);var O=R.substring(L.column,L.column+1);if(O=="}"){var A=k.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(A!==null&&m.isAutoInsertedClosing(L,R,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){s($);var _="";m.isMaybeInsertedClosing(L,R)&&(_=h.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=R.substring(L.column,L.column+1);if(O==="}"){var N=k.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var B=this.$getIndent(k.getLine(N.row))}else if(_)var B=this.$getIndent(R);else{m.clearMaybeInsertedClosing();return}var U=B+k.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+B+_,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){s($);var R=k.doc.getLine(C.start.row),F=R.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,$,k,C){if(C=="("){s($);var L=$.getSelectionRange(),R=k.doc.getTextRange(L);if(R!==""&&$.getWrapBehavioursEnabled())return u(L,R,"(",")");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){s($);var F=$.getCursorPosition(),I=k.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H==")"){var P=k.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){s($);var R=k.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,$,k,C){if(C=="["){s($);var L=$.getSelectionRange(),R=k.doc.getTextRange(L);if(R!==""&&$.getWrapBehavioursEnabled())return u(L,R,"[","]");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){s($);var F=$.getCursorPosition(),I=k.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H=="]"){var P=k.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,$,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){s($);var R=k.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,$,k,C){var L=k.$mode.$quotes||l;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;s($);var R=C,F=$.getSelectionRange(),I=k.doc.getTextRange(F);if(I!==""&&(I.length!=1||!L[I])&&$.getWrapBehavioursEnabled())return u(F,I,R,R);if(!I){var H=$.getCursorPosition(),P=k.doc.getLine(H.row),O=P.substring(H.column-1,H.column),A=P.substring(H.column,H.column+1),_=k.getTokenAt(H.row,H.column),N=k.getTokenAt(H.row,H.column+1);if(O=="\\"&&_&&/escape/.test(_.type))return null;var B=_&&/string|escape/.test(_.type),U=!N||/string|escape/.test(N.type),K;if(A==R)K=B!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(A),ne=k.$mode.$pairQuotesAfter,ae=ne&&ne[R]&&ne[R].test(O);if(!ae&&te||he||A&&!/[\s;,.})\]\\]/.test(A))return null;var ue=P[H.column-2];if(O==R&&(ue==R||Z.test(ue)))return null;K=!0}return{text:K?R+R:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,$,k,C){var L=k.$mode.$quotes||l,R=k.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(R)){s($);var F=k.doc.getLine(C.start.row),I=F.substring(C.start.column+1,C.start.column+2);if(I==R)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,E,$,k,C){if(x==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&$.selection.isEmpty()){var L=$.getCursorPosition();if(L.column===0)return;for(var R=k.doc.getLine(L.row),F=k.doc.getLine(L.row+1),I=k.getTokens(L.row),H=0,P=0;P<I.length;P++){H+=I[P].value.length;var O=I[P];if(H>=L.column){if(H===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var A=I[P+1];if(!A||!/\.doc/.test(A.type))return}}var _=L.column-(H-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&_>B&&_<B+3||N!==-1&&B!==-1&&_>=N&&_<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(R);if(/\s*\*/.test(F))return/^\s*\*/.test(R)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(R.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var E=w.getCursorPosition(),$=new b(x,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var k=new b(x,E.row,E.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",o)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,E){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isAutoInsertedClosing($,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=E+k.substr($.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,E){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isMaybeInsertedClosing($,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=k.substr(0,$.column)+E,a.maybeInsertedLineEnd=k.substr($.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,E){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&E===a.autoInsertedLineEnd[0]&&x.substr(w.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,x){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&x.substr(w.column)===a.maybeInsertedLineEnd&&x.substr(0,w.column)==a.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},p.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(t,r,d){for(var p=[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],g=0,b=[],h=0;h<p.length;h+=2)b.push(g+=p[h]),p[h+1]&&b.push(45,g+=p[h+1]);r.wordChars=String.fromCharCode.apply(null,b)}),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(t,r,d){var p=t("../config"),g=t("../tokenizer").Tokenizer,b=t("./text_highlight_rules").TextHighlightRules,h=t("./behaviour/cstyle").CstyleBehaviour,f=t("../unicode"),o=t("../lib/lang"),a=t("../token_iterator").TokenIterator,c=t("../range").Range,l;l=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,u,m,w){var x=u.doc,E=!0,$=!0,k=1/0,C=u.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var R=this.lineCommentStart.map(o.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var R=o.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;R=new RegExp("^(\\s*)(?:"+R+") ?"),L=u.getUseSoftTabs();var I=function(K,Z){var te=K.match(R);if(te){var he=te[1].length,ne=te[0].length;!A(K,he,ne)&&te[0][ne-1]==" "&&ne--,x.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!E||/\S/.test(K))&&(A(K,k,k)?x.insertInLine({row:Z,column:k},H):x.insertInLine({row:Z,column:k},F))},O=function(K,Z){return R.test(K)},A=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,_=this.blockComment.end,R=new RegExp("^(\\s*)(?:"+o.escapeRegExp(F)+")"),N=new RegExp("(?:"+o.escapeRegExp(_)+")\\s*$"),P=function(ae,ue){O(ae,ue)||(!E||/\S/.test(ae))&&(x.insertInLine({row:ue,column:ae.length},_),x.insertInLine({row:ue,column:k},F))},I=function(ae,ue){var ce;(ce=ae.match(N))&&x.removeInLine(ue,ae.length-ce[0].length,ae.length),(ce=ae.match(R))&&x.removeInLine(ue,ce[1].length,ce[0].length)},O=function(ae,ue){if(R.test(ae))return!0;for(var ce=u.getTokens(ue),fe=0;fe<ce.length;fe++)if(ce[fe].type==="comment")return!0}}function B(K){for(var Z=m;Z<=w;Z++)K(x.getLine(Z),Z)}var U=1/0;B(function(K,Z){var te=K.search(/\S/);te!==-1?(te<k&&(k=te),$&&!O(K,Z)&&($=!1)):U>K.length&&(U=K.length)}),k==1/0&&(k=U,E=!1,$=!1),L&&k%C!=0&&(k=Math.floor(k/C)*C),B($?I:P)},this.toggleBlockComment=function(s,u,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new a(u,w.row,w.column),$=E.getCurrentToken();u.selection;var k=u.selection.toOrientedRange(),C,L;if($&&/comment/.test($.type)){for(var R,F;$&&/comment/.test($.type);){var I=$.value.indexOf(x.start);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;R=new c(H,P,H,P+x.start.length);break}$=E.stepBackward()}for(var E=new a(u,w.row,w.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var I=$.value.indexOf(x.end);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;F=new c(H,P,H,P+x.end.length);break}$=E.stepForward()}F&&u.remove(F),R&&(u.remove(R),C=R.start.row,L=-x.start.length)}else L=x.start.length,C=m.start.row,u.insert(m.end,x.end),u.insert(m.start,x.start);k.start.row==C&&(k.start.column+=L),k.end.row==C&&(k.end.column+=L),u.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(s,u,m){return this.$getIndent(u)},this.checkOutdent=function(s,u,m){return!1},this.autoOutdent=function(s,u,m){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var u in s)if(s[u]){var m=s[u],w=m.prototype.$id,x=p.$modes[w];x||(p.$modes[w]=x=new m),p.$modes[u]||(p.$modes[u]=x),this.$embeds.push(u),this.$modes[u]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(L){(function(R){var F=E[L],I=R[F];R[E[L]]=function(){return this.$delegator(F,arguments,I)}})(k)},k=this,u=0;u<E.length;u++)$(u)},this.$delegator=function(s,u,m){var w=u[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],E=this.$modes[x];if(E)return E[s].apply(E,[w[1]].concat([].slice.call(u,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var k=w.split(this.$embeds[$]);if(!k[0]&&k[1]){u[0]=k[1];var E=this.$modes[this.$embeds[$]];return E[s].apply(E,u)}}var C=m.apply(this,u);return m?C:void 0},this.transformAction=function(s,u,m,w,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][u]){var k=E[$][u].apply(this,arguments);if(k)return k}}},this.getKeywords=function(s){if(!this.completionKeywords){var u=this.$tokenizer.rules,m=[];for(var w in u)for(var x=u[w],E=0,$=x.length;E<$;E++)if(typeof x[E].token=="string")/keyword|support|storage/.test(x[E].token)&&m.push(x[E].regex);else if(typeof x[E].token=="object"){for(var k=0,C=x[E].token.length;k<C;k++)if(/keyword|support|storage/.test(x[E].token[k])){var w=x[E].regex.match(/\(.+?\)/g)[k];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return s?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,u,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),r.Mode=l}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("./lib/dom"),g=function(){function b(h){this.session=h,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return b.prototype.getRowLength=function(h){var f;return this.lineWidgets?f=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[h]?1+f:this.$wrapData[h].length+1+f},b.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(h+=f.rowCount)}),h},b.prototype.$onChangeEditor=function(h){this.attach(h.editor)},b.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(h){var f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},b.prototype.updateOnFold=function(h,f){var o=f.lineWidgets;if(!(!o||!h.action)){for(var a=h.data,c=a.start.row,l=a.end.row,s=h.action=="add",u=c+1;u<l;u++)o[u]&&(o[u].hidden=s);o[l]&&(s?o[c]?o[l].hidden=s:o[c]=o[l]:(o[c]==o[l]&&(o[c]=void 0),o[l].hidden=s))}},b.prototype.updateOnChange=function(h){var f=this.session.lineWidgets;if(f){var o=h.start.row,a=h.end.row-o;if(a!==0)if(h.action=="remove"){var c=f.splice(o+1,a);!f[o]&&c[c.length-1]&&(f[o]=c.pop()),c.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var l=new Array(a);f[o]&&f[o].column!=null&&h.start.column>f[o].column&&o++,l.unshift(o,0),f.splice.apply(f,l),this.$updateRows()}}},b.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var f=!0;h.forEach(function(o,a){if(o)for(f=!1,o.row=a;o.$oldWidget;)o.$oldWidget.row=a,o=o.$oldWidget}),f&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[h.row];return f&&(h.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},b.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var f=this.editor.renderer;h.html&&!h.el&&(h.el=p.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=p.createElement("div"),h.el.textContent=h.text),h.el&&(p.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&p.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",f.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/f.layerConfig.lineHeight);var o=this.session.getFoldAt(h.row,0);if(h.$fold=o,o){var a=this.session.lineWidgets;h.row==o.end.row&&!a[o.start.row]?a[o.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(h),h},b.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[h.row];if(f==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;f;){if(f.$oldWidget==h){f.$oldWidget=h.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(h){for(var f=this.session.lineWidgets,o=f&&f[h],a=[];o;)a.push(o),o=o.$oldWidget;return a},b.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(h,f){var o=this.session._changedWidgets,a=f.layerConfig;if(!(!o||!o.length)){for(var c=1/0,l=0;l<o.length;l++){var s=o[l];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,f.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/a.characterWidth));var u=s.h/a.lineHeight;s.coverLine&&(u-=this.session.getRowLineCount(s.row),u<0&&(u=0)),s.rowCount!=u&&(s.rowCount=u,s.row<c&&(c=s.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(h,f){var o=f.layerConfig,a=this.session.lineWidgets;if(a){for(var c=Math.min(this.firstRow,o.firstRow),l=Math.max(this.lastRow,o.lastRow,a.length);c>0&&!a[c];)c--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,f.$cursorLayer.config=o;for(var s=c;s<=l;s++){var u=a[s];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,f.container.appendChild(u.el));var m=f.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;u.coverLine||(m+=o.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=m-o.offset+"px";var w=u.coverGutter?0:f.gutterWidth;u.fixedWidth||(w-=f.scrollLeft),u.el.style.left=w+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=o.width+2*o.padding+"px"),u.fixedWidth?u.el.style.right=f.scrollBar.getWidth()+"px":u.el.style.right=""}}}},b}();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,r,d){r.applyDelta=function(p,g,b){var h=g.start.row,f=g.start.column,o=p[h]||"";switch(g.action){case"insert":var a=g.lines;if(a.length===1)p[h]=o.substring(0,f)+g.lines[0]+o.substring(f);else{var c=[h,1].concat(g.lines);p.splice.apply(p,c),p[h]=o.substring(0,f)+p[h],p[h+g.lines.length-1]+=o.substring(f)}break;case"remove":var l=g.end.column,s=g.end.row;h===s?p[h]=o.substring(0,f)+o.substring(l):p.splice(h,s-h+1,o.substring(0,f)+p[s].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,b=function(){function o(a,c,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,l)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var c=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},o.prototype.setPosition=function(a,c,l){var s;if(l?s={row:a,column:c}:s=this.$clipPositionToDocument(a,c),!(this.row==s.row&&this.column==s.column)){var u={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:u,value:s})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(a,c){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,c))),c<0&&(l.column=0),l},o}();b.prototype.$insertRight=!1,p.implement(b.prototype,g);function h(o,a,c){var l=c?o.column<=a.column:o.column<a.column;return o.row<a.row||o.row==a.row&&l}function f(o,a,c){var l=o.action=="insert",s=(l?1:-1)*(o.end.row-o.start.row),u=(l?1:-1)*(o.end.column-o.start.column),m=o.start,w=l?m:o.end;return h(a,m,c)?{row:a.row,column:a.column}:h(w,a,!c)?{row:a.row+s,column:a.column+(a.row==w.row?u:0)}:{row:m.row,column:m.column}}r.Anchor=b}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,r,d){var p=t("./lib/oop"),g=t("./apply_delta").applyDelta,b=t("./lib/event_emitter").EventEmitter,h=t("./range").Range,f=t("./anchor").Anchor,o=function(){function a(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return a.prototype.setValue=function(c){var l=this.getLength()-1;this.remove(new h(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},c||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(c,l){return new f(this,c,l)},a.prototype.$detectNewLine=function(c){var l=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},a.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(c){return c==`\r
|
190
|
+
`||c=="\r"||c==`
|
191
|
+
`},a.prototype.getLine=function(c){return this.$lines[c]||""},a.prototype.getLines=function(c,l){return this.$lines.slice(c,l+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(c){var l;if(c.start.row===c.end.row)l=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{l=this.getLines(c.start.row,c.end.row),l[0]=(l[0]||"").substring(c.start.column);var s=l.length-1;c.end.row-c.start.row==s&&(l[s]=l[s].substring(0,c.end.column))}return l},a.prototype.insertLines=function(c,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,l)},a.prototype.removeLines=function(c,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,l)},a.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},a.prototype.insert=function(c,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(c,this.$split(l))},a.prototype.insertInLine=function(c,l){var s=this.clippedPos(c.row,c.column),u=this.pos(c.row,c.column+l.length);return this.applyDelta({start:s,end:u,action:"insert",lines:[l]},!0),this.clonePos(u)},a.prototype.clippedPos=function(c,l){var s=this.getLength();c===void 0?c=s:c<0?c=0:c>=s&&(c=s-1,l=void 0);var u=this.getLine(c);return l==null&&(l=u.length),l=Math.min(Math.max(l,0),u.length),{row:c,column:l}},a.prototype.clonePos=function(c){return{row:c.row,column:c.column}},a.prototype.pos=function(c,l){return{row:c,column:l}},a.prototype.$clipPosition=function(c){var l=this.getLength();return c.row>=l?(c.row=Math.max(0,l-1),c.column=this.getLine(l-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},a.prototype.insertFullLines=function(c,l){c=Math.min(Math.max(c,0),this.getLength());var s=0;c<this.getLength()?(l=l.concat([""]),s=0):(l=[""].concat(l),c--,s=this.$lines[c].length),this.insertMergedLines({row:c,column:s},l)},a.prototype.insertMergedLines=function(c,l){var s=this.clippedPos(c.row,c.column),u={row:s.row+l.length-1,column:(l.length==1?s.column:0)+l[l.length-1].length};return this.applyDelta({start:s,end:u,action:"insert",lines:l}),this.clonePos(u)},a.prototype.remove=function(c){var l=this.clippedPos(c.start.row,c.start.column),s=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:l,end:s,action:"remove",lines:this.getLinesForRange({start:l,end:s})}),this.clonePos(l)},a.prototype.removeInLine=function(c,l,s){var u=this.clippedPos(c,l),m=this.clippedPos(c,s);return this.applyDelta({start:u,end:m,action:"remove",lines:this.getLinesForRange({start:u,end:m})},!0),this.clonePos(u)},a.prototype.removeFullLines=function(c,l){c=Math.min(Math.max(0,c),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var s=l==this.getLength()-1&&c>0,u=l<this.getLength()-1,m=s?c-1:c,w=s?this.getLine(m).length:0,x=u?l+1:l,E=u?0:this.getLine(x).length,$=new h(m,w,x,E),k=this.$lines.slice(c,l+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),k},a.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(c,l){if(c instanceof h||(c=h.fromPoints(c.start,c.end)),l.length===0&&c.isEmpty())return c.start;if(l==this.getTextRange(c))return c.end;this.remove(c);var s;return l?s=this.insert(c.start,l):s=c.start,s},a.prototype.applyDeltas=function(c){for(var l=0;l<c.length;l++)this.applyDelta(c[l])},a.prototype.revertDeltas=function(c){for(var l=c.length-1;l>=0;l--)this.revertDelta(c[l])},a.prototype.applyDelta=function(c,l){var s=c.action=="insert";(s?c.lines.length<=1&&!c.lines[0]:!h.comparePoints(c.start,c.end))||(s&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(g(this.$lines,c,l),this._signal("change",c)))},a.prototype.$safeApplyDelta=function(c){var l=this.$lines.length;(c.action=="remove"&&c.start.row<l&&c.end.row<l||c.action=="insert"&&c.start.row<=l)&&this.applyDelta(c)},a.prototype.$splitAndapplyLargeDelta=function(c,l){for(var s=c.lines,u=s.length-l+1,m=c.start.row,w=c.start.column,x=0,E=0;x<u;x=E){E+=l-1;var $=s.slice(x,E);$.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+E,w=0),action:c.action,lines:$},!0)}c.lines=s.slice(x),c.start.row=m+x,c.start.column=w,this.applyDelta(c,!0)},a.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},a.prototype.indexToPosition=function(c,l){for(var s=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,m=l||0,w=s.length;m<w;m++)if(c-=s[m].length+u,c<0)return{row:m,column:c+s[m].length+u};return{row:w-1,column:c+s[w-1].length+u}},a.prototype.positionToIndex=function(c,l){for(var s=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,m=0,w=Math.min(c.row,s.length),x=l||0;x<w;++x)m+=s[x].length+u;return m+c.column},a.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},a}();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",p.implement(o.prototype,b),r.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,b=function(){function h(f,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var a=this;this.$worker=function(){if(a.running){for(var c=new Date,l=a.currentLine,s=-1,u=a.doc,m=l;a.lines[l];)l++;var w=u.getLength(),x=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),s=l;do l++;while(a.lines[l]);if(x++,x%5===0&&new Date-c>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,s==-1&&(s=l),m<=s&&a.fireUpdateEvent(m,s)}}}return h.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(f,o){var a={first:f,last:o};this._signal("update",{data:a})},h.prototype.start=function(f){this.currentLine=Math.min(f||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)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(f){var o=f.start.row,a=f.end.row-o;if(a===0)this.lines[o]=null;else if(f.action=="remove")this.lines.splice(o,a+1,null),this.states.splice(o,a+1,null);else{var c=Array(a+1);c.unshift(o,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},h.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},h.prototype.$tokenizeRow=function(f){var o=this.doc.getLine(f),a=this.states[f-1],c=this.tokenizer.getLineTokens(o,a,f);return this.states[f]+""!=c.state+""?(this.states[f]=c.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=c.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();p.implement(b.prototype,g),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,r,d){var p=t("./lib/lang"),g=t("./range").Range,b=function(){function h(f,o,a){a===void 0&&(a="text"),this.setRegexp(f),this.clazz=o,this.type=a,this.docLen=0}return h.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},h.prototype.update=function(f,o,a,c){if(this.regExp){for(var l=c.firstRow,s=c.lastRow,u={},m=a.$editor.$search,w=m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=l;x<=s;x++){var E=this.cache[x];if(E==null||a.getValue().length!=this.docLen){if(w){E=[];var $=m.$multiLineForward(a,this.regExp,x,s);if($){var k=$.endRow<=s?$.endRow-1:s;k>x&&(x=k),E.push(new g($.startRow,$.startCol,$.endRow,$.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=p.getMatchOffsets(a.getLine(x),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(F){return new g(x,F.offset,x,F.offset+F.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var L=E[C].toScreenRange(a),R=L.toString();u[R]||(u[R]=!0,o.drawSingleLineMarker(f,L,this.clazz,c))}}this.docLen=a.getValue().length}},h}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,r,d){var p=function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,L,R){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=R.length;F--;){var I=R[F][0];if(I.id<=C)break;I.id<L&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,L){for(var R=this.selections,F=R.length;F--;){var I=R[F];if(I.rev<C)return L&&(I=R[F+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=null,I=0,H=R.length;H--;){var P=R[H][0];if(P.id<L&&!F&&(F=H+1),P.id<=C){I=H+1;break}}return R.slice(I,F)},k.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.undo=function(C,L){this.lastDeltas=null;var R=this.$undoStack;if(g(R,R.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=R.pop(),I=null;return F&&(I=C.undoChanges(F,L),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var R=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,R),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),I=null;return F&&(I=C.redoChanges(F,L),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],R=L&&L[0].id||0;this.$redoStackBaseRev=R,this.$rev=R},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+a(this.$redoStack)},k}();p.prototype.hasUndo=p.prototype.canUndo,p.prototype.hasRedo=p.prototype.canRedo,p.prototype.isClean=p.prototype.isAtBookmark,p.prototype.markClean=p.prototype.bookmark;function g(k,C){for(var L=C;L--;){var R=k[L];if(R&&!R[0].ignore){for(;L<C-1;){var F=s(k[L],k[L+1]);k[L]=F[0],k[L+1]=F[1],L++}return!0}}}var b=t("./range").Range,h=b.comparePoints;b.comparePoints;function f(k){return{row:k.row,column:k.column}}function o(k){return{start:f(k.start),end:f(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
|
194
|
+
`);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(c).join(`
|
195
|
+
`):C=c(k.value)),k.start&&(C+=c(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function c(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function l(k,C){var L=k.action=="insert",R=C.action=="insert";if(L&&R)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.start,k.start)<=0)m(k,C,1);else return null;else if(L&&!R)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.end,k.start)<=0)m(k,C,-1);else return null;else if(!L&&R)if(h(C.start,k.start)>=0)m(C,k,1);else if(h(C.start,k.start)<=0)m(k,C,1);else return null;else if(!L&&!R)if(h(C.start,k.start)>=0)m(C,k,1);else if(h(C.end,k.start)<=0)m(k,C,-1);else return null;return[C,k]}function s(k,C){for(var L=k.length;L--;)for(var R=0;R<C.length;R++)if(!l(k[L],C[R])){for(;L<k.length;){for(;R--;)l(C[R],k[L]);R=C.length,L++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function u(k,C){var L=k.action=="insert",R=C.action=="insert";if(L&&R)h(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(L&&!R)h(k.start,C.end)>=0?m(k,C,-1):(h(k.start,C.start)<=0||m(k,b.fromPoints(C.start,k.start),-1),m(C,k,1));else if(!L&&R)h(C.start,k.end)>=0?m(C,k,-1):(h(C.start,k.start)<=0||m(C,b.fromPoints(k.start,C.start),-1),m(k,C,1));else if(!L&&!R)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.end,k.start)<=0)m(k,C,-1);else{var F,I;return h(k.start,C.start)<0&&(F=k,k=x(k,C.start)),h(k.end,C.end)>0&&(I=x(k,C.end)),w(C.end,k.start,k.end,-1),I&&!F&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,F,I].filter(Boolean)}return[C,k]}function m(k,C,L){w(k.start,C.start,C.end,L),w(k.end,C.start,C.end,L)}function w(k,C,L,R){k.row==(R==1?C:L).row&&(k.column+=R*(L.column-C.column)),k.row+=R*(L.row-C.row)}function x(k,C){var L=k.lines,R=k.end;k.end=f(C);var F=k.end.row-k.start.row,I=L.splice(F,L.length),H=F?C.column:C.column-k.start.column;L.push(I[0].substring(0,H)),I[0]=I[0].substr(H);var P={start:f(C),end:R,lines:I,action:k.action};return P}function E(k,C){C=o(C);for(var L=k.length;L--;){for(var R=k[L],F=0;F<R.length;F++){var I=R[F],H=u(I,C);C=H[0],H.length!=2&&(H[2]?(R.splice(F+1,1,H[1],H[2]),F++):H[1]||(R.splice(F,1),F--))}R.length||k.splice(L,1)}return k}function $(k,C){for(var L=0;L<C.length;L++)for(var R=C[L],F=0;F<R.length;F++)E(k,R[F])}r.UndoManager=p}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=function(){function b(h,f){this.foldData=h,Array.isArray(f)?this.folds=f:f=this.folds=[f];var o=f[f.length-1];this.range=new p(f[0].start.row,f[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return b.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(f){f.start.row+=h,f.end.row+=h})},b.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(f,o){return-f.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},b.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},b.prototype.walk=function(h,f,o){var a=0,c=this.folds,l,s,u,m=!0;f==null&&(f=this.end.row,o=this.end.column);for(var w=0;w<c.length;w++){if(l=c[w],s=l.range.compareStart(f,o),s==-1){h(null,f,o,a,m);return}if(u=h(null,l.start.row,l.start.column,a,m),u=!u&&h(l.placeholder,l.start.row,l.start.column,a),u||s===0)return;m=!l.sameRow,a=l.end.column}h(null,f,o,a,m)},b.prototype.getNextFoldTo=function(h,f){for(var o,a,c=0;c<this.folds.length;c++){if(o=this.folds[c],a=o.range.compareEnd(h,f),a==-1)return{fold:o,kind:"after"};if(a===0)return{fold:o,kind:"inside"}}return null},b.prototype.addRemoveChars=function(h,f,o){var a=this.getNextFoldTo(h,f),c,l;if(a){if(c=a.fold,a.kind=="inside"&&c.start.column!=f&&c.start.row!=h)window.console&&window.console.log(h,f,c);else if(c.start.row==h){l=this.folds;var s=l.indexOf(c);for(s===0&&(this.start.column+=o),s;s<l.length;s++){if(c=l[s],c.start.column+=o,!c.sameRow)return;c.end.column+=o}this.end.column+=o}}},b.prototype.split=function(h,f){var o=this.getNextFoldTo(h,f);if(!o||o.kind=="inside")return null;var a=o.fold,c=this.folds,l=this.foldData,s=c.indexOf(a),u=c[s-1];this.end.row=u.end.row,this.end.column=u.end.column,c=c.splice(s,c.length-s);var m=new b(l,c);return l.splice(l.indexOf(this)+1,0,m),m},b.prototype.merge=function(h){for(var f=h.folds,o=0;o<f.length;o++)this.addFold(f[o]);var a=this.foldData;a.splice(a.indexOf(h),1)},b.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(f){h.push(" "+f.toString())}),h.push("]"),h.join(`
|
196
|
+
`)},b.prototype.idxToPosition=function(h){for(var f=0,o=0;o<this.folds.length;o++){var a=this.folds[o];if(h-=a.start.column-f,h<0)return{row:a.start.row,column:a.start.column+h};if(h-=a.placeholder.length,h<0)return a.start;f=a.end.column}return{row:this.end.row,column:this.end.column+h}},b}();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,r,d){var p=t("./range").Range,g=p.comparePoints,b=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(f,o,a){for(var c=this.ranges,l=a||0;l<c.length;l++){var s=c[l],u=g(f,s.end);if(!(u>0)){var m=g(f,s.start);return u===0?o&&m!==0?-l-2:l:m>0||m===0&&!o?l:-l-1}}return-l-1},h.prototype.add=function(f){var o=!f.isEmpty(),a=this.pointIndex(f.start,o);a<0&&(a=-a-1);var c=this.pointIndex(f.end,o,a);return c<0?c=-c-1:c++,this.ranges.splice(a,c-a,f)},h.prototype.addList=function(f){for(var o=[],a=f.length;a--;)o.push.apply(o,this.add(f[a]));return o},h.prototype.substractPoint=function(f){var o=this.pointIndex(f);if(o>=0)return this.ranges.splice(o,1)},h.prototype.merge=function(){var f=[],o=this.ranges;o=o.sort(function(u,m){return g(u.start,m.start)});for(var a=o[0],c,l=1;l<o.length;l++){c=a,a=o[l];var s=g(c.end,a.start);s<0||s==0&&!c.isEmpty()&&!a.isEmpty()||(g(c.end,a.end)<0&&(c.end.row=a.end.row,c.end.column=a.end.column),o.splice(l,1),f.push(a),a=c,l--)}return this.ranges=o,f},h.prototype.contains=function(f,o){return this.pointIndex({row:f,column:o})>=0},h.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},h.prototype.rangeAtPoint=function(f){var o=this.pointIndex(f);if(o>=0)return this.ranges[o]},h.prototype.clipRows=function(f,o){var a=this.ranges;if(a[0].start.row>o||a[a.length-1].start.row<f)return[];var c=this.pointIndex({row:f,column:0});c<0&&(c=-c-1);var l=this.pointIndex({row:o,column:0},c);l<0&&(l=-l-1);for(var s=[],u=c;u<l;u++)s.push(a[u]);return s},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(f){for(var o=f.start,a=f.end,c=o.row,l=a.row,s=this.ranges,u=0,m=s.length;u<m;u++){var w=s[u];if(w.end.row>=c)break}if(f.action=="insert")for(var x=l-c,E=-o.column+a.column;u<m;u++){var w=s[u];if(w.start.row>c)break;if(w.start.row==c&&w.start.column>=o.column&&(w.start.column==o.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=x)),w.end.row==c&&w.end.column>=o.column){if(w.end.column==o.column&&this.$bias<0)continue;w.end.column==o.column&&E>0&&u<m-1&&w.end.column>w.start.column&&w.end.column==s[u+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=x}}else for(var x=c-l,E=o.column-a.column;u<m;u++){var w=s[u];if(w.start.row>l)break;w.end.row<l&&(c<w.end.row||c==w.end.row&&o.column<w.end.column)?(w.end.row=c,w.end.column=o.column):w.end.row==l?w.end.column<=a.column?(x||w.end.column>o.column)&&(w.end.column=o.column,w.end.row=o.row):(w.end.column+=E,w.end.row+=x):w.end.row>l&&(w.end.row+=x),w.start.row<l&&(c<w.start.row||c==w.start.row&&o.column<w.start.column)?(w.start.row=c,w.start.column=o.column):w.start.row==l?w.start.column<=a.column?(x||w.start.column>o.column)&&(w.start.column=o.column,w.start.row=o.row):(w.start.column+=E,w.start.row+=x):w.start.row>l&&(w.start.row+=x)}if(x!=0&&u<m)for(;u<m;u++){var w=s[u];w.start.row+=x,w.end.row+=x}},h}();b.prototype.comparePoints=g,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,r,d){var p=this&&this.__extends||function(){var c=function(l,s){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(u[w]=m[w])},c(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");c(l,s);function u(){this.constructor=l}l.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),g=t("../range_list").RangeList,b=function(c){p(l,c);function l(s,u){var m=c.call(this)||this;return m.foldLine=null,m.placeholder=u,m.range=s,m.start=s.start,m.end=s.end,m.sameRow=s.start.row==s.end.row,m.subFolds=m.ranges=[],m}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(u){u.setFoldLine(s)})},l.prototype.clone=function(){var s=this.range.clone(),u=new l(s,this.placeholder);return this.subFolds.forEach(function(m){u.subFolds.push(m.clone())}),u.collapseChildren=this.collapseChildren,u},l.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){f(s,this.start);for(var u=s.start.row,m=s.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(u,m),x==1);w++);var E=this.subFolds[w],$=0;if(x==0){if(E.range.containsRange(s))return E.addSubFold(s);$=1}for(var u=s.range.end.row,m=s.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(u,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,s),L=x==0?C.length-1:C.length,R=$;R<L;R++)s.addSubFold(C[R]);return s.setFoldLine(this.foldLine),s}},l.prototype.restoreRange=function(s){return a(s,this.start)},l}(g);function h(c,l){c.row-=l.row,c.row==0&&(c.column-=l.column)}function f(c,l){h(c.start,l),h(c.end,l)}function o(c,l){c.row==0&&(c.column+=l.column),c.row+=l.row}function a(c,l){o(c.start,l),o(c.end,l)}r.Fold=b}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(t,r,d){var p=t("../range").Range,g=t("./fold_line").FoldLine,b=t("./fold").Fold,h=t("../token_iterator").TokenIterator,f=t("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(a,c,l){var s=this.getFoldLine(a);if(!s)return null;for(var u=s.folds,m=0;m<u.length;m++){var w=u[m].range;if(w.contains(a,c)){if(l==1&&w.isEnd(a,c)&&!w.isEmpty()||l==-1&&w.isStart(a,c)&&!w.isEmpty())continue;return u[m]}}},this.getFoldsInRange=function(a){var c=a.start,l=a.end,s=this.$foldData,u=[];c.column+=1,l.column-=1;for(var m=0;m<s.length;m++){var w=s[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=s[m].folds,E=0;E<x.length;E++){var $=x[E];if(w=$.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;u.push($)}}}}return c.column-=1,l.column+=1,u},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var c=[];a.forEach(function(s){c=c.concat(this.getFoldsInRange(s))},this)}else var c=this.getFoldsInRange(a);return c},this.getAllFolds=function(){for(var a=[],c=this.$foldData,l=0;l<c.length;l++)for(var s=0;s<c[l].folds.length;s++)a.push(c[l].folds[s]);return a},this.getFoldStringAt=function(a,c,l,s){if(s=s||this.getFoldLine(a),!s)return null;for(var u={end:{column:0}},m,w,x=0;x<s.folds.length;x++){w=s.folds[x];var E=w.range.compareEnd(a,c);if(E==-1){m=this.getLine(w.start.row).substring(u.end.column,w.start.column);break}else if(E===0)return null;u=w}return m||(m=this.getLine(w.start.row).substring(u.end.column)),l==-1?m.substring(0,c-u.end.column):l==1?m.substring(c-u.end.column):m},this.getFoldLine=function(a,c){var l=this.$foldData,s=0;for(c&&(s=l.indexOf(c)),s==-1&&(s=0),s;s<l.length;s++){var u=l[s];if(u.start.row<=a&&u.end.row>=a)return u;if(u.end.row>a)return null}return null},this.getNextFoldLine=function(a,c){var l=this.$foldData,s=0;for(c&&(s=l.indexOf(c)),s==-1&&(s=0),s;s<l.length;s++){var u=l[s];if(u.end.row>=a)return u}return null},this.getFoldedRowCount=function(a,c){for(var l=this.$foldData,s=c-a+1,u=0;u<l.length;u++){var m=l[u],w=m.end.row,x=m.start.row;if(w>=c){x<c&&(x>=a?s-=c-x:s=0);break}else w>=a&&(x>=a?s-=w-x:s-=w-a+1)}return s},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(c,l){return c.start.row-l.start.row}),a},this.addFold=function(a,c){var l=this.$foldData,s=!1,u;a instanceof b?u=a:(u=new b(c,a),u.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(u.range);var m=u.start.row,w=u.start.column,x=u.end.row,E=u.end.column,$=this.getFoldAt(m,w,1),k=this.getFoldAt(x,E,-1);if($&&k==$)return $.addSubFold(u);$&&!$.range.isStart(m,w)&&this.removeFold($),k&&!k.range.isEnd(x,E)&&this.removeFold(k);var C=this.getFoldsInRange(u.range);C.length>0&&(this.removeFolds(C),u.collapseChildren||C.forEach(function(I){u.addSubFold(I)}));for(var L=0;L<l.length;L++){var R=l[L];if(x==R.start.row){R.addFold(u),s=!0;break}else if(m==R.end.row){if(R.addFold(u),s=!0,!u.sameRow){var F=l[L+1];if(F&&F.start.row==x){R.merge(F);break}}break}else if(x<=R.start.row)break}return s||(R=this.$addFoldLine(new g(this.$foldData,u))),this.$useWrapMode?this.$updateWrapData(R.start.row,R.start.row):this.$updateRowLengthCache(R.start.row,R.start.row),this.$modified=!0,this._signal("changeFold",{data:u,action:"add"}),u},this.addFolds=function(a){a.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(a){var c=a.foldLine,l=c.start.row,s=c.end.row,u=this.$foldData,m=c.folds;if(m.length==1)u.splice(u.indexOf(c),1);else if(c.range.isEnd(a.end.row,a.end.column))m.pop(),c.end.row=m[m.length-1].end.row,c.end.column=m[m.length-1].end.column;else if(c.range.isStart(a.start.row,a.start.column))m.shift(),c.start.row=m[0].start.row,c.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=c.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(l,s):this.$updateRowLengthCache(l,s)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var c=[],l=0;l<a.length;l++)c.push(a[l]);c.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(c){a.restoreRange(c),this.addFold(c)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(a,c){var l,s;if(a==null)l=new p(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof a=="number")l=new p(a,0,a,this.getLine(a).length);else if("row"in a)l=p.fromPoints(a,a);else{if(Array.isArray(a))return s=[],a.forEach(function(m){s=s.concat(this.unfold(m))},this),s;l=a}s=this.getFoldsInRangeList(l);for(var u=s;s.length==1&&p.comparePoints(s[0].start,l.start)<0&&p.comparePoints(s[0].end,l.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(l);if(c!=!1?this.removeFolds(s):this.expandFolds(s),u.length)return u},this.isRowFolded=function(a,c){return!!this.getFoldLine(a,c)},this.getRowFoldEnd=function(a,c){var l=this.getFoldLine(a,c);return l?l.end.row:a},this.getRowFoldStart=function(a,c){var l=this.getFoldLine(a,c);return l?l.start.row:a},this.getFoldDisplayLine=function(a,c,l,s,u){s==null&&(s=a.start.row),u==null&&(u=0),c==null&&(c=a.end.row),l==null&&(l=this.getLine(c).length);var m=this.doc,w="";return a.walk(function(x,E,$,k){if(!(E<s)){if(E==s){if($<u)return;k=Math.max(u,k)}x!=null?w+=x:w+=m.getLine(E).substring(k,$)}},c,l),w},this.getDisplayLine=function(a,c,l,s){var u=this.getFoldLine(a);if(u)return this.getFoldDisplayLine(u,a,c,l,s);var m;return m=this.doc.getLine(a),m.substring(s||0,c||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(c){var l=c.folds.map(function(s){return s.clone()});return new g(a,l)}),a},this.toggleFold=function(a){var c=this.selection,l=c.getRange(),s,u;if(l.isEmpty()){var m=l.start;if(s=this.getFoldAt(m.row,m.column),s){this.expandFold(s);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(u=this.findMatchingBracket(m))?l.comparePoint(u)==1?l.end=u:(l.start=u,l.start.column++,l.end.column--):(u=this.findMatchingBracket({row:m.row,column:m.column+1}))?(l.comparePoint(u)==1?l.end=u:l.start=u,l.start.column++):l=this.getCommentFoldRange(m.row,m.column)||l}else{var x=this.getFoldsInRange(l);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(s=x[0])}if(s||(s=this.getFoldAt(l.start.row,l.start.column)),s&&s.range.toString()==l.toString()){this.expandFold(s);return}var E="...";if(!l.isMultiLine()){if(E=this.getTextRange(l),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,l)},this.getCommentFoldRange=function(a,c,l){var s=new h(this,a,c),u=s.getCurrentToken(),m=u&&u.type;if(u&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new p;if(l!=1){do u=s.stepBackward();while(u&&w.test(u.type));u=s.stepForward()}x.start.row=s.getCurrentTokenRow(),x.start.column=s.getCurrentTokenColumn()+u.value.length,s=new h(this,a,c);var E=this.getState(s.$row);if(l!=-1){var $=-1;do if(u=s.stepForward(),$==-1){var k=this.getState(s.$row);E.toString()!==k.toString()&&($=s.$row)}else if(s.$row>$)break;while(u&&w.test(u.type));u=s.stepBackward()}else u=s.getCurrentToken();return x.end.row=s.getCurrentTokenRow(),x.end.column=s.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,c,l,s){l==null&&(l=1e5);var u=this.foldWidgets;if(u){c=c||this.getLength(),a=a||0;for(var m=a;m<c;m++)if(u[m]==null&&(u[m]=this.getFoldWidget(m)),u[m]=="start"&&!(s&&!s(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=c&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=l,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(c){for(var l=a.getTokens(c),s=0;s<l.length;s++){var u=l[s];if(!(u.type=="text"&&/^\s+$/.test(u.value)))return!!/comment/.test(u.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,c){var l=this.foldWidgets;if(!l||c&&l[a])return{};for(var s=a-1,u;s>=0;){var m=l[s];if(m==null&&(m=l[s]=this.getFoldWidget(s)),m=="start"){var w=this.getFoldWidgetRange(s);if(u||(u=w),w&&w.end.row>=a)break}s--}return{range:s!==-1&&w,firstRange:u}},this.onFoldWidgetClick=function(a,c){c instanceof f&&(c=c.domEvent);var l={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},s=this.$toggleFoldWidget(a,l);if(!s){var u=c.target||c.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,c){if(this.getFoldWidget){var l=this.getFoldWidget(a),s=this.getLine(a),u=l==="end"?-1:1,m=this.getFoldAt(a,u===-1?0:s.length,u);if(m)return c.children||c.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(c.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var E=x.range.start.row+1,$=x.range.end.row;this.foldAll(E,$,c.all?1e4:0)}else c.children?($=w?w.end.row:this.getLength(),this.foldAll(a+1,$,c.all?1e4:0)):w&&(c.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var l=this.$toggleFoldWidget(c,{});if(!l){var s=this.getParentFoldRangeData(c,!0);if(l=s.range||s.firstRange,l){c=l.start.row;var u=this.getFoldAt(c,this.getLine(c).length,1);u?this.removeFold(u):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var c=a.start.row,l=a.end.row-c;if(l===0)this.foldWidgets[c]=null;else if(a.action=="remove")this.foldWidgets.splice(c,l+1,null);else{var s=Array(l+1);s.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(a){var c=a.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,r,d){var p=t("../token_iterator").TokenIterator,g=t("../range").Range;function b(){this.findMatchingBracket=function(h,f){if(h.column==0)return null;var o=f||this.getLine(h.row).charAt(h.column-1);if(o=="")return null;var a=o.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var f=this.getLine(h.row),o=!0,a,c=f.charAt(h.column-1),l=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(l||(c=f.charAt(h.column),h={row:h.row,column:h.column+1},l=c&&c.match(/([\(\[\{])|([\)\]\}])/),o=!1),!l)return null;if(l[1]){var s=this.$findClosingBracket(l[1],h);if(!s)return null;a=g.fromPoints(h,s),o||(a.end.column++,a.start.column--),a.cursor=a.end}else{var s=this.$findOpeningBracket(l[2],h);if(!s)return null;a=g.fromPoints(s,h),o||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,f){var o=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,c=!f&&o.charAt(h.column-1),l=c&&c.match(a);if(l||(c=(f===void 0||f)&&o.charAt(h.column),h={row:h.row,column:h.column+1},l=c&&c.match(a)),!l)return null;var s=new g(h.row,h.column-1,h.row,h.column),u=l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h);if(!u)return[s];var m=new g(u.row,u.column,u.row,u.column+1);return[s,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,f,o){var a=this.$brackets[h],c=1,l=new p(this,f.row,f.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=f.column-l.getCurrentTokenColumn()-2,m=s.value;;){for(;u>=0;){var w=m.charAt(u);if(w==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else w==h&&(c+=1);u-=1}do s=l.stepBackward();while(s&&!o.test(s.type));if(s==null)break;m=s.value,u=m.length-1}return null}},this.$findClosingBracket=function(h,f,o){var a=this.$brackets[h],c=1,l=new p(this,f.row,f.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=f.column-l.getCurrentTokenColumn();;){for(var m=s.value,w=m.length;u<w;){var x=m.charAt(u);if(x==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else x==h&&(c+=1);u+=1}do s=l.stepForward();while(s&&!o.test(s.type));if(s==null)break;u=0}return null}},this.getMatchingTags=function(h){var f=new p(this,h.row,h.column),o=this.$findTagName(f);if(o){var a=f.stepBackward();return a.value==="<"?this.$findClosingTag(f,o):this.$findOpeningTag(f,o)}},this.$findTagName=function(h){var f=h.getCurrentToken(),o=!1,a=!1;if(f&&f.type.indexOf("tag-name")===-1)do a?f=h.stepBackward():f=h.stepForward(),f&&(f.value==="/>"?a=!0:f.type.indexOf("tag-name")!==-1&&(o=!0));while(f&&!o);return f},this.$findClosingTag=function(h,f){var o,a=f.value,c=f.value,l=0,s=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=h.stepForward();var u=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length),m=!1;do{if(o=f,o.type.indexOf("tag-close")!==-1&&!m){var w=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(f=h.stepForward(),f){if(f.value===">"&&!m){var w=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(f.type.indexOf("tag-name")!==-1){if(a=f.value,c===a){if(o.value==="<")l++;else if(o.value==="</"&&(l--,l<0)){h.stepBackward();var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);f=h.stepForward();var E=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=h.stepForward()),f&&f.value===">")var $=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(c===a&&f.value==="/>"&&(l--,l<0))var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=x,$=E,w=new g(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(f&&l>=0);if(s&&w&&x&&$&&u&&E)return{openTag:new g(s.start.row,s.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:u,closeTagName:E}},this.$findOpeningTag=function(h,f){var o=h.getCurrentToken(),a=f.value,c=0,l=h.getCurrentTokenRow(),s=h.getCurrentTokenColumn(),u=s+2,m=new g(l,s,l,u);h.stepForward();var w=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=h.stepForward()),!(!f||f.value!==">")){var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(f=o,l=h.getCurrentTokenRow(),s=h.getCurrentTokenColumn(),u=s+f.value.length,o=h.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(o.value==="<"){if(c++,c>0){var E=new g(l,s,l,u),$=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do f=h.stepForward();while(f&&f.value!==">");var k=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else o.value==="</"&&c--}else if(f.value==="/>"){for(var C=0,L=o;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===a){c--;break}else if(L.value==="<")break;L=h.stepBackward(),C++}for(var R=0;R<C;R++)h.stepForward()}}while(o&&c<=0);if($&&k&&m&&x&&E&&w)return{openTag:new g($.start.row,$.start.column,k.end.row,k.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:E,closeTagName:w}}}}r.BracketMatch=b}),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/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/lang"),b=t("./bidihandler").BidiHandler,h=t("./config"),f=t("./lib/event_emitter").EventEmitter,o=t("./selection").Selection,a=t("./mode/text").Mode,c=t("./range").Range,l=t("./line_widgets").LineWidgets,s=t("./document").Document,u=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,x=function(){function P(O,A){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
197
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new u(new a().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(N){_._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new s(O)),this.setDocument(O),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new b(this),h.resetOptions(this),this.setMode(A),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new l(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,O)+1;A>_&&(this.$docRowCache.splice(_,A),this.$screenRowCache.splice(_,A))},P.prototype.$getRowCacheIndex=function(O,A){for(var _=0,N=O.length-1;_<=N;){var B=_+N>>1,U=O[B];if(A>U)_=B+1;else if(A<U)N=B-1;else return B}return _-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var A=O.data;this.$resetRowCache(A.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var A=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var A=new w;A.$undoStack=O.history.undo,A.$redoStack=O.history.redo,A.mark=O.history.mark,A.$rev=O.history.rev;var _=new P(O.value);return O.folds.forEach(function(N){_.addFold("...",c.fromPoints(N.start,N.end))}),_.setAnnotations(O.annotations),_.setBreakpoints(O.breakpoints),_.setMode(O.mode),_.setScrollLeft(O.scrollLeft),_.setScrollTop(O.scrollTop),_.setUndoManager(A),_.selection.fromJSON(O.selection),_},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,A){var _=this.bgTokenizer.getTokens(O),N,B=0;if(A==null){var U=_.length-1;B=this.getLine(O).length}else for(var U=0;U<_.length&&(B+=_[U].value.length,!(B>=A));U++);return N=_[U],N?(N.index=U,N.start=B-N.value.length,N):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var A=this;O.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,A){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+A,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,A)},P.prototype.removeGutterDecoration=function(O,A){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var A=0;A<O.length;A++)this.$breakpoints[O[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[O]=A:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,A,_,N){var B=this.$markerId++,U={range:O,type:_||"line",renderer:typeof _=="function"?_:null,clazz:A,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},P.prototype.addDynamicMarker=function(O,A){if(O.update){var _=this.$markerId++;return O.id=_,O.inFront=!!A,A?(this.$frontMarkers[_]=O,this._signal("changeFrontMarker")):(this.$backMarkers[_]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var A=this.$frontMarkers[O]||this.$backMarkers[O];if(A){var _=A.inFront?this.$frontMarkers:this.$backMarkers;delete _[O],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var A=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,A,_,N){typeof A!="number"&&(_=A,A=O),_||(_="ace_step");var B=new c(O,0,A,1/0);return B.id=this.addMarker(B,_,"fullLine",N),B},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var A=O.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(O,A){var _=this.getLine(O),N=!1;if(A>0&&(N=!!_.charAt(A-1).match(this.tokenRe)),N||(N=!!_.charAt(A).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(_.slice(A-1,A+1)))var B=/\s/;else var B=this.nonTokenRe;var U=A;if(U>0){do U--;while(U>=0&&_.charAt(U).match(B));U++}for(var K=A;K<_.length&&_.charAt(K).match(B);)K++;return new c(O,U,O,K)},P.prototype.getAWordRange=function(O,A){for(var _=this.getWordRange(O,A),N=this.getLine(_.end.row);N.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var A=O.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,A){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var _=O,N=_.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!_){this.$onChangeMode(this.$modes[N]),A&&A();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return A&&A();this.$modes[N]&&!_?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(_),_||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,A){if(A||(this.$modeId=O.$id),this.$mode!==O){var _=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,A||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){h.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(A){A&&A.screenWidth>O&&(O=A.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var A=this.doc.getAllLines(),_=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=A.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}_[te]==null&&(_[te]=this.$getStringScreenWidth(A[te])[0]),_[te]>N&&(N=_[te])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,A){return this.doc.getLines(O,A)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,A){return this.doc.insert(O,A)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,A){return this.doc.removeFullLines(O,A)},P.prototype.undoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var _=O.length-1;_!=-1;_--){var N=O[_];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!A&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var _=0;_<O.length;_++){var N=O[_];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!A&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,A){function _(Z){return A?Z.action!=="insert":Z.action==="insert"}for(var N,B,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!N){_(K)?N=c.fromPoints(K.start,K.end):N=c.fromPoints(K.start,K.start);continue}_(K)?(B=K.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=K.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=K.start,N.compare(B.row,B.column)==-1&&(N=c.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(O,A){return this.doc.replace(O,A)},P.prototype.moveText=function(O,A,_){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=c.fromPoints(A,A);if(!_){this.remove(O);var K=O.start.row-O.end.row,Z=K?-O.end.column:O.start.column-O.end.column;Z&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=Z),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=Z)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,N),B.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(B.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=K,ue.end.row+=K,ue}))}return U},P.prototype.indentRows=function(O,A,_){_=_.replace(/\t/g,this.getTabString());for(var N=O;N<=A;N++)this.doc.insertInLine({row:N,column:0},_)},P.prototype.outdentRows=function(O){for(var A=O.collapseRows(),_=new c(0,0,0,0),N=this.getTabSize(),B=A.start.row;B<=A.end.row;++B){var U=this.getLine(B);_.start.row=B,_.end.row=B;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(_.start.column=K,_.end.column=K+1):(_.start.column=0,_.end.column=K),this.remove(_)}},P.prototype.$moveLines=function(O,A,_){if(O=this.getRowFoldStart(O),A=this.getRowFoldEnd(A),_<0){var N=this.getRowFoldStart(O+_);if(N<0)return 0;var B=N-O}else if(_>0){var N=this.getRowFoldEnd(A+_);if(N>this.doc.getLength()-1)return 0;var B=N-A}else{O=this.$clipRowToDocument(O),A=this.$clipRowToDocument(A);var B=A-O+1}var U=new c(O,0,A,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=B,te.end.row+=B,te}),Z=_==0?this.doc.getLines(O,A):this.doc.removeFullLines(O,A);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,A){return this.$moveLines(O,A,-1)},P.prototype.moveLinesDown=function(O,A){return this.$moveLines(O,A,1)},P.prototype.duplicateLines=function(O,A){return this.$moveLines(O,A,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,A){return A<0?0:Math.min(this.doc.getLine(O).length,A)},P.prototype.$clipPositionToDocument=function(O,A){if(A=Math.max(0,A),O<0)O=0,A=0;else{var _=this.doc.getLength();O>=_?(O=_-1,A=this.doc.getLine(_-1).length):A=Math.min(this.doc.getLine(O).length,A)}return{row:O,column:A}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var A=this.doc.getLength()-1;return O.end.row>A?(O.end.row=A,O.end.column=this.doc.getLine(A).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,A){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:O,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,A){var _=this.$wrapLimitRange;_.max<0&&(_={min:A,max:A});var N=this.$constrainWrapLimit(O,_.min,_.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,A,_){return A&&(O=Math.max(A,O)),_&&(O=Math.min(_,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var A=this.$useWrapMode,_=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(_==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(B.row),ae=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var ce=Array(Z);ce.unshift(U,0);var fe=A?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ce);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var $e=ne.range.compareInside(N.row,N.column);$e==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-N.column))):$e==-1&&(ne.addRemoveChars(U,0,B.column-N.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),_==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(O,A){this.$rowLengthCache[O]=null,this.$rowLengthCache[A]=null},P.prototype.$updateWrapData=function(O,A){var _=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(A=Math.min(A,_.length-1);te<=A;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,K.length),ce[0]=k;for(var fe=1;fe<ce.length;fe++)ce[fe]=C}else ce=this.$getDisplayTokens(_[ne].substring(ue,ae),K.length);K=K.concat(ce)}).bind(this),Z.end.row,_[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),te=Z.end.row+1):(K=this.$getDisplayTokens(_[te]),B[te]=this.$computeWrapSplits(K,U,N),te++)},P.prototype.$computeWrapSplits=function(O,A,_){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=A<=Math.max(2*_,8)||te===!1?0:Math.floor(A/2);function ne(){var $e=0;if(he===0)return $e;if(te)for(var Te=0;Te<O.length;Te++){var Ee=O[Te];if(Ee==R)$e+=1;else if(Ee==F)$e+=_;else{if(Ee==I)continue;break}}return Z&&te!==!1&&($e+=_),Math.min($e,he)}function ae($e){for(var Te=$e-U,Ee=U;Ee<$e;Ee++){var Qe=O[Ee];(Qe===12||Qe===2)&&(Te-=1)}N.length||(ue=ne(),N.indent=ue),K+=Te,N.push(K),U=$e}for(var ue=0;B-U>A-ue;){var ce=U+A-ue;if(O[ce-1]>=R&&O[ce]>=R){ae(ce);continue}if(O[ce]==k||O[ce]==C){for(ce;ce!=U-1&&O[ce]!=k;ce--);if(ce>U){ae(ce);continue}for(ce=U+A,ce;ce<O.length&&O[ce]==C;ce++);if(ce==O.length)break;ae(ce);continue}for(var fe=Math.max(ce-(A-(A>>2)),U-1);ce>fe&&O[ce]<k;)ce--;if(Z){for(;ce>fe&&O[ce]<k;)ce--;for(;ce>fe&&O[ce]==L;)ce--}else for(;ce>fe&&O[ce]<R;)ce--;if(ce>fe){ae(++ce);continue}ce=U+A,O[ce]==$&&ce--,ae(ce-ue)}return N},P.prototype.$getDisplayTokens=function(O,A){var _=[],N;A=A||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(_.length+A),_.push(F);for(var K=1;K<N;K++)_.push(I)}else U==32?_.push(R):U>39&&U<48||U>57&&U<64?_.push(L):U>=4352&&H(U)?_.push(E,$):_.push(E)}return _},P.prototype.$getStringScreenWidth=function(O,A,_){if(A==0)return[0,0];A==null&&(A=1/0),_=_||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?_+=this.getScreenTabSize(_):N>=4352&&H(N)?_+=2:_+=1,!(_>A));B++);return[_,B]},P.prototype.getRowLength=function(O){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?A:this.$wrapData[O].length+A},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE),_=this.$wrapData[A.row];return _.length&&_[0]<A.column?_.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},P.prototype.getDocumentLastRowColumn=function(O,A){var _=this.documentToScreenRow(O,A);return this.getScreenLastRowColumn(_)},P.prototype.getDocumentLastRowColumnPosition=function(O,A){var _=this.documentToScreenRow(O,A);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,A){return this.screenToDocumentPosition(O,A).row},P.prototype.screenToDocumentColumn=function(O,A){return this.screenToDocumentPosition(O,A).column},P.prototype.screenToDocumentPosition=function(O,A,_){if(O<0)return{row:0,column:0};var N,ae=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ue=O>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,fe=this.getNextFoldLine(ae),$e=fe?fe.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ce));)ne+=K,ae++,ae>$e&&(ae=fe.end.row+1,fe=this.getNextFoldLine(ae,fe),$e=fe?fe.start.row:1/0),ue&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(fe&&fe.start.row<=ae)N=this.getFoldDisplayLine(fe),ae=fe.start.row;else{if(ne+K<=O||ae>ce)return{row:ce,column:this.getLine(ce).length};N=this.getLine(ae),fe=null}var Te=0,Ee=Math.floor(O-ne);if(this.$useWrapMode){var Qe=this.$wrapData[ae];Qe&&(U=Qe[Ee],Ee>0&&Qe.length&&(Te=Qe.indent,B=Qe[Ee-1]||Qe[Qe.length-1],N=N.substring(B)))}return _!==void 0&&this.$bidiHandler.isBidiRow(ne+Ee,ae,Ee)&&(A=this.$bidiHandler.offsetToCol(_)),B+=this.$getStringScreenWidth(N,A-Te)[1],this.$useWrapMode&&B>=U&&(B=U-1),fe?fe.idxToPosition(B):{row:ae,column:B}},P.prototype.documentToScreenPosition=function(O,A){if(typeof A>"u")var _=this.$clipPositionToDocument(O.row,O.column);else _=this.$clipPositionToDocument(O,A);O=_.row,A=_.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,A,1),B&&(O=B.start.row,A=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<O;){if(he>=ce){if(U=ue.end.row+1,U>O)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var fe="";ue&&he>=ce?(fe=this.getFoldDisplayLine(ue,O,A),N=ue.start.row):(fe=this.getLine(O).substring(0,A),N=O);var $e=0;if(this.$useWrapMode){var Te=this.$wrapData[N];if(Te){for(var Ee=0;fe.length>=Te[Ee];)ne++,Ee++;fe=fe.substring(Te[Ee-1]||0,fe.length),$e=Ee>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:$e+this.$getStringScreenWidth(fe)[0]}},P.prototype.documentToScreenColumn=function(O,A){return this.documentToScreenPosition(O,A).column},P.prototype.documentToScreenRow=function(O,A){return this.documentToScreenPosition(O,A).row},P.prototype.getScreenLength=function(){var O=0,A=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,N=0,B=0,A=this.$foldData[B++],U=A?A.start.row:1/0;N<_;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=A.end.row+1,A=this.$foldData[B++],U=A?A.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)A=Z[B],O-=A.end.row-A.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,_,N){if(_===0)return[0,0];_||(_=1/0),N=N||0;var B,U;for(U=0;U<A.length&&(B=A.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>_));U++);return[N,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(O.row);return A[O.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P}();x.$uid=0,x.prototype.$modes=h.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=H,p.implement(x.prototype,f);var E=1,$=2,k=3,C=4,L=9,R=10,F=11,I=12;function H(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}t("./edit_session/folding").Folding.call(x.prototype),t("./edit_session/bracket_match").BracketMatch.call(x.prototype),h.defineOptions(x.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,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(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,r,d){var p=t("./lib/lang"),g=t("./lib/oop"),b=t("./range").Range,h=function(){function c(){this.$options={}}return c.prototype.set=function(l){return g.mixin(this.$options,l),this},c.prototype.getOptions=function(){return p.copyObject(this.$options)},c.prototype.setOptions=function(l){this.$options=l},c.prototype.find=function(l){var s=this.$options,u=this.$matchIterator(l,s);if(!u)return!1;var m=null;return u.forEach(function(w,x,E,$){return m=new b(w,x,E,$),x==$&&s.start&&s.start.start&&s.skipCurrent!=!1&&m.isEqual(s.start)?(m=null,!1):!0}),m},c.prototype.findAll=function(l){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var u=s.range,m=u?l.getLines(u.start.row,u.end.row):l.doc.getAllLines(),w=[],x=s.re;if(s.$isMultiLine){var E=x.length,$=m.length-E,k;e:for(var C=x.offset||0;C<=$;C++){for(var L=0;L<E;L++)if(m[C+L].search(x[L])==-1)continue e;var R=m[C],F=m[C+E-1],I=R.length-R.match(x[0])[0].length,H=F.match(x[E-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new b(C,I,C+E-1,H)),E>2&&(C=C+E-2))}}else for(var P,O=0;O<m.length;O++)if(this.$isMultilineSearch(s)){var A=m.length-1;if(P=this.$multiLineForward(l,x,O,A),P){var _=P.endRow<=A?P.endRow-1:A;_>O&&(O=_),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=p.getMatchOffsets(m[O],x);for(var L=0;L<P.length;L++){var N=P[L];w.push(new b(O,N.offset,O,N.offset+N.length))}}if(u){for(var B=u.start.column,U=u.end.column,O=0,L=w.length-1;O<L&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=u.end.row-u.start.row;O<L&&w[L].end.column>U&&w[L].end.row==K;)L--;for(w=w.slice(O,L+1),O=0,L=w.length;O<L;O++)w[O].start.row+=u.start.row,w[O].end.row+=u.start.row}return w},c.prototype.parseReplaceString=function(l){for(var s={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},u="",m=0,w=l.length;m<w;m++){var x=l.charCodeAt(m);if(x===s.Backslash){if(m++,m>=w){u+="\\";break}var E=l.charCodeAt(m);switch(E){case s.Backslash:u+="\\";break;case s.n:u+=`
|
199
|
+
`;break;case s.t:u+=" ";break}continue}if(x===s.DollarSign){if(m++,m>=w){u+="$";break}var $=l.charCodeAt(m);if($===s.DollarSign){u+="$$";continue}if($===s.Digit0||$===s.Ampersand){u+="$&";continue}if(s.Digit1<=$&&$<=s.Digit9){u+="$"+l[m];continue}}u+=l[m]}return u||l},c.prototype.replace=function(l,s){var u=this.$options,m=this.$assembleRegExp(u);if(u.$isMultiLine)return s;if(m){var w=this.$isMultilineSearch(u);w&&(l=l.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var x=m.exec(l);if(!x||!w&&x[0].length!=l.length)return null;if(s=u.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=l.replace(m,s),u.preserveCase){s=s.split("");for(var E=Math.min(l.length,l.length);E--;){var $=l[E];$&&$.toLowerCase()!=$?s[E]=s[E].toUpperCase():s[E]=s[E].toLowerCase()}s=s.join("")}return s}},c.prototype.$assembleRegExp=function(l,s){if(l.needle instanceof RegExp)return l.re=l.needle;var u=l.needle;if(!l.needle)return l.re=!1;l.regExp||(u=p.escapeRegExp(u));var m=l.caseSensitive?"gm":"gmi";try{new RegExp(u,"u"),l.$supportsUnicodeFlag=!0,m+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(u=f(u,l)),l.$isMultiLine=!s&&/[\n\r]/.test(u),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(u,m);try{var w=new RegExp(u,m)}catch{w=!1}return l.re=w},c.prototype.$assembleMultilineRegExp=function(l,s){for(var u=l.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),m=[],w=0;w<u.length;w++)try{m.push(new RegExp(u[w],s))}catch{return!1}return m},c.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},c.prototype.$multiLineForward=function(l,s,u,m){for(var w,x=a(l,u),E=u;E<=m;){for(var $=0;$<x&&!(E>m);$++){var k=l.getLine(E++);w=w==null?k:w+`
|
203
|
+
`+k}var C=s.exec(w);if(s.lastIndex=0,C){var L=w.slice(0,C.index).split(`
|
204
|
+
`),R=C[0].split(`
|
205
|
+
`),F=u+L.length-1,I=L[L.length-1].length,H=F+R.length-1,P=R.length==1?I+R[0].length:R[R.length-1].length;return{startRow:F,startCol:I,endRow:H,endCol:P}}}return null},c.prototype.$multiLineBackward=function(l,s,u,m,w){for(var x,E=a(l,m),$=l.getLine(m).length-u,k=m;k>=w;){for(var C=0;C<E&&k>=w;C++){var L=l.getLine(k--);x=x==null?L:L+`
|
206
|
+
`+x}var R=o(x,s,$);if(R){var F=x.slice(0,R.index).split(`
|
207
|
+
`),I=R[0].split(`
|
208
|
+
`),H=k+F.length,P=F[F.length-1].length,O=H+I.length-1,A=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:A}}}return null},c.prototype.$matchIterator=function(l,s){var u=this.$assembleRegExp(s);if(!u)return!1;var m=this.$isMultilineSearch(s),w=this.$multiLineForward,x=this.$multiLineBackward,E=s.backwards==!0,$=s.skipCurrent!=!1,k=u.unicode,C=s.range,L=s.start;L||(L=C?C[E?"end":"start"]:l.selection.getRange()),L.start&&(L=L[$!=E?"end":"start"]);var R=C?C.start.row:0,F=C?C.end.row:l.getLength()-1;if(E)var I=function(O){var A=L.row;if(!P(A,L.column,O)){for(A--;A>=R;A--)if(P(A,Number.MAX_VALUE,O))return;if(s.wrap!=!1){for(A=F,R=L.row;A>=R;A--)if(P(A,Number.MAX_VALUE,O))return}}};else var I=function(O){var A=L.row;if(!P(A,L.column,O)){for(A=A+1;A<=F;A++)if(P(A,0,O))return;if(s.wrap!=!1){for(A=R,F=L.row;A<=F;A++)if(P(A,0,O))return}}};if(s.$isMultiLine)var H=u.length,P=function(O,A,_){var N=E?O-H+1:O;if(!(N<0||N+H>l.getLength())){var B=l.getLine(N),U=B.search(u[0]);if(!(!E&&U<A||U===-1)){for(var K=1;K<H;K++)if(B=l.getLine(N+K),B.search(u[K])==-1)return;var Z=B.match(u[H-1])[0].length;if(!(E&&Z>A)&&_(N,U,N+H-1,Z))return!0}}};else if(E)var P=function(O,A,_){if(m){var N=x(l,u,A,O,R);if(!N)return!1;if(_(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=l.getLine(O),U=[],K,Z=0;for(u.lastIndex=0;K=u.exec(B);){var te=K[0].length;if(Z=K.index,!te){if(Z>=B.length)break;u.lastIndex=Z+=p.skipEmptyMatch(B,Z,k)}if(K.index+te>A)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(_(O,ne,O,ne+te))return!0}}};else var P=function(O,A,_){if(u.lastIndex=A,m){var N=w(l,u,O,F);if(N){var B=N.endRow<=F?N.endRow-1:F;B>O&&(O=B)}if(!N)return!1;if(_(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=l.getLine(O),K,Z;Z=u.exec(U);){var te=Z[0].length;if(K=Z.index,_(O,K,O,K+te))return!0;if(!te&&(u.lastIndex=K+=p.skipEmptyMatch(U,K,k),K>=U.length))return!1}};return{forEach:I}},c}();function f(c,l){var s=p.supportsLookbehind();function u(E,$){$===void 0&&($=!0);var k=s&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||l.regExp?s&&l.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(c),w=m[0],x=m[m.length-1];return u(w)+c+u(x,!1)}function o(c,l,s){for(var u=null,m=0;m<=c.length;){l.lastIndex=m;var w=l.exec(c);if(!w)break;var x=w.index+w[0].length;if(x>c.length-s)break;(!u||x>u.index+u[0].length)&&(u=w),m=w.index+1}return u}function a(c,l){var s=5e3,u={row:l,column:0},m=c.doc.positionToIndex(u),w=m+s,x=c.doc.indexToPosition(w),E=x.row;return E+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,d){var p=this&&this.__extends||function(){var c=function(l,s){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(u[w]=m[w])},c(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");c(l,s);function u(){this.constructor=l}l.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),g=t("../lib/keys"),b=t("../lib/useragent"),h=g.KEY_MODS,f=function(){function c(l,s){this.$init(l,s,!1)}return c.prototype.$init=function(l,s,u){this.platform=s||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=u},c.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},c.prototype.removeCommand=function(l,s){var u=l&&(typeof l=="string"?l:l.name);l=this.commands[u],s||delete this.commands[u];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==l)delete m[w];else if(Array.isArray(x)){var E=x.indexOf(l);E!=-1&&(x.splice(E,1),x.length==1&&(m[w]=x[0]))}}},c.prototype.bindKey=function(l,s,u){if(typeof l=="object"&&l&&(u==null&&(u=l.position),l=l[this.platform]),!!l){if(typeof s=="function")return this.addCommand({exec:s,bindKey:l,name:s.name||l});l.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),L=h[C.hashId]+C.key;w+=(w?" ":"")+L,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(m),$=h[E.hashId]+E.key;this._addCommandToBinding(w+$,s,u)},this)}},c.prototype._addCommandToBinding=function(l,s,u){var m=this.commandKeyBinding,w;if(!s)delete m[l];else if(!m[l]||this.$singleCommand)m[l]=s;else{Array.isArray(m[l])?(w=m[l].indexOf(s))!=-1&&m[l].splice(w,1):m[l]=[m[l]],typeof u!="number"&&(u=o(s));var x=m[l];for(w=0;w<x.length;w++){var E=x[w],$=o(E);if($>u)break}x.splice(w,0,s)}},c.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(s){var u=l[s];if(u){if(typeof u=="string")return this.bindKey(u,s);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=s),this.addCommand(u))}},this)},c.prototype.removeCommands=function(l){Object.keys(l).forEach(function(s){this.removeCommand(l[s])},this)},c.prototype.bindKeys=function(l){Object.keys(l).forEach(function(s){this.bindKey(s,l[s])},this)},c.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},c.prototype.parseKeys=function(l){var s=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),u=s.pop(),m=g[u];if(g.FUNCTION_KEYS[m])u=g.FUNCTION_KEYS[m].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var w=0,x=s.length;x--;){var E=g.KEY_MODS[s[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+s[x]+" in "+l),!1;w|=E}return{key:u,hashId:w}},c.prototype.findKeyCommand=function(l,s){var u=h[l]+s;return this.commandKeyBinding[u]},c.prototype.handleKeyboard=function(l,s,u,m){if(!(m<0)){var w=h[s]+u,x=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,x=this.commandKeyBinding[l.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!s||s==4)&&u.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(s==-1||m>0)&&(l.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(l,s){return s.$keyChain||""},c}();function o(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var a=function(c){p(l,c);function l(s,u){var m=c.call(this,s,u)||this;return m.$singleCommand=!0,m}return l}(f);a.call=function(c,l,s){f.prototype.$init.call(c,l,s,!0)},f.call=function(c,l,s){f.prototype.$init.call(c,l,s,!1)},r.HashHandler=a,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,r,d){var p=this&&this.__extends||function(){var o=function(a,c){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,s){l.__proto__=s}||function(l,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(l[u]=s[u])},o(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");o(a,c);function l(){this.constructor=a}a.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),g=t("../lib/oop"),b=t("../keyboard/hash_handler").MultiHashHandler,h=t("../lib/event_emitter").EventEmitter,f=function(o){p(a,o);function a(c,l){var s=o.call(this,l,c)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),s}return a.prototype.exec=function(c,l,s){if(Array.isArray(c)){for(var u=c.length;u--;)if(this.exec(c[u],l,s))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var m={editor:l,command:c,args:s};return this.canExecute(c,l)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(c,l){return typeof c=="string"&&(c=this.commands[c]),!(!c||l&&l.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(l))},a.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._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(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,c):this.exec(l[0],c,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(c){return c.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a}(b);g.implement(f.prototype,h),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,r,d){var p=t("../lib/lang"),g=t("../config"),b=t("../range").Range;function h(o,a){return{win:o,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(o){g.loadModule("ace/ext/settings_menu",function(a){a.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(o){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(o){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(o,a){typeof a=="number"&&!isNaN(a)&&o.gotoLine(a),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(o){g.loadModule("ace/ext/searchbox",function(a){a.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(o,a){o.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(o,a){o.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(o,a){o.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(o,a){o.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var a=o.$copyWithEmptySelection&&o.selection.isEmpty(),c=a?o.selection.getLineRange():o.selection.getRange();o._emit("cut",c),c.isEmpty()||o.session.remove(c),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,a){o.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(o){g.loadModule("ace/ext/searchbox",function(a){a.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(o){var a=o.selection.getRange();a.start.column=0,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(o){var a=o.selection.getRange();a.end.column=Number.MAX_VALUE,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,a){o.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,a){o.insert(p.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var a=o.selection.getRange();a.start.column=a.end.column=0,a.end.row++,o.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(o){for(var a=o.selection.isBackwards(),c=a?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),l=a?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),s=o.session.doc.getLine(c.row).length,u=o.session.doc.getTextRange(o.selection.getRange()),m=u.replace(/\n\s*/," ").length,w=o.session.doc.getLine(c.row),x=c.row+1;x<=l.row+1;x++){var E=p.stringTrimLeft(p.stringTrimRight(o.session.doc.getLine(x)));E.length!==0&&(E=" "+E),w+=E}l.row+1<o.session.doc.getLength()-1&&(w+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new b(c.row,0,l.row+2,0),w),m>0?(o.selection.moveCursorTo(c.row,c.column),o.selection.selectTo(c.row,c.column+m)):(s=o.session.doc.getLine(c.row).length>s?s+1:s,o.selection.moveCursorTo(c.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(o){var a=o.session.doc.getLength()-1,c=o.session.doc.getLine(a).length,l=o.selection.rangeList.ranges,s=[];l.length<1&&(l=[o.selection.getRange()]);for(var u=0;u<l.length;u++)u==l.length-1&&(l[u].end.row===a&&l[u].end.column===c||s.push(new b(l[u].end.row,l[u].end.column,a,c))),u===0?l[u].start.row===0&&l[u].start.column===0||s.push(new b(0,0,l[u].start.row,l[u].start.column)):s.push(new b(l[u-1].end.row,l[u-1].end.column,l[u].start.row,l[u].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var u=0;u<s.length;u++)o.selection.addRange(s[u],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var a=o.getCursorPosition();o.selection.moveTo(a.row-1,Number.MAX_VALUE),o.insert(`
|
210
|
+
`),a.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(t,r,d){var p=t("../lib/keys"),g=t("../mouse/default_gutter_handler").GutterTooltip,b=function(){function f(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new g(this.editor)}return f.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},f.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},f.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===p.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=p.enter)return;o.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var c=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldLaneWidget(c),s=this.$findNearestAnnotation(c);if(!(l===null&&s===null)){var u=this.$findClosestNumber(l,s,c);if(u===l)if(this.activeLane="fold",this.activeRowIndex=l,this.$isCustomWidgetVisible(l)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=s,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new h(o,this))}).bind(this),10)},f.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===p.tab){o.preventDefault();return}if(o.keyCode===p.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===p.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===p.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===p.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===p.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===p.enter||o.keyCode===p.space){switch(o.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),c=this.editor.session.$gutterCustomWidgets[a];if(c)c.callbacks&&c.callbacks.onClick&&c.callbacks.onClick(o,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var l=this.lines.cells[this.activeRowIndex].element.childNodes[2],s=l.getBoundingClientRect(),u=this.annotationTooltip.getElement().style;u.left=s.right+"px",u.top=s.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},f.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},f.prototype.$isFoldWidgetVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),c=this.$getFoldWidget(o).style.display!=="none";return a&&c},f.prototype.$isCustomWidgetVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),c=!!this.$getCustomWidget(o);return a&&c},f.prototype.$isAnnotationVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),c=this.$getAnnotation(o).style.display!=="none";return a&&c},f.prototype.$getFoldWidget=function(o){var a=this.lines.get(o),c=a.element;return c.childNodes[1]},f.prototype.$getCustomWidget=function(o){var a=this.lines.get(o),c=a.element;return c.childNodes[3]},f.prototype.$getAnnotation=function(o){var a=this.lines.get(o),c=a.element;return c.childNodes[2]},f.prototype.$findNearestFoldLaneWidget=function(o){if(this.$isCustomWidgetVisible(o)||this.$isFoldWidgetVisible(o))return o;for(var a=0;o-a>0||o+a<this.lines.getLength()-1;){if(a++,o-a>=0&&this.$isCustomWidgetVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(o+a))return o+a;if(o-a>=0&&this.$isFoldWidgetVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+a))return o+a}return null},f.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var a=0;o-a>0||o+a<this.lines.getLength()-1;){if(a++,o-a>=0&&this.$isAnnotationVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+a))return o+a}return null},f.prototype.$focusFoldWidget=function(o){if(o!=null){var a=this.$getFoldWidget(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},f.prototype.$focusCustomWidget=function(o){if(o!=null){var a=this.$getCustomWidget(o);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},f.prototype.$focusAnnotation=function(o){if(o!=null){var a=this.$getAnnotation(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},f.prototype.$blurFoldWidget=function(o){var a=this.$getFoldWidget(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},f.prototype.$blurCustomWidget=function(o){var a=this.$getCustomWidget(o);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},f.prototype.$blurAnnotation=function(o){var a=this.$getAnnotation(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},f.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$findClosestNumber=function(o,a,c){return o===null?a:a===null||Math.abs(c-o)<=Math.abs(c-a)?o:a},f.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var c=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(c===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$isCustomWidgetVisible(c)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},f.prototype.$rowIndexToRow=function(o){var a=this.lines.get(o);return a?a.row:null},f.prototype.$rowToRowIndex=function(o){for(var a=0;a<this.lines.getLength();a++){var c=this.lines.get(a);if(c.row==o)return a}return null},f}();r.GutterKeyboardHandler=b;var h=function(){function f(o,a){this.gutterKeyboardHandler=a,this.domEvent=o}return f.prototype.getKey=function(){return p.keyCodeToString(this.domEvent.keyCode)},f.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},f.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},f.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},f}();r.GutterKeyboardEvent=h}),ace.define("ace/editor",["require","exports","module","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/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(t,r,d){var p=this&&this.__values||function(A){var _=typeof Symbol=="function"&&Symbol.iterator,N=_&&A[_],B=0;if(N)return N.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&B>=A.length&&(A=void 0),{value:A&&A[B++],done:!A}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/lang"),f=t("./lib/useragent"),o=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,c=t("./mouse/fold_handler").FoldHandler,l=t("./keyboard/keybinding").KeyBinding,s=t("./edit_session").EditSession,u=t("./search").Search,m=t("./range").Range,w=t("./lib/event_emitter").EventEmitter,x=t("./commands/command_manager").CommandManager,E=t("./commands/default_commands").commands,$=t("./config"),k=t("./token_iterator").TokenIterator,C=t("./keyboard/gutter_handler").GutterKeyboardHandler,L=t("./config").nls,R=t("./clipboard"),F=t("./lib/keys"),I=t("./lib/event"),H=t("./tooltip").HoverTooltip,P=function(){function A(_,N,B){this.session,this.$toDestroy=[];var U=_.getContainerElement();this.container=U,this.renderer=_,this.id="editor"+ ++A.$uid,this.commands=new x(f.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new o(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new c(this)),this.keyBinding=new l(this),this.$search=new u().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new s("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(_){this.session.startOperation(_)},A.prototype.endOperation=function(_){this.session.endOperation(_)},A.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},A.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&_.command.name==N.command.name;if(_.command.name=="insertstring"){var K=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(_,N){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var B=this;$.loadModule(["keybinding",_],function(U){B.$keybindingId==_&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),N&&N()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){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),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.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=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),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(_)),this._signal("changeSession",{session:_,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(_,N){return this.session.doc.setValue(_),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),_},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(_){this.renderer.onResize(_)},A.prototype.setTheme=function(_,N){this.renderer.setTheme(_,N)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(_){this.renderer.setStyle(_)},A.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(_){this.setOption("fontSize",_)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var N=_.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var B=_.getCursorPosition(),U=_.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(_),Z=N.getMatchingBracketRanges(B,K);if(!Z){var te=new k(N,B.row,B.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(_.session)),!Z){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(m.comparePoints(Z[0].end,Z[1].start)==0?Z=[m.fromPoints(Z[0].start,Z[1].end)]:m.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[m.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return N.addMarker(ue,ae,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},A.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(_){var N=this.session.$useWrapMode,B=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,B,N),this._signal("change",_),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(_){var N=_.data;this.renderer.updateLines(N.first,N.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),_.$highlightLineMarker&&!N)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&N){var B=new m(N.row,N.column,N.row,1/0);B.id=_.addMarker(B,"ace_active-line","screenLine"),_.$highlightLineMarker=B}else N&&(_.$highlightLineMarker.start.row=N.row,_.$highlightLineMarker.end.row=N.row,_.$highlightLineMarker.start.column=N.column,_._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(_){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,K=_.getLine(N.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(te.test(he))return te}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var _=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!_&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(_+=this.session.getLine(Z.start.row)+N)}}var te={text:_};return this._signal("copy",te),R.lineMode=B?te.text:!1,te.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(_,N){var B={text:_,event:N};this.commands.exec("paste",this,B)},A.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var N=_.text,B=N===R.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,N);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},A.prototype.execCommand=function(_,N){return this.commands.exec(_,this,N)},A.prototype.insert=function(_,N){var B=this.session,U=B.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=U.transformAction(B.getState(K.row),"insertion",this,B,_);Z&&(_!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=Z.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
|
211
|
+
`)==-1){var te=m.fromPoints(K,K);te.end.column+=_.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(_==`
|
212
|
+
`||_==`\r
|
213
|
+
`){var ue=B.getLine(K.row);if(K.column>ue.search(/\S|$/)){var he=ue.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=B.getState(K.row),ue=B.getLine(K.row),ce=U.checkOutdent(ae,ue,_);if(B.insert(K,_),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new m(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new m(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(_)){var fe=U.getNextLineIndent(ae,ue.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},fe)}ce&&U.autoOutdent(ae,B,K.row)}},A.prototype.autoIndent=function(){for(var _=this.session,N=_.getMode(),B=this.selection.isEmpty()?[new m(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=_.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,ae=B[he].end.row,ue=ne;ue<=ae;ue++){ue>0&&(U=_.getState(ue-1),K=_.getLine(ue-1),Z=N.getNextLineIndent(U,K,te));var ce=_.getLine(ue),fe=N.$getIndent(ce);if(Z!==fe){if(fe.length>0){var $e=new m(ue,0,ue,fe.length);_.remove($e)}Z.length>0&&_.insert({row:ue,column:0},Z)}N.autoOutdent(U,_,ue)}},A.prototype.onTextInput=function(_,N){if(!N)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,_,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},A.prototype.applyComposition=function(_,N){if(N.extendLeft||N.extendRight){var B=this.selection.getRange();B.start.column-=N.extendLeft,B.end.column+=N.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!_&&!B.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},A.prototype.onCommandKey=function(_,N,B){return this.keyBinding.onCommandKey(_,N,B)},A.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(N.start.row),K=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var Z=B.getTextRange(N);if(Z[Z.length-1]==`
|
214
|
+
`){var te=B.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(_)},A.prototype.setGhostText=function(_,N){this.renderer.setGhostText(_,N)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),N=_.column;if(N!==0){var B=this.session.getLine(_.row),U,K;N<B.length?(U=B.charAt(N)+B.charAt(N-1),K=new m(_.row,N-1,_.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new m(_.row,N-2,_.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},A.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(_)},A.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(_)},A.prototype.indent=function(){var _=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=_.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();_.indentRows(B.first,B.last," ");return}}var K=_.getLine(N.start.row),Z=N.start,te=_.getTabSize(),he=_.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=h.stringRepeat(" ",ne);else{for(var ne=he%te;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),ae=" "}return this.insert(ae)},A.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},A.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},A.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),N=this.session,B=[],U=_.first;U<=_.last;U++)B.push(N.getLine(U));B.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new m(0,0,0,0),U=_.first;U<=_.last;U++){var Z=N.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,N.replace(K,B[U-_.first])}},A.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,N.first,N.last)},A.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),N=this.session.getState(_.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,_)},A.prototype.getNumberAt=function(_,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(_);B.lastIndex<N;){var K=B.exec(U);if(K.index<=N&&K.index+K[0].length>=N){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},A.prototype.modifyNumber=function(_){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new m(N,B-1,N,B),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(N,B);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&B<te?_*=Math.pow(10,Z.end-B-1):_*=Math.pow(10,Z.end-B),ne+=_,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ue=new m(N,Z.start,N,Z.end);this.session.replace(ue,ae),this.moveCursorTo(N,Math.max(Z.start+1,B+ae.length-Z.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var _=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Ye,gt){he=te+Ye.length,Z>=te&&Z<=he&&(B=Ye,ne.selection.clearSelection(),ne.moveCursorTo(_,te+U),ne.selection.selectTo(_,he+U)),te=he});for(var ae=this.$toggleWordPairs,ue,ce=0;ce<ae.length;ce++)for(var fe=ae[ce],$e=0;$e<=1;$e++){var Te=+!$e,Ee=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(fe[$e])+")\\s?$","i"));if(Ee){var Qe=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Ee[1])+")($|\\s)","g"));Qe&&(ue=B.replace(new RegExp(h.escapeRegExp(fe[$e]),"i"),function(Ye){var gt=fe[Te];return Ye.toUpperCase()==Ye?gt=gt.toUpperCase():Ye.charAt(0).toUpperCase()==Ye.charAt(0)&&(gt=gt.substr(0,0)+fe[Te].charAt(0).toUpperCase()+gt.substr(1)),gt}),this.insert(ue),ue="")}}},A.prototype.findLinkAt=function(_,N){var B,U,K=this.session.getLine(_),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ue=p(Z),ce=ue.next();!ce.done;ce=ue.next()){var fe=ce.value;if(ne=he+fe.length,te>=he&&te<=ne&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=fe.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch($e){B={error:$e}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(B)throw B.error}}return ae},A.prototype.openLink=function(){var _=this.selection.getCursor(),N=this.findLinkAt(_.row,_.column);return N&&window.open(N,"_blank"),N!=null},A.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var _=this.selection,N=this.session,B=_.getRange(),U=_.isBackwards();if(B.isEmpty()){var K=B.start.row;N.duplicateLines(K,K)}else{var Z=U?B.start:B.end,te=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=te,_.setSelectionRange(B,U)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(_,N,B){return this.session.moveText(_,N,B)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(_,N){var B,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();B=this.$getSelectedRows(Z),U=this.session.$moveLines(B.first,B.last,N?0:_),N&&_==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ue=0;ue<ae;ue++){var ce=ue;te[ue].moveBy(he,0),B=this.$getSelectedRows(te[ue]);for(var fe=B.first,$e=B.last;++ue<ae;){ne&&te[ue].moveBy(ne,0);var Te=this.$getSelectedRows(te[ue]);if(N&&Te.first!=$e||!N&&Te.first>$e+1)break;$e=Te.last}for(ue--,he=this.session.$moveLines(fe,$e,N?0:_),N&&_==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},A.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},A.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(_,N){var B=this.renderer,U=this.renderer.layerConfig,K=_*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):N===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,K*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(Z)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},A.prototype.scrollToLine=function(_,N,B,U){this.renderer.scrollToLine(_,N,B,U)},A.prototype.centerSelection=function(){var _=this.getSelectionRange(),N={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(N,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(_,N){this.selection.moveCursorTo(_,N)},A.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},A.prototype.jumpToMatching=function(_,N){var B=this.getCursorPosition(),U=new k(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ue=B.column-te.start,ce,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(fe[te.value[ue]])switch(ce=fe[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ce])&&(ae[ce]=0),te.value[ue]){case"(":case"[":case"{":ae[ce]++;break;case")":case"]":case"}":ae[ce]--,ae[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var $e,Te;if(he==="bracket")$e=this.session.getBracketRange(B),$e||($e=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),Te=$e.start,(N||Te.row===B.row&&Math.abs(Te.column-B.column)<2)&&($e=this.session.getBracketRange(Te)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if($e=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),$e.compare(B.row,B.column)===0){var Ee=this.session.getMatchingTags(B);Ee&&(Ee.openTag.contains(B.row,B.column)?($e=Ee.closeTag,Te=$e.start):($e=Ee.openTag,Ee.closeTag.start.row===B.row&&Ee.closeTag.start.column===B.column?Te=$e.end:Te=$e.start))}Te=Te||$e.start}Te=$e&&$e.cursor||Te,Te&&(_?$e&&N?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},A.prototype.gotoLine=function(_,N,B){this.selection.clearSelection(),this.session.unfold({row:_-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,N||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,B)},A.prototype.navigateTo=function(_,N){this.selection.moveTo(_,N)},A.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},A.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},A.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(_,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,_)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},A.prototype.replaceAll=function(_,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=B.length-1;Z>=0;--Z)this.$tryReplace(B[Z],_)&&U++;return this.selection.setSelectionRange(K),U},A.prototype.$tryReplace=function(_,N){var B=this.session.getTextRange(_);return N=this.$search.replace(B,N),N!==null?(_.end=this.session.replace(_,N),_):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(_,N,B){N||(N={}),typeof _=="string"||_ instanceof RegExp?N.needle=_:typeof _=="object"&&g.mixin(N,_);var U=this.selection.getRange();N.needle==null&&(_=this.session.getTextRange(U)||this.$search.$options.needle,_||(U=this.session.getWordRange(U.start.row,U.start.column),_=this.session.getTextRange(U)),this.$search.set({needle:_})),this.$search.set(N),N.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(N.preventScroll)return K;if(K)return this.revealRange(K,B),K;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},A.prototype.findNext=function(_,N){this.find({skipCurrent:!0,backwards:!1},_,N)},A.prototype.findPrevious=function(_,N){this.find(_,{skipCurrent:!0,backwards:!0},N)},A.prototype.revealRange=function(_,N){this.session.unfold(_),this.selection.setSelectionRange(_);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),N!==!1&&this.renderer.animateScrolling(B)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.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()},A.prototype.setAutoScrollEditorIntoView=function(_){if(_){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,ae=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=ae.top-ue.offset;ae.top>=0&&ce+N.top<0?U=!0:ae.top<ue.height&&ae.top+N.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ce+"px",K.style.left=ae.left+"px",K.style.height=ue.lineHeight+"px",K.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},A.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(_)),N.isBlinking=!this.$readOnly&&_!="wide",b.setCssClass(N.element,"ace_slim-cursors",/slim/.test(_)))},A.prototype.prompt=function(_,N,B){var U=this;$.loadModule("ace/ext/prompt",function(K){K.prompt(U,_,N,B)})},A}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.prototype.$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"],["&&","||"],["==","!="]],g.implement(P.prototype,w),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var _=this;this.textInput.setReadOnly(A),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(U=B&&B.key&&B.key.length==1&&!B.ctrlKey&&!B.metaKey,!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){_.hoverTooltip||(_.hoverTooltip=new H);var K=b.createElement("div");K.textContent=L("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),K)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var N=this.textInput.getElement();A?(I.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){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(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?O.attach(this):O.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),b.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),b.addCssClass(this.container,"ace_hasPlaceholder");var N=b.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(_),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),B||(B=new C(this)),B.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(_),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"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"});var O={getText:function(A,_){return(Math.abs(A.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function(A,_,N){return Math.max(_.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(A,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=function(){function b(h,f){this.element=h,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(h){p.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(h,f){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(h,f,o){var a=f.firstRowScreen*f.lineHeight,c=Math.floor(a/this.canvasHeight),l=o.documentToScreenRow(h,0)*f.lineHeight;return l-c*this.canvasHeight},b.prototype.computeLineHeight=function(h,f,o){return f.lineHeight*o.getRowLineCount(h)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(h){return this.cells[h]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var f=p.createFragment(this.element),o=0;o<h.length;o++)f.appendChild(h[o].element);this.element.appendChild(f)}else this.cells.push(h),this.element.appendChild(h.element)},b.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var f=p.createFragment(this.element),o=0;o<h.length;o++)f.appendChild(h[o].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},b.prototype.createCell=function(h,f,o,a){var c=this.cellCache.pop();if(!c){var l=p.createElement("div");a&&a(l),this.element.appendChild(l),c={element:l,text:"",row:h}}return c.row=h,c},b}();r.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(t,r,d){var p=t("../lib/dom"),g=t("../lib/oop"),b=t("../lib/lang"),h=t("../lib/event_emitter").EventEmitter,f=t("./lines").Lines,o=t("../config").nls,a=function(){function l(s){this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return l.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),this.session=s,s&&s.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(s,u){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,u)},l.prototype.removeGutterDecoration=function(s,u){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,u)},l.prototype.setAnnotations=function(s){this.$annotations=[];for(var u=0;u<s.length;u++){var m=s[u],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var E=m.text,$=m.text,k=m.type;E=E?b.escapeHTML(E):m.html||"",$=$||m.html||"",x.text.indexOf(E)===-1&&(x.text.push(E),x.type.push(k),x.displayText.push($));var C=m.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},l.prototype.$updateAnnotations=function(s){if(this.$annotations.length){var u=s.start.row,m=s.end.row-u;if(m!==0)if(s.action=="remove")this.$annotations.splice(u,m+1,null);else{var w=new Array(m+1);w.unshift(u,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(s){this.config=s;var u=this.session,m=s.firstRow,w=Math.min(s.lastRow+s.gutterOffset,u.getLength()-1);this.oldLastRow=w,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow();for(var x=u.getNextFoldLine(m),E=x?x.start.row:1/0,$=null,k=-1,C=m;;){if(C>E&&(C=x.end.row+1,x=u.getNextFoldLine(C,x),E=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}$=this.$lines.get(++k),$?$.row=C:($=this.$lines.createCell(C,s,this.session,c),this.$lines.push($)),this.$renderCell($,s,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$updateGutterWidth=function(s){var u=this.session,m=u.gutterRenderer||this.$renderer,w=u.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(x=u.getLength()+w-1);var E=m?m.getWidth(u,x,s):x.toString().length*s.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<u.length;m++){var w=u[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==u[m-1].row)w=u[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(s){var u=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(u,s))return this.update(s);this.$lines.moveContainer(s);var m=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!u||w<s.firstRow)return this.update(s);if(m<u.firstRow)return this.update(s);if(u.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(u.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();s.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,u.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(s,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$renderLines=function(s,u,m){for(var w=[],x=u,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,s,this.session,c);this.$renderCell(k,s,E,x),w.push(k),x++}return w},l.prototype.$renderCell=function(s,u,m,w){var x=s.element,E=this.session,$=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],R=C.firstChild,F=E.$firstLineNumber,I=E.$breakpoints,H=E.$decorations,P=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,_=u.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(E,w):w+F).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=A&&this.$cursorRow<=m.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),I[w]&&(N+=I[w]),H[w]&&(N+=H[w]),this.$annotations[w]&&w!==A&&(N+=this.$annotations[w].className),O){var K=O[w];K==null&&(K=O[w]=E.getFoldWidget(w))}if(K){var Z="ace_fold-widget ace_"+K,te=K=="start"&&w==A&&w<m.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,ae=w+1;ae<=m.end.row;ae++)if(this.$annotations[ae]){if(this.$annotations[ae].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[ae].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[ae].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}N+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),p.setStyle(k.style,"height",_),p.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=E.getFoldWidgetRange(w);ue?k.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):m?k.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):k.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else k&&(p.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[w];if(ce?this.$addCustomWidget(w,ce,s):L&&this.$removeCustomWidget(w,s),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",R.className=B,R.className+=he,p.setStyle(R.style,"height",_),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",_);var fe;switch(he){case" ace_error_fold":fe=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",R.className=B,this.$useSvgGutterIcons?R.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),p.setStyle(R.style,"height",_),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",_);var fe;switch(this.$annotations[w].className){case" ace_error":fe=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else p.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=N&&(x.className=N),p.setStyle(s.element.style,"height",this.$lines.computeLineHeight(w,u,E)+"px"),p.setStyle(s.element.style,"top",this.$lines.computeLineTop(w,u,E)+"px"),s.text=U,C.style.display==="none"&&k.style.display==="none"&&!ce?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},l.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s},l.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.prototype.setShowFoldWidgets=function(s){s?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$hideFoldWidget=function(s,u){var m=u||this.$getGutterCell(s);if(m&&m.element){var w=m.element.childNodes[1];w&&p.setStyle(w.style,"display","none")}},l.prototype.$showFoldWidget=function(s,u){var m=u||this.$getGutterCell(s);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&p.setStyle(w.style,"display","inline-block")}},l.prototype.$getGutterCell=function(s){var u=this.$lines.cells,m=this.session.documentToScreenRow(s,0);return u[s-this.config.firstRowScreen-(s-m)]},l.prototype.$addCustomWidget=function(s,u,m){var w=u.className,x=u.label,E=u.title,$=u.callbacks;this.session.$gutterCustomWidgets[s]={className:w,label:x,title:E,callbacks:$},this.$hideFoldWidget(s,m);var k=m||this.$getGutterCell(s);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=p.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",E),p.setStyle(C.style,"display","inline-block"),p.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(L){$.onClick(L,s),L.stopPropagation()}),k.element.appendChild(C)}},l.prototype.$removeCustomWidget=function(s,u){delete this.session.$gutterCustomWidgets[s],this.$showFoldWidget(s,u);var m=u||this.$getGutterCell(s);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},l.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var s=p.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding},l.prototype.getRegion=function(s){var u=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(s.x<u.left+m.left)return"markers";if(this.$showFoldWidgets&&s.x>m.right-u.right)return"foldWidgets"},l}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,g.implement(a.prototype,h);function c(l){var s=document.createTextNode("");l.appendChild(s);var u=p.createElement("span");l.appendChild(u);var m=p.createElement("span");l.appendChild(m);var w=p.createElement("span");return m.appendChild(w),l}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,r,d){var p=t("../range").Range,g=t("../lib/dom"),b=function(){function f(o){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return f.prototype.setPadding=function(o){this.$padding=o},f.prototype.setSession=function(o){this.session=o},f.prototype.setMarkers=function(o){this.markers=o},f.prototype.elt=function(o,a){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=a,c.className=o},f.prototype.update=function(o){if(o){this.config=o,this.i=0;var a;for(var c in this.markers){var l=this.markers[c];if(!l.range){l.update(a,this,this.session,o);continue}var s=l.range.clipRows(o.firstRow,o.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),l.renderer){var u=this.$getTop(s.start.row,o),m=this.$padding+s.start.column*o.characterWidth;l.renderer(a,s,m,u,o)}else l.type=="fullLine"?this.drawFullLineMarker(a,s,l.clazz,o):l.type=="screenLine"?this.drawScreenLineMarker(a,s,l.clazz,o):s.isMultiLine()?l.type=="text"?this.drawTextMarker(a,s,l.clazz,o):this.drawMultiLineMarker(a,s,l.clazz,o):this.drawSingleLineMarker(a,s,l.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(o,a){return(o-a.firstRowScreen)*a.lineHeight},f.prototype.drawTextMarker=function(o,a,c,l,s){for(var u=this.session,m=a.start.row,w=a.end.row,x=m,E=0,$=0,k=u.getScreenLastRowColumn(x),C=new p(x,a.start.column,x,$);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:u.getRowWrapIndent(x),C.end.column=k,E=$,$=k,k=x+1<w?u.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(o,C,c+(x==m?" ace_start":"")+" ace_br"+h(x==m||x==m+1&&a.start.column,E<$,$>k,x==w),l,x==w?0:1,s)},f.prototype.drawMultiLineMarker=function(o,a,c,l,s){var u=this.$padding,m=l.lineHeight,w=this.$getTop(a.start.row,l),x=u+a.start.column*l.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var E=a.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(o,E,c+" ace_br1 ace_start",l,null,s)}else this.elt(c+" ace_br1 ace_start","height:"+m+"px;right:"+u+"px;top:"+w+"px;left:"+x+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(o,E,c+" ace_br12",l,null,s)}else{w=this.$getTop(a.end.row,l);var $=a.end.column*l.characterWidth;this.elt(c+" ace_br12","height:"+m+"px;width:"+$+"px;top:"+w+"px;left:"+u+"px;"+(s||""))}if(m=(a.end.row-a.start.row-1)*l.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,l);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(c+(k?" ace_br"+k:""),"height:"+m+"px;right:"+u+"px;top:"+w+"px;left:"+u+"px;"+(s||""))}},f.prototype.drawSingleLineMarker=function(o,a,c,l,s,u){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(o,a,c,l,s,u);var m=l.lineHeight,w=(a.end.column+(s||0)-a.start.column)*l.characterWidth,x=this.$getTop(a.start.row,l),E=this.$padding+a.start.column*l.characterWidth;this.elt(c,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+E+"px;"+(u||""))},f.prototype.drawBidiSingleLineMarker=function(o,a,c,l,s,u){var m=l.lineHeight,w=this.$getTop(a.start.row,l),x=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function($){this.elt(c,"height:"+m+"px;width:"+($.width+(s||0))+"px;top:"+w+"px;left:"+(x+$.left)+"px;"+(u||""))},this)},f.prototype.drawFullLineMarker=function(o,a,c,l,s){var u=this.$getTop(a.start.row,l),m=l.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,l)-u),this.elt(c,"height:"+m+"px;top:"+u+"px;left:0;right:0;"+(s||""))},f.prototype.drawScreenLineMarker=function(o,a,c,l,s){var u=this.$getTop(a.start.row,l),m=l.lineHeight;this.elt(c,"height:"+m+"px;top:"+u+"px;left:0;right:0;"+(s||""))},f}();b.prototype.$padding=0;function h(f,o,a,c){return(f?1:0)|(o?2:0)|(a?4:0)|(c?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,r,d){var p=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return p.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/dom"),b=t("../lib/lang"),h=t("./lines").Lines,f=t("../lib/event_emitter").EventEmitter,o=t("../config").nls,a=t("./text_util").isTextToken,c=function(){function l(s){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return l.prototype.$updateEolChar=function(){var s=this.session.doc,u=s.getNewLineCharacter()==`
|
216
|
+
`&&s.getNewLineMode()!="windows",m=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},l.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",(function(u){this._signal("changeCharacterSize",u)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},l.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},l.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var u=this.$tabStrings=[0],m=1;m<s+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,m),u.push(w)}else u.push(this.dom.createTextNode(b.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=x+E,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(s,u,m){if(this.config.lastRow!=s.lastRow||this.config.firstRow!=s.firstRow)return this.update(s);this.config=s;for(var w=Math.max(u,s.firstRow),x=Math.min(m,s.lastRow),E=this.element.childNodes,$=0,k=s.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;$++}for(var L=!1,k=w,C=this.session.getNextFoldLine(k),R=C?C.start.row:1/0;k>R&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),R=C?C.start.row:1/0),!(k>x);){var F=E[$++];if(F){this.dom.removeChildren(F),this.$renderLine(F,k,k==R?C:!1),L&&(F.style.top=this.$lines.computeLineTop(k,s,this.session)+"px");var I=s.lineHeight*this.session.getRowLength(k)+"px";F.style.height!=I&&(L=!0,F.style.height=I)}k++}if(L)for(;$<this.$lines.cells.length;){var H=this.$lines.cells[$++];H.element.style.top=this.$lines.computeLineTop(H.row,s,this.session)+"px"}},l.prototype.scrollLines=function(s){var u=this.config;if(this.config=s,this.$lines.pageChanged(u,s))return this.update(s);this.$lines.moveContainer(s);var m=s.lastRow,w=u?u.lastRow:-1;if(!u||w<s.firstRow)return this.update(s);if(m<u.firstRow)return this.update(s);if(!u||u.lastRow<s.firstRow)return this.update(s);if(s.lastRow<u.firstRow)return this.update(s);if(u.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(u.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(u.lastRow>s.lastRow)for(var x=this.session.getFoldedRowCount(s.lastRow+1,u.lastRow);x>0;x--)this.$lines.pop();s.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLinesFragment(s,s.firstRow,u.firstRow-1)),s.lastRow>u.lastRow&&this.$lines.push(this.$renderLinesFragment(s,u.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(s,u,m){for(var w=[],x=u,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,s,this.session),C=k.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,s,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,s,this.session)+"px"),this.$renderLine(C,x,x==$?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},l.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var u=s.firstRow,m=s.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(s,u,m))},l.prototype.$renderToken=function(s,u,m,w){for(var x=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\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,$=this.dom.createFragment(this.element),k,C=0;k=E.exec(w);){var L=k[1],R=k[2],F=k[3],I=k[4],H=k[5];if(!(!x.showSpaces&&R)){var P=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),L){var O=x.session.getScreenTabSize(u+k.index);$.appendChild(x.$tabStrings[O].cloneNode(!0)),u+=O-1}else if(R)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=b.stringRepeat(x.SPACE_CHAR,R.length),$.appendChild(A)}else $.appendChild(this.dom.createTextNode(R,this.element));else if(F){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=b.stringRepeat(x.SPACE_CHAR,F.length),$.appendChild(A)}else if(I){u+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",A.textContent=x.showSpaces?x.SPACE_CHAR:I,$.appendChild(A)}else if(H){u+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=H,$.appendChild(A)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))s.appendChild($);else{var _="ace_"+m.type.replace(/\./g," ace_"),A=this.dom.createElement("span");m.type=="fold"&&(A.style.width=m.value.length*this.config.characterWidth+"px",A.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),A.className=_,A.appendChild($),s.appendChild(A)}return u+w.length},l.prototype.renderIndentGuide=function(s,u,m){var w=u.search(this.$indentGuideRe);if(w<=0||w>=m)return u;if(u[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,E=0;E<x;E++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}else if(u[0]==" "){for(var E=0;E<w;E++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}return this.$highlightIndentGuide(),u},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var s=this.session.doc.$lines;if(s){var u=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(u.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:u.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(u.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row+1,u.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[u.row]!==""&&u.column===s[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=u.row+1;$<s.length;$++){var k=s[$],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=$,C<=m))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var s=this.element.querySelectorAll(".ace_indent-guide-active"),u=0;u<s.length;u++)s[u].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(s,u){var m=this.session.doc.getLine(s.row);if(m!==""){var w=s.element;if(s.element.classList&&s.element.classList.contains("ace_line_group"))if(s.element.childNodes.length>0)w=s.element.childNodes[0];else return;var x=w.childNodes;if(x){var E=x[u-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<s.length;m++){var w=s[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}else for(var m=s.length-1;m>=0;m--){var w=s[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}}},l.prototype.$createLineElement=function(s){var u=this.dom.createElement("div");return u.className="ace_line",u.style.height=this.config.lineHeight+"px",u},l.prototype.$renderWrappedLine=function(s,u,m){var w=0,x=0,E=m[0],$=0,k=this.$createLineElement();s.appendChild(k);for(var C=0;C<u.length;C++){var L=u[C],R=L.value;if(C==0&&this.displayIndentGuides){if(w=R.length,R=this.renderIndentGuide(k,R,E),!R)continue;w-=R.length}if(w+R.length<E)$=this.$renderToken(k,$,L,R),w+=R.length;else{for(;w+R.length>=E;)$=this.$renderToken(k,$,L,R.substring(0,E-w)),R=R.substring(E-w),w=E,k=this.$createLineElement(),s.appendChild(k),k.appendChild(this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element)),x++,$=0,E=m[x]||Number.MAX_VALUE;R.length!=0&&(w+=R.length,$=this.$renderToken(k,$,L,R))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,$,null,"",!0)},l.prototype.$renderSimpleLine=function(s,u){for(var m=0,w=0;w<u.length;w++){var x=u[w],E=x.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(s,E),!E))){if(m+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,m,x,E);m=this.$renderToken(s,m,x,E)}}},l.prototype.$renderOverflowMessage=function(s,u,m,w,x){m&&this.$renderToken(s,u,m,w.slice(0,this.MAX_LINE_LENGTH-u));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",s.appendChild(E)},l.prototype.$renderLine=function(s,u,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(u)),m)var w=this.$getFoldLineTokens(u,m);else var w=this.session.getTokens(u);var x=s;if(w.length){var E=this.session.getRowSplitData(u);if(E&&E.length){this.$renderWrappedLine(s,w,E);var x=s.lastChild}else{var x=s;this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x));if(this.showEOL&&x){m&&(u=m.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},l.prototype.$getFoldLineTokens=function(s,u){var m=this.session,w=[];function x($,k,C){for(var L=0,R=0;R+$[L].value.length<k;)if(R+=$[L].value.length,L++,L==$.length)return;if(R!=k){var F=$[L].value.substring(k-R);F.length>C-k&&(F=F.substring(0,C-k)),w.push({type:$[L].type,value:F}),R=k+F.length,L+=1}for(;R<C&&L<$.length;){var F=$[L].value;F.length+R>C?w.push({type:$[L].type,value:F.substring(0,C-R)}):w.push($[L]),R+=F.length,L+=1}}var E=m.getTokens(s);return u.walk(function($,k,C,L,R){$!=null?w.push({type:"fold",value:$}):(R&&(E=m.getTokens(k)),E.length&&x(E,L,C))},u.end.row,this.session.getLine(u.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,p.implement(c.prototype,f),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=function(){function b(h){this.element=p.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),p.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(h){for(var f=this.cursors,o=f.length;o--;)p.setStyle(f[o].style,"opacity",h?"":"0")},b.prototype.$startCssAnimation=function(){for(var h=this.cursors,f=h.length;f--;)h[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&p.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,p.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(h){this.$padding=h},b.prototype.setSession=function(h){this.session=h},b.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},b.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},b.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,p.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var h=p.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},b.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},b.prototype.hideCursor=function(){this.isVisible=!1,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,p.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,p.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&p.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),p.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),f()},this.blinkInterval),f()}},b.prototype.getPixelPosition=function(h,f){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,h.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),c=(o.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:c}},b.prototype.isCursorInView=function(h,f){return h.top>=0&&h.top<f.maxHeight},b.prototype.update=function(h){this.config=h;var f=this.session.$selectionMarkers,o=0,a=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var o=0,c=f.length;o<c;o++){var l=this.getPixelPosition(f[o].cursor,!0);if(!((l.top>h.height+h.offset||l.top<0)&&o>1)){var s=this.cursors[a++]||this.addCursor(),u=s.style;this.drawCursor?this.drawCursor(s,l,h,f[o],this.session):this.isCursorInView(l,h)?(p.setStyle(u,"display","block"),p.translate(s,l.left,l.top),p.setStyle(u,"width",Math.round(h.characterWidth)+"px"),p.setStyle(u,"height",h.lineHeight+"px")):p.setStyle(u,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=l,this.restartTimer()},b.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,d){var p=this&&this.__extends||function(){var s=function(u,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(w[E]=x[E])},s(u,m)};return function(u,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(u,m);function w(){this.constructor=u}u.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter,o=32768,a=function(){function s(u,m){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return s.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},s}();g.implement(a.prototype,f);var c=function(s){p(u,s);function u(m,w){var x=s.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=b.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return u.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(m){this.element.style.height=m+"px"},u.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>o?(this.coeff=o/m,m=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},u.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},u}(a);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var l=function(s){p(u,s);function u(m,w){var x=s.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(m){this.element.style.width=m+"px"},u.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},u.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},u.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},u}(a);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=l,r.VScrollBar=c,r.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,d){var p=this&&this.__extends||function(){var l=function(s,u){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},l(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(s,u);function m(){this.constructor=s}s.prototype=u===null?Object.create(u):(m.prototype=u.prototype,new m)}}(),g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
217
|
+
position: absolute;
|
218
|
+
background: rgba(128, 128, 128, 0.6);
|
219
|
+
-moz-box-sizing: border-box;
|
220
|
+
box-sizing: border-box;
|
221
|
+
border: 1px solid #bbb;
|
222
|
+
border-radius: 2px;
|
223
|
+
z-index: 8;
|
224
|
+
}
|
225
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
226
|
+
position: absolute;
|
227
|
+
z-index: 6;
|
228
|
+
background: none;
|
229
|
+
overflow: hidden!important;
|
230
|
+
}
|
231
|
+
.ace_editor>.ace_sb-v {
|
232
|
+
z-index: 6;
|
233
|
+
right: 0;
|
234
|
+
top: 0;
|
235
|
+
width: 12px;
|
236
|
+
}
|
237
|
+
.ace_editor>.ace_sb-v div {
|
238
|
+
z-index: 8;
|
239
|
+
right: 0;
|
240
|
+
width: 100%;
|
241
|
+
}
|
242
|
+
.ace_editor>.ace_sb-h {
|
243
|
+
bottom: 0;
|
244
|
+
left: 0;
|
245
|
+
height: 12px;
|
246
|
+
}
|
247
|
+
.ace_editor>.ace_sb-h div {
|
248
|
+
bottom: 0;
|
249
|
+
height: 100%;
|
250
|
+
}
|
251
|
+
.ace_editor>.ace_sb_grabbed {
|
252
|
+
z-index: 8;
|
253
|
+
background: #000;
|
254
|
+
}`,"ace_scrollbar.css",!1);var o=function(){function l(s,u){this.element=b.createElement("div"),this.element.className="ace_sb"+u,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},l}();g.implement(o.prototype,f);var a=function(l){p(s,l);function s(u,m){var w=l.call(this,u,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=u,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return s.prototype.onMouseDown=function(u,m){if(u==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,E=function(I){x=I.clientY},$=function(){clearInterval(R)},k=m.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var I=w.scrollTopFromThumbTop(C+x-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var R=setInterval(L,20);return h.preventDefault(m)}var F=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),h.preventDefault(m)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(u){var m=u*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(u,m){this.pageHeight===u&&!m||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(l){p(s,l);function s(u,m){var w=l.call(this,u,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return s.prototype.onMouseDown=function(u,m){if(u==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,E=function(I){x=I.clientX},$=function(){clearInterval(R)},k=m.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var I=w.scrollLeftFromThumbLeft(C+x-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var R=setInterval(L,20);return h.preventDefault(m)}var F=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),h.preventDefault(m)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(u){var m=u*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},s.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(u,m){this.pageWidth===u&&!m||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(o);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=c,r.VScrollBar=a,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,r,d){var p=t("./lib/event"),g=function(){function b(h,f){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var o=this;this._flush=function(a){o.pending=!1;var c=o.changes;if(c&&(p.blockIdle(100),o.changes=0,o.onRender(c)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return b.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(p.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(h){var f=this.changes;return this.changes=0,f},b}();r.RenderLoop=g}),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(t,r,d){var p=t("../lib/oop"),g=t("../lib/dom"),b=t("../lib/lang"),h=t("../lib/event"),f=t("../lib/useragent"),o=t("../lib/event_emitter").EventEmitter,a=512,c=typeof ResizeObserver=="function",l=200,s=function(){function u(m){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",f.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},u.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===m.width&&w.height===m.height,this._emit("changeCharacterSize",{data:m})}},u.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){m.checkForSizeChanges(),h.onIdle(w,500)},500)},u.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(m){var w={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},u.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},u.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=g.buildDom([m(0,0),m(l,0),m(0,l),m(l,l)],this.el)},u.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function $(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function k(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function L(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var R=L(this.els[0]),F=L(this.els[1]),I=L(this.els[2]),H=L(this.els[3]),P=E($(H,F),$(H,I),$(k(F,I),k(H,R))),O=C(1+P[0],$(F,R)),A=C(1+P[1],$(I,R));if(w){var _=w,N=P[0]*_[0]/l+P[1]*_[1]/l+1,B=k(C(_[0],O),C(_[1],A));return k(C(1/N/l,B),R)}var U=$(m,R),K=E($(O,C(P[0],U)),$(A,C(P[1],U)),U);return C(l,K)},u}();s.prototype.$characterSize={width:0,height:0},p.implement(s.prototype,o),r.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,r,d){d.exports=`
|
255
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
256
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
257
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
258
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
259
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
260
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
261
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
263
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
264
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
265
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
266
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
|
271
|
+
|
272
|
+
.ace_editor {
|
273
|
+
position: relative;
|
274
|
+
overflow: hidden;
|
275
|
+
padding: 0;
|
276
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
277
|
+
direction: ltr;
|
278
|
+
text-align: left;
|
279
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
280
|
+
forced-color-adjust: none;
|
281
|
+
}
|
282
|
+
|
283
|
+
.ace_scroller {
|
284
|
+
position: absolute;
|
285
|
+
overflow: hidden;
|
286
|
+
top: 0;
|
287
|
+
bottom: 0;
|
288
|
+
background-color: inherit;
|
289
|
+
-ms-user-select: none;
|
290
|
+
-moz-user-select: none;
|
291
|
+
-webkit-user-select: none;
|
292
|
+
user-select: none;
|
293
|
+
cursor: text;
|
294
|
+
}
|
295
|
+
|
296
|
+
.ace_content {
|
297
|
+
position: absolute;
|
298
|
+
box-sizing: border-box;
|
299
|
+
min-width: 100%;
|
300
|
+
contain: style size layout;
|
301
|
+
font-variant-ligatures: no-common-ligatures;
|
302
|
+
}
|
303
|
+
.ace_invisible {
|
304
|
+
font-variant-ligatures: none;
|
305
|
+
}
|
306
|
+
|
307
|
+
.ace_keyboard-focus:focus {
|
308
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
309
|
+
outline: none;
|
310
|
+
}
|
311
|
+
|
312
|
+
.ace_dragging .ace_scroller:before{
|
313
|
+
position: absolute;
|
314
|
+
top: 0;
|
315
|
+
left: 0;
|
316
|
+
right: 0;
|
317
|
+
bottom: 0;
|
318
|
+
content: '';
|
319
|
+
background: rgba(250, 250, 250, 0.01);
|
320
|
+
z-index: 1000;
|
321
|
+
}
|
322
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
323
|
+
background: rgba(0, 0, 0, 0.01);
|
324
|
+
}
|
325
|
+
|
326
|
+
.ace_gutter {
|
327
|
+
position: absolute;
|
328
|
+
overflow : hidden;
|
329
|
+
width: auto;
|
330
|
+
top: 0;
|
331
|
+
bottom: 0;
|
332
|
+
left: 0;
|
333
|
+
cursor: default;
|
334
|
+
z-index: 4;
|
335
|
+
-ms-user-select: none;
|
336
|
+
-moz-user-select: none;
|
337
|
+
-webkit-user-select: none;
|
338
|
+
user-select: none;
|
339
|
+
contain: style size layout;
|
340
|
+
}
|
341
|
+
|
342
|
+
.ace_gutter-active-line {
|
343
|
+
position: absolute;
|
344
|
+
left: 0;
|
345
|
+
right: 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
.ace_scroller.ace_scroll-left:after {
|
349
|
+
content: "";
|
350
|
+
position: absolute;
|
351
|
+
top: 0;
|
352
|
+
right: 0;
|
353
|
+
bottom: 0;
|
354
|
+
left: 0;
|
355
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
356
|
+
pointer-events: none;
|
357
|
+
}
|
358
|
+
|
359
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
360
|
+
position: absolute;
|
361
|
+
top: 0;
|
362
|
+
left: 0;
|
363
|
+
right: 0;
|
364
|
+
padding-left: 19px;
|
365
|
+
padding-right: 6px;
|
366
|
+
background-repeat: no-repeat;
|
367
|
+
}
|
368
|
+
|
369
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
370
|
+
margin-left: -14px;
|
371
|
+
float: left;
|
372
|
+
}
|
373
|
+
|
374
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
375
|
+
margin-left: -19px;
|
376
|
+
float: left;
|
377
|
+
}
|
378
|
+
|
379
|
+
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
380
|
+
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==");
|
381
|
+
background-repeat: no-repeat;
|
382
|
+
background-position: 2px center;
|
383
|
+
}
|
384
|
+
|
385
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
386
|
+
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==");
|
387
|
+
background-repeat: no-repeat;
|
388
|
+
background-position: 2px center;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
392
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
393
|
+
background-repeat: no-repeat;
|
394
|
+
background-position: 2px center;
|
395
|
+
}
|
396
|
+
|
397
|
+
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
398
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
399
|
+
}
|
400
|
+
|
401
|
+
.ace_icon_svg.ace_error {
|
402
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
403
|
+
background-color: crimson;
|
404
|
+
}
|
405
|
+
.ace_icon_svg.ace_security {
|
406
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
407
|
+
background-color: crimson;
|
408
|
+
}
|
409
|
+
.ace_icon_svg.ace_warning {
|
410
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
411
|
+
background-color: darkorange;
|
412
|
+
}
|
413
|
+
.ace_icon_svg.ace_info {
|
414
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
415
|
+
background-color: royalblue;
|
416
|
+
}
|
417
|
+
.ace_icon_svg.ace_hint {
|
418
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
419
|
+
background-color: silver;
|
420
|
+
}
|
421
|
+
|
422
|
+
.ace_icon_svg.ace_error_fold {
|
423
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
424
|
+
background-color: crimson;
|
425
|
+
}
|
426
|
+
.ace_icon_svg.ace_security_fold {
|
427
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
428
|
+
background-color: crimson;
|
429
|
+
}
|
430
|
+
.ace_icon_svg.ace_warning_fold {
|
431
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
432
|
+
background-color: darkorange;
|
433
|
+
}
|
434
|
+
|
435
|
+
.ace_scrollbar {
|
436
|
+
contain: strict;
|
437
|
+
position: absolute;
|
438
|
+
right: 0;
|
439
|
+
bottom: 0;
|
440
|
+
z-index: 6;
|
441
|
+
}
|
442
|
+
|
443
|
+
.ace_scrollbar-inner {
|
444
|
+
position: absolute;
|
445
|
+
cursor: text;
|
446
|
+
left: 0;
|
447
|
+
top: 0;
|
448
|
+
}
|
449
|
+
|
450
|
+
.ace_scrollbar-v{
|
451
|
+
overflow-x: hidden;
|
452
|
+
overflow-y: scroll;
|
453
|
+
top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.ace_scrollbar-h {
|
457
|
+
overflow-x: scroll;
|
458
|
+
overflow-y: hidden;
|
459
|
+
left: 0;
|
460
|
+
}
|
461
|
+
|
462
|
+
.ace_print-margin {
|
463
|
+
position: absolute;
|
464
|
+
height: 100%;
|
465
|
+
}
|
466
|
+
|
467
|
+
.ace_text-input {
|
468
|
+
position: absolute;
|
469
|
+
z-index: 0;
|
470
|
+
width: 0.5em;
|
471
|
+
height: 1em;
|
472
|
+
opacity: 0;
|
473
|
+
background: transparent;
|
474
|
+
-moz-appearance: none;
|
475
|
+
appearance: none;
|
476
|
+
border: none;
|
477
|
+
resize: none;
|
478
|
+
outline: none;
|
479
|
+
overflow: hidden;
|
480
|
+
font: inherit;
|
481
|
+
padding: 0 1px;
|
482
|
+
margin: 0 -1px;
|
483
|
+
contain: strict;
|
484
|
+
-ms-user-select: text;
|
485
|
+
-moz-user-select: text;
|
486
|
+
-webkit-user-select: text;
|
487
|
+
user-select: text;
|
488
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
489
|
+
white-space: pre!important;
|
490
|
+
}
|
491
|
+
.ace_text-input.ace_composition {
|
492
|
+
background: transparent;
|
493
|
+
color: inherit;
|
494
|
+
z-index: 1000;
|
495
|
+
opacity: 1;
|
496
|
+
}
|
497
|
+
.ace_composition_placeholder { color: transparent }
|
498
|
+
.ace_composition_marker {
|
499
|
+
border-bottom: 1px solid;
|
500
|
+
position: absolute;
|
501
|
+
border-radius: 0;
|
502
|
+
margin-top: 1px;
|
503
|
+
}
|
504
|
+
|
505
|
+
[ace_nocontext=true] {
|
506
|
+
transform: none!important;
|
507
|
+
filter: none!important;
|
508
|
+
clip-path: none!important;
|
509
|
+
mask : none!important;
|
510
|
+
contain: none!important;
|
511
|
+
perspective: none!important;
|
512
|
+
mix-blend-mode: initial!important;
|
513
|
+
z-index: auto;
|
514
|
+
}
|
515
|
+
|
516
|
+
.ace_layer {
|
517
|
+
z-index: 1;
|
518
|
+
position: absolute;
|
519
|
+
overflow: hidden;
|
520
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
521
|
+
word-wrap: normal;
|
522
|
+
white-space: pre;
|
523
|
+
height: 100%;
|
524
|
+
width: 100%;
|
525
|
+
box-sizing: border-box;
|
526
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
527
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
528
|
+
pointer-events: none;
|
529
|
+
}
|
530
|
+
|
531
|
+
.ace_gutter-layer {
|
532
|
+
position: relative;
|
533
|
+
width: auto;
|
534
|
+
text-align: right;
|
535
|
+
pointer-events: auto;
|
536
|
+
height: 1000000px;
|
537
|
+
contain: style size layout;
|
538
|
+
}
|
539
|
+
|
540
|
+
.ace_text-layer {
|
541
|
+
font: inherit !important;
|
542
|
+
position: absolute;
|
543
|
+
height: 1000000px;
|
544
|
+
width: 1000000px;
|
545
|
+
contain: style size layout;
|
546
|
+
}
|
547
|
+
|
548
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
549
|
+
contain: style size layout;
|
550
|
+
position: absolute;
|
551
|
+
top: 0;
|
552
|
+
left: 0;
|
553
|
+
right: 0;
|
554
|
+
}
|
555
|
+
|
556
|
+
.ace_hidpi .ace_text-layer,
|
557
|
+
.ace_hidpi .ace_gutter-layer,
|
558
|
+
.ace_hidpi .ace_content,
|
559
|
+
.ace_hidpi .ace_gutter {
|
560
|
+
contain: strict;
|
561
|
+
}
|
562
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
563
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
564
|
+
contain: strict;
|
565
|
+
}
|
566
|
+
|
567
|
+
.ace_cjk {
|
568
|
+
display: inline-block;
|
569
|
+
text-align: center;
|
570
|
+
}
|
571
|
+
|
572
|
+
.ace_cursor-layer {
|
573
|
+
z-index: 4;
|
574
|
+
}
|
575
|
+
|
576
|
+
.ace_cursor {
|
577
|
+
z-index: 4;
|
578
|
+
position: absolute;
|
579
|
+
box-sizing: border-box;
|
580
|
+
border-left: 2px solid;
|
581
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
582
|
+
transform: translatez(0);
|
583
|
+
}
|
584
|
+
|
585
|
+
.ace_multiselect .ace_cursor {
|
586
|
+
border-left-width: 1px;
|
587
|
+
}
|
588
|
+
|
589
|
+
.ace_slim-cursors .ace_cursor {
|
590
|
+
border-left-width: 1px;
|
591
|
+
}
|
592
|
+
|
593
|
+
.ace_overwrite-cursors .ace_cursor {
|
594
|
+
border-left-width: 0;
|
595
|
+
border-bottom: 1px solid;
|
596
|
+
}
|
597
|
+
|
598
|
+
.ace_hidden-cursors .ace_cursor {
|
599
|
+
opacity: 0.2;
|
600
|
+
}
|
601
|
+
|
602
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
603
|
+
opacity: 0;
|
604
|
+
}
|
605
|
+
|
606
|
+
.ace_smooth-blinking .ace_cursor {
|
607
|
+
transition: opacity 0.18s;
|
608
|
+
}
|
609
|
+
|
610
|
+
.ace_animate-blinking .ace_cursor {
|
611
|
+
animation-duration: 1000ms;
|
612
|
+
animation-timing-function: step-end;
|
613
|
+
animation-name: blink-ace-animate;
|
614
|
+
animation-iteration-count: infinite;
|
615
|
+
}
|
616
|
+
|
617
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
618
|
+
animation-duration: 1000ms;
|
619
|
+
animation-timing-function: ease-in-out;
|
620
|
+
animation-name: blink-ace-animate-smooth;
|
621
|
+
}
|
622
|
+
|
623
|
+
@keyframes blink-ace-animate {
|
624
|
+
from, to { opacity: 1; }
|
625
|
+
60% { opacity: 0; }
|
626
|
+
}
|
627
|
+
|
628
|
+
@keyframes blink-ace-animate-smooth {
|
629
|
+
from, to { opacity: 1; }
|
630
|
+
45% { opacity: 1; }
|
631
|
+
60% { opacity: 0; }
|
632
|
+
85% { opacity: 0; }
|
633
|
+
}
|
634
|
+
|
635
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
636
|
+
position: absolute;
|
637
|
+
z-index: 3;
|
638
|
+
}
|
639
|
+
|
640
|
+
.ace_marker-layer .ace_selection {
|
641
|
+
position: absolute;
|
642
|
+
z-index: 5;
|
643
|
+
}
|
644
|
+
|
645
|
+
.ace_marker-layer .ace_bracket {
|
646
|
+
position: absolute;
|
647
|
+
z-index: 6;
|
648
|
+
}
|
649
|
+
|
650
|
+
.ace_marker-layer .ace_error_bracket {
|
651
|
+
position: absolute;
|
652
|
+
border-bottom: 1px solid #DE5555;
|
653
|
+
border-radius: 0;
|
654
|
+
}
|
655
|
+
|
656
|
+
.ace_marker-layer .ace_active-line {
|
657
|
+
position: absolute;
|
658
|
+
z-index: 2;
|
659
|
+
}
|
660
|
+
|
661
|
+
.ace_marker-layer .ace_selected-word {
|
662
|
+
position: absolute;
|
663
|
+
z-index: 4;
|
664
|
+
box-sizing: border-box;
|
665
|
+
}
|
666
|
+
|
667
|
+
.ace_line .ace_fold {
|
668
|
+
box-sizing: border-box;
|
669
|
+
|
670
|
+
display: inline-block;
|
671
|
+
height: 11px;
|
672
|
+
margin-top: -2px;
|
673
|
+
vertical-align: middle;
|
674
|
+
|
675
|
+
background-image:
|
676
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
677
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
678
|
+
background-repeat: no-repeat, repeat-x;
|
679
|
+
background-position: center center, top left;
|
680
|
+
color: transparent;
|
681
|
+
|
682
|
+
border: 1px solid black;
|
683
|
+
border-radius: 2px;
|
684
|
+
|
685
|
+
cursor: pointer;
|
686
|
+
pointer-events: auto;
|
687
|
+
}
|
688
|
+
|
689
|
+
.ace_dark .ace_fold {
|
690
|
+
}
|
691
|
+
|
692
|
+
.ace_fold:hover{
|
693
|
+
background-image:
|
694
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
695
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
696
|
+
}
|
697
|
+
|
698
|
+
.ace_tooltip {
|
699
|
+
background-color: #f5f5f5;
|
700
|
+
border: 1px solid gray;
|
701
|
+
border-radius: 1px;
|
702
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
703
|
+
color: black;
|
704
|
+
padding: 3px 4px;
|
705
|
+
position: fixed;
|
706
|
+
z-index: 999999;
|
707
|
+
box-sizing: border-box;
|
708
|
+
cursor: default;
|
709
|
+
white-space: pre-wrap;
|
710
|
+
word-wrap: break-word;
|
711
|
+
line-height: normal;
|
712
|
+
font-style: normal;
|
713
|
+
font-weight: normal;
|
714
|
+
letter-spacing: normal;
|
715
|
+
pointer-events: none;
|
716
|
+
overflow: auto;
|
717
|
+
max-width: min(33em, 66vw);
|
718
|
+
overscroll-behavior: contain;
|
719
|
+
}
|
720
|
+
.ace_tooltip pre {
|
721
|
+
white-space: pre-wrap;
|
722
|
+
}
|
723
|
+
|
724
|
+
.ace_tooltip.ace_dark {
|
725
|
+
background-color: #636363;
|
726
|
+
color: #fff;
|
727
|
+
}
|
728
|
+
|
729
|
+
.ace_tooltip:focus {
|
730
|
+
outline: 1px solid #5E9ED6;
|
731
|
+
}
|
732
|
+
|
733
|
+
.ace_icon {
|
734
|
+
display: inline-block;
|
735
|
+
width: 18px;
|
736
|
+
vertical-align: top;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon_svg {
|
740
|
+
display: inline-block;
|
741
|
+
width: 12px;
|
742
|
+
vertical-align: top;
|
743
|
+
-webkit-mask-repeat: no-repeat;
|
744
|
+
-webkit-mask-size: 12px;
|
745
|
+
-webkit-mask-position: center;
|
746
|
+
}
|
747
|
+
|
748
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
749
|
+
padding-right: 13px;
|
750
|
+
}
|
751
|
+
|
752
|
+
.ace_fold-widget, .ace_custom-widget {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
}
|
769
|
+
|
770
|
+
.ace_custom-widget {
|
771
|
+
background: none;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_folding-enabled .ace_fold-widget {
|
775
|
+
display: inline-block;
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_fold-widget.ace_end {
|
779
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget.ace_closed {
|
783
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
784
|
+
}
|
785
|
+
|
786
|
+
.ace_fold-widget:hover {
|
787
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
788
|
+
background-color: rgba(255, 255, 255, 0.2);
|
789
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
790
|
+
}
|
791
|
+
|
792
|
+
.ace_fold-widget:active {
|
793
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
794
|
+
background-color: rgba(0, 0, 0, 0.05);
|
795
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
796
|
+
}
|
797
|
+
/**
|
798
|
+
* Dark version for fold widgets
|
799
|
+
*/
|
800
|
+
.ace_dark .ace_fold-widget {
|
801
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
802
|
+
}
|
803
|
+
.ace_dark .ace_fold-widget.ace_end {
|
804
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
805
|
+
}
|
806
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
807
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
808
|
+
}
|
809
|
+
.ace_dark .ace_fold-widget:hover {
|
810
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
811
|
+
background-color: rgba(255, 255, 255, 0.1);
|
812
|
+
}
|
813
|
+
.ace_dark .ace_fold-widget:active {
|
814
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
815
|
+
}
|
816
|
+
|
817
|
+
.ace_inline_button {
|
818
|
+
border: 1px solid lightgray;
|
819
|
+
display: inline-block;
|
820
|
+
margin: -1px 8px;
|
821
|
+
padding: 0 5px;
|
822
|
+
pointer-events: auto;
|
823
|
+
cursor: pointer;
|
824
|
+
}
|
825
|
+
.ace_inline_button:hover {
|
826
|
+
border-color: gray;
|
827
|
+
background: rgba(200,200,200,0.2);
|
828
|
+
display: inline-block;
|
829
|
+
pointer-events: auto;
|
830
|
+
}
|
831
|
+
|
832
|
+
.ace_fold-widget.ace_invalid {
|
833
|
+
background-color: #FFB4B4;
|
834
|
+
border-color: #DE5555;
|
835
|
+
}
|
836
|
+
|
837
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
838
|
+
transition: opacity 0.4s ease 0.05s;
|
839
|
+
opacity: 0;
|
840
|
+
}
|
841
|
+
|
842
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
843
|
+
transition: opacity 0.05s ease 0.05s;
|
844
|
+
opacity:1;
|
845
|
+
}
|
846
|
+
|
847
|
+
.ace_underline {
|
848
|
+
text-decoration: underline;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_bold {
|
852
|
+
font-weight: bold;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_nobold .ace_bold {
|
856
|
+
font-weight: normal;
|
857
|
+
}
|
858
|
+
|
859
|
+
.ace_italic {
|
860
|
+
font-style: italic;
|
861
|
+
}
|
862
|
+
|
863
|
+
|
864
|
+
.ace_error-marker {
|
865
|
+
background-color: rgba(255, 0, 0,0.2);
|
866
|
+
position: absolute;
|
867
|
+
z-index: 9;
|
868
|
+
}
|
869
|
+
|
870
|
+
.ace_highlight-marker {
|
871
|
+
background-color: rgba(255, 255, 0,0.2);
|
872
|
+
position: absolute;
|
873
|
+
z-index: 8;
|
874
|
+
}
|
875
|
+
|
876
|
+
.ace_mobile-menu {
|
877
|
+
position: absolute;
|
878
|
+
line-height: 1.5;
|
879
|
+
border-radius: 4px;
|
880
|
+
-ms-user-select: none;
|
881
|
+
-moz-user-select: none;
|
882
|
+
-webkit-user-select: none;
|
883
|
+
user-select: none;
|
884
|
+
background: white;
|
885
|
+
box-shadow: 1px 3px 2px grey;
|
886
|
+
border: 1px solid #dcdcdc;
|
887
|
+
color: black;
|
888
|
+
}
|
889
|
+
.ace_dark > .ace_mobile-menu {
|
890
|
+
background: #333;
|
891
|
+
color: #ccc;
|
892
|
+
box-shadow: 1px 3px 2px grey;
|
893
|
+
border: 1px solid #444;
|
894
|
+
|
895
|
+
}
|
896
|
+
.ace_mobile-button {
|
897
|
+
padding: 2px;
|
898
|
+
cursor: pointer;
|
899
|
+
overflow: hidden;
|
900
|
+
}
|
901
|
+
.ace_mobile-button:hover {
|
902
|
+
background-color: #eee;
|
903
|
+
opacity:1;
|
904
|
+
}
|
905
|
+
.ace_mobile-button:active {
|
906
|
+
background-color: #ddd;
|
907
|
+
}
|
908
|
+
|
909
|
+
.ace_placeholder {
|
910
|
+
position: relative;
|
911
|
+
font-family: arial;
|
912
|
+
transform: scale(0.9);
|
913
|
+
transform-origin: left;
|
914
|
+
white-space: pre;
|
915
|
+
opacity: 0.7;
|
916
|
+
margin: 0 10px;
|
917
|
+
z-index: 1;
|
918
|
+
}
|
919
|
+
|
920
|
+
.ace_ghost_text {
|
921
|
+
opacity: 0.5;
|
922
|
+
font-style: italic;
|
923
|
+
}
|
924
|
+
|
925
|
+
.ace_ghost_text_container > div {
|
926
|
+
white-space: pre;
|
927
|
+
}
|
928
|
+
|
929
|
+
.ghost_text_line_wrapped::after {
|
930
|
+
content: "↩";
|
931
|
+
position: absolute;
|
932
|
+
}
|
933
|
+
|
934
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
935
|
+
margin: 0px 4px
|
936
|
+
}
|
937
|
+
|
938
|
+
.ace_screenreader-only {
|
939
|
+
position:absolute;
|
940
|
+
left:-10000px;
|
941
|
+
top:auto;
|
942
|
+
width:1px;
|
943
|
+
height:1px;
|
944
|
+
overflow:hidden;
|
945
|
+
}
|
946
|
+
|
947
|
+
.ace_hidden_token {
|
948
|
+
display: none;
|
949
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,r,d){var p=t("../lib/dom"),g=t("../lib/oop"),b=t("../lib/event_emitter").EventEmitter,h=function(){function f(o,a){this.canvas=p.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return f.prototype.$updateDecorators=function(o){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var c=(o.lastRow+1)*this.lineHeight;c<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var l=this.canvas.getContext("2d");function s(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var u=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),u){var m={info:1,warning:2,error:3};u.forEach(function(H){H.priority=m[H.type]||null}),u=u.sort(s);for(var w=this.renderer.session.$foldData,x=0;x<u.length;x++){var E=u[x].row,$=this.compensateFoldRows(E,w),k=Math.round((E-$)*this.lineHeight*this.heightRatio),C=Math.round((E-$)*this.lineHeight*this.heightRatio),L=Math.round(((E-$)*this.lineHeight+this.lineHeight)*this.heightRatio),R=L-C;if(R<this.minDecorationHeight){var F=(C+L)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),L=Math.round(F+this.halfMinDecorationHeight)}l.fillStyle=a[u[x].type]||null,l.fillRect(0,k,this.canvasWidth,L-C)}}var I=this.renderer.session.selection.getCursor();if(I){var $=this.compensateFoldRows(I.row,w),k=Math.round((I.row-$)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,k,this.canvasWidth,2)}},f.prototype.compensateFoldRows=function(o,a){var c=0;if(a&&a.length>0)for(var l=0;l<a.length;l++)o>a[l].start.row&&o<a[l].end.row?c+=o-a[l].start.row:o>=a[l].end.row&&(c+=a[l].end.row-a[l].start.row);return c},f}();g.implement(h.prototype,b),r.Decorator=h}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/dom"),b=t("./lib/lang"),h=t("./config"),f=t("./layer/gutter").Gutter,o=t("./layer/marker").Marker,a=t("./layer/text").Text,c=t("./layer/cursor").Cursor,l=t("./scrollbar").HScrollBar,s=t("./scrollbar").VScrollBar,u=t("./scrollbar_custom").HScrollBar,m=t("./scrollbar_custom").VScrollBar,w=t("./renderloop").RenderLoop,x=t("./layer/font_metrics").FontMetrics,E=t("./lib/event_emitter").EventEmitter,$=t("./css/editor-css"),k=t("./layer/decorators").Decorator,C=t("./lib/useragent"),L=t("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var R=function(){function F(I,H){var P=this;this.container=I||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new o(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(A){P.$scrollAnimation||P.session.setScrollTop(A.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){P.$scrollAnimation||P.session.setScrollLeft(A.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(A){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",A)}),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=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._signal("renderer",this)}return F.prototype.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(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(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))},F.prototype.updateLines=function(I,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:I,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(I,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var A=this.container;O||(O=A.clientHeight||A.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",O=A.clientHeight||A.scrollHeight),P||(P=A.clientWidth||A.scrollWidth);var _=this.$updateCachedSize(I,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(I,H,P,O){O-=this.$extraHeight||0;var A=0,_=this.$size,N={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(O&&(I||_.height!=O)&&(_.height=O,A|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),P&&(I||_.width!=P)){A|=this.CHANGE_SIZE,_.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,g.setStyle(this.scrollBarH.element.style,"left",H+"px"),g.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),_.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",B),g.setStyle(this.scroller.style,"right",B),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(A|=this.CHANGE_FULL)}return _.$dirty=!P||!O,A&&this._signal("resize",N),A},F.prototype.onGutterResize=function(I){var H=this.$showGutter?I:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},F.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},F.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},F.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=g.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){g.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var O=this.layerConfig,A=P.top,_=P.left;A-=O.offset;var N=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>O.height-N){g.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!H)A+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else A+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-B&&(_=this.$size.scrollerWidth-B),_+=this.gutterWidth+this.margin.left,g.setStyle(I,"height",N+"px"),g.setStyle(I,"width",B+"px"),g.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-B),Math.min(A,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,H=I.lastRow,P=this.session.documentToScreenRow(H,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(I,H,P,O){var A=this.scrollMargin;A.top=I|0,A.bottom=H|0,A.right=O|0,A.left=P|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},F.prototype.setMargin=function(I,H,P,O){var A=this.margin;A.top=I|0,A.bottom=H|0,A.right=O|0,A.left=P|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},F.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-H&&(I=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(I,H){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!H){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-P.offset);var A=P.width+2*this.$padding+"px",_=P.minHeight+"px";g.setStyle(this.content.style,"width",A),g.setStyle(this.content.style,"height",_)}if(I&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",I)},F.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,A=!O&&I>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var _=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,_,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var I=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),A=O*this.lineHeight,_=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-_-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,A-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,_+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-A+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ue=Math.ceil(K/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),fe=ce+ue,$e,Te,Ee=this.lineHeight;ce=I.screenToDocumentRow(ce,0);var Qe=I.getFoldLine(ce);Qe&&(ce=Qe.start.row),$e=I.documentToScreenRow(ce,0),Te=I.getRowLength(ce)*Ee,fe=Math.min(I.screenToDocumentRow(fe,0),I.getLength()-1),K=H.scrollerHeight+I.getRowLength(fe)*Ee+Te,ae=this.scrollTop-$e*Ee;var Ye=0;return(this.layerConfig.width!=_||B)&&(Ye=this.CHANGE_H_SCROLL),(B||ne)&&(Ye|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:ce,firstRowScreen:$e,lastRow:fe,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:K,maxHeight:A,offset:ae,gutterOffset:Ee?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),Ye},F.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,H),!0}}},F.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(I,H){this.$gutterLayer.addGutterDecoration(I,H)},F.prototype.removeGutterDecoration=function(I,H){this.$gutterLayer.removeGutterDecoration(I,H)},F.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(I,H,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(I,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),A=O.left,_=O.top,N=P&&P.top||0,B=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>_?(H&&U+N>_+this.lineHeight&&(_-=H*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):U+this.$size.scrollerHeight-B<_+this.lineHeight&&(H&&U+this.$size.scrollerHeight-B<_-this.lineHeight&&(_+=H*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;A-Z<K?(A-=Z,A<this.$padding+Z&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=Z,K+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&A-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},F.prototype.alignCursor=function(I,H){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),O=this.$size.scrollerHeight-this.lineHeight,A=P.top-O*(H||0);return this.session.setScrollTop(A),A},F.prototype.$calcSteps=function(I,H){var P=0,O=this.STEPS,A=[],_=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(P=0;P<O;++P)A.push(_(P/this.STEPS,I,H-I));return A},F.prototype.scrollToLine=function(I,H,P,O){var A=this.$cursorLayer.getPixelPosition({row:I,column:0}),_=A.top;H&&(_-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(_),P!==!1&&this.animateScrolling(N,O)},F.prototype.animateScrolling=function(I,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(I=A[0],I==P))return}var _=O.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:_},clearInterval(this.$timer),O.session.setScrollTop(_.shift()),O.session.$scrollTop=P;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);_.length?(O.session.setScrollTop(_.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},F.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(I,H){this.session.setScrollTop(H),this.session.setScrollLeft(I)},F.prototype.scrollBy=function(I,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},F.prototype.isScrollableBy=function(I,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-P.left-this.$padding,_=A/this.characterWidth,N=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),B=this.$blockCursor?Math.floor(_):Math.round(_);return{row:N,column:B,side:_-B>0?1:-1,offsetX:A}},F.prototype.screenToTextCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-P.left-this.$padding,_=A/this.characterWidth,N=this.$blockCursor?Math.floor(_):Math.round(_),B=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),A)},F.prototype.textToScreenCoordinates=function(I,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,H),A=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,I)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),_=O.row*this.lineHeight;return{pageX:P.left+A-this.scrollLeft,pageY:P.top+_-this.scrollTop}},F.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(I){var H=this.session.selection.cursor;this.addToken(I,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(I,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(I,O);this.addToken(A[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var _=g.createElement("div");if(A.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;A.slice(1).forEach(function(ne){var ae=g.createElement("div"),ue=g.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(g.createTextNode(ne.text)),ae.appendChild(ue),_.appendChild(ae),B=ae}),N.forEach(function(ne){var ae=g.createElement("span");L(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(g.createTextNode(ne.value)),B.appendChild(ae)}),this.$ghostTextWidget={el:_,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),K=this.container,Z=K.getBoundingClientRect().height,te=A.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(I,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var A=I.split(/\r?\n/),_=[],N=0;N<A.length;N++){var B=this.session.$getDisplayTokens(A[N],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(A[N].length);for(var Z=0;Z<U.length;Z++){var te=A[N].slice(K,U[Z]);_.push({text:te,wrapped:!0}),K=U[Z]}}else _.push({text:A[N],wrapped:!1})}return _},F.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(I,H,P,O){var A=this.session;A.bgTokenizer.lines[P]=null;var _={type:H,value:I},N=A.getTokens(P);if(O==null||!N.length)N.push(_);else for(var B=0,U=0;U<N.length;U++){var K=N[U];if(B+=K.value.length,O<=B){var Z=K.value.length-(B-O),te=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:te},_,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(I,H){for(var P=this.session.getTokens(I),O=0,A=!1,_=[],N=0;N<P.length;N++){var B=P[N];if(O+=B.value.length,B.type!=="ghost_text"){if(A){_.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===H&&(A=!0)}}return this.updateLines(I,I),_},F.prototype.removeExtraToken=function(I,H){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},F.prototype.setTheme=function(I,H){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var O=I||this.$options.theme.initialValue;h.loadModule(["theme",O],A)}else A(I);function A(_){if(P.$themeId!=I)return H&&H();if(!_||!_.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");_.$id&&(P.$themeId=_.$id),g.importCssString(_.cssText,_.cssClass,P.container),P.theme&&g.removeCssClass(P.container,P.theme.cssClass);var N="padding"in _?_.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=_.cssClass,P.theme=_,g.addCssClass(P.container,_.cssClass),g.setCssClass(P.container,"ace_dark",_.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:_}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(I,H){g.setCssClass(this.container,I,H!==!1)},F.prototype.unsetStyle=function(I){g.removeCssClass(this.container,I)},F.prototype.setCursorStyle=function(I){g.setStyle(this.scroller.style,"cursor",I)},F.prototype.setMouseCursor=function(I){g.setStyle(this.scroller.style,"cursor",I)},F.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(I){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,I===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=b.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-O)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,p.implement(R.prototype,E),h.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&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(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/net"),b=t("../lib/event_emitter").EventEmitter,h=t("../config");function f(l){var s="importScripts('"+g.qualifyURL(l)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new u;return m.append(s),m.getBlob("application/javascript")}}function o(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var s=f(l),u=window.URL||window.webkitURL,m=u.createObjectURL(s);return new Worker(m)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,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};(function(){p.implement(this,b),this.$createWorkerFromOldConfig=function(l,s,u,m,w){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),h.get("packaged")||!t.toUrl)m=m||h.moduleUrl(s,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var E={};l.forEach(function($){E[$]=x(t.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:s,classname:u}),this.$worker},this.onMessage=function(l){var s=l.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var u=this.callbacks[s.id];u&&(u(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return g.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,s){this.$worker.postMessage({command:l,args:s})},this.call=function(l,s,u){if(u){var m=this.callbackId++;this.callbacks[m]=u,s.push(m)}this.send(l,s)},this.emit=function(l,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:s.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var c=function(l,s,u){var m=null,w=!1,x=Object.create(b),E=[],$=new a({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),m&&(w?setTimeout(k):k())}});$.setEmitSync=function(C){w=C};var k=function(){var C=E.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},h.loadModule(["worker",s],function(C){for(m=new C[u](x);E.length;)k()}),$};r.UIWorkerClient=c,r.WorkerClient=a,r.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,r,d){var p=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,b=t("./lib/oop"),h=function(){function f(o,a,c,l,s,u){var m=this;this.length=a,this.session=o,this.doc=o.getDocument(),this.mainClass=s,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=c;var w=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var o=this,a=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=c.addMarker(new p(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var u=a.createAnchor(s.row,s.column);u.$insertRight=!0,u.detach(),o.others.push(u)}),c.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,a=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=o.addMarker(new p(c.row,c.column,c.row,c.column+a.length),a.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},f.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var a=o;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var c=o.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,l=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,s=a.start.column-this.pos.column;if(this.updateAnchors(o),l&&(this.length+=c),l&&!this.session.$fromUndo){if(o.action==="insert")for(var u=this.others.length-1;u>=0;u--){var m=this.others[u],w={row:m.row,column:m.column+s};this.doc.insertMergedLines(w,o.lines)}else if(o.action==="remove")for(var u=this.others.length-1;u>=0;u--){var m=this.others[u],w={row:m.row,column:m.column+s};this.doc.remove(new p(w.row,w.column,w.row,w.column-c))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var a=this.others.length;a--;)this.others[a].onChange(o);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var o=this,a=this.session,c=function(s,u){a.removeMarker(s.markerId),s.markerId=a.addMarker(new p(s.row,s.column,s.row,s.column+o.length),u,null,!1)};c(this.pos,this.mainClass);for(var l=this.others.length;l--;)c(this.others[l],this.othersClass)}},f.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},f.prototype.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},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),a=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,c=0;c<a;c++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f}();b.implement(h.prototype,g),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,d){var p=t("../lib/event"),g=t("../lib/useragent");function b(f,o){return f.row==o.row&&f.column==o.column}function h(f){var o=f.domEvent,a=o.altKey,c=o.shiftKey,l=o.ctrlKey,s=f.getAccelKey(),u=f.getButton();if(l&&g.isMac&&(u=o.button),f.editor.inMultiSelectMode&&u==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!l&&!a&&!s){u===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(u===0){var m=f.editor,w=m.selection,x=m.inMultiSelectMode,E=f.getDocumentPosition(),$=w.getCursor(),k=f.inSelection()||w.isEmpty()&&b(E,$),C=f.x,L=f.y,R=function(te){C=te.clientX,L=te.clientY},F=m.session,I=m.renderer.pixelToScreenCoordinates(C,L),H=I,P;if(m.$mouseHandler.$enableJumpToDef)l&&a||s&&a?P=c?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(s&&!a){if(P="add",!x&&c)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&g.isMac&&o.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&k)return;if(!x){var O=w.toOrientedRange();m.addSelectionMarker(O)}var A=w.rangeList.rangeAtPoint(E);m.inVirtualSelectionMode=!0,c&&(A=null,O=w.ranges[0]||O,m.removeSelectionMarker(O)),m.once("mouseup",function(){var te=w.toOrientedRange();A&&te.isEmpty()&&b(A.cursor,te.cursor)?w.substractPoint(te.cursor):(c?w.substractPoint(O.cursor):O&&(m.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),m.inVirtualSelectionMode=!1})}else if(P=="block"){f.stop(),m.inVirtualSelectionMode=!0;var _,N=[],B=function(){var te=m.renderer.pixelToScreenCoordinates(C,L),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);b(H,te)&&b(he,w.lead)||(H=te,m.selection.moveToPosition(he),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(N),N=w.rectangularRangeBlock(H,I),m.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=m.$mouseHandler.$clickSelection.clone()),N.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!s?w.toSingleRange():!x&&s&&(_=w.toOrientedRange(),m.addSelectionMarker(_)),c?I=F.documentToScreenPosition(w.lead):w.moveToPosition(E),H={row:-1,column:-1};var U=function(te){B(),clearInterval(Z),m.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),_&&(m.removeSelectionMarker(_),w.toSingleRange(_));for(var he=0;he<N.length;he++)w.addRange(N[he]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},K=B;p.capture(m.container,R,U);var Z=setInterval(function(){K()},20);return f.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,r,d){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.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(g){g.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(g){g.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(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.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(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var p=t("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new p(r.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(t,r,d){var p=t("./range_list").RangeList,g=t("./range").Range,b=t("./selection").Selection,h=t("./mouse/multi_select_handler").onMouseDown,f=t("./lib/event"),o=t("./lib/lang"),a=t("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var c=t("./search").Search,l=new c;function s($,k,C){return l.$options.wrap=!0,l.$options.needle=k,l.$options.backwards=C==-1,l.find($)}var u=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,k){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var L=this.rangeList.add($);return this.$onAddRange($),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),$&&this.fromOrientedRange($)},this.substractPoint=function($){var k=this.rangeList.substractPoint($);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();$.push(k),this.rangeCount=0}for(var C=$.length;C--;){var L=this.ranges.indexOf($[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<$.length;C++){var L=$[C],R=L.start.row,F=L.end.row;if(R===F)k.push(L.clone());else{for(k.push(new g(R,L.start.column,R,this.session.getLine(R).length));++R<F;)k.push(this.getLineRange(R,!0));k.push(new g(F,0,F,L.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var L=this.session.documentToScreenPosition(this.cursor),R=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(L,R);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,k,C){var L=[],R=$.column<k.column;if(R)var F=$.column,I=k.column,H=$.offsetX,P=k.offsetX;else var F=k.column,I=$.column,H=k.offsetX,P=$.offsetX;var O=$.row<k.row;if(O)var A=$.row,_=k.row;else var A=k.row,_=$.row;F<0&&(F=0),A<0&&(A=0),A==_&&(C=!0);for(var N,B=A;B<=_;B++){var U=g.fromPoints(this.session.screenToDocumentPosition(B,F,H),this.session.screenToDocumentPosition(B,I,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=R?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var K=L.length-1;L[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;L[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)L[te].isEmpty()&&L.splice(te,1)}return L}}).call(b.prototype);var m=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var k=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",k),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var k=this.session.$selectionMarkers.indexOf($);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var k=this.session.$selectionMarkers,C=$.length;C--;){var L=$[C];if(L.marker){this.session.removeMarker(L.marker);var R=k.indexOf(L);R!=-1&&k.splice(R,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){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($){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($){var k=$.command,C=$.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?L=C.forEachSelection(k,$.args):k.multiSelectAction=="forEachLine"?L=C.forEachSelection(k,$.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=k.exec(C,$.args||{})):L=k.multiSelectAction(C,$.args||{});else{var L=k.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function($,k,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,R=C==!0||C&&C.$byLines,F=this.session,I=this.selection,H=I.rangeList,P=(L?I:H).ranges,O;if(!P.length)return $.exec?$.exec(this,k||{}):$(this,k||{});var A=I._eventRegistry;I._eventRegistry={};var _=new b(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(R)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;_.fromOrientedRange(P[N]),_.index=N,this.selection=F.selection=_;var B=$.exec?$.exec(this,k||{}):$(this,k||{});!O&&B!==void 0&&(O=B),_.toOrientedRange(P[N])}_.detach(),this.selection=F.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=A,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],L=0;L<k.length;L++)C.push(this.session.getTextRange(k[L]));var R=this.session.getDocument().getNewLineCharacter();$=C.join(R),$.length==(C.length-1)*R.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var L=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=k.row||this.session.$clipPositionToDocument(L.row,L.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,k,C){if(k=k||{},k.needle=$||k.needle,k.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(L)}this.$search.set(k);var R=this.$search.findAll(this.session);if(!R.length)return 0;var F=this.multiSelect;C||F.toSingleRange(R[0]);for(var I=R.length;I--;)F.addRange(R[I],!0);return L&&F.rangeList.rangeAtPoint(L.start)&&F.addRange(L,!0),R.length},this.selectMoreLines=function($,k){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,R=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(R.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(R.row+$,R.column);if(C.isEmpty())var H=F;else var I=this.session.documentToScreenPosition(L?C.end:C.start),H=this.session.screenToDocumentPosition(I.row+$,I.column);if(L){var P=g.fromPoints(F,H);P.cursor=P.start}else{var P=g.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=R.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var k=this.session,C=k.multiSelect,L=C.ranges,R=L.length;R--;){var F=L[R];if(F.isEmpty()){var I=k.getWordRange(F.start.row,F.start.column);F.start.row=I.start.row,F.start.column=I.start.column,F.end.row=I.end.row,F.end.column=I.end.column}}C.mergeOverlappingRanges();for(var H=[],R=L.length;R--;){var F=L[R];H.unshift(k.getTextRange(F))}$<0?H.unshift(H.pop()):H.push(H.shift());for(var R=L.length;R--;){var F=L[R],P=F.clone();k.replace(F,H[R]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,k,C){var L=this.session,R=L.multiSelect,F=R.toOrientedRange();if(!(F.isEmpty()&&(F=L.getWordRange(F.start.row,F.start.column),F.cursor=$==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var I=L.getTextRange(F),H=s(L,I,$);H&&(H.cursor=$==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var $=this.session,k=$.multiSelect,C=k.ranges,L=-1,R=C.filter(function(K){if(K.cursor.row==L)return!0;L=K.cursor.row});if(!C.length||R.length==C.length-1){var F=this.selection.getRange(),I=F.start.row,H=F.end.row,P=I==H;if(P){var O=this.session.getLength(),A;do A=this.session.getLine(H);while(/[=:]/.test(A)&&++H<O);do A=this.session.getLine(I);while(/[=:]/.test(A)&&--I>0);I<0&&(I=0),H>=O&&(H=O-1)}var _=this.session.removeFullLines(I,H);_=this.$reAlignText(_,P),this.session.insert({row:I,column:0},_.join(`
|
950
|
+
`)+`
|
951
|
+
`),P||(F.start.column=0,F.end.column=_[_.length-1].length),this.selection.setRange(F)}else{R.forEach(function(K){k.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,te=$.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>N&&(N=Z.column),he<B&&(B=he),he});C.forEach(function(K,Z){var te=K.cursor,he=N-te.column,ne=U[Z]-B;he>ne?$.insert(te,o.stringRepeat(" ",he-ne)):$.remove(new g(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=te.row,K.cursor=K.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,k){var C=!0,L=!0,R,F,I;return $.map(function(_){var N=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?R==null?(R=N[1].length,F=N[2].length,I=N[3].length,N):(R+F+I!=N[1].length+N[2].length+N[3].length&&(L=!1),R!=N[1].length&&(C=!1),R>N[1].length&&(R=N[1].length),F<N[2].length&&(F=N[2].length),I>N[3].length&&(I=N[3].length),N):[_]}).map(k?P:C?L?O:P:A);function H(_){return o.stringRepeat(" ",_)}function P(_){return _[2]?H(R)+_[2]+H(F-_[2].length+I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function O(_){return _[2]?H(R+F-_[2].length)+_[2]+H(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function A(_){return _[2]?H(R)+_[2]+H(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(m.prototype);function w($,k){return $.row==k.row&&$.column==k.column}r.onSessionChange=function($){var k=$.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",h),$.commands.addCommands(a.defaultCommands),E($))}function E($){if(!$.textInput)return;var k=$.textInput.getElement(),C=!1;f.addListener(k,"keydown",function(R){var F=R.keyCode==18&&!(R.ctrlKey||R.shiftKey||R.metaKey);$.$blockSelectEnabled&&F?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},$),f.addListener(k,"keyup",L,$),f.addListener(k,"blur",L,$);function L(R){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,t("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,r,d){var p=t("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,h,f){var o=b.getLine(f);return this.foldingStartMarker.test(o)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(b,h,f){return null},this.indentationBlock=function(b,h,f){var o=/\S/,a=b.getLine(h),c=a.search(o);if(c!=-1){for(var l=f||a.length,s=b.getLength(),u=h,m=h;++h<s;){var w=b.getLine(h).search(o);if(w!=-1){if(w<=c){var x=b.getTokenAt(h,0);if(!x||x.type!=="string")break}m=h}}if(m>u){var E=b.getLine(m).length;return new p(u,l,m,E)}}},this.openingBracketBlock=function(b,h,f,o,a){var c={row:f,column:o+1},l=b.$findClosingBracket(h,c,a);if(l){var s=b.foldWidgets[l.row];return s==null&&(s=b.getFoldWidget(l.row)),s=="start"&&l.row>c.row&&(l.row--,l.column=b.getLine(l.row).length),p.fromPoints(c,l)}},this.closingBracketBlock=function(b,h,f,o,a){var c={row:f,column:o},l=b.$findOpeningBracket(h,c);if(l)return l.column++,c.column--,p.fromPoints(l,c)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,r,d){var p=t("../lib/dom"),g=t("../range").Range,b=t("../config").nls;function h(o,a,c){for(var l=0,s=o.length-1;l<=s;){var u=l+s>>1,m=c(a,o[u]);if(m>0)l=u+1;else if(m<0)s=u-1;else return u}return-(l+1)}function f(o,a,c){var l=o.getAnnotations().sort(g.comparePoints);if(l.length){var s=h(l,{row:a,column:-1},g.comparePoints);s<0&&(s=-s-1),s>=l.length?s=c>0?0:l.length-1:s===0&&c<0&&(s=l.length-1);var u=l[s];if(!(!u||!c)){if(u.row===a){do u=l[s+=c];while(u&&u.row===a);if(!u)return l.slice()}var m=[];a=u.row;do m[c<0?"unshift":"push"](u),u=l[s+=c];while(u&&u.row==a);return m.length&&m}}}r.showErrorMarker=function(o,a){var c=o.session,l=o.getCursorPosition(),s=l.row,u=c.widgetManager.getWidgetsAtRow(s).filter(function(R){return R.type=="errorMarker"})[0];u?u.destroy():s-=a;var m=f(c,s,a),w;if(m){var x=m[0];l.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,l.row=x.row,w=o.renderer.$gutterLayer.$annotations[l.row]}else{if(u)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(l.row),o.selection.moveToPosition(l);var E={row:l.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},$=E.el.appendChild(p.createElement("div")),k=E.el.appendChild(p.createElement("div"));k.className="error_widget_arrow "+w.className;var C=o.renderer.$cursorLayer.getPixelPosition(l).left;k.style.left=C+o.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(R,F){$.appendChild(p.createTextNode(R)),F<w.displayText.length-1&&$.appendChild(p.createElement("br"))}),$.appendChild(p.createElement("div"));var L=function(R,F,I){if(F===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(E),o.off("changeSelection",E.destroy),o.off("changeSession",E.destroy),o.off("mouseup",E.destroy),o.off("change",E.destroy))},o.keyBinding.addKeyboardHandler(L),o.on("changeSelection",E.destroy),o.on("changeSession",E.destroy),o.on("mouseup",E.destroy),o.on("change",E.destroy),o.session.widgetManager.addLineWidget(E),E.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},p.importCssString(`
|
952
|
+
.error_widget_wrapper {
|
953
|
+
background: inherit;
|
954
|
+
color: inherit;
|
955
|
+
border:none
|
956
|
+
}
|
957
|
+
.error_widget {
|
958
|
+
border-top: solid 2px;
|
959
|
+
border-bottom: solid 2px;
|
960
|
+
margin: 5px 0;
|
961
|
+
padding: 10px 40px;
|
962
|
+
white-space: pre-wrap;
|
963
|
+
}
|
964
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
965
|
+
border-color: #ff5a5a
|
966
|
+
}
|
967
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
968
|
+
border-color: #F1D817
|
969
|
+
}
|
970
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
971
|
+
border-color: #5a5a5a
|
972
|
+
}
|
973
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
974
|
+
border-color: #5aaa5a
|
975
|
+
}
|
976
|
+
.error_widget_arrow {
|
977
|
+
position: absolute;
|
978
|
+
border: solid 5px;
|
979
|
+
border-top-color: transparent!important;
|
980
|
+
border-right-color: transparent!important;
|
981
|
+
border-left-color: transparent!important;
|
982
|
+
top: -5px;
|
983
|
+
}
|
984
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","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","ace/loader_build"],function(t,r,d){t("./loader_build")(r);var p=t("./lib/dom"),g=t("./range").Range,b=t("./editor").Editor,h=t("./edit_session").EditSession,f=t("./undomanager").UndoManager,o=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(c,l){if(typeof c=="string"){var s=c;if(c=document.getElementById(s),!c)throw new Error("ace.edit can't find div #"+s)}if(c&&c.env&&c.env.editor instanceof b)return c.env.editor;var u="";if(c&&/input|textarea/i.test(c.tagName)){var m=c;u=m.value,c=p.createElement("pre"),m.parentNode.replaceChild(c,m)}else c&&(u=c.textContent,c.innerHTML="");var w=r.createEditSession(u),x=new b(new o(c),w,l),E={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(E.textarea=m),x.on("destroy",function(){E.editor.container.env=null}),x.container.env=x.env=E,x},r.createEditSession=function(c,l){var s=new h(c,l);return s.setUndoManager(new f),s},r.Range=g,r.Editor=b,r.EditSession=h,r.UndoManager=f,r.VirtualRenderer=o;var a=r.config.version;r.version=a}),function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var d in t)t.hasOwnProperty(d)&&(r.ace[d]=t[d]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}(rg)),rg.exports}var us=ar("b",R1()),og={exports:{}},sg;function O1(){return sg||(sg=1,function(n,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var h=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},l=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},s=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},u=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":E,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},u,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,l,b,h,s,f,o,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(R,F,I){var H=R[2]=="-"||R[2]=="~"?"indentedHeredoc":"heredoc",P=R.split(this.splitRegex);return I.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(R,F,I){return R===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(R,F,I){return R===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(R,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:R}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(R,F,I){return this.next="",R=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(R,F,I){return I.length&&R[0]===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};p.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),o=f.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new p(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=t("../../range").Range,h=t("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};p.inherits(f,g),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(o,a,c){var l=o.getLine(c),s=this.foldingStartMarker.test(l),u=this.foldingStopMarker.test(l);if(s&&!u){var m=l.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||m[1]=="when"&&/\sthen\s/.test(l)===!0)return;if(o.getTokenAt(c,m.index+2).type==="keyword")return"start"}else if(!m[3]||o.getTokenAt(c,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!u||s&&u)return"";var m=l.match(this.foldingStopMarker);if(m[3]==="end"){if(o.getTokenAt(c,m.index+1).type==="keyword")return"end"}else if(!m[1]||o.getTokenAt(c,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,a,c){var l=o.doc.getLine(c),s=this.foldingStartMarker.exec(l);if(s)return s[1]||s[3]?this.rubyBlock(o,c,s.index+2):this.openingBracketBlock(o,"{",c,s.index);var s=this.foldingStopMarker.exec(l);if(s)return s[3]==="end"&&o.getTokenAt(c,s.index+1).type==="keyword"?this.rubyBlock(o,c,s.index+1):s[1]==="=end"&&o.getTokenAt(c,s.index+1).type==="comment.multiline"?this.rubyBlock(o,c,s.index+1):this.closingBracketBlock(o,"}",c,s.index+s[0].length)},this.rubyBlock=function(o,a,c,l){var s=new h(o,a,c),u=s.getCurrentToken();if(!(!u||u.type!="keyword"&&u.type!="comment.multiline")){var m=u.value,w=o.getLine(a);switch(u.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+u.value);if(!x.test(w))return;var E=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var x=new RegExp("^\\s*"+u.value+"\\s*$");if(!x.test(w))return;var E=1;break;default:var E=this.indentKeywords[m]}var $=[m];if(E){var k=E===-1?o.getLine(a-1).length:o.getLine(a).length,C=a,L=[];if(L.push(s.getCurrentTokenRange()),s.step=E===-1?s.stepBackward:s.stepForward,u.type=="comment.multiline"){for(;u=s.step();)if(u.type==="comment.multiline"){if(E==1){if(k=6,u.value=="=end")break}else if(u.value=="=begin")break}}else for(;u=s.step();){var R=!1;if(u.type==="keyword"){var F=E*this.indentKeywords[u.value];switch(w=o.getLine(s.getCurrentTokenRow()),u.value){case"do":for(var I=s.$tokenIndex-1;I>=0;I--){var H=s.$rowTokens[I];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var x=new RegExp("^\\s*"+u.value+"\\s*$");(!x.test(w)||m=="case")&&(F=0,R=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+u.value);x.test(w)||(F=0,R=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(F=0,R=!0)}if(F>0)$.unshift(u.value);else if(F<=0&&R===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&u.value!="do"||u.value=="do"&&E==-1&&F!=0||u.value!="do"))break;F===0&&$.unshift(u.value)}}}if(!u)return null;if(l)return L.push(s.getCurrentTokenRange()),L;var a=s.getCurrentTokenRow();if(E===-1){if(u.type==="comment.multiline")var P=6;else var P=o.getLine(a).length;return new b(a,P,C-1,k)}return new b(C,k,a-1,o.getLine(a-1).length)}}}}).call(f.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./ruby_highlight_rules").RubyHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../range").Range,o=t("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};p.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,s){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[]\s*$/),E=l.match(/^\s*(class|def|module)\s.*$/),$=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||$||k)&&(u+=s)}return u},this.checkOutdent=function(c,l,s){return/^\s+(end|else|rescue|ensure)$/.test(l+s)||this.$outdent.checkOutdent(l,s)},this.autoOutdent=function(c,l,s){var u=l.getLine(s);if(/}/.test(u))return this.$outdent.autoOutdent(l,s);var m=this.$getIndent(u),w=l.getLine(s-1),x=this.$getIndent(w),E=l.getTabString();x.length<=m.length&&m.slice(-E.length)==E&&l.remove(new f(s,m.length-E.length,s,m.length))},this.getMatching=function(c,l,s){if(l==null){var u=c.selection.lead;s=u.column,l=u.row}var m=c.getTokenAt(l,s);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,l,s,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(t){n&&(n.exports=t)})}()}(og)),og.exports}O1();var ag={exports:{}},lg;function N1(){return lg||(lg=1,function(n,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=function(){var h="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",o="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":o,"variable.language":"self|cls","constant.language":f,keyword:h},"identifier"),c="[uU]?",l="[rR]",s="[fF]",u="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+E+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",R="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",F="(?:(?:"+R+"|"+L+")"+k+")",I="(?:"+F+"|"+R+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:s+'"{3}',next:"fqqstring3"},{token:"string",regex:s+'"(?=.)',next:"fqqstring"},{token:"string",regex:s+"'{3}",next:"fqstring3"},{token:"string",regex:s+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};p.inherits(b,g),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};p.inherits(b,g),(function(){this.getFoldWidgetRange=function(h,f,o){var a=h.getLine(o),c=a.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(h,c[1],o,c.index):c[2]?this.indentationBlock(h,o,c.index+c[2].length):this.indentationBlock(h,o)}}).call(b.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./python_highlight_rules").PythonHighlightRules,h=t("./folding/pythonic").FoldMode,f=t("../range").Range,o=function(){this.HighlightRules=b,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};p.inherits(o,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,l,s){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(u+=s)}return u};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,s){if(s!==`\r
|
985
|
+
`&&s!=="\r"&&s!==`
|
986
|
+
`)return!1;var u=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!u)return!1;do var m=u.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(c,l,s){s+=1;var u=this.$getIndent(l.getLine(s)),m=l.getTabString();u.slice(-m.length)==m&&l.remove(new f(s,u.length-m.length,s,u.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(o.prototype),r.Mode=o}),function(){ace.require(["ace/mode/python"],function(t){n&&(n.exports=t)})}()}(ag)),ag.exports}N1();var cg={exports:{}},ug;function D1(){return ug||(ug=1,function(n,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};p.inherits(b,g),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),o=f.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new p(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("../../range").Range,b=t("./fold_mode").FoldMode,h=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};p.inherits(h,b),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,o,a){var c=f.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(f,o,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(f,o,a,c){var l=f.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(f,l,a);var s=l.match(this.foldingStartMarker);if(s){var u=s.index;if(s[1])return this.openingBracketBlock(f,s[1],a,u);var m=f.getCommentFoldRange(a,u+s[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(f,a):o!="all"&&(m=null)),m}if(o!=="markbegin"){var s=l.match(this.foldingStopMarker);if(s){var u=s.index+s[0].length;return s[1]?this.closingBracketBlock(f,s[1],a,u):f.getCommentFoldRange(a,u,-1)}}},this.getSectionRange=function(f,o){var a=f.getLine(o),c=a.search(/\S/),l=o,s=a.length;o+=1;for(var u=o,m=f.getLength();++o<m;){a=f.getLine(o);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(f,"all",o);if(x){if(x.start.row<=l)break;if(x.isMultiLine())o=x.end.row;else if(c==w)break}u=o}}return new g(l,s,u,f.getLine(u).length)},this.getCommentRegionBlock=function(f,o,a){for(var c=o.search(/\s*$/),l=f.getLength(),s=a,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){o=f.getLine(a);var w=u.exec(o);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>s)return new g(s,c,x,o.length)}}).call(h.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./json_highlight_rules").JsonHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("./folding/cstyle").FoldMode,o=t("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};p.inherits(a,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,l,s){var u=this.$getIndent(l);if(c=="start"){var m=l.match(/^.*[\{\(\[]\s*$/);m&&(u+=s)}return u},this.checkOutdent=function(c,l,s){return this.$outdent.checkOutdent(l,s)},this.autoOutdent=function(c,l,s){this.$outdent.autoOutdent(l,s)},this.createWorker=function(c){var l=new o(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(c.getDocument()),l.on("annotate",function(s){c.setAnnotations(s.data)}),l.on("terminate",function(){c.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(t){n&&(n.exports=t)})}()}(cg)),cg.exports}D1();var hg={exports:{}},dg;function F1(){return dg||(dg=1,function(n,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop");t("../lib/lang");var g=t("./text_highlight_rules").TextHighlightRules,b=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",h=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",o=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",u=function(){var m=this.createKeywordMapper({"support.function":h,"support.constant":f,"support.type":b,"support.constant.color":o,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};p.inherits(u,g),r.CssHighlightRules=u}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},b.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};p.inherits(b,g),b.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},b.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=b}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(t,r,d){function p(){var c=o.replace("\\d","\\d\\-"),l={onMatch:function(u,m,w){var x=u.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:u.slice(0,x)},{type:"meta.tag.tag-name.xml",value:u.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(u,m,w){return m==w[0]&&w.shift(),u.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:u}]},nextState:"jsx"},s,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(c){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=t("../lib/oop"),h=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=t("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(c){var l={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},s=this.createKeywordMapper(l,"identifier"),u="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(l).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+u+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:s,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,$,k){if(this.next=E=="{"?this.nextState:"",E=="{"&&k.length)k.unshift("start",$);else if(E=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!c||c.jsx!=0)&&p.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,f),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=function(h){var f="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+f+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:f},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+f+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+f+":)?"+f+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===b&&this.normalizeRules()};(function(){this.embedTagRules=function(h,f,o){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(<)("+o+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[o+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,c,l){return l.splice(0),this.token}}],this.embedRules(h,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(</)("+o+"(?=\\s|>|$))",next:o+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),p.inherits(b,g),r.XmlHighlightRules=b}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./css_highlight_rules").CssHighlightRules,h=t("./javascript_highlight_rules").JavaScriptHighlightRules,f=t("./xml_highlight_rules").XmlHighlightRules,o=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){f.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,l){var s=o[l];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(s?"."+s:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(b,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};p.inherits(a,f),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(t,r,d){var p=t("../config").$modes,g=t("../lib/oop"),b=t("../lib/lang"),h=t("./text_highlight_rules").TextHighlightRules,f=t("./html_highlight_rules").HtmlHighlightRules,o=function(c){return"(?:[^"+b.escapeRegExp(c)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(s,u,m,w){var x=s.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return p[E]||(E=""),m.unshift("githubblock",[],[x[1],x[2],E],u),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(s,u,m,w){var x=m[1],E=m[2][0],$=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(s);if(C&&C[1].length<E.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&p[k]){var L=p[k].getTokenizer().getLineTokens(s,x.slice(0));return m[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(s){return"markup.heading."+s.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+o("]")+")(\\]\\s*\\[)("+o("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+o("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+o('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:l}),this.normalizeRules()};g.inherits(a,h),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=t("../../range").Range,h=r.FoldMode=function(){};p.inherits(h,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,o,a){var c=f.getLine(a);return this.foldingStartMarker.test(c)?c[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,o,a){function c(R){return E=f.getTokens(R)[0],E&&E.type.lastIndexOf($,0)===0}function l(){var R=E.value[0];return R=="="?6:R=="-"?5:7-E.value.search(/[^#]|$/)}var s=f.getLine(a),u=s.length,m=f.getLength(),w=a,x=a;if(s.match(this.foldingStartMarker)){if(s[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(s=f.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new b(w,u,a,0)}for(;a-- >0&&(s=f.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new b(a,s.length,w,0)}var E,$="markup.heading";if(c(a)){for(var k=l();++a<m;)if(c(a)){var C=l();if(C>=k)break}if(x=a-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(f.getLine(x));)x--;if(x>w){var L=f.getLine(x).length;return new b(w,u,x,L)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var f=b.getLine(h),o=f.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new p(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(t,r,d){function p(o,a){return o&&o.type.lastIndexOf(a+".xml")>-1}var g=t("../../lib/oop"),b=t("../behaviour").Behaviour,h=t("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(o,a,c,l,s){if(s=='"'||s=="'"){var u=s,m=l.doc.getTextRange(c.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&c.getWrapBehavioursEnabled())return{text:u+m+u,selection:!1};var w=c.getCursorPosition(),x=l.doc.getLine(w.row),E=x.substring(w.column,w.column+1),$=new h(l,w.row,w.column),k=$.getCurrentToken();if(E==u&&(p(k,"attribute-value")||p(k,"string")))return{text:"",selection:[1,1]};if(k||(k=$.stepBackward()),!k)return;for(;p(k,"tag-whitespace")||p(k,"whitespace");)k=$.stepBackward();var C=!E||E.match(/\s/);if(p(k,"attribute-equals")&&(C||E==">")||p(k,"decl-attribute-equals")&&(C||E=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(o,a,c,l,s){var u=l.doc.getTextRange(s);if(!s.isMultiLine()&&(u=='"'||u=="'")){var m=l.doc.getLine(s.start.row),w=m.substring(s.start.column+1,s.start.column+2);if(w==u)return s.end.column++,s}}),this.add("autoclosing","insertion",function(o,a,c,l,s){if(s==">"){var u=c.getSelectionRange().start,m=new h(l,u.row,u.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(p(w,"tag-name")||p(w,"tag-whitespace")||p(w,"attribute-name")||p(w,"attribute-equals")||p(w,"attribute-value"))||p(w,"reference.attribute-value"))return;if(p(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(u.column<x)return;if(u.column==x){var E=m.stepForward();if(E&&p(E,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(l.getLine(u.row).slice(u.column)))return;for(;!p(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var $=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(p(m.stepBackward(),"end-tag-open"))return;var C=w.value;return $==u.row&&(C=C.substring(0,u.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(o,a,c,l,s){if(s==`
|
987
|
+
`){var u=c.getCursorPosition(),m=l.getLine(u.row),w=new h(l,u.row,u.column),x=w.getCurrentToken();if(p(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var E=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var k=l.getTokenAt(u.row,u.column+1),m=l.getLine($),C=this.$getIndent(m),L=C+l.getTabString();return k&&k.value==="</"?{text:`
|
988
|
+
`+L+`
|
989
|
+
`+C,selection:[1,L.length,1,L.length]}:{text:`
|
990
|
+
`+L}}}}})};g.inherits(f,b),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(t,r,d){var p=t("../../lib/oop"),g=t("../../token_iterator").TokenIterator,b=t("../behaviour/cstyle").CstyleBehaviour,h=t("../behaviour/xml").XmlBehaviour,f=function(){var o=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(o),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,c,l,s,u){if(u==">"){var m=l.getSelectionRange().start,w=new g(s,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};p.inherits(f,b),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,d){function p(a,c){return a&&a.type&&a.type.lastIndexOf(c+".xml")>-1}var g=t("../../lib/oop"),b=t("../../range").Range,h=t("./fold_mode").FoldMode,f=r.FoldMode=function(a,c){h.call(this),this.voidElements=a||{},this.optionalEndTags=g.mixin({},this.voidElements),c&&g.mixin(this.optionalEndTags,c)};g.inherits(f,h);var o=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,c,l){var s=this._getFirstTagInLine(a,l);return s?s.closing||!s.tagName&&s.selfClosing?c==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(a,l,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,c){return/comment/.test(a.getState(c))&&/<!-/.test(a.getLine(c))?"start":""},this._getFirstTagInLine=function(a,c){for(var l=a.getTokens(c),s=new o,u=0;u<l.length;u++){var m=l[u];if(p(m,"tag-open")){if(s.end.column=s.start.column+m.value.length,s.closing=p(m,"end-tag-open"),m=l[++u],!m)return null;if(s.tagName=m.value,m.value===""){if(m=l[++u],!m)return null;s.tagName=m.value}for(s.end.column+=m.value.length,u++;u<l.length;u++)if(m=l[u],s.end.column+=m.value.length,p(m,"tag-close")){s.selfClosing=m.value=="/>";break}return s}if(p(m,"tag-close"))return s.selfClosing=m.value=="/>",s;s.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,c,l,s){for(var u=a.getTokens(c),m=0,w=0;w<u.length;w++){var x=u[w];if(m+=x.value.length,!(m<s-1)&&p(x,"end-tag-open")&&(x=u[w+1],p(x,"tag-name")&&x.value===""&&(x=u[w+2]),x&&x.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,c,l){var s=this._getFirstTagInLine(a,l);if(!s)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var u=a.getMatchingTags({row:l,column:0});if(u)return new b(u.openTag.end.row,u.openTag.end.column,u.closeTag.start.row,u.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("../../range").Range,b=t("./fold_mode").FoldMode,h=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};p.inherits(h,b),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,o,a){var c=f.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(f,o,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(f,o,a,c){var l=f.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(f,l,a);var s=l.match(this.foldingStartMarker);if(s){var u=s.index;if(s[1])return this.openingBracketBlock(f,s[1],a,u);var m=f.getCommentFoldRange(a,u+s[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(f,a):o!="all"&&(m=null)),m}if(o!=="markbegin"){var s=l.match(this.foldingStopMarker);if(s){var u=s.index+s[0].length;return s[1]?this.closingBracketBlock(f,s[1],a,u):f.getCommentFoldRange(a,u,-1)}}},this.getSectionRange=function(f,o){var a=f.getLine(o),c=a.search(/\S/),l=o,s=a.length;o+=1;for(var u=o,m=f.getLength();++o<m;){a=f.getLine(o);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(f,"all",o);if(x){if(x.start.row<=l)break;if(x.isMultiLine())o=x.end.row;else if(c==w)break}u=o}}return new g(l,s,u,f.getLine(u).length)},this.getCommentRegionBlock=function(f,o,a){for(var c=o.search(/\s*$/),l=f.getLength(),s=a,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){o=f.getLine(a);var w=u.exec(o);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>s)return new g(s,c,x,o.length)}}).call(h.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,d){var p=t("../../lib/oop"),g=t("./xml").FoldMode,b=t("./cstyle").FoldMode,h=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new g};p.inherits(h,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,o,a){var c=this.getFoldWidgetBase(f,o,a);return c||this.xmlFoldMode.getFoldWidget(f,o,a)},this.getFoldWidgetRange=function(f,o,a,c){var l=this.getFoldWidgetRangeBase(f,o,a,c);return l||this.xmlFoldMode.getFoldWidgetRange(f,o,a)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./javascript_highlight_rules").JavaScriptHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,o=t("./behaviour/javascript").JavaScriptBehaviour,a=t("./folding/javascript").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new o,this.foldingRules=new a};p.inherits(c,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,s,u){var m=this.$getIndent(s),w=this.getTokenizer().getLineTokens(s,l),x=w.tokens,E=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(l=="start"||l=="no_regex"){var $=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(m+=u)}else if(l=="doc-start"&&(E=="start"||E=="no_regex"))return"";return m},this.checkOutdent=function(l,s,u){return this.$outdent.checkOutdent(s,u)},this.autoOutdent=function(l,s,u){this.$outdent.autoOutdent(s,u)},this.createWorker=function(l){var s=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(l.getDocument()),s.on("annotate",function(u){l.setAnnotations(u.data)}),s.on("terminate",function(){l.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(t,r,d){var p={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var b=document.createElement("c").style;for(var h in b)if(typeof b[h]=="string"){var f=h.replace(/[A-Z]/g,function(o){return"-"+o.toLowerCase()});p.hasOwnProperty(f)||(p[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,h,f,o){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(f.row).substr(0,f.column),c=/\([^)]*$/.test(a);return c&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,h,f,o):this.getPropertyCompletions(b,h,f,o,c)}return[]},this.getPropertyCompletions=function(b,h,f,o,a){a=a||!1;var c=Object.keys(p);return c.map(function(l){return{caption:l,snippet:l+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,h,f,o){var a=h.getLine(f.row).substr(0,f.column),c=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!c)return[];var l=[];return c in p&&typeof p[c]=="object"&&(l=Object.keys(p[c])),l.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(t,r,d){var p=t("../../lib/oop");t("../behaviour").Behaviour;var g=t("./cstyle").CstyleBehaviour,b=t("../../token_iterator").TokenIterator,h=function(){this.inherit(g),this.add("colon","insertion",function(f,o,a,c,l){if(l===":"&&a.selection.isEmpty()){var s=a.getCursorPosition(),u=new b(c,s.row,s.column),m=u.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=u.stepBackward()),m&&m.type==="support.type"){var w=c.doc.getLine(s.row),x=w.substring(s.column,s.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,o,a,c,l){var s=c.doc.getTextRange(l);if(!l.isMultiLine()&&s===":"){var u=a.getCursorPosition(),m=new b(c,u.row,u.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=c.doc.getLine(l.start.row),E=x.substring(l.end.column,l.end.column+1);if(E===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(f,o,a,c,l){if(l===";"&&a.selection.isEmpty()){var s=a.getCursorPosition(),u=c.doc.getLine(s.row),m=u.substring(s.column,s.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,o,a,c,l){if(l==="!"&&a.selection.isEmpty()){var s=a.getCursorPosition(),u=c.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(u.substring(s.column)))return{text:"!important",selection:[10,10]}}})};p.inherits(h,g),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./css_highlight_rules").CssHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,o=t("./css_completions").CssCompletions,a=t("./behaviour/css").CssBehaviour,c=t("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new a,this.$completer=new o,this.foldingRules=new c};p.inherits(l,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,u,m){var w=this.$getIndent(u),x=this.getTokenizer().getLineTokens(u,s).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var E=u.match(/^.*\{\s*$/);return E&&(w+=m),w},this.checkOutdent=function(s,u,m){return this.$outdent.checkOutdent(u,m)},this.autoOutdent=function(s,u,m){this.$outdent.autoOutdent(u,m)},this.getCompletions=function(s,u,m,w){return this.$completer.getCompletions(s,u,m,w)},this.createWorker=function(s){var u=new f(["ace"],"ace/mode/css_worker","Worker");return u.attachToDocument(s.getDocument()),u.on("annotate",function(m){s.setAnnotations(m.data)}),u.on("terminate",function(){s.clearAnnotations()}),u},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=r.FoldMode=function(h,f){this.defaultMode=h,this.subModes=f};p.inherits(b,g),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var f in this.subModes)if(h.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(h,f,o,a){var c=this.$getMode(h);return c?c.getFoldWidget(f,o,a):""},this.getFoldWidget=function(h,f,o){return this.$tryMode(h.getState(o-1),h,f,o)||this.$tryMode(h.getState(o),h,f,o)||this.defaultMode.getFoldWidget(h,f,o)},this.getFoldWidgetRange=function(h,f,o){var a=this.$getMode(h.getState(o-1));return(!a||!a.getFoldWidget(h,f,o))&&(a=this.$getMode(h.getState(o))),(!a||!a.getFoldWidget(h,f,o))&&(a=this.defaultMode),a.getFoldWidgetRange(h,f,o)}}).call(b.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,d){var p=t("../../lib/oop"),g=t("./mixed").FoldMode,b=t("./xml").FoldMode,h=t("./cstyle").FoldMode,f=r.FoldMode=function(o,a){g.call(this,new b(o,a),{"js-":new h,"css-":new h})};p.inherits(f,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(t,r,d){function p(u,m){return u.type.lastIndexOf(m+".xml")>-1}function g(u,m){for(var w=new h(u,m.row,m.column),x=w.getCurrentToken();x&&!p(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(u,m){for(var w=new h(u,m.row,m.column),x=w.getCurrentToken();x&&!p(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var h=t("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],o=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=f.concat(o),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},l=Object.keys(c),s=function(){};(function(){this.getCompletions=function(u,m,w,x){var E=m.getTokenAt(w.row,w.column);if(!E)return[];if(p(E,"tag-name")||p(E,"tag-open")||p(E,"end-tag-open"))return this.getTagCompletions(u,m,w,x);if(p(E,"tag-whitespace")||p(E,"attribute-name"))return this.getAttributeCompletions(u,m,w,x);if(p(E,"attribute-value"))return this.getAttributeValueCompletions(u,m,w,x);var $=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(u,m,w,x):[]},this.getTagCompletions=function(u,m,w,x){return l.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(u,m,w,x){var E=g(m,w);if(!E)return[];var $=a;return E in c&&($=$.concat(Object.keys(c[E]))),$.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(u,m,w,x){var E=g(m,w),$=b(m,w);if(!E)return[];var k=[];return E in c&&$ in c[E]&&typeof c[E][$]=="object"&&(k=Object.keys(c[E][$])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(u,m,w,x){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(s.prototype),r.HtmlCompletions=s}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./text").Mode,h=t("./javascript").Mode,f=t("./css").Mode,o=t("./html_highlight_rules").HtmlHighlightRules,a=t("./behaviour/xml").XmlBehaviour,c=t("./folding/html").FoldMode,l=t("./html_completions").HtmlCompletions,s=t("../worker/worker_client").WorkerClient,u=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=o,this.$behaviour=new a,this.$completer=new l,this.createModeDelegates({"js-":h,"css-":f}),this.foldingRules=new c(this.voidElements,g.arrayToMap(m))};p.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(u),this.getNextLineIndent=function(x,E,$){return this.$getIndent(E)},this.checkOutdent=function(x,E,$){return!1},this.getCompletions=function(x,E,$,k){return this.$completer.getCompletions(x,E,$,k)},this.createWorker=function(x){if(this.constructor==w){var E=new s(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(x.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function($){x.setAnnotations($.data)}),E.on("terminate",function(){x.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,b=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",h=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var o=this.createKeywordMapper({keyword:b,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",l="(?:\\d+)",s="(?:(?:"+l+"?"+c+")|(?:"+l+"\\.))",u="(?:(?:"+s+"|"+l+"))",m="(?:"+u+"|"+s+")",w="(?:&"+l+")",x="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,L,R){var F=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return R.push(F,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:o,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};p.inherits(f,g),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./sh_highlight_rules").ShHighlightRules,h=t("../range").Range,f=t("./folding/cstyle").FoldMode,o=function(){this.HighlightRules=b,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};p.inherits(o,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,s){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(u+=s)}return u};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,s){if(s!==`\r
|
991
|
+
`&&s!=="\r"&&s!==`
|
992
|
+
`)return!1;var u=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!u)return!1;do var m=u.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(c,l,s){s+=1;var u=this.$getIndent(l.getLine(s)),m=l.getTabString();u.slice(-m.length)==m&&l.remove(new h(s,u.length-m.length,s,u.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(o.prototype),r.Mode=o}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./text").Mode,h=t("./xml_highlight_rules").XmlHighlightRules,f=t("./behaviour/xml").XmlBehaviour,o=t("./folding/xml").FoldMode,a=t("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=h,this.$behaviour=new f,this.foldingRules=new o};p.inherits(c,b),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(l){var s=new a(["ace"],"ace/mode/xml_worker","Worker");return s.attachToDocument(l.getDocument()),s.on("error",function(u){l.setAnnotations(u.data)}),s.on("terminate",function(){l.clearAnnotations()}),s},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(t,r,d){var p=t("../lib/oop"),g=t("./behaviour/cstyle").CstyleBehaviour,b=t("./text").Mode,h=t("./markdown_highlight_rules").MarkdownHighlightRules,f=t("./folding/markdown").FoldMode,o=function(){this.HighlightRules=h,this.createModeDelegates({javascript:t("./javascript").Mode,html:t("./html").Mode,bash:t("./sh").Mode,sh:t("./sh").Mode,xml:t("./xml").Mode,css:t("./css").Mode}),this.foldingRules=new f,this.$behaviour=new g({braces:!0})};p.inherits(o,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,c,l){if(a=="listblock"){var s=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!s)return"";var u=s[2];return u||(u=parseInt(s[3],10)+1+"."),s[1]+u+s[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(o.prototype),r.Mode=o}),function(){ace.require(["ace/mode/markdown"],function(t){n&&(n.exports=t)})}()}(hg)),hg.exports}F1();var pg={exports:{}},gg;function P1(){return gg||(gg=1,function(n,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,d){d.exports=`.ace-twilight .ace_gutter {
|
993
|
+
background: #232323;
|
994
|
+
color: #E2E2E2
|
995
|
+
}
|
996
|
+
|
997
|
+
.ace-twilight .ace_print-margin {
|
998
|
+
width: 1px;
|
999
|
+
background: #232323
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
.ace-twilight {
|
1003
|
+
background-color: #141414;
|
1004
|
+
color: #F8F8F8
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_cursor {
|
1008
|
+
color: #A7A7A7
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1012
|
+
background: rgba(221, 240, 255, 0.20)
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1016
|
+
box-shadow: 0 0 3px 0px #141414;
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1020
|
+
background: rgb(102, 82, 0)
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1024
|
+
margin: -1px 0 0 -1px;
|
1025
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1029
|
+
background: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_gutter-active-line {
|
1033
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1037
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_invisible {
|
1041
|
+
color: rgba(255, 255, 255, 0.25)
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
.ace-twilight .ace_keyword,
|
1045
|
+
.ace-twilight .ace_meta {
|
1046
|
+
color: #CDA869
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
.ace-twilight .ace_constant,
|
1050
|
+
.ace-twilight .ace_constant.ace_character,
|
1051
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1052
|
+
.ace-twilight .ace_constant.ace_other,
|
1053
|
+
.ace-twilight .ace_heading,
|
1054
|
+
.ace-twilight .ace_markup.ace_heading,
|
1055
|
+
.ace-twilight .ace_support.ace_constant {
|
1056
|
+
color: #CF6A4C
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1060
|
+
color: #F8F8F8;
|
1061
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1065
|
+
text-decoration: underline;
|
1066
|
+
font-style: italic;
|
1067
|
+
color: #D2A8A1
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_support {
|
1071
|
+
color: #9B859D
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
.ace-twilight .ace_fold {
|
1075
|
+
background-color: #AC885B;
|
1076
|
+
border-color: #F8F8F8
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_support.ace_function {
|
1080
|
+
color: #DAD085
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
.ace-twilight .ace_list,
|
1084
|
+
.ace-twilight .ace_markup.ace_list,
|
1085
|
+
.ace-twilight .ace_storage {
|
1086
|
+
color: #F9EE98
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1090
|
+
.ace-twilight .ace_meta.ace_tag {
|
1091
|
+
color: #AC885B
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string {
|
1095
|
+
color: #8F9D6A
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_string.ace_regexp {
|
1099
|
+
color: #E9C062
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
.ace-twilight .ace_comment {
|
1103
|
+
font-style: italic;
|
1104
|
+
color: #5F5A60
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_variable {
|
1108
|
+
color: #7587A6
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_xml-pe {
|
1112
|
+
color: #494949
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
.ace-twilight .ace_indent-guide-active {
|
1120
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1121
|
+
}
|
1122
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(t,r,d){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=t("./twilight-css");var p=t("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(t){n&&(n.exports=t)})}()}(pg)),pg.exports}P1();var fg={exports:{}},mg;function W1(){return mg||(mg=1,function(n,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(t,r,d){function p(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var g=t("./lib/dom"),b=t("./lib/oop"),h=t("./lib/event_emitter").EventEmitter,f=t("./lib/lang"),o=t("./range").Range,a=t("./range_list").RangeList,c=t("./keyboard/hash_handler").HashHandler,l=t("./tokenizer").Tokenizer,s=t("./clipboard"),u={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,R){var F=C.session.getTextRange();return R?F.replace(/\n\r?([ \t]*\S)/g,`
|
1123
|
+
`+R+"$1"):F},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return s.getText&&s.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};u.SELECTED_TEXT=u.SELECTION;var m=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=u}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function R(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var F={regex:"/("+R("/")+"+)/",onMatch:function(I,H,P){var O=P[0];return O.fmtString=!0,O.guard=I.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(I=O),[I]}},{regex:/}/,onMatch:function(I,H,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,H,P){var O=L(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+R("\\|")+"*\\|",onMatch:function(I,H,P){var O=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?I=O:O=="n"?I=`
|
1124
|
+
`:O=="t"?I=" ":"ulULE".indexOf(O)!=-1&&(I={changeCase:O,local:O>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,H,P){var O=P.shift();return O&&(O.flag=I.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,H,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,H,P){var O={text:I.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,H,P){var O=P[0];return O.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(I,H,P){I[1]=="+"&&(P[0].ifEnd=P[0]),I[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,R){return this.getTokenizer().getLineTokens(L,R).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(L,R,F){if(/^\d+$/.test(R))return(this.variables.__||{})[R]||"";if(/^[A-Z]\d+$/.test(R))return(this.variables[R[0]+"__"]||{})[R.substr(1)]||"";if(R=R.replace(/^TM_/,""),!this.variables.hasOwnProperty(R))return"";var I=this.variables[R];return typeof I=="function"&&(I=this.variables[R](L,R,F)),I??""},C.prototype.tmStrFormat=function(L,R,F){if(!R.fmt)return L;var I=R.flag||"",H=R.guard;H=new RegExp(H,I.replace(/[^gim]/g,""));var P=typeof R.fmt=="string"?this.tokenizeTmSnippet(R.fmt,"formatString"):R.fmt,O=this,A=L.replace(H,function(){var _=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,F),B="E",U=0;U<N.length;U++){var K=N[U];if(typeof K=="object")if(N[U]="",K.changeCase&&K.local){var Z=N[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?N[U]=Z[0].toUpperCase():N[U]=Z[0].toLowerCase(),N[U+1]=Z.substr(1))}else K.changeCase&&(B=K.changeCase);else B=="U"?N[U]=K.toUpperCase():B=="L"&&(N[U]=K.toLowerCase())}return O.variables.__=_,N.join("")});return A},C.prototype.tmFormatFunction=function(L,R,F){return R.formatFunction=="upcase"?L.toUpperCase():R.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,R){function F(B){var U=L.indexOf(B,O+1);U!=-1&&(O=U)}for(var I=[],H="",P=!0,O=0;O<L.length;O++){var A=L[O];if(typeof A=="string"){I.push(A),A==`
|
1125
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec(A)[0],P=/\S/.test(A));continue}if(A){if(P=!1,A.fmtString){var _=L.indexOf(A,O+1);_==-1&&(_=L.length),A.fmt=L.slice(O+1,_),O=_}if(A.text){var N=this.getVariableValue(R,A.text,H)+"";A.fmtString&&(N=this.tmStrFormat(N,A,R)),A.formatFunction&&(N=this.tmFormatFunction(N,A,R)),N&&!A.ifEnd?(I.push(N),F(A)):!N&&A.ifEnd&&F(A.ifEnd)}else A.elseEnd?F(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&I.push(A)}}return I},C.prototype.getDisplayTextForSnippet=function(L,R){var F=w.call(this,L,R);return F.text},C.prototype.insertSnippetForSelection=function(L,R,F){F===void 0&&(F={});var I=w.call(this,L,R,F),H=L.getSelectionRange(),P=L.session.replace(H,I.text),O=new x(L),A=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(I.tabstops,H.start,P,A)},C.prototype.insertSnippet=function(L,R,F){F===void 0&&(F={});var I=this;if(L.inVirtualSelectionMode)return I.insertSnippetForSelection(L,R,F);L.forEachSelection(function(){I.insertSnippetForSelection(L,R,F)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var R=L.session.$mode.$id||"";if(R=R.split("/").pop(),R==="html"||R==="php"){R==="php"&&!L.session.$mode.inlinePhp&&(R="html");var F=L.getCursorPosition(),I=L.session.getState(F.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?R="javascript":I.substring(0,4)=="css-"?R="css":I.substring(0,4)=="php-"&&(R="php"))}return R},C.prototype.getActiveScopes=function(L){var R=this.$getScope(L),F=[R],I=this.snippetMap;return I[R]&&I[R].includeScopes&&F.push.apply(F,I[R].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(L,R){var F=this,I=L.forEachSelection(function(){return F.expandSnippetForSelection(L,R)},null,{keepOrder:!0});return I&&L.tabstopManager&&L.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(L,R){var F=L.getCursorPosition(),I=L.session.getLine(F.row),H=I.substring(0,F.column),P=I.substr(F.column),O=this.snippetMap,A;return this.getActiveScopes(L).some(function(_){var N=O[_];return N&&(A=this.findMatchingSnippet(N,H,P)),!!A},this),A?(R&&R.dryRun||(L.session.doc.removeInLine(F.row,F.column-A.replaceBefore.length,F.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(L,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,R,F){for(var I=L.length;I--;){var H=L[I];if(!(H.startRe&&!H.startRe.test(R))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(R):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(R)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(L,R){function F(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function I(_,N,B){return _=F(_),N=F(N),_=N+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function H(_){_.scope||(_.scope=R||"_"),R=_.scope,P[R]||(P[R]=[],O[R]={});var N=O[R];if(_.name){var B=N[_.name];B&&A.unregister(B),N[_.name]=_}P[R].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
|
1126
|
+
`):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=f.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=I(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=I(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,A=this;L||(L=[]),Array.isArray(L)?L.forEach(H):Object.keys(L).forEach(function(_){H(L[_])}),this._signal("registerSnippets",{scope:R})},C.prototype.unregister=function(L,R){function F(P){var O=H[P.scope||R];if(O&&O[P.name]){delete O[P.name];var A=I[P.scope||R],_=A&&A.indexOf(P);_>=0&&A.splice(_,1)}}var I=this.snippetMap,H=this.snippetNameMap;L.content?F(L):Array.isArray(L)&&L.forEach(F)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var R=[],F={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=I.exec(L);){if(H[1])try{F=JSON.parse(H[1]),R.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),R.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=A.exec(O)[1],F.trigger=A.exec(O)[1],F.endTrigger=A.exec(O)[1],F.endGuard=A.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return R},C.prototype.getSnippetByName=function(L,R){var F=this.snippetNameMap,I;return this.getActiveScopes(R).some(function(H){var P=F[H];return P&&(I=P[L]),!!I},this),I},C}();b.implement(m.prototype,h);var w=function(C,L,R){function F(ce){for(var fe=[],$e=0;$e<ce.length;$e++){var Te=ce[$e];if(typeof Te=="object"){if(N[Te.tabstopId])continue;var Ee=ce.lastIndexOf(Te,$e-1);Te=fe[Ee]||{tabstopId:Te.tabstopId}}fe[$e]=Te}return fe}R===void 0&&(R={});var I=C.getCursorPosition(),H=C.session.getLine(I.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];I.column<O.length&&(O=O.slice(0,I.column)),L=L.replace(/\r/g,"");var A=this.tokenizeTmSnippet(L);A=this.resolveVariables(A,C),A=A.map(function(ce){return ce==`
|
1127
|
+
`&&!R.excludeExtraIndent?ce+O:typeof ce=="string"?ce.replace(/\t/g,P):ce});var _=[];A.forEach(function(ce,fe){if(typeof ce=="object"){var $e=ce.tabstopId,Te=_[$e];if(Te||(Te=_[$e]=[],Te.index=$e,Te.value="",Te.parents={}),Te.indexOf(ce)===-1){ce.choices&&!Te.choices&&(Te.choices=ce.choices),Te.push(ce);var Ee=A.indexOf(ce,fe+1);if(Ee!==-1){var Qe=A.slice(fe+1,Ee),Ye=Qe.some(function(gt){return typeof gt=="object"});Ye&&!Te.value?Te.value=Qe:Qe.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Qe.join(""))}}}}),_.forEach(function(ce){ce.length=0});for(var N={},B=0;B<A.length;B++){var U=A[B];if(typeof U=="object"){var K=U.tabstopId,Z=_[K],te=A.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(ce){Z.parents[ce]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),A.splice.apply(A,[B+1,Math.max(0,te-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ue="";return A.forEach(function(ce){if(typeof ce=="string"){var fe=ce.split(`
|
1128
|
+
`);fe.length>1?(ae=fe[fe.length-1].length,ne+=fe.length-1):ae+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:ae}:ce.start={row:ne,column:ae})}),{text:ue,tabstops:_,tokens:A}},x=function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(L){for(var R=L.action[0]=="r",F=this.selectedTabstop||{},I=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],A=O==F||I[O.index];if(O.rangeList.$bias=A?0:1,L.action=="remove"&&O!==F){var _=O.parents&&O.parents[F.index],N=O.rangeList.pointIndex(L.start,_);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(L.end,_);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(L)}var Z=this.session;!this.$inChange&&R&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var R=this.session,F=R.getTextRange(L.firstNonLinked),I=0;I<L.length;I++){var H=L[I];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);R.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,R=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var H=this.ranges[I].contains(L.row,L.column),P=F||this.ranges[I].contains(R.row,R.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var R=this.tabstops.length,F=this.index+(L||1);F=Math.min(Math.max(F,1),R),F==R&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var R=this.tabstops[this.index];if(R&&this.addTabstopMarkers(R),this.index=L,R=this.tabstops[this.index],!(!R||!R.length)){this.selectedTabstop=R;var F=R.firstNonLinked||R;if(R.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var I=this.editor.multiSelect;I.toSingleRange(F);for(var H=0;H<R.length;H++)R.hasLinkedRanges&&R[H].linked||I.addRange(R[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(L,R,F){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var H=o.fromPoints(F,F);$(H.start,R),$(H.end,R),L[0]=[H],L[0].index=0}var P=this.index,O=[P+1,0],A=this.ranges,_=this.snippetId=(this.snippetId||0)+1;L.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=_;for(var K=0;K<N.length;K++){var Z=N[K],te=o.fromPoints(Z.start,Z.end||Z.start);E(te.start,R),E(te.end,R),te.original=Z,te.tabstop=U,A.push(te),U!=N?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(L){var R=this.session;L.forEach(function(F){F.markerId||(F.markerId=R.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var R=this.session;L.forEach(function(F){R.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(R){R.snippetId===L?this.addTabstopMarkers(R):this.removeTabstopMarkers(R)},this)}},C.prototype.removeRange=function(L){var R=L.tabstop.indexOf(L);R!=-1&&L.tabstop.splice(R,1),R=this.ranges.indexOf(L),R!=-1&&this.ranges.splice(R,1),R=L.tabstop.rangeList.ranges.indexOf(L),R!=-1&&L.tabstop.splice(R,1),this.session.removeMarker(L.markerId),L.tabstop.length||(R=this.tabstops.indexOf(L.tabstop),R!=-1&&this.tabstops.splice(R,1),this.tabstops.length||this.detach())},C}();x.prototype.keyboardHandler=new c,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},$=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};g.importCssString(`
|
1129
|
+
.ace_snippet-marker {
|
1130
|
+
-moz-box-sizing: border-box;
|
1131
|
+
box-sizing: border-box;
|
1132
|
+
background: rgba(194, 193, 208, 0.09);
|
1133
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1134
|
+
position: absolute;
|
1135
|
+
}`,"snippets.css",!1),r.snippetManager=new m;var k=t("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,r,d){var p=t("../virtual_renderer").VirtualRenderer,g=t("../editor").Editor,b=t("../range").Range,h=t("../lib/event"),f=t("../lib/lang"),o=t("../lib/dom"),a=t("../config").nls,c=t("./../lib/useragent"),l=function(E){return"suggest-aria-id:".concat(E)},s=c.isSafari?"menu":"listbox",u=c.isSafari?"menuitem":"option",m=c.isSafari?"aria-current":"aria-selected",w=function(E){var $=new p(E);$.$maxLines=4;var k=new g($);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=function(){function E($){var k=o.createElement("div"),C=w(k);$&&$.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",s),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(A){var _=A.getDocumentPosition();C.selection.moveToPosition(_),I.start.row=I.end.row=_.row,A.stop()});var R,F=new b(-1,0,-1,1/0),I=new b(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!R){R=A;return}if(!(R.x==A.x&&R.y==A.y)){R=A,R.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var _=R.getDocumentPosition().row;F.start.row!=_&&(F.id||C.setRow(_),P(_))}}),C.renderer.on("beforeRender",function(){if(R&&F.start.row!=-1){R.$pos=null;var A=R.getDocumentPosition().row;F.id||C.setRow(A),P(A,!0)}}),C.renderer.on("afterRender",function(){for(var A=C.renderer.$textLayer,_=A.config.firstRow,N=A.config.lastRow;_<=N;_++){var B=A.element.childNodes[_-A.config.firstRow];B.setAttribute("role",u),B.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",_+1);var U=C.getData(_);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",K)}var Z=B.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),_=C.renderer.$textLayer,N=_.element.childNodes[A-_.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(o.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=l(A);o.addCssClass(N,"ace_selected"),N.id=U,_.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(m,"true")}});var H=function(){P(-1)},P=function(A,_){A!==F.start.row&&(F.start.row=F.end.row=A,_||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,H()}),C.on("hide",H),C.on("changeSelection",H),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(A){var _=C.data[A];return typeof _=="string"?_:_&&_.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(A){function _(ce,fe){ce&&B.push({type:(N.className||"")+(fe||""),value:ce})}var N=C.data[A],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ue=K.indexOf(ae,te);if(ue==-1)continue;_(U.slice(te,ue),""),te=ue+ae.length,_(U.slice(ue,te),"completion-highlight")}return _(U.slice(te,U.length),""),B.push({type:"completion-spacer",value:" "}),N.meta&&B.push({type:"completion-meta",value:N.meta}),N.message&&B.push({type:"completion-message",value:N.message}),B},O.$updateOnChange=L,O.start=L,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(A,_){C.filterText=_||"",C.setValue(f.stringRepeat(`
|
1136
|
+
`,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return I.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),I.start.row!=A&&(C.selection.clearSelection(),I.start.row=I.end.row=A||0,C.session._emit("changeBackMarker"),C.moveCursorTo(A||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(A,_,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===A.top&&C.anchorPos.left===A.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*_*1.4,ae={top:0,bottom:0},ue=Z-A.top-3*this.$borderSize-_,ce=A.top-3*this.$borderSize;N||(ce<=ue||ue>=ne?N="bottom":N="top"),N==="top"?(ae.bottom=A.top-this.$borderSize,ae.top=ae.bottom-ne):N==="bottom"&&(ae.top=A.top+_+this.$borderSize,ae.bottom=ae.top+ne);var fe=ae.top>=0&&ae.bottom<=Z;if(!B&&!fe)return!1;fe?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,N==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=A.left;return $e+U.offsetWidth>te&&($e=te-U.offsetWidth),U.style.left=$e+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),R=null),C.anchorPos=A,C.anchor=N,!0},C.show=function(A,_,N){this.tryShow(A,_,N?"bottom":void 0,!0)},C.goTo=function(A){var _=this.getRow(),N=this.session.getLength()-1;switch(A){case"up":_=_<=0?N:_-1;break;case"down":_=_>=N?-1:_+1;break;case"start":_=0;break;case"end":_=N}this.setRow(_)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E}();o.importCssString(`
|
1137
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1138
|
+
background-color: #CAD6FA;
|
1139
|
+
z-index: 1;
|
1140
|
+
}
|
1141
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1142
|
+
background-color: #3a674e;
|
1143
|
+
}
|
1144
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1145
|
+
border: 1px solid #abbffe;
|
1146
|
+
margin-top: -1px;
|
1147
|
+
background: rgba(233,233,253,0.4);
|
1148
|
+
position: absolute;
|
1149
|
+
z-index: 2;
|
1150
|
+
}
|
1151
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1152
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1153
|
+
background: rgba(58, 103, 78, 0.62);
|
1154
|
+
}
|
1155
|
+
.ace_completion-meta {
|
1156
|
+
opacity: 0.5;
|
1157
|
+
margin-left: 0.9em;
|
1158
|
+
}
|
1159
|
+
.ace_completion-message {
|
1160
|
+
margin-left: 0.9em;
|
1161
|
+
color: blue;
|
1162
|
+
}
|
1163
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1164
|
+
color: #2d69c7;
|
1165
|
+
}
|
1166
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1167
|
+
color: #93ca12;
|
1168
|
+
}
|
1169
|
+
.ace_editor.ace_autocomplete {
|
1170
|
+
width: 300px;
|
1171
|
+
z-index: 200000;
|
1172
|
+
border: 1px lightgray solid;
|
1173
|
+
position: fixed;
|
1174
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1175
|
+
line-height: 1.4;
|
1176
|
+
background: #fefefe;
|
1177
|
+
color: #111;
|
1178
|
+
}
|
1179
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1180
|
+
border: 1px #484747 solid;
|
1181
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1182
|
+
line-height: 1.4;
|
1183
|
+
background: #25282c;
|
1184
|
+
color: #c1c1c1;
|
1185
|
+
}
|
1186
|
+
.ace_autocomplete .ace_text-layer {
|
1187
|
+
width: calc(100% - 8px);
|
1188
|
+
}
|
1189
|
+
.ace_autocomplete .ace_line {
|
1190
|
+
display: flex;
|
1191
|
+
align-items: center;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_line > * {
|
1194
|
+
min-width: 0;
|
1195
|
+
flex: 0 0 auto;
|
1196
|
+
}
|
1197
|
+
.ace_autocomplete .ace_line .ace_ {
|
1198
|
+
flex: 0 1 auto;
|
1199
|
+
overflow: hidden;
|
1200
|
+
text-overflow: ellipsis;
|
1201
|
+
}
|
1202
|
+
.ace_autocomplete .ace_completion-spacer {
|
1203
|
+
flex: 1;
|
1204
|
+
}
|
1205
|
+
.ace_autocomplete.ace_loading:after {
|
1206
|
+
content: "";
|
1207
|
+
position: absolute;
|
1208
|
+
top: 0px;
|
1209
|
+
height: 2px;
|
1210
|
+
width: 8%;
|
1211
|
+
background: blue;
|
1212
|
+
z-index: 100;
|
1213
|
+
animation: ace_progress 3s infinite linear;
|
1214
|
+
animation-delay: 300ms;
|
1215
|
+
transform: translateX(-100%) scaleX(1);
|
1216
|
+
}
|
1217
|
+
@keyframes ace_progress {
|
1218
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1219
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1220
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1221
|
+
}
|
1222
|
+
@media (prefers-reduced-motion) {
|
1223
|
+
.ace_autocomplete.ace_loading:after {
|
1224
|
+
transform: translateX(625%) scaleX(2);
|
1225
|
+
animation: none;
|
1226
|
+
}
|
1227
|
+
}
|
1228
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,r,d){var p=function(){function g(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(b){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),o=this.popup.renderer.$textLayer,a=o.element.childNodes[f-o.config.firstRow];if(a){for(var c="doc-tooltip ",l=0;l<this._lines.length;l++)c+="ace-inline-screenreader-line-".concat(l," ");a.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=b.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(h));var o=document.createTextNode(this._lines[h]);f.appendChild(o),b.appendChild(f)}return b},g}();r.AceInlineScreenReader=p}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(t,r,d){var p=t("../snippets").snippetManager,g=t("./inline_screenreader").AceInlineScreenReader,b=function(){function h(){this.editor=null}return h.prototype.show=function(f,o,a){if(a=a||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!o)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(f));var c=o.snippet?p.getDisplayTextForSnippet(f,o.snippet):o.value;return o.hideInlinePreview||!c||!c.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(a.length),c===""?f.removeGhostText():f.setGhostText(c),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h}();r.AceInline=b}),ace.define("ace/autocomplete/util",["require","exports","module"],function(t,r,d){r.parForEach=function(g,b,h){var f=0,o=g.length;o===0&&h();for(var a=0;a<o;a++)b(g[a],function(c,l){f++,f===o&&h(c,l)})};var p=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,b,h){h=h||p;for(var f=[],o=b-1;o>=0&&h.test(g[o]);o--)f.push(g[o]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,b,h){h=h||p;for(var f=[],o=b;o<g.length&&h.test(g[o]);o++)f.push(g[o]);return f},r.getCompletionPrefix=function(g){var b=g.getCursorPosition(),h=g.session.getLine(b.row),f;return g.completers.forEach((function(o){o.identifierRegexps&&o.identifierRegexps.forEach((function(a){!f&&a&&(f=this.retrievePrecedingIdentifier(h,b.column,a))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(h,b.column)},r.triggerAutocomplete=function(g,h){var h=h??g.session.getPrecedingCharacter();return g.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(h)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(t,r,d){var p=t("./keyboard/hash_handler").HashHandler,g=t("./autocomplete/popup").AcePopup,b=t("./autocomplete/inline").AceInline,h=t("./autocomplete/popup").getAriaId,f=t("./autocomplete/util"),o=t("./lib/lang"),a=t("./lib/dom"),c=t("./snippets").snippetManager,l=t("./config"),s=t("./lib/event"),u=t("./lib/scroll").preventParentScroll,m=function($,k){k.completer&&k.completer.destroy()},w=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new p,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=o.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=o.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=o.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=o.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new E($.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),s.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},$.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(k){var C=this.base.row,L=this.base.column,R=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(L,R);this.inlineRenderer.show(this.editor,k,F)?this.$seen(k):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var L=this.popup.getData(C);L&&(!k||L.hideInlinePreview)&&this.$seen(L)}},$.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,L=C.layerConfig.lineHeight,R=C.$cursorLayer.getPixelPosition(this.base,!0);R.left-=this.popup.getTextLeftOffset();var F=k.container.getBoundingClientRect();R.top+=F.top-C.layerConfig.offset,R.left+=F.left-k.renderer.scrollLeft,R.left+=C.gutterWidth;var I={top:R.top,left:R.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var H=k.container.getBoundingClientRect().bottom-L,P=H<I.top?{top:H,left:I.left}:I;this.popup.tryShow(P,L,"bottom")||this.popup.tryShow(R,L,"top")||this.popup.show(R,L)},$.prototype.openPopup=function(k,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var R=this.popup.getRow(),F=this.popup.data[R];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(F)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===R&&F!==this.completions.filtered[I]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(I===R&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}L||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(k){var C=document.activeElement,L=this.editor.textInput.getElement(),R=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),F=this.popup&&this.popup.container;C!=L&&C.parentNode!=F&&!R&&C!=this.tooltipNode&&k.relatedTarget!=L&&this.detach()},$.prototype.mousedownListener=function(k){this.detach()},$.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(k){this.popup.goTo(k)},$.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var L=this.completions,R=this.getCompletionProvider().insertMatch(this.editor,k,L.filterText,C);return this.completions==L&&this.detach(),R},$.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},$.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},$.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var R=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:R});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,k);return}if(C&&C.matches){var R=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(R.row,R.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var L=this.editor.getSession(),R=this.editor.getCursorPosition(),F=f.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(R.row,R.column-F.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:R}).provideCompletions(this.editor,I,(function(H,P,O){var A=P.filtered,_=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!A.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(_)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==_&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!O&&this.showLoadingState?new E($.completionsForLoading.concat(A),P.filterText):P,this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[k.getHoveredRow()]||C[k.getRow()]),R=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,I=0;I<F;I++){var H=this.editor.completers[I];if(H.getDocTooltip&&L.completerId===H.id){R=H.getDocTooltip(L);break}}if(!R&&typeof L!="string"&&(R=L),typeof R=="string"&&(R={docText:R}),!R||!R.docHTML&&!R.docText)return this.hideDocTooltip();this.showDocTooltip(R)},$.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",u));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;k.docHTML?L.innerHTML=k.docHTML:k.docText&&(L.textContent=k.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var R=this.popup,F=R.container.getBoundingClientRect(),I=400,H=300,P=R.renderer.scrollBar.width||10,O=F.left,A=window.innerWidth-F.right-P,_=R.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min(A/I,1),Math.min(O/I,1),Math.min(_/H*.9)],B=Math.max.apply(Math,N),U=L.style;U.display="block",B==N[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",R.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=R.container.offsetTop-L.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(R.container.offsetTop,H)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},$.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(k){return k.completer instanceof $||(k.completer&&(k.completer.destroy(),k.completer=null),l.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),k.completer=$.$sharedInstance):(k.completer=new $,k.once("destroy",m))),k.completer},$}();w.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var k=$.completer.insertMatch();if(k||$.tabstopManager)return k;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var k=f.getCompletionPrefix($);!k&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,k){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function $(k){this.initialPosition=k,this.active=!0}return $.prototype.insertByIndex=function(k,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],L)},$.prototype.insertMatch=function(k,C,L){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var R=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(R-=this.initialPosition.prefix.length,R+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),R||F){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var H=0,P;P=I[H];H++)P.start.column-=R,P.end.column+=F,k.session.remove(P)}C.snippet?c.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},$.prototype.$insertString=function(k,C){var L=C.value||C;k.execCommand("insertstring",L)},$.prototype.gatherCompletions=function(k,C){var L=k.getSession(),R=k.getCursorPosition(),F=f.getCompletionPrefix(k),I=[];this.completers=k.completers;var H=k.completers.length;return k.completers.forEach(function(P,O){P.getCompletions(k,L,R,F,function(A,_){P.hideInlinePreview&&(_=_.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!A&&_&&(I=I.concat(_)),C(null,{prefix:f.getCompletionPrefix(k),matches:I,finished:--H===0})})}),!0},$.prototype.provideCompletions=function(k,C,L){var R=(function(P){var O=P.prefix,A=P.matches;this.completions=new E(A),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&L(null,this.completions,P.finished)}).bind(this),F=!0,I=null;if(this.gatherCompletions(k,(function(P,O){if(this.active){P&&(L(P,[],!0),this.detach());var A=O.prefix;if(A.indexOf(O.prefix)===0){if(F){I=O;return}R(O)}}}).bind(this)),F=!1,I){var H=I;I=null,R(H)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},$}(),E=function(){function $(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(R,F){return F.exactMatch-R.exactMatch||F.$score-R.$score||(R.caption||R.value).localeCompare(F.caption||F.value)});var L=null;C=C.filter(function(R){var F=R.snippet||R.caption||R.value;return F===L?!1:(L=F,!0)}),this.filtered=C},$.prototype.filterCompletions=function(k,C){var L=[],R=C.toUpperCase(),F=C.toLowerCase();e:for(var I=0,H;H=k[I];I++){if(H.skipFilter){H.$score=H.score,L.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,A=0,_=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)_=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(R[K],O+1);if(N=Z>=0&&(te<0||Z<te)?Z:te,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(_+=10),_+=B,A|=1<<K),O=N}}H.matchMask=A,H.exactMatch=_?0:1,H.$score=(H.score||0)-_,L.push(H)}}return L},$}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=E}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,d){function p(f,o){var a=f.getTextRange(b.fromPoints({row:0,column:0},o));return a.split(h).length-1}function g(f,o){var a=p(f,o),c=f.getValue().split(h),l=Object.create(null),s=c[a];return c.forEach(function(u,m){if(!(!u||u===s)){var w=Math.abs(a-m),x=c.length-w;l[u]?l[u]=Math.max(x,l[u]):l[u]=x}}),l}var b=t("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(f,o,a,c,l){var s=g(o,a),u=Object.keys(s);l(null,u.map(function(m){return{caption:m,value:m,score:s[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,r,d){var p=t("../snippets").snippetManager,g=t("../autocomplete").Autocomplete,b=t("../config"),h=t("../lib/lang"),f=t("../autocomplete/util"),o=t("../autocomplete/text_completer"),a={getCompletions:function(R,F,I,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(R,F,I,H,P);var O=R.session.getState(I.row),A=F.$mode.getCompletions(O,F,I,H);A=A.map(function(_){return _.completerId=a.id,_}),P(null,A)},id:"keywordCompleter"},c=function(R){var F={};return R.replace(/\${(\d+)(:(.*?))?}/g,function(I,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(I,H){return F[H]})},l={getCompletions:function(R,F,I,H,P){var O=[],A=F.getTokenAt(I.row,I.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=p.getActiveScopes(R);var _=p.snippetMap,N=[];O.forEach(function(B){for(var U=_[B]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&N.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:l.id})}},this),P(null,N)},getDocTooltip:function(R){R.snippet&&!R.docHTML&&(R.docHTML=["<b>",h.escapeHTML(R.caption),"</b>","<hr></hr>",h.escapeHTML(c(R.snippet))].join(""))},id:"snippetCompleter"},s=[l,o,a];r.setCompleters=function(R){s.length=0,R&&s.push.apply(s,R)},r.addCompleter=function(R){s.push(R)},r.textCompleter=o,r.keyWordCompleter=a,r.snippetCompleter=l;var u={name:"expandSnippet",exec:function(R){return p.expandWithTab(R)},bindKey:"Tab"},m=function(R,F){w(F.session.$mode)},w=function(R){typeof R=="string"&&(R=b.$modes[R]),R&&(p.files||(p.files={}),x(R.$id,R.snippetFileId),R.modes&&R.modes.forEach(w))},x=function(R,F){!F||!R||p.files[R]||(p.files[R]={},b.loadModule(F,function(I){I&&(p.files[R]=I,!I.snippets&&I.snippetText&&(I.snippets=p.parseSnippetFile(I.snippetText)),p.register(I.snippets||[],I.scope),I.includeScopes&&(p.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},E=function(R){var F=R.editor,I=F.completer&&F.completer.activated;if(R.command.name==="backspace")I&&!f.getCompletionPrefix(F)&&F.completer.detach();else if(R.command.name==="insertstring"&&!I){$=R;var H=R.editor.$liveAutocompletionDelay;H?k.delay(H):C(R)}},$,k=h.delayedCall(function(){C($)},0),C=function(R){var F=R.editor,I=f.getCompletionPrefix(F),H=R.args,P=f.triggerAutocomplete(F,H);if(I&&I.length>=F.$liveAutocompletionThreshold||P){var O=g.for(F);O.autoShown=!0,O.showPopup(F)}},L=t("../editor").Editor;t("../config").defineOptions(L.prototype,"editor",{enableBasicAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:s),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:s),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(R){R?(this.commands.addCommand(u),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(u),this.off("changeMode",m))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(t){n&&(n.exports=t)})}()}(fg)),fg.exports}W1();var vg={exports:{}},yg;function B1(){return yg||(yg=1,function(n,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,d){d.exports=`
|
1229
|
+
|
1230
|
+
/* ------------------------------------------------------------------------------------------
|
1231
|
+
* Editor Search Form
|
1232
|
+
* --------------------------------------------------------------------------------------- */
|
1233
|
+
.ace_search {
|
1234
|
+
background-color: #ddd;
|
1235
|
+
color: #666;
|
1236
|
+
border: 1px solid #cbcbcb;
|
1237
|
+
border-top: 0 none;
|
1238
|
+
overflow: hidden;
|
1239
|
+
margin: 0;
|
1240
|
+
padding: 4px 6px 0 4px;
|
1241
|
+
position: absolute;
|
1242
|
+
top: 0;
|
1243
|
+
z-index: 99;
|
1244
|
+
white-space: normal;
|
1245
|
+
}
|
1246
|
+
.ace_search.left {
|
1247
|
+
border-left: 0 none;
|
1248
|
+
border-radius: 0px 0px 5px 0px;
|
1249
|
+
left: 0;
|
1250
|
+
}
|
1251
|
+
.ace_search.right {
|
1252
|
+
border-radius: 0px 0px 0px 5px;
|
1253
|
+
border-right: 0 none;
|
1254
|
+
right: 0;
|
1255
|
+
}
|
1256
|
+
|
1257
|
+
.ace_search_form, .ace_replace_form {
|
1258
|
+
margin: 0 20px 4px 0;
|
1259
|
+
overflow: hidden;
|
1260
|
+
line-height: 1.9;
|
1261
|
+
}
|
1262
|
+
.ace_replace_form {
|
1263
|
+
margin-right: 0;
|
1264
|
+
}
|
1265
|
+
.ace_search_form.ace_nomatch {
|
1266
|
+
outline: 1px solid red;
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
.ace_search_field {
|
1270
|
+
border-radius: 3px 0 0 3px;
|
1271
|
+
background-color: white;
|
1272
|
+
color: black;
|
1273
|
+
border: 1px solid #cbcbcb;
|
1274
|
+
border-right: 0 none;
|
1275
|
+
outline: 0;
|
1276
|
+
padding: 0;
|
1277
|
+
font-size: inherit;
|
1278
|
+
margin: 0;
|
1279
|
+
line-height: inherit;
|
1280
|
+
padding: 0 6px;
|
1281
|
+
min-width: 17em;
|
1282
|
+
vertical-align: top;
|
1283
|
+
min-height: 1.8em;
|
1284
|
+
box-sizing: content-box;
|
1285
|
+
}
|
1286
|
+
.ace_searchbtn {
|
1287
|
+
border: 1px solid #cbcbcb;
|
1288
|
+
line-height: inherit;
|
1289
|
+
display: inline-block;
|
1290
|
+
padding: 0 6px;
|
1291
|
+
background: #fff;
|
1292
|
+
border-right: 0 none;
|
1293
|
+
border-left: 1px solid #dcdcdc;
|
1294
|
+
cursor: pointer;
|
1295
|
+
margin: 0;
|
1296
|
+
position: relative;
|
1297
|
+
color: #666;
|
1298
|
+
}
|
1299
|
+
.ace_searchbtn:last-child {
|
1300
|
+
border-radius: 0 3px 3px 0;
|
1301
|
+
border-right: 1px solid #cbcbcb;
|
1302
|
+
}
|
1303
|
+
.ace_searchbtn:disabled {
|
1304
|
+
background: none;
|
1305
|
+
cursor: default;
|
1306
|
+
}
|
1307
|
+
.ace_searchbtn:hover {
|
1308
|
+
background-color: #eef1f6;
|
1309
|
+
}
|
1310
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1311
|
+
padding: 0px 0.7em
|
1312
|
+
}
|
1313
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1314
|
+
content: "";
|
1315
|
+
border: solid 2px #888;
|
1316
|
+
width: 0.5em;
|
1317
|
+
height: 0.5em;
|
1318
|
+
border-width: 2px 0 0 2px;
|
1319
|
+
display:inline-block;
|
1320
|
+
transform: rotate(-45deg);
|
1321
|
+
}
|
1322
|
+
.ace_searchbtn.next:after {
|
1323
|
+
border-width: 0 2px 2px 0 ;
|
1324
|
+
}
|
1325
|
+
.ace_searchbtn_close {
|
1326
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1327
|
+
border-radius: 50%;
|
1328
|
+
border: 0 none;
|
1329
|
+
color: #656565;
|
1330
|
+
cursor: pointer;
|
1331
|
+
font: 16px/16px Arial;
|
1332
|
+
padding: 0;
|
1333
|
+
height: 14px;
|
1334
|
+
width: 14px;
|
1335
|
+
top: 9px;
|
1336
|
+
right: 7px;
|
1337
|
+
position: absolute;
|
1338
|
+
}
|
1339
|
+
.ace_searchbtn_close:hover {
|
1340
|
+
background-color: #656565;
|
1341
|
+
background-position: 50% 100%;
|
1342
|
+
color: white;
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
.ace_button {
|
1346
|
+
margin-left: 2px;
|
1347
|
+
cursor: pointer;
|
1348
|
+
-webkit-user-select: none;
|
1349
|
+
-moz-user-select: none;
|
1350
|
+
-o-user-select: none;
|
1351
|
+
-ms-user-select: none;
|
1352
|
+
user-select: none;
|
1353
|
+
overflow: hidden;
|
1354
|
+
opacity: 0.7;
|
1355
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1356
|
+
padding: 1px;
|
1357
|
+
box-sizing: border-box!important;
|
1358
|
+
color: black;
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
.ace_button:hover {
|
1362
|
+
background-color: #eee;
|
1363
|
+
opacity:1;
|
1364
|
+
}
|
1365
|
+
.ace_button:active {
|
1366
|
+
background-color: #ddd;
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
.ace_button.checked {
|
1370
|
+
border-color: #3399ff;
|
1371
|
+
opacity:1;
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
.ace_search_options{
|
1375
|
+
margin-bottom: 3px;
|
1376
|
+
text-align: right;
|
1377
|
+
-webkit-user-select: none;
|
1378
|
+
-moz-user-select: none;
|
1379
|
+
-o-user-select: none;
|
1380
|
+
-ms-user-select: none;
|
1381
|
+
user-select: none;
|
1382
|
+
clear: both;
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
.ace_search_counter {
|
1386
|
+
float: left;
|
1387
|
+
font-family: arial;
|
1388
|
+
padding: 0 8px;
|
1389
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(t,r,d){var p=t("../lib/dom"),g=t("../lib/lang"),b=t("../lib/event"),h=t("./searchbox-css"),f=t("../keyboard/hash_handler").HashHandler,o=t("../lib/keys"),a=t("../config").nls,c=999;p.importCssString(h,"ace_searchbox",!1);var l=function(){function m(w,x,E){this.activeInput,this.element=p.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),p.importCssString(h,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(E)}),b.addListener(w,"click",function(E){var $=E.target||E.srcElement,k=$.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),b.stopPropagation(E)}),b.addCommandKeyListener(w,function(E,$,k){var C=o.keyCodeToString(k),L=x.$searchBarKb.findKeyCommand($,C);L&&L.exec&&(L.exec(x),b.stopEvent(E))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),b.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),b.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),b.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){p.setCssClass(this.replaceOption,"checked",this.searchRange),p.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",p.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),p.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),p.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,E){var $=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!$&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,E=x.unicode,$=0,k=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
1390
|
+
`),w.session.doc.$autoNewLine=`
|
1391
|
+
`);var L=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(L-=w.session.doc.positionToIndex(this.searchRange.start));for(var R=x.lastIndex=0,F;(F=x.exec(C))&&($++,R=F.index,R<=L&&k++,!($>c||!F[0]&&(x.lastIndex=R+=g.skipEmptyMatch(C,R,E),R>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,$>c?c+"+":$])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(w=g.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),s=new f;s.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),s.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var u=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);l.prototype.$searchBarKb=s,l.prototype.$closeSearchBarKb=u,r.SearchBox=l,r.Search=function(m,w){var x=m.searchBox||new l(m);x.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(t){n&&(n.exports=t)})}()}(vg)),vg.exports}B1();var z1=Object.defineProperty,j1=(n,e,t)=>e in n?z1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wl=(n,e,t)=>j1(n,typeof e!="symbol"?e+"":e,t);function bg(n,e){return function(){return n.apply(e,arguments)}}const{toString:H1}=Object.prototype,{getPrototypeOf:vu}=Object,{iterator:xl,toStringTag:wg}=Symbol,Cl=(n=>e=>{const t=H1.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Di=n=>(n=n.toLowerCase(),e=>Cl(e)===n),kl=n=>e=>typeof e===n,{isArray:Gs}=Array,Ma=kl("undefined");function U1(n){return n!==null&&!Ma(n)&&n.constructor!==null&&!Ma(n.constructor)&&Vr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const xg=Di("ArrayBuffer");function V1(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&xg(n.buffer),e}const q1=kl("string"),Vr=kl("function"),Cg=kl("number"),Sl=n=>n!==null&&typeof n=="object",K1=n=>n===!0||n===!1,_l=n=>{if(Cl(n)!=="object")return!1;const e=vu(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(wg in n)&&!(xl in n)},G1=Di("Date"),Y1=Di("File"),X1=Di("Blob"),Q1=Di("FileList"),Z1=n=>Sl(n)&&Vr(n.pipe),J1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Vr(n.append)&&((e=Cl(n))==="formdata"||e==="object"&&Vr(n.toString)&&n.toString()==="[object FormData]"))},ex=Di("URLSearchParams"),[tx,nx,rx,ix]=["ReadableStream","Request","Response","Headers"].map(Di),ox=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ea(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),Gs(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{const p=t?Object.getOwnPropertyNames(n):Object.keys(n),g=p.length;let b;for(r=0;r<g;r++)b=p[r],e.call(null,n[b],b,n)}}function kg(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,d;for(;r-- >0;)if(d=t[r],e===d.toLowerCase())return d;return null}const hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sg=n=>!Ma(n)&&n!==hs;function yu(){const{caseless:n}=Sg(this)&&this||{},e={},t=(r,d)=>{const p=n&&kg(e,d)||d;_l(e[p])&&_l(r)?e[p]=yu(e[p],r):_l(r)?e[p]=yu({},r):Gs(r)?e[p]=r.slice():e[p]=r};for(let r=0,d=arguments.length;r<d;r++)arguments[r]&&Ea(arguments[r],t);return e}const sx=(n,e,t,{allOwnKeys:r}={})=>(Ea(e,(d,p)=>{t&&Vr(d)?n[p]=bg(d,t):n[p]=d},{allOwnKeys:r}),n),ax=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),lx=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},cx=(n,e,t,r)=>{let d,p,g;const b={};if(e=e||{},n==null)return e;do{for(d=Object.getOwnPropertyNames(n),p=d.length;p-- >0;)g=d[p],(!r||r(g,n,e))&&!b[g]&&(e[g]=n[g],b[g]=!0);n=t!==!1&&vu(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},ux=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},hx=n=>{if(!n)return null;if(Gs(n))return n;let e=n.length;if(!Cg(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},dx=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&vu(Uint8Array)),px=(n,e)=>{const t=(n&&n[xl]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},gx=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},fx=Di("HTMLFormElement"),mx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),_g=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),vx=Di("RegExp"),Ag=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Ea(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},yx=n=>{Ag(n,(e,t)=>{if(Vr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Vr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},bx=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return Gs(n)?r(n):r(String(n).split(e)),t},wx=()=>{},xx=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Cx(n){return!!(n&&Vr(n.append)&&n[wg]==="FormData"&&n[xl])}const kx=n=>{const e=new Array(10),t=(r,d)=>{if(Sl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[d]=r;const p=Gs(r)?[]:{};return Ea(r,(g,b)=>{const h=t(g,d+1);!Ma(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},Sx=Di("AsyncFunction"),_x=n=>n&&(Sl(n)||Vr(n))&&Vr(n.then)&&Vr(n.catch),$g=((n,e)=>n?setImmediate:e?((t,r)=>(hs.addEventListener("message",({source:d,data:p})=>{d===hs&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),hs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Vr(hs.postMessage)),Ax=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||$g,$x=n=>n!=null&&Vr(n[xl]),_e={isArray:Gs,isArrayBuffer:xg,isBuffer:U1,isFormData:J1,isArrayBufferView:V1,isString:q1,isNumber:Cg,isBoolean:K1,isObject:Sl,isPlainObject:_l,isReadableStream:tx,isRequest:nx,isResponse:rx,isHeaders:ix,isUndefined:Ma,isDate:G1,isFile:Y1,isBlob:X1,isRegExp:vx,isFunction:Vr,isStream:Z1,isURLSearchParams:ex,isTypedArray:dx,isFileList:Q1,forEach:Ea,merge:yu,extend:sx,trim:ox,stripBOM:ax,inherits:lx,toFlatObject:cx,kindOf:Cl,kindOfTest:Di,endsWith:ux,toArray:hx,forEachEntry:px,matchAll:gx,isHTMLForm:fx,hasOwnProperty:_g,hasOwnProp:_g,reduceDescriptors:Ag,freezeMethods:yx,toObjectSet:bx,toCamelCase:mx,noop:wx,toFiniteNumber:xx,findKey:kg,global:hs,isContextDefined:Sg,isSpecCompliantForm:Cx,toJSONObject:kx,isAsyncFn:Sx,isThenable:_x,setImmediate:$g,asap:Ax,isIterable:$x};function It(n,e,t,r,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),d&&(this.response=d,this.status=d.status?d.status:null)}_e.inherits(It,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Tg=It.prototype,Mg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Mg[n]={value:n}}),Object.defineProperties(It,Mg),Object.defineProperty(Tg,"isAxiosError",{value:!0}),It.from=(n,e,t,r,d,p)=>{const g=Object.create(Tg);return _e.toFlatObject(n,g,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),It.call(g,n.message,e,t,r,d),g.cause=n,g.name=n.name,p&&Object.assign(g,p),g};const Tx=null;function bu(n){return _e.isPlainObject(n)||_e.isArray(n)}function Eg(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function Ig(n,e,t){return n?n.concat(e).map(function(r,d){return r=Eg(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function Mx(n){return _e.isArray(n)&&!n.some(bu)}const Ex=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function Al(n,e,t){if(!_e.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=_e.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,s){return!_e.isUndefined(s[l])});const r=t.metaTokens,d=t.visitor||f,p=t.dots,g=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(d))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(_e.isDate(l))return l.toISOString();if(!b&&_e.isBlob(l))throw new It("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(l)||_e.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function f(l,s,u){let m=l;if(l&&!u&&typeof l=="object"){if(_e.endsWith(s,"{}"))s=r?s:s.slice(0,-2),l=JSON.stringify(l);else if(_e.isArray(l)&&Mx(l)||(_e.isFileList(l)||_e.endsWith(s,"[]"))&&(m=_e.toArray(l)))return s=Eg(s),m.forEach(function(w,x){!(_e.isUndefined(w)||w===null)&&e.append(g===!0?Ig([s],x,p):g===null?s:s+"[]",h(w))}),!1}return bu(l)?!0:(e.append(Ig(u,s,p),h(l)),!1)}const o=[],a=Object.assign(Ex,{defaultVisitor:f,convertValue:h,isVisitable:bu});function c(l,s){if(!_e.isUndefined(l)){if(o.indexOf(l)!==-1)throw Error("Circular reference detected in "+s.join("."));o.push(l),_e.forEach(l,function(u,m){(!(_e.isUndefined(u)||u===null)&&d.call(e,u,_e.isString(m)?m.trim():m,s,a))===!0&&c(u,s?s.concat(m):[m])}),o.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return c(n),e}function Lg(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function wu(n,e){this._pairs=[],n&&Al(n,this,e)}const Rg=wu.prototype;Rg.append=function(n,e){this._pairs.push([n,e])},Rg.toString=function(n){const e=n?function(t){return n.call(this,t,Lg)}:Lg;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function Ix(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Og(n,e,t){if(!e)return n;const r=t&&t.encode||Ix;_e.isFunction(t)&&(t={serialize:t});const d=t&&t.serialize;let p;if(d?p=d(e,t):p=_e.isURLSearchParams(e)?e.toString():new wu(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}class Ng{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(t){t!==null&&e(t)})}}const Dg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lx=typeof URLSearchParams<"u"?URLSearchParams:wu,Rx=typeof FormData<"u"?FormData:null,Ox=typeof Blob<"u"?Blob:null,Nx={isBrowser:!0,classes:{URLSearchParams:Lx,FormData:Rx,Blob:Ox},protocols:["http","https","file","blob","url","data"]},xu=typeof window<"u"&&typeof document<"u",Cu=typeof navigator=="object"&&navigator||void 0,Dx=xu&&(!Cu||["ReactNative","NativeScript","NS"].indexOf(Cu.product)<0),Fx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Px=xu&&window.location.href||"http://localhost",Wx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xu,hasStandardBrowserEnv:Dx,hasStandardBrowserWebWorkerEnv:Fx,navigator:Cu,origin:Px},Symbol.toStringTag,{value:"Module"})),_r={...Wx,...Nx};function Bx(n,e){return Al(n,new _r.classes.URLSearchParams,Object.assign({visitor:function(t,r,d,p){return _r.isNode&&_e.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)}},e))}function zx(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jx(n){const e={},t=Object.keys(n);let r;const d=t.length;let p;for(r=0;r<d;r++)p=t[r],e[p]=n[p];return e}function Fg(n){function e(t,r,d,p){let g=t[p++];if(g==="__proto__")return!0;const b=Number.isFinite(+g),h=p>=t.length;return g=!g&&_e.isArray(d)?d.length:g,h?(_e.hasOwnProp(d,g)?d[g]=[d[g],r]:d[g]=r,!b):((!d[g]||!_e.isObject(d[g]))&&(d[g]=[]),e(t,r,d[g],p)&&_e.isArray(d[g])&&(d[g]=jx(d[g])),!b)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const t={};return _e.forEachEntry(n,(r,d)=>{e(zx(r),d,t,0)}),t}return null}function Hx(n,e,t){if(_e.isString(n))try{return(e||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Ia={transitional:Dg,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,d=_e.isObject(n);if(d&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify(Fg(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let p;if(d){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Bx(n,this.formSerializer).toString();if((p=_e.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return Al(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),Hx(n)):n}],transformResponse:[function(n){const e=this.transitional||Ia.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.isString(n)&&(t&&!this.responseType||r)){const d=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(p){if(d)throw p.name==="SyntaxError"?It.from(p,It.ERR_BAD_RESPONSE,this,null,this.response):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_r.classes.FormData,Blob:_r.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],n=>{Ia.headers[n]={}});const Ux=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Vx=n=>{const e={};let t,r,d;return n&&n.split(`
|
1392
|
+
`).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&Ux[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Pg=Symbol("internals");function La(n){return n&&String(n).trim().toLowerCase()}function $l(n){return n===!1||n==null?n:_e.isArray(n)?n.map($l):String(n)}function qx(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const Kx=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ku(n,e,t,r,d){if(_e.isFunction(r))return r.call(this,e,t);if(d&&(e=t),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function Gx(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function Yx(n,e){const t=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(d,p,g){return this[r].call(this,e,d,p,g)},configurable:!0})})}let qr=class{constructor(n){n&&this.set(n)}set(n,e,t){const r=this;function d(g,b,h){const f=La(b);if(!f)throw new Error("header name must be a non-empty string");const o=_e.findKey(r,f);(!o||r[o]===void 0||h===!0||h===void 0&&r[o]!==!1)&&(r[o||b]=$l(g))}const p=(g,b)=>_e.forEach(g,(h,f)=>d(h,f,b));if(_e.isPlainObject(n)||n instanceof this.constructor)p(n,e);else if(_e.isString(n)&&(n=n.trim())&&!Kx(n))p(Vx(n),e);else if(_e.isObject(n)&&_e.isIterable(n)){let g={},b,h;for(const f of n){if(!_e.isArray(f))throw TypeError("Object iterator must return a key-value pair");g[h=f[0]]=(b=g[h])?_e.isArray(b)?[...b,f[1]]:[b,f[1]]:f[1]}p(g,e)}else n!=null&&d(e,n,t);return this}get(n,e){if(n=La(n),n){const t=_e.findKey(this,n);if(t){const r=this[t];if(!e)return r;if(e===!0)return qx(r);if(_e.isFunction(e))return e.call(this,r,t);if(_e.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=La(n),n){const t=_e.findKey(this,n);return!!(t&&this[t]!==void 0&&(!e||ku(this,this[t],t,e)))}return!1}delete(n,e){const t=this;let r=!1;function d(p){if(p=La(p),p){const g=_e.findKey(t,p);g&&(!e||ku(t,t[g],g,e))&&(delete t[g],r=!0)}}return _e.isArray(n)?n.forEach(d):d(n),r}clear(n){const e=Object.keys(this);let t=e.length,r=!1;for(;t--;){const d=e[t];(!n||ku(this,this[d],d,n,!0))&&(delete this[d],r=!0)}return r}normalize(n){const e=this,t={};return _e.forEach(this,(r,d)=>{const p=_e.findKey(t,d);if(p){e[p]=$l(r),delete e[d];return}const g=n?Gx(d):String(d).trim();g!==d&&delete e[d],e[g]=$l(r),t[g]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return _e.forEach(this,(t,r)=>{t!=null&&t!==!1&&(e[r]=n&&_e.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
|
1393
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const t=new this(n);return e.forEach(r=>t.set(r)),t}static accessor(n){const e=(this[Pg]=this[Pg]={accessors:{}}).accessors,t=this.prototype;function r(d){const p=La(d);e[p]||(Yx(t,d),e[p]=!0)}return _e.isArray(n)?n.forEach(r):r(n),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(qr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),_e.freezeMethods(qr);function Su(n,e){const t=this||Ia,r=e||t,d=qr.from(r.headers);let p=r.data;return _e.forEach(n,function(g){p=g.call(t,p,d.normalize(),e?e.status:void 0)}),d.normalize(),p}function Wg(n){return!!(n&&n.__CANCEL__)}function Ys(n,e,t){It.call(this,n??"canceled",It.ERR_CANCELED,e,t),this.name="CanceledError"}_e.inherits(Ys,It,{__CANCEL__:!0});function Bg(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new It("Request failed with status code "+t.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Xx(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function Qx(n,e){n=n||10;const t=new Array(n),r=new Array(n);let d=0,p=0,g;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),f=r[p];g||(g=h),t[d]=b,r[d]=h;let o=p,a=0;for(;o!==d;)a+=t[o++],o=o%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const c=f&&h-f;return c?Math.round(a*1e3/c):void 0}}function Zx(n,e){let t=0,r=1e3/e,d,p;const g=(b,h=Date.now())=>{t=h,d=null,p&&(clearTimeout(p),p=null),n.apply(null,b)};return[(...b)=>{const h=Date.now(),f=h-t;f>=r?g(b,h):(d=b,p||(p=setTimeout(()=>{p=null,g(d)},r-f)))},()=>d&&g(d)]}const Tl=(n,e,t=3)=>{let r=0;const d=Qx(50,250);return Zx(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),o=g<=b;r=g;const a={loaded:g,total:b,progress:b?g/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&o?(b-g)/f:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(a)},t)},zg=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},jg=n=>(...e)=>_e.asap(()=>n(...e)),Jx=_r.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,_r.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(_r.origin),_r.navigator&&/(msie|trident)/i.test(_r.navigator.userAgent)):()=>!0,eC=_r.hasStandardBrowserEnv?{write(n,e,t,r,d,p){const g=[n+"="+encodeURIComponent(e)];_e.isNumber(t)&&g.push("expires="+new Date(t).toGMTString()),_e.isString(r)&&g.push("path="+r),_e.isString(d)&&g.push("domain="+d),p===!0&&g.push("secure"),document.cookie=g.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tC(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function nC(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Hg(n,e,t){let r=!tC(e);return n&&(r||t==!1)?nC(n,e):e}const Ug=n=>n instanceof qr?{...n}:n;function ds(n,e){e=e||{};const t={};function r(f,o,a,c){return _e.isPlainObject(f)&&_e.isPlainObject(o)?_e.merge.call({caseless:c},f,o):_e.isPlainObject(o)?_e.merge({},o):_e.isArray(o)?o.slice():o}function d(f,o,a,c){if(_e.isUndefined(o)){if(!_e.isUndefined(f))return r(void 0,f,a,c)}else return r(f,o,a,c)}function p(f,o){if(!_e.isUndefined(o))return r(void 0,o)}function g(f,o){if(_e.isUndefined(o)){if(!_e.isUndefined(f))return r(void 0,f)}else return r(void 0,o)}function b(f,o,a){if(a in e)return r(f,o);if(a in n)return r(void 0,f)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b,headers:(f,o,a)=>d(Ug(f),Ug(o),a,!0)};return _e.forEach(Object.keys(Object.assign({},n,e)),function(f){const o=h[f]||d,a=o(n[f],e[f],f);_e.isUndefined(a)&&o!==b||(t[f]=a)}),t}const Vg=n=>{const e=ds({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;e.headers=g=qr.from(g),e.url=Og(Hg(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&g.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(_e.isFormData(t)){if(_r.hasStandardBrowserEnv||_r.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if((h=g.getContentType())!==!1){const[f,...o]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];g.setContentType([f||"multipart/form-data",...o].join("; "))}}if(_r.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&Jx(e.url))){const f=d&&p&&eC.read(p);f&&g.set(d,f)}return e},rC=typeof XMLHttpRequest<"u",iC=rC&&function(n){return new Promise(function(e,t){const r=Vg(n);let d=r.data;const p=qr.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,o,a,c,l;function s(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=qr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:n,request:u};Bg(function($){e($),s()},function($){t($),s()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(t(new It("Request aborted",It.ECONNABORTED,n,u)),u=null)},u.onerror=function(){t(new It("Network Error",It.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Dg;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new It(x,E.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,n,u)),u=null},d===void 0&&p.setContentType(null),"setRequestHeader"in u&&_e.forEach(p.toJSON(),function(x,E){u.setRequestHeader(E,x)}),_e.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),g&&g!=="json"&&(u.responseType=r.responseType),h&&([a,l]=Tl(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([o,c]=Tl(b),u.upload.addEventListener("progress",o),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{u&&(t(!x||x.type?new Ys(null,n,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=Xx(r.url);if(w&&_r.protocols.indexOf(w)===-1){t(new It("Unsupported protocol "+w+":",It.ERR_BAD_REQUEST,n));return}u.send(d||null)})},oC=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,d;const p=function(f){if(!d){d=!0,b();const o=f instanceof Error?f:this.reason;r.abort(o instanceof It?o:new Ys(o instanceof Error?o.message:o))}};let g=e&&setTimeout(()=>{g=null,p(new It(`timeout ${e} of ms exceeded`,It.ETIMEDOUT))},e);const b=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(p):f.removeEventListener("abort",p)}),n=null)};n.forEach(f=>f.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>_e.asap(b),h}},sC=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,d;for(;r<t;)d=r+e,yield n.slice(r,d),r=d},aC=async function*(n,e){for await(const t of lC(n))yield*sC(t,e)},lC=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},qg=(n,e,t,r)=>{const d=aC(n,e);let p=0,g,b=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:o}=await d.next();if(f){b(),h.close();return}let a=o.byteLength;if(t){let c=p+=a;t(c)}h.enqueue(new Uint8Array(o))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},Ml=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Kg=Ml&&typeof ReadableStream=="function",cC=Ml&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Gg=(n,...e)=>{try{return!!n(...e)}catch{return!1}},uC=Kg&&Gg(()=>{let n=!1;const e=new Request(_r.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Yg=64*1024,_u=Kg&&Gg(()=>_e.isReadableStream(new Response("").body)),El={stream:_u&&(n=>n.body)};Ml&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!El[e]&&(El[e]=_e.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new It(`Response type '${e}' is not supported`,It.ERR_NOT_SUPPORT,r)})})})(new Response);const hC=async n=>{if(n==null)return 0;if(_e.isBlob(n))return n.size;if(_e.isSpecCompliantForm(n))return(await new Request(_r.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(n)||_e.isArrayBuffer(n))return n.byteLength;if(_e.isURLSearchParams(n)&&(n=n+""),_e.isString(n))return(await cC(n)).byteLength},dC=async(n,e)=>_e.toFiniteNumber(n.getContentLength())??hC(e),pC=Ml&&(async n=>{let{url:e,method:t,data:r,signal:d,cancelToken:p,timeout:g,onDownloadProgress:b,onUploadProgress:h,responseType:f,headers:o,withCredentials:a="same-origin",fetchOptions:c}=Vg(n);f=f?(f+"").toLowerCase():"text";let l=oC([d,p&&p.toAbortSignal()],g),s;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&uC&&t!=="get"&&t!=="head"&&(m=await dC(o,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=k.headers.get("content-type"))&&o.setContentType(C),k.body){const[L,R]=zg(m,Tl(jg(h)));r=qg(k.body,Yg,L,R)}}_e.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;s=new Request(e,{...c,signal:l,method:t.toUpperCase(),headers:o.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(s);const E=_u&&(f==="stream"||f==="response");if(_u&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&zg(C,Tl(jg(b),!0))||[];x=new Response(qg(x.body,Yg,L,()=>{R&&R(),u&&u()}),k)}f=f||"text";let $=await El[_e.findKey(El,f)||"text"](x,n);return!E&&u&&u(),await new Promise((k,C)=>{Bg(k,C,{data:$,headers:qr.from(x.headers),status:x.status,statusText:x.statusText,config:n,request:s})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new It("Network Error",It.ERR_NETWORK,n,s),{cause:w.cause||w}):It.from(w,w&&w.code,n,s)}}),Au={http:Tx,xhr:iC,fetch:pC};_e.forEach(Au,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Xg=n=>`- ${n}`,gC=n=>_e.isFunction(n)||n===null||n===!1,Qg={getAdapter:n=>{n=_e.isArray(n)?n:[n];const{length:e}=n;let t,r;const d={};for(let p=0;p<e;p++){t=n[p];let g;if(r=t,!gC(t)&&(r=Au[(g=String(t)).toLowerCase()],r===void 0))throw new It(`Unknown adapter '${g}'`);if(r)break;d[g||"#"+p]=r}if(!r){const p=Object.entries(d).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let g=e?p.length>1?`since :
|
1394
|
+
`+p.map(Xg).join(`
|
1395
|
+
`):" "+Xg(p[0]):"as no adapter specified";throw new It("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return r},adapters:Au};function $u(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ys(null,n)}function Zg(n){return $u(n),n.headers=qr.from(n.headers),n.data=Su.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Qg.getAdapter(n.adapter||Ia.adapter)(n).then(function(e){return $u(n),e.data=Su.call(n,n.transformResponse,e),e.headers=qr.from(e.headers),e},function(e){return Wg(e)||($u(n),e&&e.response&&(e.response.data=Su.call(n,n.transformResponse,e.response),e.response.headers=qr.from(e.response.headers))),Promise.reject(e)})}const Jg="1.9.0",Il={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Il[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const ef={};Il.transitional=function(n,e,t){function r(d,p){return"[Axios v"+Jg+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new It(r(p," has been removed"+(e?" in "+e:"")),It.ERR_DEPRECATED);return e&&!ef[p]&&(ef[p]=!0,console.warn(r(p," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(d,p,g):!0}},Il.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function fC(n,e,t){if(typeof n!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const p=r[d],g=e[p];if(g){const b=n[p],h=b===void 0||g(b,p,n);if(h!==!0)throw new It("option "+p+" must be "+h,It.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new It("Unknown option "+p,It.ERR_BAD_OPTION)}}const Ll={assertOptions:fC,validators:Il},Ji=Ll.validators;let ps=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Ng,response:new Ng}}async request(n,e){try{return await this._request(n,e)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const d=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?d&&!String(t.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(t.stack+=`
|
1396
|
+
`+d):t.stack=d}catch{}}throw t}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=ds(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:d}=e;t!==void 0&&Ll.assertOptions(t,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),r!=null&&(_e.isFunction(r)?e.paramsSerializer={serialize:r}:Ll.assertOptions(r,{encode:Ji.function,serialize:Ji.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ll.assertOptions(e,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=d&&_e.merge(d.common,d[e.method]);d&&_e.forEach(["delete","get","head","post","put","patch","common"],l=>{delete d[l]}),e.headers=qr.concat(p,d);const g=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,g.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let f,o=0,a;if(!b){const l=[Zg.bind(this),void 0];for(l.unshift.apply(l,g),l.push.apply(l,h),a=l.length,f=Promise.resolve(e);o<a;)f=f.then(l[o++],l[o++]);return f}a=g.length;let c=e;for(o=0;o<a;){const l=g[o++],s=g[o++];try{c=l(c)}catch(u){s.call(this,u);break}}try{f=Zg.call(this,c)}catch(l){return Promise.reject(l)}for(o=0,a=h.length;o<a;)f=f.then(h[o++],h[o++]);return f}getUri(n){n=ds(this.defaults,n);const e=Hg(n.baseURL,n.url,n.allowAbsoluteUrls);return Og(e,n.params,n.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){ps.prototype[n]=function(e,t){return this.request(ds(t||{},{method:n,url:e,data:(t||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function e(t){return function(r,d,p){return this.request(ds(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}ps.prototype[n]=e(),ps.prototype[n+"Form"]=e(!0)});let mC=class mw{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let p=r._listeners.length;for(;p-- >0;)r._listeners[p](d);r._listeners=null}),this.promise.then=d=>{let p;const g=new Promise(b=>{r.subscribe(b),p=b}).then(d);return g.cancel=function(){r.unsubscribe(p)},g},e(function(d,p,g){r.reason||(r.reason=new Ys(d,p,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new mw(function(t){e=t}),cancel:e}}};function vC(n){return function(e){return n.apply(null,e)}}function yC(n){return _e.isObject(n)&&n.isAxiosError===!0}const Tu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tu).forEach(([n,e])=>{Tu[e]=n});function tf(n){const e=new ps(n),t=bg(ps.prototype.request,e);return _e.extend(t,ps.prototype,e,{allOwnKeys:!0}),_e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return tf(ds(n,r))},t}const qn=tf(Ia);qn.Axios=ps,qn.CanceledError=Ys,qn.CancelToken=mC,qn.isCancel=Wg,qn.VERSION=Jg,qn.toFormData=Al,qn.AxiosError=It,qn.Cancel=qn.CanceledError,qn.all=function(n){return Promise.all(n)},qn.spread=vC,qn.isAxiosError=yC,qn.mergeConfig=ds,qn.AxiosHeaders=qr,qn.formToJSON=n=>Fg(_e.isHTMLForm(n)?new FormData(n):n),qn.getAdapter=Qg.getAdapter,qn.HttpStatusCode=Tu,qn.default=qn;const{Axios:ND,AxiosError:DD,CanceledError:FD,isCancel:PD,CancelToken:WD,VERSION:BD,all:zD,Cancel:jD,isAxiosError:HD,spread:UD,toFormData:VD,AxiosHeaders:qD,HttpStatusCode:KD,formToJSON:GD,getAdapter:YD,mergeConfig:XD}=qn,Mu=qn.create({baseURL:location.origin,timeout:6e4,params:{}});Mu.interceptors.response.use(n=>n,n=>{var e,t,r,d,p,g,b,h,f,o,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(s){s&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let c=`HTTP ${n.response.status} - `;(e=n.response)!=null&&e.statusText&&(c+=`${n.response.statusText} `),(r=(t=n.response)==null?void 0:t.config)!=null&&r.data&&(c+=`${n.response.config.data} `),(p=(d=n.response)==null?void 0:d.data)!=null&&p.message?c+=`${n.response.data.message}`:(b=(g=n.response)==null?void 0:g.data)!=null&&b.exception?c+=`${n.response.data.exception}`:(o=(f=(h=n.response)==null?void 0:h.data)==null?void 0:f.error)!=null&&o.message?(n.response.data.error.class&&(c+=`${n.response.data.error.class} `),c+=`${n.response.data.error.message}`):c+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:c}),n}else throw n});const Rl=async function(n,e,{data:t,params:r={},headers:d,noAuth:p=!1,noScope:g=!1,onUploadProgress:b=!1}={}){if(!p){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}d.Authorization=localStorage.openc3Token}return d.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),Mu({method:n,url:e,data:t,params:r,headers:d,onUploadProgress:b})},Eu={Accept:"application/json"},nf={...Eu,"Content-Type":"application/json"},bC=ar("F",{get:function(n,{params:e,headers:t=Eu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Rl("get",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})},put:function(n,{data:e,params:t,headers:r=nf,noScope:d,noAuth:p,onUploadProgress:g}={}){return Rl("put",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},post:function(n,{data:e,params:t,headers:r=nf,noScope:d,noAuth:p,onUploadProgress:g}={}){return Rl("post",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},delete:function(n,{params:e,headers:t=Eu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Rl("delete",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})}});let Ol=()=>({emit(n,...e){for(let t=this.events[n]||[],r=0,d=t.length;r<d;r++)t[r](...e)},events:{},on(n,e){var t;return((t=this.events)[n]||(t[n]=[])).push(e),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(d=>e!==d)}}});class Ra extends Error{constructor(e,t){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=t,this.name="ReasonError"}}class Iu extends Ra{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class wC extends Ra{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Fi extends Ra{constructor(e,t){t?super(e,t):super("Disconnected",e),this.name="DisconnectedError"}}class xC extends Fi{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function rf(n){return n?`{${Object.keys(n).sort().filter(e=>n[e]!==void 0).map(e=>{let t=JSON.stringify(n[e]);return`${JSON.stringify(e)}:${t}`}).join(",")}}`:""}class CC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,t){if(!this._info)return this._info={id:e,info:t},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((t,{id:r,info:d})=>(t[r]=d,t),{})}}const gs=Symbol("state");class of{constructor(e={}){this.emitter=Ol(),this.params=Object.freeze(e),this.presence=new CC(this),this.initialConnect=!0,this[gs]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=rf({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[gs]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[gs]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[gs]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[gs]="connected";let e=!0,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[gs]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[gs]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,t)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(e,t){this.emit("message",e,t)}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}emit(e,...t){return this.emitter.emit(e,...t)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(d=>d()),e()})),r.push(this.on("close",d=>{r.forEach(p=>p()),t(d||new Ra("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class kC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let t=this.channels.indexOf(e);t>-1&&this.channels.splice(t,1)}notify(e,...t){this.state=e==="restored"?"connected":e,t.length===1?this.channels.forEach(r=>r[e](t[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let t=this._pendings[0];return!t||t.intent!==e?Promise.resolve():t.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let t,r={promise:new Promise(p=>{t=p}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},d=this._pendingTop;return this._pendings.push(r),d&&await d.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let t=this._pendingTop;return!t||t.acquired||t.intent!==e?!1:(this._pendings.pop(),t.canceled=!0,!0)}}class SC{constructor(){this.queue=[]}async acquire(e,t){t==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class _C{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new SC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:t,unsubscribe:r}){let d=this._subscriptions[e]=new kC(e);return d.remoteId=this._localToRemote[e],d.subscriber=t,d.unsubscriber=r,d.gvl=this.glv,d}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,t){this._localToRemote[e]=t;let r=this.get(e);r&&(r.remoteId=t)}}class AC{constructor(e={}){this.subscriptions=new _C(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,t){this._remoteToLocal[t]=e,this.subscriptions.storeRemoteId(e,t),this.flush(t)}unsubscribe(e){let t=this.subscriptions.get(e);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,t,r){let d=this._remoteToLocal[e];if(!d){this._pendingMessages.push([e,t,r]);return}let p=this.subscriptions.get(d);p&&p.channels.forEach(g=>{g.receive(t,r)})}notify(e,t,r){let d=this._remoteToLocal[e];if(!d)return;let p=this.subscriptions.get(d);p&&p.channels.forEach(g=>g.emit(t,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let t=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}}const sf={debug:0,info:1,warn:2,error:3};class af{constructor(e){this.level=e||"warn"}log(e,t,r){sf[e]<sf[this.level]||this.writeLogEntry(e,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}}class Oa extends af{writeLogEntry(){}}class $C{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let TC=0;class lf{constructor(e={}){let{logger:t}=e;this.logger=t||new Oa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,t){let r={channel:e};t&&Object.assign(r,t);let d=rf(r);if(this.pendingUnsubscriptions[d]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,d),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,t))},g)})}if(this.pendingSubscriptions[d])return this.logger.warn("subscription is already pending, skipping",d),Promise.reject(Error("Already subscribing"));let p=this.subscribeRetryInterval;return new Promise((g,b)=>{let h=++TC;this.pendingSubscriptions[d]={resolve:g,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(d)),this.maybeRetrySubscribe(h,d,p)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,t,r){setTimeout(()=>{let d=this.pendingSubscriptions[t];d&&d.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(e,t,r))},r)}maybeExpireSubscribe(e,t,r){setTimeout(()=>{let d=this.pendingSubscriptions[t];d&&d.id===e&&(delete this.pendingSubscriptions[t],d.reject(new wC(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,t,r){return t==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=t,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,t){return this.cable.send({command:"whisper",identifier:e,data:t}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:d,reason:p,reconnect:g}=e;if(t==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(t==="disconnect"){let b=new Fi(p);this.reset(b),g===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(t==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(t==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Iu)):this.logger.error("subscription not found",{type:t,identifier:r})}if(d)return{identifier:r,message:d};this.logger.warn(`unknown message type: ${t}`,{message:e})}reset(e){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const cf=()=>Date.now()/1e3|0;class MC extends lf{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=cf()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let t in this.pendingPresence)this.pendingPresence[t].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:d}=e;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(t==="reject_subscription")return super.receive(e);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(t==="ping")return this.restoreSince&&(this.restoreSince=cf()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(t==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let p=e.restored_ids||Object.keys(this.subscriptionStreams);for(let g of p)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(p)}return this.cable.connected(this.sessionId)}if(t==="presence"){let p=d.type;if(p==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(d))}else if(p==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:d}}if(d){let p=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:d,meta:p}}this.logger.warn(`unknown message type: ${t}`,{message:e})}perform(e,t,r){switch(t){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,t,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let t=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(t.history=r,this.pendingHistory[e]=!0);let d=this.presenceInfo[e];return d&&(t.presence=d),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let t={},r=!1;if(this.subscriptionStreams[e])for(let d of this.subscriptionStreams[e]){let p=this.streamsPositions[d];p&&(r=!0,t[d]=p)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(e,t,r,d){if(!(!t||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(t),this.streamsPositions[t]={epoch:r,offset:d},{stream:t,epoch:r,offset:d}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,t){return this.presenceInfo[e]=t,this.cable.send({command:"join",identifier:e,presence:t}),Promise.resolve()}async leave(e,t){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:t}),Promise.resolve()}presence(e,t){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,d)=>{this.pendingPresence[e]={resolve:r,reject:d},this.cable.send({command:"presence",identifier:e,data:t})})}}class EC extends Ra{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Lu extends of{constructor(e,t){super(t),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}wl(Lu,"identifier","__ghost__");const IC="$pubsub";class Ru extends of{async perform(e,t){if(e.startsWith("$"))return super.perform(e,t);throw Error("not implemented")}}wl(Ru,"identifier",IC);const fs=Symbol("state");let LC=class{constructor({transport:n,protocol:e,encoder:t,logger:r,lazy:d,hubOptions:p,performFailures:g,transportConfigurator:b}){this.emitter=Ol(),this.transport=n,this.encoder=t,this.logger=r||new Oa,this.protocol=e,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new AC(p||{}),this[fs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,d===!1&&this.connect().catch(()=>{})}get state(){return this[fs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[fs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(t){this.handleClose(t)}return e}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[fs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Fi("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[fs]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Fi("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,t=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}notify(n,e,t){e&&typeof e!="string"&&(t=e,e=void 0),e?this.hub.notify(e,"info",{type:n,data:t}):this.emit("info",{type:n,data:t})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Fi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[fs]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let e;n&&(e=n instanceof Fi?n:new Fi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[fs]="closed";let t=e||new Fi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",t)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(n);if(e===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",e);let t=this.protocol.receive(e);if(t){this.logger.debug("processed incoming message",t);let{type:r,identifier:d,message:p,meta:g}=t;r?this.hub.notify(d,r,p):this.hub.transmit(d,p,g)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(n);if(e===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(e)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let e=new Ru({stream_name:n});return this.subscribe(e)}streamFromSigned(n){let e=new Ru({signed_stream_name:n});return this.subscribe(e)}subscribeTo(n,e){let t,r;return typeof n=="string"&&(r=n,n=Lu),t=r?new n(r,e):new n(e),this.subscribe(t)}subscribe(n){if(!n.attached(this))return n;let e=n.identifier;n.connecting();let t=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return t.add(n),t.intent==="subscribed"&&t.state==="connected"&&n.connected(),t.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,e,t){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let d=await n.acquire("subscribed");if(d.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),d.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),d.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),d.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),d.release();return}let p={identifier:e,params:t};this.logger.debug("subscribing",p);try{let g=await this.protocol.subscribe(e,t);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...p,remoteId:g}),n.notify("connected")}catch(g){if(g){if(g instanceof Iu&&this.logger.warn("rejected",p),g instanceof Fi){this.logger.debug("disconnected during subscription; will retry on connect",p),d.release();return}this.logger.error("failed to subscribe",{error:g,...p})}n.close(g),this.hub.unsubscribe(r)}d.release()}unsubscribe(n){let e=n.identifier,t=this.hub.subscriptions.get(e);if(!t)throw Error(`Subscription not found: ${e}`);t.remove(n),n.closed(),t.maybeUnsubscribe()}async _unsubscribe(n){let e=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let t=await n.acquire("unsubscribed");if(t.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),t.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:n.intent}),t.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:e}),t.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),n.close(),this.hub.unsubscribe(e),t.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(d){d&&(d instanceof Fi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:d}):this.logger.error("unsubscribe failed",{id:e,error:d}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(e)):n.state="closed",t.release()}async perform(n,e,t){if(this.performFailures==="throw")return this._perform(n,e,t);try{return await this._perform(n,e,t)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,e,t){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new EC;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let d=r.remoteId,p={id:d,action:e,payload:t};this.logger.debug("perform",p);try{let g=await this.protocol.perform(d,e,t);return g&&this.logger.debug("perform result",{message:g,request:p}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:p}),g}}on(n,e){return this.emitter.on(n,e)}once(n,e){let t=this.emitter.on(n,(...r)=>{t(),e(...r)});return t}emit(n,...e){return this.emitter.emit(n,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,e)=>{let t=[()=>delete this._pendingConnect];t.push(this.on("connect",()=>{t.forEach(r=>r()),n()})),t.push(this.on("close",r=>{t.forEach(d=>d()),e(r)})),t.push(this.on("disconnect",r=>{t.forEach(d=>d()),e(r)}))}),this._pendingConnect)}};const RC={maxMissingPings:2,maxReconnectAttempts:1/0},Xs=()=>Date.now(),uf=(n,e)=>{e=e||{};let{backoffRate:t,jitterRatio:r,maxInterval:d}=e;return t=t||2,r===void 0&&(r=.5),p=>{let g=n*t**p,b=g*t,h=g+(b-g)*Math.random(),f=2*(Math.random()-.5)*r;return h=h*(1+f),d&&d<h&&(h=d),h}};let hf=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},RC,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Oa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Xs()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Xs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Xs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Xs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Xs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=Xs()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new xC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class OC{constructor(e,t={}){this.transports=e,this.transport=null,this.emitter=Ol(),this.unbind=[],this.logger=t.logger||new Oa}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let t=this.transports[e];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,t){this.transports.forEach(r=>{r.setParam(e,t)})}setToken(e,t){this.transports.forEach(r=>{r.setToken(e,t)})}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class NC{constructor(e,t={}){this.url=e;let r=t.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ol();let{format:d,subprotocol:p,authStrategy:g}=t;this.format=d||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=p}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((t,r)=>{let d=[];d.push(this.once("open",()=>{d.forEach(p=>p()),t()})),d.push(this.once("close",()=>{d.forEach(p=>p()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,t){let r=new URL(this.url);r.searchParams.set(e,t);let d=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(d)}setToken(e,t="jid"){if(this.authStrategy==="param")this.setParam(t,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(d=>d.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let t=e.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const df={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function DC(n,e){if(typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),e=e||{},!n&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},df,e);let{protocol:t,websocketImplementation:r,websocketFormat:d,websocketOptions:p,websocketAuthStrategy:g,fallbacks:b,logLevel:h,logger:f,transport:o,encoder:a,lazy:c,monitor:l,pingInterval:s,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:$,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:R,auth:F}=e;if(f=f||new Oa(h),typeof t=="string"){x=x||t;let P=t.substring(0,t.lastIndexOf("-")),O=t.substring(t.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")t=new lf({logger:f,...k});else if(P==="actioncable-v1-ext")t=new MC({logger:f,historyTimestamp:$,...k});else throw Error(`Protocol is not supported yet: ${t}`);if(O==="json")a=a||new $C,d=d||"text";else if(O==="msgpack"){if(d="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(d=d||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${t}`)}if(!t)throw Error("Protocol must be specified");o=o||new NC(n,{websocketImplementation:r,websocketOptions:p,subprotocol:x,authStrategy:g,format:d}),b&&(o=new OC([o,...b],{logger:f})),F&&F.token&&o.setToken(F.token,F.param||"jid"),u=u||uf(s),l!==!1&&(l=l||new hf({pingInterval:s,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,logger:f}));let I={concurrentSubscribes:C},H=new LC({protocol:t,transport:o,encoder:a,logger:f,lazy:c,hubOptions:I,performFailures:L,transportConfigurator:R});return l&&(l.watch(H),H.monitor=l),E&&FC(H,async()=>{try{await E(o)}catch(P){return f.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function FC(n,e){let t=!1;n.on("connect",()=>t=!1),n.on("close",async r=>{if(r){if(t){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await e())}})}class PC{constructor(e){this.channel=e}notify(e,...t){typeof this[e]=="function"&&this[e](...t)}perform(e,t={}){this.channel.perform(e,t)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class WC extends Lu{constructor(e,t,r){super(e,t),this.subscription=new PC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:d})=>this.subscription.notify("connected",{reconnected:d})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",d=>this.subscription.notify("received",d)),this.on("close",d=>{d&&d instanceof Iu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class BC{constructor(e){this.cable=e}create(e,t){let r,d;typeof e=="object"?(r=e.channel,delete e.channel,d=e):(r=e,d={});let p=new WC(r,d,t);return p.subscription.notify("initialized"),this.cable.subscribe(p),p.subscription}findAll(e){return this.cable.hub.channels.filter(t=>t.identifier===e).map(t=>t.subscription)}}class zC{constructor(e){this.cable=e,this.subscriptions=new BC(e)}}class jC extends af{writeLogEntry(e,t,r){r?console[e](t,r):console[e](t)}}class HC extends hf{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},t=d=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:d})},r=()=>this.disconnect(new Fi("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const UC=["cable","action-cable"],VC="/cable",Nl=(n,e)=>{for(let t of UC){let r=n.head.querySelector(`meta[name='${t}-${e}']`);if(r)return r.getAttribute("content")}},pf=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,qC=()=>{if(typeof document<"u"&&document.head){let n=Nl(document,"url");if(n)return pf(n)}return pf(VC)},KC=()=>{if(typeof document<"u"&&document.head){let n=Nl(document,"history-timestamp");if(n)return n|0}},GC=()=>{if(typeof document<"u"&&document.head)return Nl(document,"token")},YC=()=>{if(typeof document<"u"&&document.head)return Nl(document,"token-param")};function XC(n,e){typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),n=n||qC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=KC());let t=GC();if(t){let f=YC();e.auth=Object.assign({token:t,param:f},e.auth||{})}e=Object.assign({},df,e);let{logLevel:r,logger:d,pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h}=e;return d=e.logger=e.logger||new jC(r),g=e.reconnectStrategy=e.reconnectStrategy||uf(p),e.monitor!==!1&&(e.monitor=e.monitor||new HC({pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h,logger:d})),DC(n,e)}function QC(n,e){let t=XC(n,e);return new zC(t)}class ZC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,t,r={},d={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(p=>{if(p&&OpenC3Auth.setTokens(),this._cable==null){let g=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);g=new URL(g,document.baseURI).href,this._cable=QC(g)}return this._cable.subscriptions.create({channel:e,...d},r)})}recordPing(){}}ar("P",ZC);class JC{constructor(e,t,r="",d=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=t,this.usage=r,this.url=d}}ar("a",JC);function Dl(n){return ek.test(n)}const ek=/^-?[0-9]+$/;function gf(n){return tk.test(n)}const tk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ff(n,e){const t=Number.parseFloat(n),r=String(t),d=mf(n),p=mf(r);return!!(d===p||(e==null?void 0:e.approx)===!0&&!Dl(n)&&p.length>=14&&d.startsWith(p.substring(0,14)))}let Na=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function nk(n){if(ff(n,{approx:!1}))return;if(Dl(n))return Na.truncate_integer;const e=Number.parseFloat(n);return Number.isFinite(e)?e===0?Na.underflow:Na.truncate_float:Na.overflow}function mf(n){return n.replace(rk,"").replace(ok,"").replace(sk,"").replace(ik,"")}const rk=/[eE][+-]?\d+$/,ik=/^-?(0*)?/,ok=/\./,sk=/0+$/;class ak{constructor(e){if(wl(this,"isLosslessNumber",!0),!gf(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=nk(this.value);if(e===void 0||e===Na.truncate_float)return Number.parseFloat(this.value);if(Dl(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function lk(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function ck(n){return new ak(n)}function uk(n,e){return Ou({"":n},"",n,e)}function Ou(n,e,t,r){return Array.isArray(t)?r.call(n,e,dk(t,r)):t&&typeof t=="object"&&!lk(t)?r.call(n,e,hk(t,r)):r.call(n,e,t)}function hk(n,e){for(const t of Object.keys(n)){const r=Ou(n,t,n[t],e);r!==void 0?n[t]=r:delete n[t]}return n}function dk(n,e){for(let t=0;t<n.length;t++)n[t]=Ou(n,String(t),n[t],e);return n}function pk(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ck,r=0;const d=b();return s(d),m(),e?uk(d,e):d;function p(){if(n.charCodeAt(r)===bk){r++,f();const A={};let _=!0;for(;r<n.length&&n.charCodeAt(r)!==yf;){_?_=!1:(c(),f());const N=r,B=o();if(B===void 0){E();return}f(),l();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(A,B)&&!Nu(U,A[B])&&$(B,N+1),A[B]=U}return n.charCodeAt(r)!==yf&&k(),r++,A}}function g(){if(n.charCodeAt(r)===wk){r++,f();const A=[];let _=!0;for(;r<n.length&&n.charCodeAt(r)!==bf;){_?_=!1:c();const N=b();u(N),A.push(N)}return n.charCodeAt(r)!==bf&&C(),r++,A}}function b(){f();const A=o()??a()??p()??g()??h("true",!0)??h("false",!1)??h("null",null);return f(),A}function h(A,_){if(n.slice(r,r+A.length)===A)return r+=A.length,_}function f(){for(;gk(n.charCodeAt(r));)r++}function o(){if(n.charCodeAt(r)===Du){r++;let A="";for(;r<n.length&&n.charCodeAt(r)!==Du;){if(n.charCodeAt(r)===yk){const _=n[r+1],N=vk[_];N!==void 0?(A+=N,r++):_==="u"?Fl(n.charCodeAt(r+2))&&Fl(n.charCodeAt(r+3))&&Fl(n.charCodeAt(r+4))&&Fl(n.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):I(r):R(r)}else mk(n.charCodeAt(r))?A+=n[r]:L(n[r]);r++}return x(),r++,A}}function a(){const A=r;if(n.charCodeAt(r)===wf&&(r++,w(A)),n.charCodeAt(r)===Fu)r++;else if(fk(n.charCodeAt(r)))for(r++;Pl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===Tk)for(r++,w(A);Pl(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===Rk||n.charCodeAt(r)===Lk)for(r++,(n.charCodeAt(r)===wf||n.charCodeAt(r)===_k)&&r++,w(A);Pl(n.charCodeAt(r));)r++;if(r>A)return t(n.slice(A,r))}function c(){if(n.charCodeAt(r)!==$k)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(n.charCodeAt(r)!==Mk)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function s(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function u(A){if(A===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(A){if(!Pl(n.charCodeAt(r))){const _=n.slice(A,r);throw new SyntaxError(`Invalid number '${_}', expecting a digit ${O()}`)}}function x(){if(n.charCodeAt(r)!==Du)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(A,_){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${_}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function L(A){throw new SyntaxError(`Invalid character '${A}' ${H()}`)}function R(A){const _=n.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${_}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(A){const _=n.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${_}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function gk(n){return n===xk||n===Ck||n===kk||n===Sk}function Fl(n){return n>=Fu&&n<=Pu||n>=Ek&&n<=Ok||n>=Ik&&n<=Nk}function Pl(n){return n>=Fu&&n<=Pu}function fk(n){return n>=Ak&&n<=Pu}function mk(n){return n>=32&&n<=1114111}function Nu(n,e){return n===e?!0:Array.isArray(n)&&Array.isArray(e)?n.length===e.length&&n.every((t,r)=>Nu(t,e[r])):vf(n)&&vf(e)?[...new Set([...Object.keys(n),...Object.keys(e)])].every(t=>Nu(n[t],e[t])):!1}function vf(n){return typeof n=="object"&&n!==null}const vk={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1397
|
+
`,r:"\r",t:" "},yk=92,bk=123,yf=125,wk=91,bf=93,xk=32,Ck=10,kk=9,Sk=13,Du=34,_k=43,wf=45,Fu=48,Ak=49,Pu=57,$k=44,Tk=46,Mk=58,Ek=65,Ik=97,Lk=69,Rk=101,Ok=70,Nk=102;function xf(n,e,t,r){return d(n);function d(h,f){if(Array.isArray(r)){const o=r.find(a=>a.test(h));if(o){const a=o.stringify(h);if(typeof a!="string"||!gf(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return p(h);if(h&&typeof h=="object")return g(h)}function p(h,f){if(h.length===0)return"[]";let o="[";for(let a=0;a<h.length;a++){const c=h[a];typeof c<"u"&&typeof c!="function"?o+=d(c):o+="null",a<h.length-1&&(o+=",")}return o+="]",o}function g(h,f){if(typeof h.toJSON=="function")return xf(h.toJSON(),e,t,void 0);const o=Array.isArray(e)?e.map(String):Object.keys(h);if(o.length===0)return"{}";let a=!0,c="{";for(const l of o){const s=h[l];if(b(l,s)){a?a=!1:c+=",";const u=JSON.stringify(l);c+=`${u}:`,c+=d(s)}}return c+="}",c}function b(h,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function Dk(n){return Dl(n)&&!ff(n)?BigInt(n):parseFloat(n)}class Fk{constructor(){wl(this,"id",1)}async exec(e,t,r={},d={},p=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,d.manual=!0,(await Mu.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...d},timeout:p,transformRequest:[(g,b)=>xf(g)],transformResponse:[g=>pk(g,void 0,Dk)]})).data.result}catch(g){let b=new Error;throw g.response?(b.name=g.response.data.error.data.class,b.message=g.response.data.error.data.message,b.object=g.response.data.error):g.request?(b.name="Request error",b.message="Request error, no response received"):b=g,b}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,t){return this.exec("map_target_to_interface",[e,t])}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...r){return this.exec("interface_cmd",[e,t,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,r){return this.exec("get_item",[e,t,r])}get_param(e,t,r){return this.exec("get_param",[e,t,r])}get_parameter(e,t,r){return this.exec("get_param",[e,t,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_tlm",[e,t])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,t=!1){return this.exec("get_all_tlm_names",[e],{hidden:t})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,t,r,d=30){const p=await this.exec("get_tlm_packet",[e,t],{type:r,stale_time:d});if(p!=null){let g=p.length,b=null;for(let h=0;h<g;h++)b=this.decode_openc3_type(p[h][1]),b!==null&&(p[h][1]=b)}return p}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}async get_tlm_values(e,t=30,r=null){let d={stale_time:t};r!==null&&(d.cache_timeout=r);const p=await this.exec("get_tlm_values",[e],d,{},1e4);let g=p[0].length,b=null;for(let h=0;h<g;h++)b=this.decode_openc3_type(p[0][h]),b!==null&&(p[0][h]=b);return p}get_limits(e,t,r){return this.exec("get_limits",[e,t,r])}async tlm(e,t,r,d="CONVERTED"){let p=null;if(t===void 0)p=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t))p=await this.exec("tlm",[e],{type:t});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else p=await this.exec("tlm",[e,t,r],{type:d});let g=this.decode_openc3_type(p);return g!==null&&(p=g),p}async inject_tlm(e,t,r=null,d="CONVERTED"){await this.exec("inject_tlm",[e,t,r],{type:d})}set_tlm(e,t,r,d){return this.exec("set_tlm",[e,t,r],{type:d})}override_tlm(e,t,r,d){return this.exec("override_tlm",[e,t,r],{type:d})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,r,d){return this.exec("normalize_tlm",[e,t,r],{type:d})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,t=!1){return this.exec("get_all_cmd_names",[e],{hidden:t})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_cmd",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,r,d="CONVERTED"){return this.exec("get_cmd_value",[e,t,r,d])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,r,d,p){let g=null;for(let b in d)Object.prototype.hasOwnProperty.call(d,b)&&(g=this.encode_openc3_type(d[b]),g!==null&&(d[b]=g));return this.exec(e,[t,r,d],{},p)}get_cmd_hazardous(e,t,r,d={}){return t===void 0?this.exec("get_cmd_hazardous",e,{},d):this._cmd("get_cmd_hazardous",e,t,r,d)}cmd(e,t,r,d={}){return t===void 0?this.exec("cmd",e,{},d):this._cmd("cmd",e,t,r,d)}cmd_no_range_check(e,t,r,d={}){return t===void 0?this.exec("cmd_no_range_check",e,{},d):this._cmd("cmd_no_range_check",e,t,r,d)}cmd_raw(e,t,r,d={}){return t===void 0?this.exec("cmd_raw",e,{},d):this._cmd("cmd_raw",e,t,r,d)}cmd_raw_no_range_check(e,t,r,d={}){return t===void 0?this.exec("cmd_raw_no_range_check",e,{},d):this._cmd("cmd_raw_no_range_check",e,t,r,d)}cmd_no_hazardous_check(e,t,r,d={}){return t===void 0?this.exec("cmd_no_hazardous_check",e,{},d):this._cmd("cmd_no_hazardous_check",e,t,r,d)}cmd_no_checks(e,t,r,d={}){return t===void 0?this.exec("cmd_no_checks",e,{},d):this._cmd("cmd_no_checks",e,t,r,d)}cmd_raw_no_hazardous_check(e,t,r,d={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},d):this._cmd("cmd_raw_no_hazardous_check",e,t,r,d)}cmd_raw_no_checks(e,t,r,d={}){return t===void 0?this.exec("cmd_raw_no_checks",e,{},d):this._cmd("cmd_raw_no_checks",e,t,r,d)}build_cmd(e,t,r){return t===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,r)}build_command(e,t,r){return t===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,r){return this.exec("save_config",[e,t,r])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,r){return this.exec("enable_limits",[e,t,r])}disable_limits(e,t,r){return this.exec("disable_limits",[e,t,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,t){return this.exec("set_setting",[e,t])}update_news(){return this.exec("update_news",[])}save_setting(e,t){return this.exec("set_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t),d=new Uint8Array(r);return Array.from(d).map(p=>p.toString(16).padStart(2,"0")).join("")}}}ar("B",Fk);var Cf={exports:{}},kf;function Pk(){return kf||(kf=1,function(n,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,d){function p(f,o){function a(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),_=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(_&&!_[2]&&(N=I-_[1].length,B=I),A&&!A[2]&&(N||(N=I),B=I+A[1].length),N)return{start:N,end:B};if(_&&_[2]&&_.index>H)return{start:_.index,end:_.index+_[2].length};if(A&&A[2])return N=I+A[2].length,{start:N,end:N+A[3].length}}}for(var c=o.column||f.getOption("printMarginColumn"),l=o.allowMerge!=0,s=Math.min(o.startRow,o.endRow),u=Math.max(o.startRow,o.endRow),m=f.session;s<=u;){var w=m.getLine(s);if(w.length>c){var x=a(w,c,5);if(x){var E=/^\s*/.exec(w)[0];m.replace(new b(s,x.start,s,x.end),`
|
1398
|
+
`+E)}u++}else if(l&&/\S/.test(w)&&s!=u){var $=m.getLine(s+1);if($&&/\S/.test($)){var k=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),L=k+" "+C,x=a(L,c,5);if(x&&x.start>k.length||L.length<c){var R=new b(s,k.length,s+1,$.length-C.length);m.replace(R," "),s--,u--}else k.length<w.length&&m.remove(new b(s,k.length,s,w.length))}}s++}}function g(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var o=f.editor,a=o.selection.cursor;if(a.column<=o.renderer.$printMarginColumn)return;var c=o.session.$undoManager.$lastDelta;p(o,{startRow:a.row,endRow:a.row,allowMerge:!1}),c!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var b=t("../range").Range,h=t("../editor").Editor;t("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=p}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(t,r,d){function p(y){return{row:y.line,column:y.ch}}function g(y){return new Ne(y.row,y.column)}function b(y,T,S){if(T.line===S.line&&T.ch>=S.ch-1){var D=y.getLine(T.line),W=D.charCodeAt(T.ch);55296<=W&&W<=55551&&(S.ch+=1)}return{start:T,end:S}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),Be.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Ko),L(y),Be.on(y.getInputField(),"paste",o(y))}function f(y){y.setOption("disableInput",!1),y.off("cursorActivity",Ko),Be.off(y.getInputField(),"paste",o(y)),y.state.vim=null,mr&&clearTimeout(mr)}function o(y){var T=y.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(y.setCursor(fe(y.getCursor(),0,1)),Hn.enterInsertMode(y,{},T))}),T.onPasteFn}function a(y,T){return T>=y.firstLine()&&T<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function s(y){return va.test(y)}function u(y){return an.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,T){for(var S=0;S<T.length;S++)if(T[S]==y)return!0;return!1}function E(y,T,S,D,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),Kt[y]={type:S,defaultValue:T,callback:W},D)for(var z=0;z<D.length;z++)Kt[D[z]]=Kt[y];T&&$(y,T)}function $(y,T,S,D){var W=Kt[y];D=D||{};var z=D.scope;if(!W)return new Error("Unknown option: "+y);if(W.type=="boolean"){if(T&&T!==!0)return new Error("Invalid argument: "+y+"="+T);T!==!1&&(T=!0)}W.callback?(z!=="local"&&W.callback(T,void 0),z!=="global"&&S&&W.callback(T,S)):(z!=="local"&&(W.value=W.type=="boolean"?!!T:T),z!=="global"&&S&&(S.state.vim.options[y]={value:T}))}function k(y,T,S){var D=Kt[y];S=S||{};var W=S.scope;if(!D)return new Error("Unknown option: "+y);if(D.callback){var z=T&&D.callback(void 0,T);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&T&&T.state.vim.options[y];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=zn()}function L(y){return y.state.vim||(y.state.vim={inputState:new A,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function R(){je={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ai(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Kt){var T=Kt[y];T.value=T.defaultValue}}function F(y){function T(Y){typeof Y=="string"?An.value=Y:An=null}if(y[0]=="<"){var S=y.toLowerCase().slice(1,-1),D=S.split("-");if(S=D.pop()||"",S=="lt")y="<";else if(S=="space")y=" ";else if(S=="cr")y=`
|
1399
|
+
`;else if($i[S]){var W=An.value,z={key:$i[S],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};An.onKeyDown&&An.onKeyDown(z,An.value,T),An&&An.onKeyUp&&An.onKeyUp(z,An.value,T);return}}if(y==`
|
1400
|
+
`){var q=An;An=null,q.onClose&&q.onClose(q.value)}else An.value=(An.value||"")+y}function I(y,T,S){var D=pn;if(S){if(Pr.indexOf(S)!=-1)return;Pr.push(S),pn=S.noremap!=0}try{for(var W=L(y),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec(T);){var Y=q[0],Q=W.insertMode;if(An){F(Y);continue}var re=kt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1401
|
+
`;else{if($i.hasOwnProperty(se)){Y=$i[se],Yo(y,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Pr.pop(),pn=Pr.length?D:!1,!Pr.length&&An){var Ce=An;An=null,Ir(y,Ce)}}}function H(y,T){var S=y.key;if(!Wr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=ir[S]||S;var D="";if(y.ctrlKey&&(D+="C-"),y.altKey&&(D+="A-"),y.metaKey&&(D+="M-"),Be.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(D=D.slice(2)),(D||S.length>1)&&y.shiftKey&&(D+="S-"),T&&!T.expectLiteralNext&&S.length==1){if(Zn.keymap&&S in Zn.keymap)(Zn.remapCtrl!=0||!D)&&(S=Zn.keymap[S]);else if(S.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(S=W)}}return D+=S,D.length>1&&(D="<"+D+">"),D}}function P(y,T){Zn.string!==y&&(Zn=O(y)),Zn.remapCtrl=T}function O(y){function T(D){return D.split(/\\?(.)/).filter(Boolean)}var S={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=T(W[1]),q=T(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)S[z[Y]]=q[Y]}else if(W.length==1){var Q=T(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)S[Q[Y]]=Q[Y+1]}}}),{keymap:S,string:y}):{keymap:S,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(y,T){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,Be.signal(y,"vim-command-done",T)}function N(){this.removed=[],this.inserted=""}function B(y,T,S){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!S}function U(y,T){var S=je.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");S[y]=T,sn.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new B,y["."]=new B,y[":"]=new B,y["/"]=new B,y["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,T){Jr[y]=T}function he(y,T){for(var S=[],D=0;D<T;D++)S.push(y);return S}function ne(y,T){Jo[y]=T}function ae(y,T){Hn[y]=T}function ue(y,T,S){var D=y.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(y.firstLine(),T.line),y.lastLine()),q=y.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;S&&S.line==z&&S.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ce(y){var T={};for(var S in y)y.hasOwnProperty(S)&&(T[S]=y[S]);return T}function fe(y,T,S){return typeof T=="object"&&(S=T.ch,T=T.line),new Ne(y.line+T,y.ch+S)}function $e(y,T,S,D){D.operator&&(S="operatorPending");for(var W,z=[],q=[],Y=pn?T.length-So:0,Q=Y;Q<T.length;Q++){var re=T[Q];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||D.operator&&re.type=="action"||!(W=Te(y,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function Te(y,T){var S=T.slice(-11)=="<character>",D=T.slice(-10)=="<register>";if(S||D){var W=T.length-(S?11:10),z=y.slice(0,W),q=T.slice(0,W);return z==q&&y.length>W?"full":q.indexOf(z)==0?"partial":!1}return y==T?"full":T.indexOf(y)==0?"partial":!1}function Ee(y){var T=/^.*(<[^>]+>)$/.exec(y),S=T?T[1]:y.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
|
1402
|
+
`;break;case"<Space>":S=" ";break;default:S=""}return S}function Qe(y,T,S){return function(){for(var D=0;D<S;D++)T(y)}}function Ye(y){return new Ne(y.line,y.ch)}function gt(y,T){return y.ch==T.ch&&y.line==T.line}function at(y,T){return y.line<T.line?!0:y.line==T.line&&y.ch<T.ch}function ft(y,T){return arguments.length>2&&(T=ft.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,T)?y:T}function on(y,T){return arguments.length>2&&(T=on.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,T)?T:y}function wn(y,T,S){var D=at(y,T),W=at(T,S);return D&&W}function Zt(y,T){return y.getLine(T).length}function wr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function xn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Pn(y,T,S){var D=Zt(y,T),W=new Array(S-D+1).join(" ");y.setCursor(new Ne(T,D)),y.replaceRange(W,y.getCursor())}function Wn(y,T){var S=[],D=y.listSelections(),W=Ye(y.clipPos(T)),z=!gt(T,W),q=y.getCursor("head"),Y=xt(D,q),Q=gt(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ye=D[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),be=ye.ch,Oe=W.ch,Re=D[se].head.ch-be,Ke=Oe-be;Re>0&&Ke<=0?(be++,z||Oe--):Re<0&&Ke>=0?(be--,Q||Oe++):Re<0&&Ke==-1&&(be--,Oe++);for(var ut=Ce;ut<=me;ut++){var et={anchor:new Ne(ut,be),head:new Ne(ut,Oe)};S.push(et)}return y.setSelections(S),T.ch=Oe,ye.ch=be,ye}function rr(y,T,S){for(var D=[],W=0;W<S;W++){var z=fe(T,W,0);D.push({anchor:z,head:z})}y.setSelections(D,0)}function xt(y,T,S){for(var D=0;D<y.length;D++){var W=gt(y[D].anchor,T),z=gt(y[D].head,T);if(W||z)return D}return-1}function qe(y,T){var S=T.lastSelection,D=function(){var z=y.listSelections(),q=z[0],Y=z[z.length-1],Q=at(q.anchor,q.head)?q.anchor:q.head,re=at(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=y.getCursor(),q=y.getCursor(),Y=S.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ye=z.line;ye<q.line;ye++){var Ce=new Ne(ye,z.ch),me=new Ne(ye,q.ch),be={anchor:Ce,head:me};se.push(be)}y.setSelections(se)}else{var Oe=S.anchorMark.find(),Re=S.headMark.find(),Ke=Re.line-Oe.line,ut=Re.ch-Oe.ch;q={line:q.line+Ke,ch:Ke?q.ch:ut+q.ch},S.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,Zt(y,q.line))),y.setSelection(z,q)}return[z,q]};return T.visualMode?D():W()}function ke(y,T){var S=T.sel.anchor,D=T.sel.head;T.lastPastedText&&(D=y.posFromIndex(y.indexFromPos(S)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:y.setBookmark(S),headMark:y.setBookmark(D),anchor:Ye(S),head:Ye(D),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function Ue(y,T,S,D){var W=y.state.vim.sel,z=D?T:W.head,q=D?T:W.anchor,Y;return at(S,T)&&(Y=S,S=T,T=Y),at(z,q)?(z=ft(T,z),q=on(q,S)):(q=ft(T,q),z=on(z,S),z=fe(z,0,-1),z.ch==-1&&z.line!=y.firstLine()&&(z=new Ne(z.line-1,Zt(y,z.line-1)))),[q,z]}function Ze(y,T,W){var D=y.state.vim;T=T||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=mt(y,T,W);y.setSelections(z.ranges,z.primary)}function mt(y,T,S,D){var W=Ye(T.head),z=Ye(T.anchor);if(S=="char"){var q=!D&&!at(T.head,T.anchor)?1:0,Y=at(T.head,T.anchor)?1:0;return W=fe(T.head,0,q),z=fe(T.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(S=="line"){if(at(T.head,T.anchor))W.ch=0,z.ch=Zt(y,z.line);else{z.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Zt(y,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(S=="block"){var re=Math.min(z.line,W.line),se=z.ch,ye=Math.max(z.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,be=W.line==re?0:me-1,Oe=[],Re=0;Re<me;Re++)Oe.push({anchor:new Ne(re+Re,se),head:new Ne(re+Re,Ce)});return{ranges:Oe,primary:be}}}function At(y){var T=y.getCursor("head");return y.getSelection().length==1&&(T=ft(T,y.getCursor("anchor"))),T}function _t(y,T){var S=y.state.vim;T!==!1&&y.setCursor(ue(y,S.sel.head)),ke(y,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Be.signal(y,"vim-mode-change",{mode:"normal"})}function Pt(y,T,S){var D=y.getRange(T,S);if(/\n\s*$/.test(D)){var W=D.split(`
|
1403
|
+
`);W.pop();for(var z,z=W.pop();W.length>0&&z&&m(z);z=W.pop())S.line--,S.ch=0;z?(S.line--,S.ch=Zt(y,S.line)):S.ch=0}}function Nt(y,T,S){T.ch=0,S.ch=0,S.line++}function pt(y){if(!y)return 0;var T=y.search(/\S/);return T==-1?y.length:T}function Ct(y,T,S){var D=T.inclusive,W=T.innerWord,z=T.bigWord,q=T.noSymbol,Y=T.multiline,Q=S||At(y),re=y.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,be,Oe=q?_o[0]:_i[0];if(W&&/\s/.test(re.charAt(me)))Oe=function(Sn){return/\s/.test(Sn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=mo(y,Q,!0,z,!0);break}z?Oe=_i[0]:(Oe=_o[0],Oe(re.charAt(me))||(Oe=_o[1]))}for(var Re=me,Ke=me;Oe(re.charAt(Ke))&&Ke>=0;)Ke--;if(Ke++,be)Re=be.to,Ce=be.line,se=y.getLine(Ce),!se&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(D){var ut=Re,et=Q.ch<=Ke&&/\s/.test(re.charAt(Q.ch));if(!et)for(;/\s/.test(se.charAt(Re))&&Re<se.length;)Re++;if(ut==Re||et){for(var st=Ke;/\s/.test(re.charAt(Ke-1))&&Ke>0;)Ke--;!Ke&&!et&&(Ke=st)}}return{start:new Ne(ye,Ke),end:new Ne(Ce,Re)}}function Tn(y,T,S){var D=T;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:D,end:D};var W=Be.findMatchingTag(y,T)||Be.findEnclosingTag(y,T);return!W||!W.open||!W.close?{start:D,end:D}:S?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Tr(y,T,S){gt(T,S)||je.jumpList.add(y,T,S)}function Xr(y,T){je.lastCharacterSearch.increment=y,je.lastCharacterSearch.forward=T.forward,je.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function ji(y,T,S,D){var W=Ye(y.getCursor()),z=S?1:-1,q=S?y.lineCount():-1,Y=W.ch,Q=W.line,re=y.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:S,depth:0,curMoveThrough:!1},ye=di[D];if(!ye)return W;var Ce=pi[ye].init,me=pi[ye].isComplete;for(Ce&&Ce(se);Q!==q&&T;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=y.getLine(Q)||"",z>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(W.line=Q,W.ch=se.index,T--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function mo(y,T,S,D,W){var z=T.line,q=T.ch,Y=y.getLine(z),Q=S?1:-1,re=D?_i:_o;if(W&&Y==""){if(z+=Q,Y=y.getLine(z),!a(y,z))return null;q=S?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(q))){for(ye=q;q!=se&&re[be](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==T.ch&&z==T.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:z}}me||(q+=Q)}if(z+=Q,!a(y,z))return null;Y=y.getLine(z),q=Q>0?0:Y.length}}function xr(y,T,S,D,W,z){var q=Ye(T),Y=[];(D&&!W||!D&&W)&&S++;for(var Q=!D||!W,re=0;re<S;re++){var se=mo(y,T,D,z,Q);if(!se){var ye=Zt(y,y.lastLine());Y.push(D?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),T=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=S,me=Y[0],be=Y.pop();return D&&!W?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(be=Y.pop()),new Ne(be.line,be.from)):D&&W?new Ne(be.line,be.to-1):!D&&W?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(be=Y.pop()),new Ne(be.line,be.to)):new Ne(be.line,be.from)}function vo(y,T,S,D,W){var z=T,q=new Ne(z.line+S.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=y.charCoords(Y,"div").left),q}function jo(y,T,S,D,W){for(var z=W||y.getCursor(),q=z.ch,Y,Q=0;Q<T;Q++){var re=y.getLine(z.line);if(Y=Za(q,re,D,S),Y==-1)return null;q=Y}return new Ne(y.getCursor().line,Y)}function Qa(y,T){var S=y.getCursor().line;return ue(y,new Ne(S,T-1))}function ci(y,T,S,D){!x(S,co)&&!tn.test(S)||(T.marks[S]&&T.marks[S].clear(),T.marks[S]=y.setBookmark(D))}function Za(y,T,S,D,W){var z;return D?(z=T.indexOf(S,y+1),z!=-1):(z=T.lastIndexOf(S,y-1),z!=-1),z}function As(y,T,S,D,W){function z(Ke){return!/\S/.test(y.getLine(Ke))}function q(Ke,ut,et){return et?z(Ke)!=z(Ke+ut):!z(Ke)&&z(Ke+ut)}function Y(Ke){D=D>0?1:-1;var ut=y.ace.session.getFoldLine(Ke);ut&&Ke+D>ut.start.row&&Ke+D<ut.end.row&&(D=(D>0?ut.end.row:ut.start.row)-Ke)}var Q=T.line,re=y.firstLine(),se=y.lastLine(),ye,Ce,me=Q;if(D){for(;re<=me&&me<=se&&S>0;)Y(me),q(me,D)&&S--,me+=D;return new Ne(me,0)}var be=y.state.vim;if(be.visualLine&&q(Q,1,!0)){var Oe=be.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Re=z(Q);for(me=Q;me<=se&&S;me++)q(me,1,!0)&&(!W||z(me)!=Re)&&S--;for(Ce=new Ne(me,0),me>se&&!Re?Re=!0:W=!1,me=Q;me>re&&!((!W||z(me)==Re||me==Q)&&q(me,-1,!0));me--);return ye=new Ne(me,0),{start:ye,end:Ce}}function ua(y,T,S,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(z(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!W)return{ln:be.ln,pos:be.pos+1};for(z(be);be.line!==null&&m(be.line[be.pos]);)Oe=be.pos,z(be);return{ln:be.ln,pos:Oe+1}}z(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(z(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return W?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};z(be)}return be.line=me,W&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};S>0;)D<0?Q=Y(y,Q.ln,Q.pos,D):Q=q(y,Q.ln,Q.pos,D),S--;return new Ne(Q.ln,Q.pos)}function Hi(y,T,S,D){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function z(Q,re,se,ye){var Re=Q.getLine(re),Ce=Re==="",me={line:Re,ln:re,pos:se,dir:ye},be={ln:me.ln,pos:me.pos},Oe=me.line==="";for(W(Q,me);me.line!==null;){if(be.ln=me.ln,be.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(Ce=!0),W(Q,me)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ke=Re.length-1;Ke>=0;--Ke)if(!m(Re[Ke])){be.pos=Ke;break}return be}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},be=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!be)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(be=!1,me={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){me.pos=Re;break}return me}for(var Y={ln:T.line,pos:T.ch};S>0;)D<0?Y=q(y,Y.ln,Y.pos,D):Y=z(y,Y.ln,Y.pos,D),S--;return new Ne(Y.ln,Y.pos)}function Xn(y,T,S,D){var W=T,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],re=y.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=y.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ye=z;z=q,q=ye}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function Mr(y,T,S,D){var W=Ye(T),z=y.getLine(W.line),q=z.split(""),Y,Q,re,se,ye=q.indexOf(S);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&q[W.ch]==S){var Ce=/string/.test(y.getTokenTypeAt(fe(T,0,1))),me=/string/.test(y.getTokenTypeAt(T)),be=Ce&&!me;be||(Q=W.ch,--W.ch)}if(q[W.ch]==S&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==S&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==S&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Ui(){}function Rn(y){var T=y.state.vim;return T.searchState_||(T.searchState_=new Ui)}function Er(y){return Vi(y,"/")}function io(y){return $s(y,"/")}function Vi(y,T){var S=$s(y,T)||[];if(!S.length)return[];var D=[];if(S[0]===0){for(var W=0;W<S.length;W++)typeof S[W]=="number"&&D.push(y.substring(S[W]+1,S[W+1]));return D}}function $s(y,T){T||(T="/");for(var S=!1,D=[],W=0;W<y.length;W++){var z=y.charAt(W);!S&&z==T&&D.push(W),S=!S&&z=="\\"}return D}function ha(y){for(var T="|(){",S="}",D=!1,W=[],z=-1;z<y.length;z++){var q=y.charAt(z)||"",Y=y.charAt(z+1)||"",Q=Y&&T.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&S.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ja(y){for(var T=!1,S=[],D=-1;D<y.length;D++){var W=y.charAt(D)||"",z=y.charAt(D+1)||"";Ti[W+z]?(S.push(Ti[W+z]),D++):T?(S.push(W),T=!1):W==="\\"?(T=!0,s(z)||z==="$"?S.push("$"):z!=="/"&&z!=="\\"&&S.push("\\")):(W==="$"&&S.push("$"),S.push(W),z==="/"&&S.push("\\"))}return S.join("")}function el(y){for(var T=new Be.StringStream(y),S=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)S.push(T.next());var D=!1;for(var W in fr)if(T.match(W,!0)){D=!0,S.push(fr[W]);break}D||S.push(T.next())}return S.join("")}function qi(y,T,S){var D=je.registerController.getRegister("/");if(D.setText(y),y instanceof RegExp)return y;var W=io(y),z,q;if(!W.length)z=y;else{z=y.substring(0,W[0]);var Y=y.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;k("pcre")||(z=ha(z)),S&&(T=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,T||q?"im":"m");return Q}function ui(y){typeof y=="string"&&(y=document.createElement(y));for(var T,S=1;S<arguments.length;S++)if(T=arguments[S])if(typeof T!="object"&&(T=document.createTextNode(T)),T.nodeType)y.appendChild(T);else for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(D[0]==="$"?y.style[D.slice(1)]=T[D]:y.setAttribute(D,T[D]));return y}function qt(y,T){var S=ui("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);y.openNotification?y.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function da(y,T){return ui("div",{$display:"flex"},ui("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,ui("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&ui("span",{$color:"#888"},T))}function Ir(y,T){if(Pr.length){T.value||(T.value=""),An=T;return}var S=da(T.prefix,T.desc);if(y.openDialog)y.openDialog(S,T.onClose,{onKeyDown:T.onKeyDown,onKeyUp:T.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:T.value});else{var D="";typeof T.prefix!="string"&&T.prefix&&(D+=T.prefix.textContent),T.desc&&(D+=" "+T.desc),T.onClose(prompt(D,""))}}function Qn(y,T){if(y instanceof RegExp&&T instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],D=0;D<S.length;D++){var W=S[D];if(y[W]!==T[W])return!1}return!0}return!1}function Cn(y,T,S,D){if(T){var W=Rn(y),z=qi(T,!!S,!!D);if(z)return Ci(y,z),Qn(z,W.getQuery())||W.setQuery(z),z}}function Bn(y){if(y.source.charAt(0)=="^")var T=!0;return{token:function(S){if(T&&!S.sol()){S.skipToEnd();return}var D=S.match(y,!1);if(D)return D[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!y.exec(S.next()+D[0]))?(S.next(),null):(S.match(y),"searching");for(;!S.eol()&&(S.next(),!S.match(y,!1)););},query:y}}function Ci(y,T){clearTimeout(mr);var S=Rn(y);S.highlightTimeout=mr,mr=setTimeout(function(){if(y.state.vim){var D=Rn(y);D.highlightTimeout=null;var W=D.getOverlay();(!W||T!=W.query)&&(W&&y.removeOverlay(W),W=Bn(T),y.addOverlay(W),y.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(y.showMatchesOnScrollbar(T))),D.setOverlay(W))}},50)}function Lr(y,T,S,D){return D===void 0&&(D=1),y.operation(function(){for(var W=y.getCursor(),z=y.getSearchCursor(S,W),q=0;q<D;q++){var Y=z.find(T);if(q==0&&Y&>(z.from(),W)){var Q=T?z.from():z.to();Y=z.find(T),Y&&!Y[0]&>(z.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=z.find(T))}if(!Y&&(z=y.getSearchCursor(S,T?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!z.find(T)))return}return z.from()})}function ki(y,T,S,D,W){return D===void 0&&(D=1),y.operation(function(){var z=y.getCursor(),q=y.getSearchCursor(S,z),Y=q.find(!T);!W.visualMode&&Y&>(q.from(),z)&&q.find(!T);for(var Q=0;Q<D;Q++)if(Y=q.find(T),!Y&&(q=y.getSearchCursor(S,T?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!q.find(T)))return;return[q.from(),q.to()]})}function Ho(y){var T=Rn(y);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),y.removeOverlay(Rn(y).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function Ts(y,T,S){return typeof y!="number"&&(y=y.line),T instanceof Array?x(y,T):typeof S=="number"?y>=T&&y<=S:y==T}function oo(y){var T=y.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function Qr(y,T,S){if(S=="'"||S=="`")return je.jumpList.find(y,-1)||new Ne(0,0);if(S==".")return yo(y);var D=T.marks[S];return D&&D.find()}function yo(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var T=y.doc.history.done,S=T.length;S--;)if(T[S].changes)return Ye(T[S].changes[0].to)}function Uo(y,T,S,D,W,z,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var et=y.getRange(z.from(),z.to()),st=et.replace(q,Y),Sn=z.to().line;z.replace(st),Ke=z.to().line,W+=Ke-Sn,ut=Ke<Sn}function ye(){var et=Re&&Ye(z.to()),st=z.findNext();return st&&!st[0]&&et&>(z.from(),et)&&(st=z.findNext()),st}function Ce(){for(;ye()&&Ts(z.from(),D,W);)if(!(!S&&z.from().line==Ke&&!ut)){y.scrollIntoView(z.from(),30),y.setSelection(z.from(),z.to()),Re=z.from(),Oe=!1;return}Oe=!0}function me(et){if(et&&et(),y.focus(),Re){y.setCursor(Re);var st=y.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Re.ch}Q&&Q()}function be(et,st,Sn){Be.e_stop(et);var ht=H(et);switch(ht){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Mn=Q;Q=void 0,y.operation(re),Q=Mn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(Sn)}return Oe&&me(Sn),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ke,ut;if(Ce(),Oe){qt(y,"No matches for "+q.source);return}if(!T){re(),Q&&Q();return}Ir(y,{prefix:ui("span","replace with ",ui("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function Zr(y,T){var S=y.state.vim,D=je.macroModeState,W=je.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(y.off("change",bo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Be.off(y.getInputField(),"keydown",Ls)),!z&&S.insertModeRepeat>1&&(pa(y,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,T||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),W.setText(q.changes.join("")),Be.signal(y,"vim-mode-change",{mode:"normal"}),D.isRecording&&hr(D)}function Vo(y){On.unshift(y)}function Ms(y,T,S,D,W){var z={keys:y,type:T};z[T]=S,z[T+"Args"]=D;for(var q in W)z[q]=W[q];Vo(z)}function Es(y,T,S,D){var W=je.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&kr.processCommand(y,W.keyBuffer[0]),S.isPlaying=!1;return}var z=W.keyBuffer,q=0;S.isPlaying=!0,S.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),kt.handleKey(y,se,"macro"),T.insertMode){var ye=W.insertModeChanges[q++].changes;je.macroModeState.lastInsertModeChanges.changes=ye,Xo(y,ye,1),Zr(y)}S.isPlaying=!1}function qo(y,T){if(!y.isPlaying){var S=y.latestRegister,D=je.registerController.getRegister(S);D&&D.pushText(T)}}function hr(y){if(!y.isPlaying){var T=y.latestRegister,S=je.registerController.getRegister(T);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(y.lastInsertModeChanges)}}function Is(y,T){if(!y.isPlaying){var S=y.latestRegister,D=je.registerController.getRegister(S);D&&D.pushSearchQuery&&D.pushSearchQuery(T)}}function bo(y,T){var S=je.macroModeState,D=S.lastInsertModeChanges;if(!S.isPlaying)for(var W=y.state.vim;T;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var z=y.listSelections().length;z>1&&(D.ignoreCount=z);var q=T.text.join(`
|
1404
|
+
`);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}T=T.next}}function Ko(y){var T=y.state.vim;if(T.insertMode){var S=je.macroModeState;if(S.isPlaying)return;var D=S.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||Go(y,T)}function Go(y,T,S){var D=y.getCursor("anchor"),W=y.getCursor("head");if(T.visualMode&&!y.somethingSelected()?_t(y,!1):!T.visualMode&&!T.insertMode&&y.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,Be.signal(y,"vim-mode-change",{mode:"visual"})),T.visualMode){var z=at(W,D)?0:-1,q=at(W,D)?-1:0;W=fe(W,0,z),D=fe(D,0,q),T.sel={anchor:D,head:W},ci(y,T,"<",ft(W,D)),ci(y,T,">",on(W,D))}else!T.insertMode&&!S&&(T.lastHPos=y.getCursor().ch)}function so(y,T){this.keyName=y,this.key=T.key,this.ctrlKey=T.ctrlKey,this.altKey=T.altKey,this.metaKey=T.metaKey,this.shiftKey=T.shiftKey}function Ls(y){var T=je.macroModeState,S=T.lastInsertModeChanges,D=Be.keyName?Be.keyName(y):y.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new so(D,y)))}function pa(y,T,S,D){function W(){Y?jn.processAction(y,T,T.lastEditActionCommand):jn.evalInput(y,T)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=T.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;Xo(y,ye.changes,se)}}var q=je.macroModeState;q.isPlaying=!0;var Y=!!T.lastEditActionCommand,Q=T.inputState;if(T.inputState=T.lastEditInputState,Y&&T.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<S;re++)W(),z(1);else D||W(),z(S);T.inputState=Q,T.insertMode&&!D&&Zr(y),q.isPlaying=!1}function Yo(y,T){Be.lookupKey(T,"vim-insert",function(S){return typeof S=="string"?Be.commands[S](y):S(y),!0})}function Xo(y,T,S){var D=y.getCursor("head"),W=je.macroModeState.lastInsertModeChanges.visualBlock;W&&(rr(y,D,W+1),S=y.listSelections().length,y.setCursor(D));for(var z=0;z<S;z++){W&&y.setCursor(fe(D,z,0));for(var q=0;q<T.length;q++){var Y=T[q];if(Y instanceof so)Yo(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=fe(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}W&&y.setCursor(fe(D,0,1))}function Rs(y,T,S,D){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Rr[T]||T;var W="";if(S.ctrlKey&&(W+="C-"),S.altKey&&(W+="A-"),(W||T.length>1)&&S.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&T.length==1){if(Zn.keymap&&T in Zn.keymap)(Zn.remapCtrl!==!1||!W)&&(T=Zn.keymap[T]);else if(T.charCodeAt(0)>255){var z=S.code&&S.code.slice(-1)||"";S.shiftKey||(z=z.toLowerCase()),z&&(T=z)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function Qo(y){var T=new y.constructor;return Object.keys(y).forEach(function(S){if(S!="insertEnd"){var D=y[S];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=Qo(D)),T[S]=D}}),y.sel&&(T.sel={head:y.sel.head&&Ye(y.sel.head),anchor:y.sel.anchor&&Ye(y.sel.anchor)}),T}function wo(y,T,S){var D=!1,W=kt.maybeInitVimState_(y),z=W.visualBlock||W.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)y.ace.exitMultiSelectMode();else if(z||!q||y.ace.inVirtualSelectionMode)D=kt.handleKey(y,T,S);else{var Y=Qo(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var se=y.ace.selection;y.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),Ce=y.getCursor("anchor"),me=at(ye,Ce)?0:-1,be=at(ye,Ce)?-1:0;ye=fe(ye,0,me),Ce=fe(Ce,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=Ce,D=gi(y,T,S),se.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=Qo(Y)),re++}),y.curOp.cursorActivity&&!D&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&Go(y,W,!0),D}function Si(y,T){T.off("beforeEndOperation",Si);var S=T.state.cm.vimCmd;S&&T.execCommand(S.exec?S:S.name,S.args),T.curOp=T.prevOp}var dr=t("../range").Range,ao=t("../lib/event_emitter").EventEmitter,Ki=t("../lib/dom"),ga=t("../lib/oop"),tl=t("../lib/keys"),xo=t("../lib/event"),Gi=t("../search").Search,Co=t("../lib/useragent"),Zo=t("../search_highlight").SearchHighlight,ko=t("../commands/multi_select_commands"),fa=t("../mode/text").Mode.prototype.tokenRe,lo=t("../ext/hardwrap").hardWrap;t("../multi_select");var Be=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(y,T){if(!(this instanceof Ne))return new Ne(y,T);this.line=y,this.ch=T},Be.defineOption=function(y,T,S){},Be.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
|
1405
|
+
`)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=xo.stopEvent,Be.keyName=function(y){var T=tl[y.keyCode]||y.key||"";return T.length==1&&(T=T.toUpperCase()),T=xo.getModifierString(y).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+T,T},Be.keyMap.default=function(y){return function(T){var S=T.ace.commands.commandKeyBinding[y.toLowerCase()];return S&&T.ace.execCommand(S)!==!1}},Be.lookupKey=function y(T,S,D){S||(S="default"),typeof S=="string"&&(S=Be.keyMap[S]||Be.keyMap.default);var W=typeof S=="function"?S(T):S[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return y(T,S.fallthrough,D);for(var z=0;z<S.fallthrough.length;z++){var q=y(T,S.fallthrough[z],D);if(q)return q}}},Be.findMatchingTag=function(y,T){return y.findMatchingTag(T)},Be.findEnclosingTag=function(y,T){},Be.signal=function(y,T,S){return y._signal(T,S)},Be.on=xo.addListener,Be.off=xo.removeListener,Be.isWordChar=function(y){return y<""?/^\w$/.test(y):(fa.lastIndex=0,fa.test(y))},(function(){ga.implement(Be.prototype,ao),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var D={text:S.action[0]=="i"?S.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,this.$updateMarkers(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(ko.keyboardHandler)},this.operation=function(S,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return S();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=S();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!z.cursorActivity&&!z.lastChange&&W&&(this.ace.prevOp=W)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,D,W){var z=W?W[S+"Handlers"]:(this._eventRegistry||{})[S];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(S,D){typeof S=="object"&&(D=S.ch,S=S.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:D}),this.ace.selection.moveTo(S,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var D=this.ace.selection,W=S=="anchor"?D.isEmpty()?D.lead:D.anchor:S=="head"||!S?D.lead:D.getRange()[S];return g(W)},this.listSelections=function(S){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(W){return{anchor:this.clipPos(g(W.cursor==W.end?W.start:W.end)),head:this.clipPos(g(W.cursor))}},this)},this.setSelections=function(S,D){var W=this.ace.multiSelect,z=S.map(function(re){var se=p(re.anchor),ye=p(re.head),Ce=dr.comparePoints(se,ye)<0?new dr.fromPoints(se,ye):new dr.fromPoints(ye,se);return Ce.cursor=dr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(S,D,W){var z=this.ace.selection;z.moveTo(S.line,S.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var D=this.ace.session.$clipPositionToDocument(S.line,S.ch);return g(D)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var D=S.action=="insert",W=S.start,z=S.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=dr.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=D?se:dr.comparePoints(re,z);if(ye>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var y=function(S,D,W,z){this.cm=S,this.id=D,this.row=W,this.column=z,S.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return g(this)},this.setBookmark=function(S,D){var W=new y(this,this.$uid++,S.line,S.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(S,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,S)}},this.findPosV=function(S,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(S.line,S.ch);z!=null&&(Q.column=z),Q.row+=D,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return g(re)}debugger},this.charCoords=function(S,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(S.line,S.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(S,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(S.top/W.lineHeight)),q=Math.max(0,Math.floor(S.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return g(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(S,D,W){var z=!1,q=!1;S instanceof RegExp&&!S.global&&(z=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
|
1406
|
+
`,q=!1);var Y=new Gi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:S,caseSensitive:z,wrap:!1,backwards:ye,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&g(se.start)},to:function(){return se&&g(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(S,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,D){if(S){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(p(S),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,D){return this.ace.session.getTextRange(new dr(S.line,S.ch,D.line,D.ch))},this.replaceRange=function(S,D,W){W||(W=D);var z=new dr(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,S)},this.replaceSelection=this.replaceSelections=function(S){var D=Array.isArray(S)&&S,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?S[0]||"":S);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?S[q]||"":S);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var T={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,D){switch(this.state[S]=D,S){case"indentWithTabs":S=T[S],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:S=T[S]}S&&this.ace.setOption(S,D)},this.getOption=function(S){var D,W=T[S];switch(W&&(D=this.ace.getOption(W)),S){case"indentWithTabs":return S=T[S],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new Zo(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,D=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var D=this.ace.session.getTokenAt(S.line,S.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(S){var D=this.ace.session.findMatchingBracket(p(S));return{to:D&&g(D)}},this.findMatchingTag=function(S){var D=this.ace.session.getMatchingTags(p(S));if(D)return{open:{from:g(D.openTag.start),to:g(D.openTag.end)},close:{from:g(D.closeTag.start),to:g(D.closeTag.end)}}},this.indentLine=function(S,D){D===!0?this.ace.session.indentRows(S,S," "):D===!1&&this.ace.session.outdentRows(new dr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(p(S))},this.posFromIndex=function(S){return g(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),p(S),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:S.line,column:S.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Q={row:S.line,column:S.ch-1})}return Q&&{pos:g(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Be.commands.hasOwnProperty(S))return Be.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var D=this.$lineHandleChanges;if(!D)return null;for(var W=S.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return g(S.$lastDelta.end)}}).call(Be.prototype);var ma=Be.StringStream=function(y,T){this.pos=this.start=0,this.string=y,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ma.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var T=this.string.charAt(this.pos);if(typeof y=="string")var S=T==y;else var S=T&&(y.test?y.test(T):y(T));if(S)return++this.pos,T},eatWhile:function(y){for(var T=this.pos;this.eat(y););return this.pos>T},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var T=this.string.indexOf(y,this.pos);if(T>-1)return this.pos=T,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,T,S){if(typeof y!="string"){var D=this.string.slice(this.pos).match(y);return D&&D.index>0?null:(D&&T!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return S?q.toLowerCase():q},z=this.string.substr(this.pos,y.length);if(W(z)==W(y))return T!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,T){this.lineStart+=y;try{return T()}finally{this.lineStart-=y}}},Be.defineExtension=function(y,T){Be.prototype[y]=T},Ki.importCssString(`.normal-mode .ace_cursor{
|
1407
|
+
border: none;
|
1408
|
+
background-color: rgba(255,0,0,0.5);
|
1409
|
+
}
|
1410
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1411
|
+
background-color: transparent;
|
1412
|
+
border: 1px solid red;
|
1413
|
+
opacity: 0.7
|
1414
|
+
}
|
1415
|
+
.ace_dialog {
|
1416
|
+
position: absolute;
|
1417
|
+
left: 0; right: 0;
|
1418
|
+
background: inherit;
|
1419
|
+
z-index: 15;
|
1420
|
+
padding: .1em .8em;
|
1421
|
+
overflow: hidden;
|
1422
|
+
color: inherit;
|
1423
|
+
}
|
1424
|
+
.ace_dialog-top {
|
1425
|
+
border-bottom: 1px solid #444;
|
1426
|
+
top: 0;
|
1427
|
+
}
|
1428
|
+
.ace_dialog-bottom {
|
1429
|
+
border-top: 1px solid #444;
|
1430
|
+
bottom: 0;
|
1431
|
+
}
|
1432
|
+
.ace_dialog input {
|
1433
|
+
border: none;
|
1434
|
+
outline: none;
|
1435
|
+
background: transparent;
|
1436
|
+
width: 20em;
|
1437
|
+
color: inherit;
|
1438
|
+
font-family: monospace;
|
1439
|
+
}`,"vimMode",!1),function(){function y(S,D,W){var z=S.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function T(S,D){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=D}Be.defineExtension("openDialog",function(S,D,W){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),T(this,null);var q=y(this,S,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Be.on(re,"input",function(ye){W.onInput(ye,re.value,z)}),W.onKeyUp&&Be.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,z)}),Be.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&D(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Be.e_stop(ye),z()))}),W.closeOnBlur!==!1&&Be.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Be.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Be.on(se,"blur",z),se.focus()),z}}),Be.defineExtension("openNotification",function(S,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){T(this,W);var z=y(this,S,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Be.on(z,"click",function(re){Be.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Be.Pos,On=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],So=On.length,hi=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Zn=O(""),va=/[\d]/,_o=[Be.isWordChar,function(y){return y&&!Be.isWordChar(y)&&!/\s/.test(y)}],_i=[function(y){return/\S/.test(y)}],co=["<",">"],sn=["-",'"',".",":","_","/","+"],tn=/^\w$/,an;try{an=new RegExp("^[\\p{Lu}]$","u")}catch{an=/^[A-Z]$/}var Kt={};E("filetype",void 0,"string",["ft"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.getOption("mode");return S=="null"?"":S}var S=y==""?"null":y;T.setOption("mode",S)}}),E("textwidth",80,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.getOption("textwidth");return S}var D=Math.round(y);D>1&&T.setOption("textwidth",D)}});var Ai=function(){function y(Q,re,se){function ye(Oe){var Re=++W%D,Ke=Y[Re];Ke&&Ke.clear(),Y[Re]=Q.setBookmark(Oe)}var Ce=W%D,me=Y[Ce];if(me){var be=me.find();be&&!gt(be,re)&&ye(re)}else ye(re);ye(se),z=W,q=W-D+1,q<0&&(q=0)}function T(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(D+W)%D],se&&(Ce=se.find())&&!gt(me,Ce))break;while(W<z&&W>q)}return se}function S(Q,re){var se=W,ye=T(Q,re);return W=se,ye&&ye.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:y,find:S,move:T}},zn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=je.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,T){var S=je.registerController.getRegister(T);if(S){if(S.clear(),this.latestRegister=T,y.openDialog){var D=ui("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=y.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var je,kn,kt={enterVimMode:h,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return je.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return je},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:so,map:function(y,T,S){kr.map(y,T,S)},unmap:function(y,T){return kr.unmap(y,T)},noremap:function(y,T,S){kr.map(y,T,S,!0)},mapclear:function(y){var T=On.length,S=So,D=On.slice(0,T-S);if(On=On.slice(T-S),y)for(var W=D.length-1;W>=0;W--){var z=D[W];if(y!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:$,getOption:k,defineOption:E,defineEx:function(y,T,S){if(!T)T=y;else if(y.indexOf(T)!==0)throw new Error('(Vim.defineEx) "'+T+'" is not a prefix of "'+y+'", command not registered');Os[y]=S,kr.commandMap_[T]={name:y,shortName:T,type:"api"}},handleKey:function(y,T,S){var D=this.findKey(y,T,S);if(typeof D=="function")return D()},multiSelectHandleKey:wo,findKey:function(y,T,S){function D(){var re=je.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),_(y),!0;S!="mapping"&&qo(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)_t(y);else{if(!Y.insertMode)return;Zr(y)}return _(y),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),se=T.length==1,ye=jn.matchCommand(re,On,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return _(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),kn&&window.clearTimeout(kn),kn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&_(y)},k("insertModeEscKeysTimeout")),se){var me=y.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=T;for(var be=0;be<me.length;be++){var Oe=ft(me[be].anchor,me[be].head),Re=on(me[be].anchor,me[be].head),Ke=y.getRange(Oe,y.state.overwrite?fe(Re,0,1):Re);Ce.removed[be]=(Ce.removed[be]||"")+Ke}}return!se}if(Y.expectLiteralNext=!1,kn&&window.clearTimeout(kn),ye.command&&Ce){for(var me=y.listSelections(),be=0;be<me.length;be++){var ut=me[be].head;y.replaceRange(Ce.removed[be]||"",fe(ut,0,-Ce.inserted.length),ut,"+input")}je.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||_(y),ye.command}function q(){if(D()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return _(y),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=jn.matchCommand(Ce,On,Y.inputState,ye);return me.type=="none"?(_(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(_(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=z():Q=q(),Q===!1?!Y.insertMode&&T.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),kt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,T){kr.processCommand(y,T)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:Ms,_mapCommand:Vo,defineRegister:U,exitVisualMode:_t,exitInsertMode:Zr},Pr=[],pn=!1,An,ir={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Wr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},$i={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(ir)).forEach(function(y){$i[(ir[y]||"").toLowerCase()]=$i[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,T){if(y===void 0)return Zn.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},B.prototype={setText:function(y,T,S){this.keyBuffer=[y||""],this.linewise=!!T,this.blockwise=!!S},pushText:function(y,T){T&&(this.linewise||this.keyBuffer.push(`
|
1440
|
+
`),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(zn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(y,T,S,D,W){if(y!=="_"){D&&S.charAt(S.length-1)!==`
|
1441
|
+
`&&(S+=`
|
1442
|
+
`);var z=this.isValidRegister(y)?this.getRegister(y):null;if(!z){switch(T){case"yank":this.registers[0]=new B(S,D,W);break;case"delete":case"change":S.indexOf(`
|
1443
|
+
`)==-1?this.registers["-"]=new B(S,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(S,D))}this.unnamedRegister.setText(S,D,W);return}var q=u(y);q?z.pushText(S,D):z.setText(S,D,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new B),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,sn)||tn.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,T){var S=this.historyBuffer,D=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+D;T?W>=0:W<S.length;W+=D)for(var z=S[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=S.length)return this.iterator=S.length,this.initialPrefix;if(W<0)return y},pushInput:function(y){var T=this.historyBuffer.indexOf(y);T>-1&&this.historyBuffer.splice(T,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,T,S,D){var W=$e(y,T,D,S);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ee(y);if(!Q||Q.length>1)return{type:"clear"};S.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(y,T,S){switch(T.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(y,T,S);break;case"operator":this.processOperator(y,T,S);break;case"operatorMotion":this.processOperatorMotion(y,T,S);break;case"action":this.processAction(y,T,S);break;case"search":this.processSearch(y,T,S);break;case"ex":case"keyToEx":this.processEx(y,T,S);break}},processMotion:function(y,T,S){T.inputState.motion=S.motion,T.inputState.motionArgs=ce(S.motionArgs),this.evalInput(y,T)},processOperator:function(y,T,S){var D=T.inputState;if(D.operator){if(D.operator==S.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(y,T);return}_(y)}D.operator=S.operator,D.operatorArgs=ce(S.operatorArgs),S.keys.length>1&&(D.operatorShortcut=S.keys),S.exitVisualBlock&&(T.visualBlock=!1,Ze(y)),T.visualMode&&this.evalInput(y,T)},processOperatorMotion:function(y,T,S){var D=T.visualMode,W=ce(S.operatorMotionArgs);W&&D&&W.visualLine&&(T.visualLine=!0),this.processOperator(y,T,S),D||this.processMotion(y,T,S)},processAction:function(y,T,S){var D=T.inputState,W=D.getRepeat(),z=!!W,q=ce(S.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),S.operator&&this.processOperator(y,T,S),S.motion&&this.processMotion(y,T,S),(S.motion||S.operator)&&this.evalInput(y,T),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,_(y),T.lastMotion=null,S.isEdit&&this.recordLastEdit(T,D,S),Hn[S.action](y,q,T)},processSearch:function(y,T,S){function D(Re,Ke,ut){je.searchHistoryController.pushInput(Re),je.searchHistoryController.reset();try{Cn(y,Re,Ke,ut)}catch{qt(y,"Invalid regex: "+Re),_(y);return}jn.processMotion(y,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function W(Re){D(Re,!0,!0);var Ke=je.macroModeState;Ke.isRecording&&Is(Ke,Re)}function z(Re,Ke,ut){var et=H(Re),st,Sn;et=="<Up>"||et=="<Down>"?(st=et=="<Up>",Sn=Re.target?Re.target.selectionEnd:0,Ke=je.searchHistoryController.nextMatch(Ke,st)||"",ut(Ke),Sn&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(Sn,Re.target.value.length))):et&&et!="<Left>"&&et!="<Right>"&&je.searchHistoryController.reset();var ht;try{ht=Cn(y,Ke,!0,!0)}catch{}ht?y.scrollIntoView(Lr(y,!Y,ht),30):(Ho(y),y.scrollTo(ye.left,ye.top))}function q(Re,Ke,ut){var et=H(Re);et=="<Esc>"||et=="<C-c>"||et=="<C-[>"||et=="<BS>"&&Ke==""?(je.searchHistoryController.pushInput(Ke),je.searchHistoryController.reset(),Cn(y,se),Ho(y),y.scrollTo(ye.left,ye.top),Be.e_stop(Re),_(y),ut(),y.focus()):et=="<Up>"||et=="<Down>"?Be.e_stop(Re):et=="<C-u>"&&(Be.e_stop(Re),ut(""))}if(y.getSearchCursor){var Y=S.searchArgs.forward,Q=S.searchArgs.wholeWordOnly;Rn(y).setReversed(!Y);var re=Y?"/":"?",se=Rn(y).getQuery(),ye=y.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var Ce=je.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else Ir(y,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var me=Ct(y,{noSymbol:!0}),be=!0;if(me||(me=Ct(y,{noSymbol:!1}),be=!1),!me){qt(y,"No word under cursor"),_(y);return}var Oe=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=xn(Oe),je.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),D(Oe,!0,!1)}}},processEx:function(y,T,S){function D(z){je.exCommandHistoryController.pushInput(z),je.exCommandHistoryController.reset(),kr.processCommand(y,z),y.state.vim&&_(y)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(je.exCommandHistoryController.pushInput(q),je.exCommandHistoryController.reset(),Be.e_stop(z),_(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=je.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Be.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&je.exCommandHistoryController.reset()}S.type=="keyToEx"?kr.processCommand(y,S.exArgs.input):T.visualMode?Ir(y,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):Ir(y,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(y,T){var S=T.inputState,D=S.motion,W=S.motionArgs||{},z=S.operator,q=S.operatorArgs||{},Y=S.registerName,Q=T.sel,re=Ye(T.visualMode?ue(y,Q.head):y.getCursor("head")),se=Ye(T.visualMode?ue(y,Q.anchor):y.getCursor("anchor")),ye=Ye(re),Ce=Ye(se),me,be,Oe;if(z&&this.recordLastEdit(T,S),S.repeatOverride!==void 0?Oe=S.repeatOverride:Oe=S.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),S.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=S.selectedCharacter),W.repeat=Oe,_(y),D){var Re=Jr[D](y,re,W,T,S);if(T.lastMotion=Jr[D],!Re)return;if(W.toJumplist){!z&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ke=je.jumpList,ut=Ke.cachedCursor;ut?(Tr(y,ut,Re),delete Ke.cachedCursor):Tr(y,re,Re)}Re instanceof Array?(be=Re[0],me=Re[1]):me=Re,me||(me=Ye(re)),T.visualMode?((!T.visualBlock||me.ch!==1/0)&&(me=ue(y,me,ye)),be&&(be=ue(y,be)),be=be||Ce,Q.anchor=be,Q.head=me,Ze(y),ci(y,T,"<",at(be,me)?be:me),ci(y,T,">",at(be,me)?me:be)):z||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ue(y,me,ye),y.setCursor(me.line,me.ch))}if(z){if(q.lastSel){be=Ce;var et=q.lastSel,st=Math.abs(et.head.line-et.anchor.line),Sn=Math.abs(et.head.ch-et.anchor.ch);et.visualLine?me=new Ne(Ce.line+st,Ce.ch):et.visualBlock?me=new Ne(Ce.line+st,Ce.ch+Sn):et.head.line==et.anchor.line?me=new Ne(Ce.line,Ce.ch+Sn):me=new Ne(Ce.line+st,Ce.ch),T.visualMode=!0,T.visualLine=et.visualLine,T.visualBlock=et.visualBlock,Q=T.sel={anchor:be,head:me},Ze(y)}else T.visualMode&&(q.lastSel={anchor:Ye(Q.anchor),head:Ye(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var ht,Mn,$t,Rt,or;if(T.visualMode){ht=ft(Q.head,Q.anchor),Mn=on(Q.head,Q.anchor),$t=T.visualLine||q.linewise,Rt=T.visualBlock?"block":$t?"line":"char";var vr=b(y,ht,Mn);if(or=mt(y,{anchor:vr.start,head:vr.end},Rt),$t){var En=or.ranges;if(Rt=="block")for(var V=0;V<En.length;V++)En[V].head.ch=Zt(y,En[V].head.line);else Rt=="line"&&(En[0].head=new Ne(En[0].head.line+1,0))}}else{if(ht=Ye(be||Ce),Mn=Ye(me||ye),at(Mn,ht)){var X=ht;ht=Mn,Mn=X}$t=W.linewise||q.linewise,$t?Nt(y,ht,Mn):W.forward&&Pt(y,ht,Mn),Rt="char";var ie=!W.inclusive||$t,vr=b(y,ht,Mn);or=mt(y,{anchor:vr.start,head:vr.end},Rt,ie)}y.setSelections(or.ranges,or.primary),T.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=$t;var oe=Jo[z](y,q,or.ranges,Ce,me);T.visualMode&&_t(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,T,S){var D=je.macroModeState;D.isPlaying||(y.lastEditInputState=T,y.lastEditActionCommand=S,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Jr={moveToTopLine:function(y,T,S){var D=oo(y).top+S.repeat-1;return new Ne(D,pt(y.getLine(D)))},moveToMiddleLine:function(y){var T=oo(y),S=Math.floor((T.top+T.bottom)*.5);return new Ne(S,pt(y.getLine(S)))},moveToBottomLine:function(y,T,S){var D=oo(y).bottom-S.repeat+1;return new Ne(D,pt(y.getLine(D)))},expandToLine:function(y,T,S){var D=T;return new Ne(D.line+S.repeat-1,1/0)},findNext:function(y,T,S){var D=Rn(y),W=D.getQuery();if(W){var z=!S.forward;return z=D.isReversed()?!z:z,Ci(y,W),Lr(y,z,W,S.repeat)}},findAndSelectNextInclusive:function(y,T,S,D,W){var z=Rn(y),q=z.getQuery();if(q){var Y=!S.forward;Y=z.isReversed()?!Y:Y;var Q=ki(y,Y,q,S.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=D.sel.anchor;if(ye)return z.isReversed()?S.forward?[ye,re]:[ye,se]:S.forward?[ye,se]:[ye,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(y,T,S,D){var W=Qr(y,D,S.selectedCharacter);return W?S.linewise?{line:W.line,ch:pt(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,T,S,D){if(D.visualBlock&&S.sameLine){var W=D.sel;return[ue(y,new Ne(W.anchor.line,W.head.ch)),ue(y,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(y,T,S,D){for(var W=T,z=0;z<S.repeat;z++){var q=W;for(var Y in D.marks)if(c(Y)){var Q=D.marks[Y].find(),re=S.forward?at(Q,q):at(q,Q);if(!re&&!(S.linewise&&Q.line==q.line)){var se=gt(q,W),ye=S.forward?wn(q,Q,W):wn(W,Q,q);(se||ye)&&(W=Q)}}}return S.linewise&&(W=new Ne(W.line,pt(y.getLine(W.line)))),W},moveByCharacters:function(y,T,S){var D=T,W=S.repeat,z=S.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(y,T,S,D){var W=T,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=S.repeat+(S.repeatOffset||0),Y=S.forward?W.line+q:W.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(y,T,S,D);if(Y>re&&W.line==re)return vo(y,T,S,D,!0);var se=y.ace.session.getFoldLine(Y);return se&&(S.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),S.toFirstChar&&(z=pt(y.getLine(Y)),D.lastHPos=z),D.lastHSPos=y.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(y,T,S,D){var W=T;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=y.charCoords(W,"div").left}var z=S.repeat,Q=y.findPosV(W,S.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(S.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new Ne(y.firstLine(),0),"div");re.left=D.lastHSPos,Q=y.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(y,T,S){var D=T,W=S.repeat;return y.findPosV(D,S.forward?W:-W,"page")},moveByParagraph:function(y,T,S){var D=S.forward?1:-1;return As(y,T,S.repeat,D)},moveBySentence:function(y,T,S){var D=S.forward?1:-1;return Hi(y,T,S.repeat,D)},moveByScroll:function(y,T,S,D){var W=y.getScrollInfo(),z=null,q=S.repeat;q||(q=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(T,"local");if(S.repeat=q,z=Jr.moveByDisplayLines(y,T,S,D),!z)return null;var Q=y.charCoords(z,"local");return y.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(y,T,S){return xr(y,T,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(y,T,S){var D=S.repeat,W=jo(y,D,S.forward,S.selectedCharacter,T),z=S.forward?-1:1;return Xr(z,S),W?(W.ch+=z,W):null},moveToCharacter:function(y,T,S){var D=S.repeat;return Xr(0,S),jo(y,D,S.forward,S.selectedCharacter,T)||T},moveToSymbol:function(y,T,S){var D=S.repeat;return ji(y,D,S.forward,S.selectedCharacter)||T},moveToColumn:function(y,T,S,D){var W=S.repeat;return D.lastHPos=W-1,D.lastHSPos=y.charCoords(T,"div").left,Qa(y,W)},moveToEol:function(y,T,S,D){return vo(y,T,S,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,T){var S=T;return new Ne(S.line,pt(y.getLine(S.line)))},moveToMatchedSymbol:function(y,T){for(var S=T,D=S.line,W=S.ch,z=y.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&l(q)){var Y=y.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return S},moveToStartOfLine:function(y,T){return new Ne(T.line,0)},moveToLineOrEdgeOfDocument:function(y,T,S){var D=S.forward?y.lastLine():y.firstLine();return S.repeatIsExplicit&&(D=S.repeat-y.getOption("firstLineNumber")),new Ne(D,pt(y.getLine(D)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var T=y.getCursor();return T.sticky=="before"&&T.ch--,T},textObjectManipulation:function(y,T,S,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=S.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!S.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=Xn(y,T,q,Y),!Q){var se=y.getSearchCursor(new RegExp("\\"+q,"g"),T);se.find()&&(Q=Xn(y,se.from(),q,Y))}}else if(z[q])re=!0,Q=Mr(y,T,q,Y);else if(q==="W"||q==="w")for(var ye=S.repeat||1;ye-- >0;){var Ce=Ct(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=As(y,T,S.repeat,0,Y),S.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var me=D.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=Tn(y,T,Y);else if(q==="s"){var be=y.getLine(T.line);T.ch>0&&w(be[T.ch])&&(T.ch-=1);var Oe=ua(y,T,S.repeat,1,Y),Re=ua(y,T,S.repeat,-1,Y);m(y.getLine(Re.line)[Re.ch])&&m(y.getLine(Oe.line)[Oe.ch-1])&&(Re={line:Re.line,ch:Re.ch+1}),Q={start:Re,end:Oe}}return Q?y.state.vim.visualMode?Ue(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,T,S){var D=je.lastCharacterSearch,W=S.repeat,z=S.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);y.moveH(-q,"char"),S.inclusive=!!z;var Y=jo(y,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),T)}},Jo={change:function(y,T,S){var D,W,z=y.state.vim,q=S[0].anchor,Y=S[0].head;if(z.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),W=y.getSelection(),y.replaceSelection(""),D=q;else{W=y.getSelection();var Q=he("",S.length);y.replaceSelections(Q),D=ft(S[0].head,S[0].anchor)}else{W=y.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=fe(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}T.linewise&&(q=new Ne(q.line,pt(y.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),D=q}je.registerController.pushText(T.registerName,"change",W,T.linewise,S.length>1),Hn.enterInsertMode(y,{head:D},y.state.vim)},delete:function(y,T,S){var D,W,z=y.state.vim;if(z.visualBlock){W=y.getSelection();var q=he("",S.length);y.replaceSelections(q),D=ft(S[0].head,S[0].anchor)}else{var Y=S[0].anchor,Q=S[0].head;T.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,Zt(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),D=Y,T.linewise&&(D=Jr.moveToFirstNonWhiteSpaceCharacter(y,Y))}return je.registerController.pushText(T.registerName,"delete",W,T.linewise,z.visualBlock),ue(y,D)},indent:function(y,T,S){var D=y.state.vim,W=D.visualMode?T.repeat:1;if(D.visualBlock){for(var z=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=S.length-1;Q>=0;Q--)if(Y=ft(S[Q].anchor,S[Q].head),T.indentRight)y.replaceRange(q.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}y.replaceRange("",Y,fe(Y,0,se))}return Y}if(y.indentMore)for(var ye=0;ye<W;ye++)T.indentRight?y.indentMore():y.indentLess();else{var be=S[0].anchor.line,Oe=D.visualBlock?S[S.length-1].anchor.line:S[0].head.line;T.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var ye=0;ye<W;ye++)y.indentLine(Q,T.indentRight)}return Jr.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},indentAuto:function(y,T,S){return y.execCommand("indentAuto"),Jr.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},hardWrap:function(y,T,S,D,W){if(y.hardWrap){var z=S[0].anchor.line,q=S[0].head.line;T.linewise&&q--;var Y=y.hardWrap({from:z,to:q});return Y>z&&T.linewise&&Y--,T.keepCursor?D:new Ne(Y,0)}},changeCase:function(y,T,S,D,W){for(var z=y.getSelections(),q=[],Y=T.toLower,Q=0;Q<z.length;Q++){var re=z[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=u(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return y.replaceSelections(q),T.shouldMoveCursor?W:!y.state.vim.visualMode&&T.linewise&&S[0].anchor.line+1==S[0].head.line?Jr.moveToFirstNonWhiteSpaceCharacter(y,D):T.linewise?D:ft(S[0].anchor,S[0].head)},yank:function(y,T,S,D){var W=y.state.vim,z=y.getSelection(),q=W.visualMode?ft(W.sel.anchor,W.sel.head,S[0].head,S[0].anchor):D;return je.registerController.pushText(T.registerName,"yank",z,T.linewise,W.visualBlock),q}},Hn={jumpListWalk:function(y,T,S){if(!S.visualMode){var D=T.repeat,W=T.forward,z=je.jumpList,q=z.move(y,W?D:-D),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,T,S){if(!S.visualMode){var D=T.repeat||1,W=y.defaultTextHeight(),z=y.getScrollInfo().top,q=W*D,Y=T.forward?z+q:z-q,Q=Ye(y.getCursor()),re=y.charCoords(Q,"local");if(T.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var se=Y+y.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,T){var S=y.getCursor().line,D=y.charCoords(new Ne(S,0),"local"),W=y.getScrollInfo().clientHeight,z=D.top;switch(T.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(S,y.getLine(S).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}y.scrollTo(null,z)},replayMacro:function(y,T,S){var D=T.selectedCharacter,W=T.repeat,z=je.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)Es(y,S,z,D)},enterMacroRecordMode:function(y,T){var S=je.macroModeState,D=T.selectedCharacter;je.registerController.isValidRegister(D)&&S.enterMacroRecordMode(y,D)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,T,S){if(!y.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=T&&T.repeat||1;var D=T?T.insertAt:null,W=S.sel,z=T.head||y.getCursor("head"),q=y.listSelections().length;if(D=="eol")z=new Ne(z.line,Zt(y,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=b(y,z,fe(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=b(y,z,Jr.moveToFirstNonWhiteSpaceCharacter(y,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=fe(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(S.visualMode)return}else D=="lastEdit"&&(z=yo(y)||z);y.setOption("disableInput",!1),T&&T.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})),je.macroModeState.isPlaying||(y.on("change",bo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(z,{insertLeft:!0}),Be.on(y.getInputField(),"keydown",Ls)),S.visualMode&&_t(y),rr(y,z,q)}},toggleVisualMode:function(y,T,S){var D=T.repeat,W=y.getCursor(),z;if(S.visualMode)S.visualLine^T.linewise||S.visualBlock^T.blockwise?(S.visualLine=!!T.linewise,S.visualBlock=!!T.blockwise,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Ze(y)):_t(y);else{S.visualMode=!0,S.visualLine=!!T.linewise,S.visualBlock=!!T.blockwise,z=ue(y,new Ne(W.line,W.ch+D-1));var q=b(y,W,z);S.sel={anchor:q.start,head:q.end},Be.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Ze(y),ci(y,S,"<",ft(W,z)),ci(y,S,">",on(W,z))}},reselectLastSelection:function(y,T,S){var D=S.lastSelection;if(S.visualMode&&ke(y,S),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;S.sel={anchor:W,head:z},S.visualMode=!0,S.visualLine=D.visualLine,S.visualBlock=D.visualBlock,Ze(y),ci(y,S,"<",ft(W,z)),ci(y,S,">",on(W,z)),Be.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(y,T,S){var D,W;if(S.visualMode){if(D=y.getCursor("anchor"),W=y.getCursor("head"),at(W,D)){var z=W;W=D,D=z}W.ch=Zt(y,W.line)-1}else{var q=Math.max(T.repeat,2);D=y.getCursor(),W=ue(y,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=Zt(y,D.line);var re="",se=0;if(!T.keepSpaces){var ye=y.getLine(D.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}y.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ue(y,new Ne(D.line,Y));S.visualMode&&_t(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,T,S){S.insertMode=!0;var D=Ye(y.getCursor());if(D.line===y.firstLine()&&!T.after)y.replaceRange(`
|
1444
|
+
`,new Ne(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{D.line=T.after?D.line:D.line-1,D.ch=Zt(y,D.line),y.setCursor(D);var W=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:T.repeat},S)},paste:function(y,T,S){var D=this,W=je.registerController.getRegister(T.registerName),z=function(){var q=W.toString();D.continuePaste(y,T,S,q,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(y,T,S,q,W)},function(){z()}):z()},continuePaste:function(y,T,S,D,W){var z=Ye(y.getCursor());if(D){if(T.matchIndent){var q=y.getOption("tabSize"),Y=function(En){var V=En.split(" ").length-1,X=En.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ye=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(En){var V=re+(Y(En)-Ce);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ye?`
|
1445
|
+
`:""}if(T.repeat>1)var D=Array(T.repeat+1).join(D);var me=W.linewise,be=W.blockwise;if(be){D=D.split(`
|
1446
|
+
`),me&&D.pop();for(var Oe=0;Oe<D.length;Oe++)D[Oe]=D[Oe]==""?" ":D[Oe];z.ch+=T.after?1:0,z.ch=Math.min(Zt(y,z.line),z.ch)}else me?S.visualMode?D=S.visualLine?D.slice(0,-1):`
|
1447
|
+
`+D.slice(0,D.length-1)+`
|
1448
|
+
`:T.after?(D=`
|
1449
|
+
`+D.slice(0,D.length-1),z.ch=Zt(y,z.line)):z.ch=0:z.ch+=T.after?1:0;var Re;if(S.visualMode){S.lastPastedText=D;var Ke,ut=qe(y,S),et=ut[0],st=ut[1],Sn=y.getSelection(),ht=y.listSelections(),Mn=new Array(ht.length).join("1").split("1");S.lastSelection&&(Ke=S.lastSelection.headMark.find()),je.registerController.unnamedRegister.setText(Sn),be?(y.replaceSelections(Mn),st=new Ne(et.line+D.length-1,et.ch),y.setCursor(et),Wn(y,st),y.replaceSelections(D),Re=et):S.visualBlock?(y.replaceSelections(Mn),y.setCursor(et),y.replaceRange(D,et,et),Re=et):(y.replaceRange(D,et,st),Re=y.posFromIndex(y.indexFromPos(et)+D.length-1)),Ke&&(S.lastSelection.headMark=y.setBookmark(Ke)),me&&(Re.ch=0)}else if(be){y.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var $t=z.line+Oe;$t>y.lastLine()&&y.replaceRange(`
|
1450
|
+
`,new Ne($t,0));var Rt=Zt(y,$t);Rt<z.ch&&Pn(y,$t,z.ch)}y.setCursor(z),Wn(y,new Ne(z.line+D.length-1,z.ch)),y.replaceSelections(D),Re=z}else if(y.replaceRange(D,z),me){var $t=T.after?z.line+1:z.line;Re=new Ne($t,pt(y.getLine($t)))}else Re=Ye(z),/\n/.test(D)||(Re.ch+=D.length-(T.after?1:0));S.visualMode&&_t(y,!1),y.setCursor(Re)}},undo:function(y,T){y.operation(function(){Qe(y,Be.commands.undo,T.repeat)(),y.setCursor(ue(y,y.getCursor("start")))})},redo:function(y,T){Qe(y,Be.commands.redo,T.repeat)()},setRegister:function(y,T,S){S.inputState.registerName=T.selectedCharacter},insertRegister:function(y,T,S){var D=T.selectedCharacter,W=je.registerController.getRegister(D),z=W&&W.toString();z&&y.replaceSelection(z)},oneNormalCommand:function(y,T,S){Zr(y,!0),S.insertModeReturn=!0,Be.on(y,"vim-command-done",function D(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Hn.enterInsertMode(y,{},S)),Be.off(y,"vim-command-done",D))})},setMark:function(y,T,S){var D=T.selectedCharacter;ci(y,S,D,y.getCursor())},replace:function(y,T,S){var D=T.selectedCharacter,W=y.getCursor(),z,q,Y=y.listSelections();if(S.visualMode)W=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(W.line);z=W.ch+T.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=b(y,W,q);if(W=re.start,q=re.end,D==`
|
1451
|
+
`)S.visualMode||y.replaceRange("",W,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(y);else{var se=y.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),S.visualBlock){var ye=new Array(y.getOption("tabSize")+1).join(" ");se=y.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ye).replace(/[^\n]/g,D).split(`
|
1452
|
+
`),y.replaceSelections(se)}else y.replaceRange(se,W,q);S.visualMode?(W=at(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),_t(y,!1)):y.setCursor(fe(q,0,-1))}},incrementNumberToken:function(y,T){for(var S=y.getCursor(),D=y.getLine(S.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(D))!==null&&(q=z.index,Y=q+z[0].length,!(S.ch<Y)););if(!(!T.backtrack&&Y<=S.ch)&&z){var re=z[2]||z[4],se=z[3]||z[5],ye=T.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(z[1]+se,Ce)+ye*T.repeat;Q=me.toString(Ce);var be=re?new Array(se.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new Ne(S.line,q),Re=new Ne(S.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new Ne(S.line,q+Q.length-1))}},repeatLastEdit:function(y,T,S){var D=S.lastEditInputState;if(D){var W=T.repeat;W&&T.repeatIsExplicit?S.lastEditInputState.repeatOverride=W:W=S.lastEditInputState.repeatOverride||W,pa(y,S,W,!1)}},indent:function(y,T){y.indentLine(y.getCursor().line,T.indentRight)},exitInsertMode:Zr},di={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},pi={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var T=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,T}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var T=y.lineText.match(/^#(\w+)/)[1];if(T==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(T==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(T==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Ui.prototype={getQuery:function(){return je.query},setQuery:function(y){je.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return je.isReversed},setReversed:function(y){je.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Ti={"\\n":`
|
1453
|
+
`,"\\r":"\r","\\t":" "},fr={"\\/":"/","\\\\":"\\","\\n":`
|
1454
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},mr=0,Cr=function(){this.buildCommandMap_()};Cr.prototype={processCommand:function(y,T,S){var D=this;y.operation(function(){y.curOp.isVimOp=!0,D._processCommand(y,T,S)})},_processCommand:function(y,T,S){var D=y.state.vim,W=je.registerController.getRegister(":"),z=W.toString(),q=new Be.StringStream(T);W.setText(T);var Y=S||{};Y.input=T;try{this.parseInput_(y,q,Y)}catch(se){throw qt(y,se.toString()),se}D.visualMode&&_t(y);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&W.setText(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){qt(y,'Not an editor command ":'+T+'"');return}try{Os[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw qt(y,se.toString()),se}},parseInput_:function(y,T,S){if(T.eatWhile(":"),T.eat("%")?(S.line=y.firstLine(),S.lineEnd=y.lastLine()):(S.line=this.parseLineSpec_(y,T),S.line!==void 0&&T.eat(",")&&(S.lineEnd=this.parseLineSpec_(y,T))),S.line==null)if(y.state.vim.visualMode){var D=Qr(y,y.state.vim,"<");S.selectionLine=D&&D.line,D=Qr(y,y.state.vim,">"),S.selectionLineEnd=D&&D.line}else S.selectionLine=y.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?S.commandName=W[1]:S.commandName=T.match(/.*/)[0],S},parseLineSpec_:function(y,T){var S=T.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(T.next()){case".":return this.parseLineSpecOffset_(T,y.getCursor().line);case"$":return this.parseLineSpecOffset_(T,y.lastLine());case"'":var D=T.next(),W=Qr(y,y.state.vim,D);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_(T,W.line);case"-":case"+":return T.backUp(1),this.parseLineSpecOffset_(T,y.getCursor().line);default:return T.backUp(1),void 0}},parseLineSpecOffset_:function(y,T){var S=y.match(/^([+-])?(\d+)/);if(S){var D=parseInt(S[2],10);S[1]=="-"?T-=D:T+=D}return T},parseCommandArgs_:function(y,T,S){if(!y.eol()){T.argString=y.match(/.*/)[0];var D=S.argDelimiter||/\s+/,W=wr(T.argString).split(D);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(y){for(var T=y.length;T>0;T--){var S=y.substring(0,T);if(this.commandMap_[S]){var D=this.commandMap_[S];if(D.name.indexOf(y)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<hi.length;y++){var T=hi[y],S=T.shortName||T.name;this.commandMap_[S]=T}},map:function(y,T,S,D){if(y!=":"&&y.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var W=y.substring(1);T!=":"&&T.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:T.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:T,user:!0}}else{var z={keys:y,type:"keyToKey",toKeys:T,noremap:!!D};S&&(z.context=S),On.unshift(z)}},unmap:function(y,T){if(y!=":"&&y.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var S=y.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var D=y,W=0;W<On.length;W++)if(D==On[W].keys&&On[W].context===T)return On.splice(W,1),!0}};var Os={colorscheme:function(y,T){if(!T.args||T.args.length<1){qt(y,y.getOption("theme"));return}y.setOption("theme",T.args[0])},map:function(y,T,S,D){var W=T.args;if(!W||W.length<2){y&&qt(y,"Invalid mapping: "+T.input);return}kr.map(W[0],W[1],S,D)},imap:function(y,T){this.map(y,T,"insert")},nmap:function(y,T){this.map(y,T,"normal")},vmap:function(y,T){this.map(y,T,"visual")},omap:function(y,T){this.map(y,T,"operatorPending")},noremap:function(y,T){this.map(y,T,void 0,!0)},inoremap:function(y,T){this.map(y,T,"insert",!0)},nnoremap:function(y,T){this.map(y,T,"normal",!0)},vnoremap:function(y,T){this.map(y,T,"visual",!0)},onoremap:function(y,T){this.map(y,T,"operatorPending",!0)},unmap:function(y,T,S){var D=T.args;(!D||D.length<1||!kr.unmap(D[0],S))&&y&&qt(y,"No such mapping: "+T.input)},mapclear:function(y,T){kt.mapclear()},imapclear:function(y,T){kt.mapclear("insert")},nmapclear:function(y,T){kt.mapclear("normal")},vmapclear:function(y,T){kt.mapclear("visual")},omapclear:function(y,T){kt.mapclear("operatorPending")},move:function(y,T){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:T.line+1})},set:function(y,T){var S=T.args,D=T.setCfg||{};if(!S||S.length<1){y&&qt(y,"Invalid mapping: "+T.input);return}var W=S[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+T.argString);z=z.substring(0,z.length-1),Y=!0}else z.charAt(z.length-1)=="!"&&(z=z.substring(0,z.length-1),Q=!0);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=Kt[z]&&Kt[z].type=="boolean";if(re&&(Q?q=!k(z,y,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=k(z,y,D);se instanceof Error?qt(y,se.message):se===!0||se===!1?qt(y," "+(se?"":"no")+z):qt(y," "+z+"="+se)}else{var ye=$(z,q,y,D);ye instanceof Error&&qt(y,ye.message)}},setlocal:function(y,T){T.setCfg={scope:"local"},this.set(y,T)},setglobal:function(y,T){T.setCfg={scope:"global"},this.set(y,T)},registers:function(y,T){var S=T.args,D=je.registerController.registers,W=`----------Registers----------
|
1455
|
+
|
1456
|
+
`;if(S){var z;S=S.join("");for(var q=0;q<S.length;q++)if(z=S.charAt(q),!!je.registerController.isValidRegister(z)){var Y=D[z]||new B;W+='"'+z+" "+Y.toString()+`
|
1457
|
+
`}}else for(var z in D){var Q=D[z].toString();Q.length&&(W+='"'+z+" "+Q+`
|
1458
|
+
`)}qt(y,W)},sort:function(y,T){function S(){if(T.argString){var $t=new Be.StringStream(T.argString);if($t.eat("!")&&(z=!0),$t.eol())return;if(!$t.eatSpace())return"Invalid arguments";var Rt=$t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Rt&&!$t.eol())return"Invalid arguments";if(Rt[1]){q=Rt[1].indexOf("i")!=-1,Y=Rt[1].indexOf("u")!=-1;var or=Rt[1].indexOf("d")!=-1||Rt[1].indexOf("n")!=-1&&1,vr=Rt[1].indexOf("x")!=-1&&1,En=Rt[1].indexOf("o")!=-1&&1;if(or+vr+En>1)return"Invalid arguments";Q=or&&"decimal"||vr&&"hex"||En&&"octal"}Rt[2]&&(re=new RegExp(Rt[2].substr(1,Rt[2].length-2),q?"i":""))}}function D($t,Rt){if(z){var or;or=$t,$t=Rt,Rt=or}q&&($t=$t.toLowerCase(),Rt=Rt.toLowerCase());var vr=Q&&Re.exec($t),En=Q&&Re.exec(Rt);return vr?(vr=parseInt((vr[1]+vr[2]).toLowerCase(),Ke),En=parseInt((En[1]+En[2]).toLowerCase(),Ke),vr-En):$t<Rt?-1:1}function W($t,Rt){if(z){var or;or=$t,$t=Rt,Rt=or}return q&&($t[0]=$t[0].toLowerCase(),Rt[0]=Rt[0].toLowerCase()),$t[0]<Rt[0]?-1:1}var z,q,Y,Q,re,se=S();if(se){qt(y,se+": "+T.argString);return}var ye=T.line||y.firstLine(),Ce=T.lineEnd||T.line||y.lastLine();if(ye!=Ce){var me=new Ne(ye,0),be=new Ne(Ce,Zt(y,Ce)),Oe=y.getRange(me,be).split(`
|
1459
|
+
`),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ke=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ut=[],et=[];if(Q||re)for(var st=0;st<Oe.length;st++){var Sn=re?Oe[st].match(re):null;Sn&&Sn[0]!=""?ut.push(Sn):!re&&Re.exec(Oe[st])?ut.push(Oe[st]):et.push(Oe[st])}else et=Oe;if(ut.sort(re?W:D),re)for(var st=0;st<ut.length;st++)ut[st]=ut[st].input;else Q||et.sort(D);if(Oe=z?ut.concat(et):et.concat(ut),Y){var ht=Oe,Mn;Oe=[];for(var st=0;st<ht.length;st++)ht[st]!=Mn&&Oe.push(ht[st]),Mn=ht[st]}y.replaceRange(Oe.join(`
|
1460
|
+
`),me,be)}},vglobal:function(y,T){this.global(y,T)},normal:function(y,T){var S=T.argString;if(S&&S[0]=="!"&&(S=S.slice(1),pn=!0),S=S.trimStart(),!S){qt(y,"Argument is required.");return}var D=T.line;if(typeof D=="number")for(var W=isNaN(T.lineEnd)?D:T.lineEnd,z=D;z<=W;z++)y.setCursor(z,0),I(y,T.argString.trimStart()),y.state.vim.insertMode&&Zr(y,!0);else I(y,T.argString.trimStart()),y.state.vim.insertMode&&Zr(y,!0)},global:function(y,T){var S=T.argString;if(!S){qt(y,"Regular Expression missing from global");return}var D=T.commandName[0]==="v";S[0]==="!"&&T.commandName[0]==="g"&&(D=!0,S=S.slice(1));var W=T.line!==void 0?T.line:y.firstLine(),z=T.lineEnd||T.line||y.lastLine(),q=Er(S),Y=S,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{Cn(y,Y,!0,!0)}catch{qt(y,"Invalid regex: "+Y);return}for(var re=Rn(y).getQuery(),se=[],ye=W;ye<=z;ye++){var Ce=y.getLine(ye),me=re.test(Ce);me!==D&&se.push(Q?y.getLineHandle(ye):Ce)}if(!Q){qt(y,se.join(`
|
1461
|
+
`));return}var be=0,Oe=function(){if(be<se.length){var Re=se[be++],Ke=y.getLineNumber(Re);if(Ke==null){Oe();return}var ut=Ke+1+Q;kr.processCommand(y,ut,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,T){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=T.argString,D=S?Vi(S,S[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(k("pcre")?z=el(z.replace(/([^\\])&/g,"$1$$&")):z=Ja(z),je.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(S&&S.length){qt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{Cn(y,W,!0,!0)}catch{qt(y,"Invalid regex: "+W);return}if(z=z||je.lastSubstituteReplacePart,z===void 0){qt(y,"No previous substitute regular expression");return}var ye=Rn(y),Ce=ye.getQuery(),me=T.line!==void 0?T.line:y.getCursor().line,be=T.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Oe=ue(y,new Ne(me,0)),Re=y.getSearchCursor(Ce,Oe);Uo(y,re,se,me,be,Re,Ce,z,T.callback)},startinsert:function(y,T){I(y,T.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(y){Be.commands.save?Be.commands.save(y):y.save&&y.save()},nohlsearch:function(y){Ho(y)},yank:function(y){var T=Ye(y.getCursor()),S=T.line,D=y.getLine(S);je.registerController.pushText("0","yank",D,!0,!0)},delete:function(y,T){var S=T.selectionLine,D=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;Jo.delete(y,{linewise:!0},[{anchor:new Ne(S,0),head:new Ne(D+1,0)}])},join:function(y,T){var S=T.selectionLine,D=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;y.setCursor(new Ne(S,0)),Hn.joinLines(y,{repeat:D-S},y.state.vim)},delmarks:function(y,T){if(!T.argString||!wr(T.argString)){qt(y,"Argument required");return}for(var S=y.state.vim,D=new Be.StringStream(wr(T.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){qt(y,"Invalid argument: "+T.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){qt(y,"Invalid argument: "+T.argString.substring(W));return}var q=z,Y=D.next();if(!(c(q)&&c(Y)||u(q)&&u(Y))){qt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){qt(y,"Invalid argument: "+T.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete S.marks[ye]}}else delete S.marks[z]}}},kr=new Cr;E("insertModeEscKeysTimeout",200,"number"),Be.Vim=kt;var Rr={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},gi=kt.handleKey.bind(kt);kt.handleKey=function(y,T,S){return y.operation(function(){return gi(y,T,S)},!0)},R(),r.CodeMirror=Be;var fi=kt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,T,S,D,W){var z=this.state.vim||{},q=S.characterWidth,Y=S.lineHeight,Q=T.top,re=T.left;if(!z.insertMode){var se=D.cursor?dr.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Ki.translate(y,re,Q),Ki.setStyle(y.style,"width",q+"px"),Ki.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var T=y.state.cm,S=fi(T);if(!S.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,T,S,D,W){var z=y.editor,q=z.state.cm,Y=fi(q);if(D!=-1){if(Y.insertMode||(T==-1?(S.charCodeAt(0)>255&&y.inputKey&&(S=y.inputKey,S&&y.inputHash==4&&(S=S.toUpperCase())),y.inputChar=S):T==4||T==0?y.inputKey==S&&y.inputHash==T&&y.inputChar?(S=y.inputChar,T=-1):(y.inputChar=null,y.inputKey=S,y.inputHash=T):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&S=="backspace"&&T==0)return{command:"gotoleft"};if(S=="c"&&T==1&&!Co.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){_t(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Rn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(T==-1||T&1||T===0&&S.length>1){var se=Y.insertMode,ye=Rs(T,S,W||{},Y);Y.status==null&&(Y.status="");var Ce=wo(q,ye,"user");return Y=fi(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&(T!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function T(){var D=fi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!D),y.textInput.setCommandMode(!D),y.renderer.$keepTextAreaAtCursor=D,y.renderer.$blockCursor=!D}y.state||(y.state={});var S=new Be(y);y.state.cm=S,y.$vimModeHandler=this,h(S),fi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(fi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(T(),S._signal("changeStatus"))}),T(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(y){var T=y.state.cm;f(T),T.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var T=y.state.cm,S=fi(T);if(S.insertMode)return"INSERT";var D="";return S.visualMode&&(D+="VISUAL",S.visualLine&&(D+=" LINE"),S.visualBlock&&(D+=" BLOCK")),S.status&&(D+=(D?" ":"")+S.status),D}},kt.defineOption({name:"wrap",set:function(y,T){T&&T.ace.setOption("wrap",y)},type:"boolean"},!1),kt.defineEx("write","w",function(){console.log(":write is not implemented")}),On.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),On.push({keys:"gq",type:"operator",operator:"hardWrap"}),kt.defineOperator("hardWrap",function(y,T,S,D,W){var z=S[0].anchor.line,q=S[0].head.line;return T.linewise&&q--,lo(y.ace,{startRow:z,endRow:q}),Ne(q,0)}),E("textwidth",void 0,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var S=T.ace.getOption("printMarginColumn");return S}var D=Math.round(y);D>1&&T.ace.setOption("printMarginColumn",D)}}),Hn.aceCommand=function(y,T,S){y.vimCmd=T,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Si):Si(null,y.ace)},Hn.fold=function(y,T,S){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},So=On.length,r.handler.defaultKeymap=On,r.handler.actions=Hn,r.Vim=kt}),function(){ace.require(["ace/keyboard/vim"],function(t){n&&(n.exports=t)})}()}(Cf)),Cf.exports}Pk();var Wl={exports:{}};/**
|
1462
|
+
* @license
|
1463
|
+
* Lodash <https://lodash.com/>
|
1464
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1465
|
+
* Released under MIT license <https://lodash.com/license>
|
1466
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1467
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1468
|
+
*/var Wk=Wl.exports,Sf;function Bk(){return Sf||(Sf=1,function(n,e){(function(){var t,r="4.17.21",d=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,o="__lodash_placeholder__",a=1,c=2,l=4,s=1,u=2,m=1,w=2,x=4,E=8,$=16,k=32,C=64,L=128,R=256,F=512,I=30,H="...",P=800,O=16,A=1,_=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",L],["bind",m],["bindKey",w],["curry",E],["curryRight",$],["flip",F],["partial",k],["partialRight",C],["rearg",R]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",$e="[object Boolean]",Te="[object Date]",Ee="[object DOMException]",Qe="[object Error]",Ye="[object Function]",gt="[object GeneratorFunction]",at="[object Map]",ft="[object Number]",on="[object Null]",wn="[object Object]",Zt="[object Promise]",wr="[object Proxy]",xn="[object RegExp]",Pn="[object Set]",Wn="[object String]",rr="[object Symbol]",xt="[object Undefined]",qe="[object WeakMap]",ke="[object WeakSet]",Ue="[object ArrayBuffer]",Ze="[object DataView]",mt="[object Float32Array]",At="[object Float64Array]",_t="[object Int8Array]",Pt="[object Int16Array]",Nt="[object Int32Array]",pt="[object Uint8Array]",Ct="[object Uint8ClampedArray]",Tn="[object Uint16Array]",Tr="[object Uint32Array]",Xr=/\b__p \+= '';/g,ji=/\b(__p \+=) '' \+/g,mo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,vo=/[&<>"']/g,jo=RegExp(xr.source),Qa=RegExp(vo.source),ci=/<%-([\s\S]+?)%>/g,Za=/<%([\s\S]+?)%>/g,As=/<%=([\s\S]+?)%>/g,ua=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hi=/^\w*$/,Xn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,Ui=RegExp(Mr.source),Rn=/^\s+/,Er=/\s/,io=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vi=/\{\n\/\* \[wrapped with (.+)\] \*/,$s=/,? & /,ha=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ja=/[()=,{}\[\]\/\s]/,el=/\\(\\)?/g,qi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ui=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,da=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Qn=/^0o[0-7]+$/i,Cn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ci=/($^)/,Lr=/['\n\r\u2028\u2029\\]/g,ki="\\ud800-\\udfff",Ho="\\u0300-\\u036f",Ts="\\ufe20-\\ufe2f",oo="\\u20d0-\\u20ff",Qr=Ho+Ts+oo,yo="\\u2700-\\u27bf",Uo="a-z\\xdf-\\xf6\\xf8-\\xff",Zr="\\xac\\xb1\\xd7\\xf7",Vo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ms="\\u2000-\\u206f",Es=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qo="A-Z\\xc0-\\xd6\\xd8-\\xde",hr="\\ufe0e\\ufe0f",Is=Zr+Vo+Ms+Es,bo="['’]",Ko="["+ki+"]",Go="["+Is+"]",so="["+Qr+"]",Ls="\\d+",pa="["+yo+"]",Yo="["+Uo+"]",Xo="[^"+ki+Is+Ls+yo+Uo+qo+"]",Rs="\\ud83c[\\udffb-\\udfff]",Qo="(?:"+so+"|"+Rs+")",wo="[^"+ki+"]",Si="(?:\\ud83c[\\udde6-\\uddff]){2}",dr="[\\ud800-\\udbff][\\udc00-\\udfff]",ao="["+qo+"]",Ki="\\u200d",ga="(?:"+Yo+"|"+Xo+")",tl="(?:"+ao+"|"+Xo+")",xo="(?:"+bo+"(?:d|ll|m|re|s|t|ve))?",Gi="(?:"+bo+"(?:D|LL|M|RE|S|T|VE))?",Co=Qo+"?",Zo="["+hr+"]?",ko="(?:"+Ki+"(?:"+[wo,Si,dr].join("|")+")"+Zo+Co+")*",fa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=Zo+Co+ko,ma="(?:"+[pa,Si,dr].join("|")+")"+Be,Ne="(?:"+[wo+so+"?",so,Si,dr,Ko].join("|")+")",On=RegExp(bo,"g"),So=RegExp(so,"g"),hi=RegExp(Rs+"(?="+Rs+")|"+Ne+Be,"g"),Zn=RegExp([ao+"?"+Yo+"+"+xo+"(?="+[Go,ao,"$"].join("|")+")",tl+"+"+Gi+"(?="+[Go,ao+ga,"$"].join("|")+")",ao+"?"+ga+"+"+xo,ao+"+"+Gi,lo,fa,Ls,ma].join("|"),"g"),va=RegExp("["+Ki+ki+Qr+hr+"]"),_o=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_i=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],co=-1,sn={};sn[mt]=sn[At]=sn[_t]=sn[Pt]=sn[Nt]=sn[pt]=sn[Ct]=sn[Tn]=sn[Tr]=!0,sn[ue]=sn[ce]=sn[Ue]=sn[$e]=sn[Ze]=sn[Te]=sn[Qe]=sn[Ye]=sn[at]=sn[ft]=sn[wn]=sn[xn]=sn[Pn]=sn[Wn]=sn[qe]=!1;var tn={};tn[ue]=tn[ce]=tn[Ue]=tn[Ze]=tn[$e]=tn[Te]=tn[mt]=tn[At]=tn[_t]=tn[Pt]=tn[Nt]=tn[at]=tn[ft]=tn[wn]=tn[xn]=tn[Pn]=tn[Wn]=tn[rr]=tn[pt]=tn[Ct]=tn[Tn]=tn[Tr]=!0,tn[Qe]=tn[Ye]=tn[qe]=!1;var an={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Kt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ai={"&":"&","<":"<",">":">",""":'"',"'":"'"},zn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},je=parseFloat,kn=parseInt,kt=typeof Wo=="object"&&Wo&&Wo.Object===Object&&Wo,Pr=typeof self=="object"&&self&&self.Object===Object&&self,pn=kt||Pr||Function("return this")(),An=e&&!e.nodeType&&e,ir=An&&!0&&n&&!n.nodeType&&n,Wr=ir&&ir.exports===An,$i=Wr&&kt.process,jn=function(){try{var pe=ir&&ir.require&&ir.require("util").types;return pe||$i&&$i.binding&&$i.binding("util")}catch{}}(),Jr=jn&&jn.isArrayBuffer,Jo=jn&&jn.isDate,Hn=jn&&jn.isMap,di=jn&&jn.isRegExp,pi=jn&&jn.isSet,Ti=jn&&jn.isTypedArray;function fr(pe,Se,xe){switch(xe.length){case 0:return pe.call(Se);case 1:return pe.call(Se,xe[0]);case 2:return pe.call(Se,xe[0],xe[1]);case 3:return pe.call(Se,xe[0],xe[1],xe[2])}return pe.apply(Se,xe)}function mr(pe,Se,xe,Ve){for(var dt=-1,Ot=pe==null?0:pe.length;++dt<Ot;){var Jt=pe[dt];Se(Ve,Jt,xe(Jt),pe)}return Ve}function Cr(pe,Se){for(var xe=-1,Ve=pe==null?0:pe.length;++xe<Ve&&Se(pe[xe],xe,pe)!==!1;);return pe}function Os(pe,Se){for(var xe=pe==null?0:pe.length;xe--&&Se(pe[xe],xe,pe)!==!1;);return pe}function kr(pe,Se){for(var xe=-1,Ve=pe==null?0:pe.length;++xe<Ve;)if(!Se(pe[xe],xe,pe))return!1;return!0}function Rr(pe,Se){for(var xe=-1,Ve=pe==null?0:pe.length,dt=0,Ot=[];++xe<Ve;){var Jt=pe[xe];Se(Jt,xe,pe)&&(Ot[dt++]=Jt)}return Ot}function gi(pe,Se){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Se,0)>-1}function fi(pe,Se,xe){for(var Ve=-1,dt=pe==null?0:pe.length;++Ve<dt;)if(xe(Se,pe[Ve]))return!0;return!1}function y(pe,Se){for(var xe=-1,Ve=pe==null?0:pe.length,dt=Array(Ve);++xe<Ve;)dt[xe]=Se(pe[xe],xe,pe);return dt}function T(pe,Se){for(var xe=-1,Ve=Se.length,dt=pe.length;++xe<Ve;)pe[dt+xe]=Se[xe];return pe}function S(pe,Se,xe,Ve){var dt=-1,Ot=pe==null?0:pe.length;for(Ve&&Ot&&(xe=pe[++dt]);++dt<Ot;)xe=Se(xe,pe[dt],dt,pe);return xe}function D(pe,Se,xe,Ve){var dt=pe==null?0:pe.length;for(Ve&&dt&&(xe=pe[--dt]);dt--;)xe=Se(xe,pe[dt],dt,pe);return xe}function W(pe,Se){for(var xe=-1,Ve=pe==null?0:pe.length;++xe<Ve;)if(Se(pe[xe],xe,pe))return!0;return!1}var z=be("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(ha)||[]}function Q(pe,Se,xe){var Ve;return xe(pe,function(dt,Ot,Jt){if(Se(dt,Ot,Jt))return Ve=Ot,!1}),Ve}function re(pe,Se,xe,Ve){for(var dt=pe.length,Ot=xe+(Ve?1:-1);Ve?Ot--:++Ot<dt;)if(Se(pe[Ot],Ot,pe))return Ot;return-1}function se(pe,Se,xe){return Se===Se?tt(pe,Se,xe):re(pe,Ce,xe)}function ye(pe,Se,xe,Ve){for(var dt=xe-1,Ot=pe.length;++dt<Ot;)if(Ve(pe[dt],Se))return dt;return-1}function Ce(pe){return pe!==pe}function me(pe,Se){var xe=pe==null?0:pe.length;return xe?ut(pe,Se)/xe:Z}function be(pe){return function(Se){return Se==null?t:Se[pe]}}function Oe(pe){return function(Se){return pe==null?t:pe[Se]}}function Re(pe,Se,xe,Ve,dt){return dt(pe,function(Ot,Jt,Wt){xe=Ve?(Ve=!1,Ot):Se(xe,Ot,Jt,Wt)}),xe}function Ke(pe,Se){var xe=pe.length;for(pe.sort(Se);xe--;)pe[xe]=pe[xe].value;return pe}function ut(pe,Se){for(var xe,Ve=-1,dt=pe.length;++Ve<dt;){var Ot=Se(pe[Ve]);Ot!==t&&(xe=xe===t?Ot:xe+Ot)}return xe}function et(pe,Se){for(var xe=-1,Ve=Array(pe);++xe<pe;)Ve[xe]=Se(xe);return Ve}function st(pe,Se){return y(Se,function(xe){return[xe,pe[xe]]})}function Sn(pe){return pe&&pe.slice(0,zt(pe)+1).replace(Rn,"")}function ht(pe){return function(Se){return pe(Se)}}function Mn(pe,Se){return y(Se,function(xe){return pe[xe]})}function $t(pe,Se){return pe.has(Se)}function Rt(pe,Se){for(var xe=-1,Ve=pe.length;++xe<Ve&&se(Se,pe[xe],0)>-1;);return xe}function or(pe,Se){for(var xe=pe.length;xe--&&se(Se,pe[xe],0)>-1;);return xe}function vr(pe,Se){for(var xe=pe.length,Ve=0;xe--;)pe[xe]===Se&&++Ve;return Ve}var En=Oe(an),V=Oe(Kt);function X(pe){return"\\"+zn[pe]}function ie(pe,Se){return pe==null?t:pe[Se]}function oe(pe){return va.test(pe)}function ge(pe){return _o.test(pe)}function we(pe){for(var Se,xe=[];!(Se=pe.next()).done;)xe.push(Se.value);return xe}function Me(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ve,dt){xe[++Se]=[dt,Ve]}),xe}function Pe(pe,Se){return function(xe){return pe(Se(xe))}}function ze(pe,Se){for(var xe=-1,Ve=pe.length,dt=0,Ot=[];++xe<Ve;){var Jt=pe[xe];(Jt===Se||Jt===o)&&(pe[xe]=o,Ot[dt++]=xe)}return Ot}function Ge(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ve){xe[++Se]=Ve}),xe}function Je(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(Ve){xe[++Se]=[Ve,Ve]}),xe}function tt(pe,Se,xe){for(var Ve=xe-1,dt=pe.length;++Ve<dt;)if(pe[Ve]===Se)return Ve;return-1}function St(pe,Se,xe){for(var Ve=xe+1;Ve--;)if(pe[Ve]===Se)return Ve;return Ve}function Ht(pe){return oe(pe)?ct(pe):z(pe)}function Tt(pe){return oe(pe)?vn(pe):q(pe)}function zt(pe){for(var Se=pe.length;Se--&&Er.test(pe.charAt(Se)););return Se}var vt=Oe(Ai);function ct(pe){for(var Se=hi.lastIndex=0;hi.test(pe);)++Se;return Se}function vn(pe){return pe.match(hi)||[]}function In(pe){return pe.match(Zn)||[]}var sr=function pe(Se){Se=Se==null?pn:Xt.defaults(pn.Object(),Se,Xt.pick(pn,_i));var xe=Se.Array,Ve=Se.Date,dt=Se.Error,Ot=Se.Function,Jt=Se.Math,Wt=Se.Object,Br=Se.RegExp,Mi=Se.String,gn=Se.TypeError,yr=xe.prototype,Ao=Ot.prototype,Un=Wt.prototype,Ns=Se["__core-js_shared__"],Tc=Ao.toString,dn=Un.hasOwnProperty,$I=0,$0=function(){var i=/[^.]+$/.exec(Ns&&Ns.keys&&Ns.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Mc=Un.toString,TI=Tc.call(Wt),MI=pn._,EI=Br("^"+Tc.call(dn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ec=Wr?Se.Buffer:t,es=Se.Symbol,Ic=Se.Uint8Array,T0=Ec?Ec.allocUnsafe:t,Lc=Pe(Wt.getPrototypeOf,Wt),M0=Wt.create,E0=Un.propertyIsEnumerable,Rc=yr.splice,I0=es?es.isConcatSpreadable:t,nl=es?es.iterator:t,Ds=es?es.toStringTag:t,Oc=function(){try{var i=zs(Wt,"defineProperty");return i({},"",{}),i}catch{}}(),II=Se.clearTimeout!==pn.clearTimeout&&Se.clearTimeout,LI=Ve&&Ve.now!==pn.Date.now&&Ve.now,RI=Se.setTimeout!==pn.setTimeout&&Se.setTimeout,Nc=Jt.ceil,Dc=Jt.floor,Td=Wt.getOwnPropertySymbols,OI=Ec?Ec.isBuffer:t,L0=Se.isFinite,NI=yr.join,DI=Pe(Wt.keys,Wt),pr=Jt.max,Or=Jt.min,FI=Ve.now,PI=Se.parseInt,R0=Jt.random,WI=yr.reverse,Md=zs(Se,"DataView"),rl=zs(Se,"Map"),Ed=zs(Se,"Promise"),ya=zs(Se,"Set"),il=zs(Se,"WeakMap"),ol=zs(Wt,"create"),Fc=il&&new il,ba={},BI=js(Md),zI=js(rl),jI=js(Ed),HI=js(ya),UI=js(il),Pc=es?es.prototype:t,sl=Pc?Pc.valueOf:t,O0=Pc?Pc.toString:t;function J(i){if(Vn(i)&&!Et(i)&&!(i instanceof Gt)){if(i instanceof Ei)return i;if(dn.call(i,"__wrapped__"))return Nb(i)}return new Ei(i)}var wa=function(){function i(){}return function(v){if(!Nn(v))return{};if(M0)return M0(v);i.prototype=v;var M=new i;return i.prototype=t,M}}();function Wc(){}function Ei(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=t}J.templateSettings={escape:ci,evaluate:Za,interpolate:As,variable:"",imports:{_:J}},J.prototype=Wc.prototype,J.prototype.constructor=J,Ei.prototype=wa(Wc.prototype),Ei.prototype.constructor=Ei;function Gt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function VI(){var i=new Gt(this.__wrapped__);return i.__actions__=ei(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=ei(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=ei(this.__views__),i}function qI(){if(this.__filtered__){var i=new Gt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function KI(){var i=this.__wrapped__.value(),v=this.__dir__,M=Et(i),j=v<0,G=M?i.length:0,ee=oR(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=j?de:le-1,Le=this.__iteratees__,De=Le.length,Xe=0,lt=Or(ve,this.__takeCount__);if(!M||!j&&G==ve&<==ve)return ib(i,this.__actions__);var bt=[];e:for(;ve--&&Xe<lt;){Ie+=v;for(var Bt=-1,wt=i[Ie];++Bt<De;){var Ut=Le[Bt],Qt=Ut.iteratee,yi=Ut.type,Hr=Qt(wt);if(yi==_)wt=Hr;else if(!Hr){if(yi==A)continue e;break e}}bt[Xe++]=wt}return bt}Gt.prototype=wa(Wc.prototype),Gt.prototype.constructor=Gt;function Fs(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var j=i[v];this.set(j[0],j[1])}}function GI(){this.__data__=ol?ol(null):{},this.size=0}function YI(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function XI(i){var v=this.__data__;if(ol){var M=v[i];return M===h?t:M}return dn.call(v,i)?v[i]:t}function QI(i){var v=this.__data__;return ol?v[i]!==t:dn.call(v,i)}function ZI(i,v){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=ol&&v===t?h:v,this}Fs.prototype.clear=GI,Fs.prototype.delete=YI,Fs.prototype.get=XI,Fs.prototype.has=QI,Fs.prototype.set=ZI;function $o(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var j=i[v];this.set(j[0],j[1])}}function JI(){this.__data__=[],this.size=0}function eL(i){var v=this.__data__,M=Bc(v,i);if(M<0)return!1;var j=v.length-1;return M==j?v.pop():Rc.call(v,M,1),--this.size,!0}function tL(i){var v=this.__data__,M=Bc(v,i);return M<0?t:v[M][1]}function nL(i){return Bc(this.__data__,i)>-1}function rL(i,v){var M=this.__data__,j=Bc(M,i);return j<0?(++this.size,M.push([i,v])):M[j][1]=v,this}$o.prototype.clear=JI,$o.prototype.delete=eL,$o.prototype.get=tL,$o.prototype.has=nL,$o.prototype.set=rL;function To(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var j=i[v];this.set(j[0],j[1])}}function iL(){this.size=0,this.__data__={hash:new Fs,map:new(rl||$o),string:new Fs}}function oL(i){var v=Zc(this,i).delete(i);return this.size-=v?1:0,v}function sL(i){return Zc(this,i).get(i)}function aL(i){return Zc(this,i).has(i)}function lL(i,v){var M=Zc(this,i),j=M.size;return M.set(i,v),this.size+=M.size==j?0:1,this}To.prototype.clear=iL,To.prototype.delete=oL,To.prototype.get=sL,To.prototype.has=aL,To.prototype.set=lL;function Ps(i){var v=-1,M=i==null?0:i.length;for(this.__data__=new To;++v<M;)this.add(i[v])}function cL(i){return this.__data__.set(i,h),this}function uL(i){return this.__data__.has(i)}Ps.prototype.add=Ps.prototype.push=cL,Ps.prototype.has=uL;function Yi(i){var v=this.__data__=new $o(i);this.size=v.size}function hL(){this.__data__=new $o,this.size=0}function dL(i){var v=this.__data__,M=v.delete(i);return this.size=v.size,M}function pL(i){return this.__data__.get(i)}function gL(i){return this.__data__.has(i)}function fL(i,v){var M=this.__data__;if(M instanceof $o){var j=M.__data__;if(!rl||j.length<d-1)return j.push([i,v]),this.size=++M.size,this;M=this.__data__=new To(j)}return M.set(i,v),this.size=M.size,this}Yi.prototype.clear=hL,Yi.prototype.delete=dL,Yi.prototype.get=pL,Yi.prototype.has=gL,Yi.prototype.set=fL;function N0(i,v){var M=Et(i),j=!M&&Hs(i),G=!M&&!j&&os(i),ee=!M&&!j&&!G&&Sa(i),le=M||j||G||ee,de=le?et(i.length,Mi):[],ve=de.length;for(var Ie in i)(v||dn.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Lo(Ie,ve)))&&de.push(Ie);return de}function D0(i){var v=i.length;return v?i[zd(0,v-1)]:t}function mL(i,v){return Jc(ei(i),Ws(v,0,i.length))}function vL(i){return Jc(ei(i))}function Id(i,v,M){(M!==t&&!Xi(i[v],M)||M===t&&!(v in i))&&Mo(i,v,M)}function al(i,v,M){var j=i[v];(!(dn.call(i,v)&&Xi(j,M))||M===t&&!(v in i))&&Mo(i,v,M)}function Bc(i,v){for(var M=i.length;M--;)if(Xi(i[M][0],v))return M;return-1}function yL(i,v,M,j){return ts(i,function(G,ee,le){v(j,G,M(G),le)}),j}function F0(i,v){return i&&ho(v,br(v),i)}function bL(i,v){return i&&ho(v,ni(v),i)}function Mo(i,v,M){v=="__proto__"&&Oc?Oc(i,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[v]=M}function Ld(i,v){for(var M=-1,j=v.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?t:dp(i,v[M]);return G}function Ws(i,v,M){return i===i&&(M!==t&&(i=i<=M?i:M),v!==t&&(i=i>=v?i:v)),i}function Ii(i,v,M,j,G,ee){var le,de=v&a,ve=v&c,Ie=v&l;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==t)return le;if(!Nn(i))return i;var Le=Et(i);if(Le){if(le=aR(i),!de)return ei(i,le)}else{var De=Nr(i),Xe=De==Ye||De==gt;if(os(i))return ab(i,de);if(De==wn||De==ue||Xe&&!G){if(le=ve||Xe?{}:Ab(i),!de)return ve?XL(i,bL(le,i)):YL(i,F0(le,i))}else{if(!tn[De])return G?i:{};le=lR(i,De,de)}}ee||(ee=new Yi);var lt=ee.get(i);if(lt)return lt;ee.set(i,le),tw(i)?i.forEach(function(wt){le.add(Ii(wt,v,M,wt,i,ee))}):Jb(i)&&i.forEach(function(wt,Ut){le.set(Ut,Ii(wt,v,M,Ut,i,ee))});var bt=Ie?ve?Zd:Qd:ve?ni:br,Bt=Le?t:bt(i);return Cr(Bt||i,function(wt,Ut){Bt&&(Ut=wt,wt=i[Ut]),al(le,Ut,Ii(wt,v,M,Ut,i,ee))}),le}function wL(i){var v=br(i);return function(M){return P0(M,i,v)}}function P0(i,v,M){var j=M.length;if(i==null)return!j;for(i=Wt(i);j--;){var G=M[j],ee=v[G],le=i[G];if(le===t&&!(G in i)||!ee(le))return!1}return!0}function W0(i,v,M){if(typeof i!="function")throw new gn(g);return gl(function(){i.apply(t,M)},v)}function ll(i,v,M,j){var G=-1,ee=gi,le=!0,de=i.length,ve=[],Ie=v.length;if(!de)return ve;M&&(v=y(v,ht(M))),j?(ee=fi,le=!1):v.length>=d&&(ee=$t,le=!1,v=new Ps(v));e:for(;++G<de;){var Le=i[G],De=M==null?Le:M(Le);if(Le=j||Le!==0?Le:0,le&&De===De){for(var Xe=Ie;Xe--;)if(v[Xe]===De)continue e;ve.push(Le)}else ee(v,De,j)||ve.push(Le)}return ve}var ts=db(uo),B0=db(Od,!0);function xL(i,v){var M=!0;return ts(i,function(j,G,ee){return M=!!v(j,G,ee),M}),M}function zc(i,v,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=v(ee);if(le!=null&&(de===t?le===le&&!vi(le):M(le,de)))var de=le,ve=ee}return ve}function CL(i,v,M,j){var G=i.length;for(M=Dt(M),M<0&&(M=-M>G?0:G+M),j=j===t||j>G?G:Dt(j),j<0&&(j+=G),j=M>j?0:rw(j);M<j;)i[M++]=v;return i}function z0(i,v){var M=[];return ts(i,function(j,G,ee){v(j,G,ee)&&M.push(j)}),M}function Sr(i,v,M,j,G){var ee=-1,le=i.length;for(M||(M=uR),G||(G=[]);++ee<le;){var de=i[ee];v>0&&M(de)?v>1?Sr(de,v-1,M,j,G):T(G,de):j||(G[G.length]=de)}return G}var Rd=pb(),j0=pb(!0);function uo(i,v){return i&&Rd(i,v,br)}function Od(i,v){return i&&j0(i,v,br)}function jc(i,v){return Rr(v,function(M){return Ro(i[M])})}function Bs(i,v){v=rs(v,i);for(var M=0,j=v.length;i!=null&&M<j;)i=i[po(v[M++])];return M&&M==j?i:t}function H0(i,v,M){var j=v(i);return Et(i)?j:T(j,M(i))}function zr(i){return i==null?i===t?xt:on:Ds&&Ds in Wt(i)?iR(i):vR(i)}function Nd(i,v){return i>v}function kL(i,v){return i!=null&&dn.call(i,v)}function SL(i,v){return i!=null&&v in Wt(i)}function _L(i,v,M){return i>=Or(v,M)&&i<pr(v,M)}function Dd(i,v,M){for(var j=M?fi:gi,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Le=i[le];le&&v&&(Le=y(Le,ht(v))),ve=Or(Le.length,ve),de[le]=!M&&(v||G>=120&&Le.length>=120)?new Ps(le&&Le):t}Le=i[0];var De=-1,Xe=de[0];e:for(;++De<G&&Ie.length<ve;){var lt=Le[De],bt=v?v(lt):lt;if(lt=M||lt!==0?lt:0,!(Xe?$t(Xe,bt):j(Ie,bt,M))){for(le=ee;--le;){var Bt=de[le];if(!(Bt?$t(Bt,bt):j(i[le],bt,M)))continue e}Xe&&Xe.push(bt),Ie.push(lt)}}return Ie}function AL(i,v,M,j){return uo(i,function(G,ee,le){v(j,M(G),ee,le)}),j}function cl(i,v,M){v=rs(v,i),i=Eb(i,v);var j=i==null?i:i[po(Ri(v))];return j==null?t:fr(j,i,M)}function U0(i){return Vn(i)&&zr(i)==ue}function $L(i){return Vn(i)&&zr(i)==Ue}function TL(i){return Vn(i)&&zr(i)==Te}function ul(i,v,M,j,G){return i===v?!0:i==null||v==null||!Vn(i)&&!Vn(v)?i!==i&&v!==v:ML(i,v,M,j,ul,G)}function ML(i,v,M,j,G,ee){var le=Et(i),de=Et(v),ve=le?ce:Nr(i),Ie=de?ce:Nr(v);ve=ve==ue?wn:ve,Ie=Ie==ue?wn:Ie;var Le=ve==wn,De=Ie==wn,Xe=ve==Ie;if(Xe&&os(i)){if(!os(v))return!1;le=!0,Le=!1}if(Xe&&!Le)return ee||(ee=new Yi),le||Sa(i)?kb(i,v,M,j,G,ee):nR(i,v,ve,M,j,G,ee);if(!(M&s)){var lt=Le&&dn.call(i,"__wrapped__"),bt=De&&dn.call(v,"__wrapped__");if(lt||bt){var Bt=lt?i.value():i,wt=bt?v.value():v;return ee||(ee=new Yi),G(Bt,wt,M,j,ee)}}return Xe?(ee||(ee=new Yi),rR(i,v,M,j,G,ee)):!1}function EL(i){return Vn(i)&&Nr(i)==at}function Fd(i,v,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Wt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Le=de[1];if(le&&de[2]){if(Ie===t&&!(ve in i))return!1}else{var De=new Yi;if(j)var Xe=j(Ie,Le,ve,i,v,De);if(!(Xe===t?ul(Le,Ie,s|u,j,De):Xe))return!1}}return!0}function V0(i){if(!Nn(i)||dR(i))return!1;var v=Ro(i)?EI:Ir;return v.test(js(i))}function IL(i){return Vn(i)&&zr(i)==xn}function LL(i){return Vn(i)&&Nr(i)==Pn}function RL(i){return Vn(i)&&ou(i.length)&&!!sn[zr(i)]}function q0(i){return typeof i=="function"?i:i==null?ri:typeof i=="object"?Et(i)?Y0(i[0],i[1]):G0(i):gw(i)}function Pd(i){if(!pl(i))return DI(i);var v=[];for(var M in Wt(i))dn.call(i,M)&&M!="constructor"&&v.push(M);return v}function OL(i){if(!Nn(i))return mR(i);var v=pl(i),M=[];for(var j in i)j=="constructor"&&(v||!dn.call(i,j))||M.push(j);return M}function Wd(i,v){return i<v}function K0(i,v){var M=-1,j=ti(i)?xe(i.length):[];return ts(i,function(G,ee,le){j[++M]=v(G,ee,le)}),j}function G0(i){var v=ep(i);return v.length==1&&v[0][2]?Tb(v[0][0],v[0][1]):function(M){return M===i||Fd(M,i,v)}}function Y0(i,v){return np(i)&&$b(v)?Tb(po(i),v):function(M){var j=dp(M,i);return j===t&&j===v?pp(M,i):ul(v,j,s|u)}}function Hc(i,v,M,j,G){i!==v&&Rd(v,function(ee,le){if(G||(G=new Yi),Nn(ee))NL(i,v,le,M,Hc,j,G);else{var de=j?j(ip(i,le),ee,le+"",i,v,G):t;de===t&&(de=ee),Id(i,le,de)}},ni)}function NL(i,v,M,j,G,ee,le){var de=ip(i,M),ve=ip(v,M),Ie=le.get(ve);if(Ie){Id(i,M,Ie);return}var Le=ee?ee(de,ve,M+"",i,v,le):t,De=Le===t;if(De){var Xe=Et(ve),lt=!Xe&&os(ve),bt=!Xe&&!lt&&Sa(ve);Le=ve,Xe||lt||bt?Et(de)?Le=de:Jn(de)?Le=ei(de):lt?(De=!1,Le=ab(ve,!0)):bt?(De=!1,Le=lb(ve,!0)):Le=[]:fl(ve)||Hs(ve)?(Le=de,Hs(de)?Le=iw(de):(!Nn(de)||Ro(de))&&(Le=Ab(ve))):De=!1}De&&(le.set(ve,Le),G(Le,ve,j,ee,le),le.delete(ve)),Id(i,M,Le)}function X0(i,v){var M=i.length;if(M)return v+=v<0?M:0,Lo(v,M)?i[v]:t}function Q0(i,v,M){v.length?v=y(v,function(ee){return Et(ee)?function(le){return Bs(le,ee.length===1?ee[0]:ee)}:ee}):v=[ri];var j=-1;v=y(v,ht(yt()));var G=K0(i,function(ee,le,de){var ve=y(v,function(Ie){return Ie(ee)});return{criteria:ve,index:++j,value:ee}});return Ke(G,function(ee,le){return GL(ee,le,M)})}function DL(i,v){return Z0(i,v,function(M,j){return pp(i,j)})}function Z0(i,v,M){for(var j=-1,G=v.length,ee={};++j<G;){var le=v[j],de=Bs(i,le);M(de,le)&&hl(ee,rs(le,i),de)}return ee}function FL(i){return function(v){return Bs(v,i)}}function Bd(i,v,M,j){var G=j?ye:se,ee=-1,le=v.length,de=i;for(i===v&&(v=ei(v)),M&&(de=y(i,ht(M)));++ee<le;)for(var ve=0,Ie=v[ee],Le=M?M(Ie):Ie;(ve=G(de,Le,ve,j))>-1;)de!==i&&Rc.call(de,ve,1),Rc.call(i,ve,1);return i}function J0(i,v){for(var M=i?v.length:0,j=M-1;M--;){var G=v[M];if(M==j||G!==ee){var ee=G;Lo(G)?Rc.call(i,G,1):Ud(i,G)}}return i}function zd(i,v){return i+Dc(R0()*(v-i+1))}function PL(i,v,M,j){for(var G=-1,ee=pr(Nc((v-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function jd(i,v){var M="";if(!i||v<1||v>U)return M;do v%2&&(M+=i),v=Dc(v/2),v&&(i+=i);while(v);return M}function jt(i,v){return op(Mb(i,v,ri),i+"")}function WL(i){return D0(_a(i))}function BL(i,v){var M=_a(i);return Jc(M,Ws(v,0,M.length))}function hl(i,v,M,j){if(!Nn(i))return i;v=rs(v,i);for(var G=-1,ee=v.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=po(v[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Le=de[ve];Ie=j?j(Le,ve,de):t,Ie===t&&(Ie=Nn(Le)?Le:Lo(v[G+1])?[]:{})}al(de,ve,Ie),de=de[ve]}return i}var eb=Fc?function(i,v){return Fc.set(i,v),i}:ri,zL=Oc?function(i,v){return Oc(i,"toString",{configurable:!0,enumerable:!1,value:fp(v),writable:!0})}:ri;function jL(i){return Jc(_a(i))}function Li(i,v,M){var j=-1,G=i.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+v];return ee}function HL(i,v){var M;return ts(i,function(j,G,ee){return M=v(j,G,ee),!M}),!!M}function Uc(i,v,M){var j=0,G=i==null?j:i.length;if(typeof v=="number"&&v===v&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!vi(le)&&(M?le<=v:le<v)?j=ee+1:G=ee}return G}return Hd(i,v,ri,M)}function Hd(i,v,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;v=M(v);for(var le=v!==v,de=v===null,ve=vi(v),Ie=v===t;G<ee;){var Le=Dc((G+ee)/2),De=M(i[Le]),Xe=De!==t,lt=De===null,bt=De===De,Bt=vi(De);if(le)var wt=j||bt;else Ie?wt=bt&&(j||Xe):de?wt=bt&&Xe&&(j||!lt):ve?wt=bt&&Xe&&!lt&&(j||!Bt):lt||Bt?wt=!1:wt=j?De<=v:De<v;wt?G=Le+1:ee=Le}return Or(ee,he)}function tb(i,v){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=v?v(le):le;if(!M||!Xi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function nb(i){return typeof i=="number"?i:vi(i)?Z:+i}function mi(i){if(typeof i=="string")return i;if(Et(i))return y(i,mi)+"";if(vi(i))return O0?O0.call(i):"";var v=i+"";return v=="0"&&1/i==-B?"-0":v}function ns(i,v,M){var j=-1,G=gi,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=fi;else if(ee>=d){var Ie=v?null:eR(i);if(Ie)return Ge(Ie);le=!1,G=$t,ve=new Ps}else ve=v?[]:de;e:for(;++j<ee;){var Le=i[j],De=v?v(Le):Le;if(Le=M||Le!==0?Le:0,le&&De===De){for(var Xe=ve.length;Xe--;)if(ve[Xe]===De)continue e;v&&ve.push(De),de.push(Le)}else G(ve,De,M)||(ve!==de&&ve.push(De),de.push(Le))}return de}function Ud(i,v){return v=rs(v,i),i=Eb(i,v),i==null||delete i[po(Ri(v))]}function rb(i,v,M,j){return hl(i,v,M(Bs(i,v)),j)}function Vc(i,v,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&v(i[ee],ee,i););return M?Li(i,j?0:ee,j?ee+1:G):Li(i,j?ee+1:0,j?G:ee)}function ib(i,v){var M=i;return M instanceof Gt&&(M=M.value()),S(v,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function Vd(i,v,M){var j=i.length;if(j<2)return j?ns(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=ll(ee[G]||le,i[de],v,M));return ns(Sr(ee,1),v,M)}function ob(i,v,M){for(var j=-1,G=i.length,ee=v.length,le={};++j<G;){var de=j<ee?v[j]:t;M(le,i[j],de)}return le}function qd(i){return Jn(i)?i:[]}function Kd(i){return typeof i=="function"?i:ri}function rs(i,v){return Et(i)?i:np(i,v)?[i]:Ob(cn(i))}var UL=jt;function is(i,v,M){var j=i.length;return M=M===t?j:M,!v&&M>=j?i:Li(i,v,M)}var sb=II||function(i){return pn.clearTimeout(i)};function ab(i,v){if(v)return i.slice();var M=i.length,j=T0?T0(M):new i.constructor(M);return i.copy(j),j}function Gd(i){var v=new i.constructor(i.byteLength);return new Ic(v).set(new Ic(i)),v}function VL(i,v){var M=v?Gd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function qL(i){var v=new i.constructor(i.source,ui.exec(i));return v.lastIndex=i.lastIndex,v}function KL(i){return sl?Wt(sl.call(i)):{}}function lb(i,v){var M=v?Gd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function cb(i,v){if(i!==v){var M=i!==t,j=i===null,G=i===i,ee=vi(i),le=v!==t,de=v===null,ve=v===v,Ie=vi(v);if(!de&&!Ie&&!ee&&i>v||ee&&le&&ve&&!de&&!Ie||j&&le&&ve||!M&&ve||!G)return 1;if(!j&&!ee&&!Ie&&i<v||Ie&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function GL(i,v,M){for(var j=-1,G=i.criteria,ee=v.criteria,le=G.length,de=M.length;++j<le;){var ve=cb(G[j],ee[j]);if(ve){if(j>=de)return ve;var Ie=M[j];return ve*(Ie=="desc"?-1:1)}}return i.index-v.index}function ub(i,v,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=v.length,Ie=pr(ee-le,0),Le=xe(ve+Ie),De=!j;++de<ve;)Le[de]=v[de];for(;++G<le;)(De||G<ee)&&(Le[M[G]]=i[G]);for(;Ie--;)Le[de++]=i[G++];return Le}function hb(i,v,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=v.length,Le=pr(ee-de,0),De=xe(Le+Ie),Xe=!j;++G<Le;)De[G]=i[G];for(var lt=G;++ve<Ie;)De[lt+ve]=v[ve];for(;++le<de;)(Xe||G<ee)&&(De[lt+M[le]]=i[G++]);return De}function ei(i,v){var M=-1,j=i.length;for(v||(v=xe(j));++M<j;)v[M]=i[M];return v}function ho(i,v,M,j){var G=!M;M||(M={});for(var ee=-1,le=v.length;++ee<le;){var de=v[ee],ve=j?j(M[de],i[de],de,M,i):t;ve===t&&(ve=i[de]),G?Mo(M,de,ve):al(M,de,ve)}return M}function YL(i,v){return ho(i,tp(i),v)}function XL(i,v){return ho(i,Sb(i),v)}function qc(i,v){return function(M,j){var G=Et(M)?mr:yL,ee=v?v():{};return G(M,i,yt(j,2),ee)}}function xa(i){return jt(function(v,M){var j=-1,G=M.length,ee=G>1?M[G-1]:t,le=G>2?M[2]:t;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):t,le&&jr(M[0],M[1],le)&&(ee=G<3?t:ee,G=1),v=Wt(v);++j<G;){var de=M[j];de&&i(v,de,j,ee)}return v})}function db(i,v){return function(M,j){if(M==null)return M;if(!ti(M))return i(M,j);for(var G=M.length,ee=v?G:-1,le=Wt(M);(v?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function pb(i){return function(v,M,j){for(var G=-1,ee=Wt(v),le=j(v),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return v}}function QL(i,v,M){var j=v&m,G=dl(i);function ee(){var le=this&&this!==pn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function gb(i){return function(v){v=cn(v);var M=oe(v)?Tt(v):t,j=M?M[0]:v.charAt(0),G=M?is(M,1).join(""):v.slice(1);return j[i]()+G}}function Ca(i){return function(v){return S(dw(hw(v).replace(On,"")),i,"")}}function dl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=wa(i.prototype),j=i.apply(M,v);return Nn(j)?j:M}}function ZL(i,v,M){var j=dl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=ka(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:ze(le,ve);if(ee-=Ie.length,ee<M)return bb(i,v,Kc,G.placeholder,t,le,Ie,t,t,M-ee);var Le=this&&this!==pn&&this instanceof G?j:i;return fr(Le,this,le)}return G}function fb(i){return function(v,M,j){var G=Wt(v);if(!ti(v)){var ee=yt(M,3);v=br(v),M=function(de){return ee(G[de],de,G)}}var le=i(v,M,j);return le>-1?G[ee?v[le]:le]:t}}function mb(i){return Io(function(v){var M=v.length,j=M,G=Ei.prototype.thru;for(i&&v.reverse();j--;){var ee=v[j];if(typeof ee!="function")throw new gn(g);if(G&&!le&&Qc(ee)=="wrapper")var le=new Ei([],!0)}for(j=le?j:M;++j<M;){ee=v[j];var de=Qc(ee),ve=de=="wrapper"?Jd(ee):t;ve&&rp(ve[0])&&ve[1]==(L|E|k|R)&&!ve[4].length&&ve[9]==1?le=le[Qc(ve[0])].apply(le,ve[3]):le=ee.length==1&&rp(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Le=Ie[0];if(le&&Ie.length==1&&Et(Le))return le.plant(Le).value();for(var De=0,Xe=M?v[De].apply(this,Ie):Le;++De<M;)Xe=v[De].call(this,Xe);return Xe}})}function Kc(i,v,M,j,G,ee,le,de,ve,Ie){var Le=v&L,De=v&m,Xe=v&w,lt=v&(E|$),bt=v&F,Bt=Xe?t:dl(i);function wt(){for(var Ut=arguments.length,Qt=xe(Ut),yi=Ut;yi--;)Qt[yi]=arguments[yi];if(lt)var Hr=ka(wt),bi=vr(Qt,Hr);if(j&&(Qt=ub(Qt,j,G,lt)),ee&&(Qt=hb(Qt,ee,le,lt)),Ut-=bi,lt&&Ut<Ie){var er=ze(Qt,Hr);return bb(i,v,Kc,wt.placeholder,M,Qt,er,de,ve,Ie-Ut)}var Qi=De?M:this,No=Xe?Qi[i]:i;return Ut=Qt.length,de?Qt=yR(Qt,de):bt&&Ut>1&&Qt.reverse(),Le&&ve<Ut&&(Qt.length=ve),this&&this!==pn&&this instanceof wt&&(No=Bt||dl(No)),No.apply(Qi,Qt)}return wt}function vb(i,v){return function(M,j){return AL(M,i,v(j),{})}}function Gc(i,v){return function(M,j){var G;if(M===t&&j===t)return v;if(M!==t&&(G=M),j!==t){if(G===t)return j;typeof M=="string"||typeof j=="string"?(M=mi(M),j=mi(j)):(M=nb(M),j=nb(j)),G=i(M,j)}return G}}function Yd(i){return Io(function(v){return v=y(v,ht(yt())),jt(function(M){var j=this;return i(v,function(G){return fr(G,j,M)})})})}function Yc(i,v){v=v===t?" ":mi(v);var M=v.length;if(M<2)return M?jd(v,i):v;var j=jd(v,Nc(i/Ht(v)));return oe(v)?is(Tt(j),0,i).join(""):j.slice(0,i)}function JL(i,v,M,j){var G=v&m,ee=dl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Le=j.length,De=xe(Le+ve),Xe=this&&this!==pn&&this instanceof le?ee:i;++Ie<Le;)De[Ie]=j[Ie];for(;ve--;)De[Ie++]=arguments[++de];return fr(Xe,G?M:this,De)}return le}function yb(i){return function(v,M,j){return j&&typeof j!="number"&&jr(v,M,j)&&(M=j=t),v=Oo(v),M===t?(M=v,v=0):M=Oo(M),j=j===t?v<M?1:-1:Oo(j),PL(v,M,j,i)}}function Xc(i){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Oi(v),M=Oi(M)),i(v,M)}}function bb(i,v,M,j,G,ee,le,de,ve,Ie){var Le=v&E,De=Le?le:t,Xe=Le?t:le,lt=Le?ee:t,bt=Le?t:ee;v|=Le?k:C,v&=~(Le?C:k),v&x||(v&=-4);var Bt=[i,v,G,lt,De,bt,Xe,de,ve,Ie],wt=M.apply(t,Bt);return rp(i)&&Ib(wt,Bt),wt.placeholder=j,Lb(wt,i,v)}function Xd(i){var v=Jt[i];return function(M,j){if(M=Oi(M),j=j==null?0:Or(Dt(j),292),j&&L0(M)){var G=(cn(M)+"e").split("e"),ee=v(G[0]+"e"+(+G[1]+j));return G=(cn(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return v(M)}}var eR=ya&&1/Ge(new ya([,-0]))[1]==B?function(i){return new ya(i)}:yp;function wb(i){return function(v){var M=Nr(v);return M==at?Me(v):M==Pn?Je(v):st(v,i(v))}}function Eo(i,v,M,j,G,ee,le,de){var ve=v&w;if(!ve&&typeof i!="function")throw new gn(g);var Ie=j?j.length:0;if(Ie||(v&=-97,j=G=t),le=le===t?le:pr(Dt(le),0),de=de===t?de:Dt(de),Ie-=G?G.length:0,v&C){var Le=j,De=G;j=G=t}var Xe=ve?t:Jd(i),lt=[i,v,M,j,G,Le,De,ee,le,de];if(Xe&&fR(lt,Xe),i=lt[0],v=lt[1],M=lt[2],j=lt[3],G=lt[4],de=lt[9]=lt[9]===t?ve?0:i.length:pr(lt[9]-Ie,0),!de&&v&(E|$)&&(v&=-25),!v||v==m)var bt=QL(i,v,M);else v==E||v==$?bt=ZL(i,v,de):(v==k||v==(m|k))&&!G.length?bt=JL(i,v,M,j):bt=Kc.apply(t,lt);var Bt=Xe?eb:Ib;return Lb(Bt(bt,lt),i,v)}function xb(i,v,M,j){return i===t||Xi(i,Un[M])&&!dn.call(j,M)?v:i}function Cb(i,v,M,j,G,ee){return Nn(i)&&Nn(v)&&(ee.set(v,i),Hc(i,v,t,Cb,ee),ee.delete(v)),i}function tR(i){return fl(i)?t:i}function kb(i,v,M,j,G,ee){var le=M&s,de=i.length,ve=v.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Le=ee.get(v);if(Ie&&Le)return Ie==v&&Le==i;var De=-1,Xe=!0,lt=M&u?new Ps:t;for(ee.set(i,v),ee.set(v,i);++De<de;){var bt=i[De],Bt=v[De];if(j)var wt=le?j(Bt,bt,De,v,i,ee):j(bt,Bt,De,i,v,ee);if(wt!==t){if(wt)continue;Xe=!1;break}if(lt){if(!W(v,function(Ut,Qt){if(!$t(lt,Qt)&&(bt===Ut||G(bt,Ut,M,j,ee)))return lt.push(Qt)})){Xe=!1;break}}else if(!(bt===Bt||G(bt,Bt,M,j,ee))){Xe=!1;break}}return ee.delete(i),ee.delete(v),Xe}function nR(i,v,M,j,G,ee,le){switch(M){case Ze:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Ue:return!(i.byteLength!=v.byteLength||!ee(new Ic(i),new Ic(v)));case $e:case Te:case ft:return Xi(+i,+v);case Qe:return i.name==v.name&&i.message==v.message;case xn:case Wn:return i==v+"";case at:var de=Me;case Pn:var ve=j&s;if(de||(de=Ge),i.size!=v.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==v;j|=u,le.set(i,v);var Le=kb(de(i),de(v),j,G,ee,le);return le.delete(i),Le;case rr:if(sl)return sl.call(i)==sl.call(v)}return!1}function rR(i,v,M,j,G,ee){var le=M&s,de=Qd(i),ve=de.length,Ie=Qd(v),Le=Ie.length;if(ve!=Le&&!le)return!1;for(var De=ve;De--;){var Xe=de[De];if(!(le?Xe in v:dn.call(v,Xe)))return!1}var lt=ee.get(i),bt=ee.get(v);if(lt&&bt)return lt==v&&bt==i;var Bt=!0;ee.set(i,v),ee.set(v,i);for(var wt=le;++De<ve;){Xe=de[De];var Ut=i[Xe],Qt=v[Xe];if(j)var yi=le?j(Qt,Ut,Xe,v,i,ee):j(Ut,Qt,Xe,i,v,ee);if(!(yi===t?Ut===Qt||G(Ut,Qt,M,j,ee):yi)){Bt=!1;break}wt||(wt=Xe=="constructor")}if(Bt&&!wt){var Hr=i.constructor,bi=v.constructor;Hr!=bi&&"constructor"in i&&"constructor"in v&&!(typeof Hr=="function"&&Hr instanceof Hr&&typeof bi=="function"&&bi instanceof bi)&&(Bt=!1)}return ee.delete(i),ee.delete(v),Bt}function Io(i){return op(Mb(i,t,Pb),i+"")}function Qd(i){return H0(i,br,tp)}function Zd(i){return H0(i,ni,Sb)}var Jd=Fc?function(i){return Fc.get(i)}:yp;function Qc(i){for(var v=i.name+"",M=ba[v],j=dn.call(ba,v)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return v}function ka(i){var v=dn.call(J,"placeholder")?J:i;return v.placeholder}function yt(){var i=J.iteratee||mp;return i=i===mp?q0:i,arguments.length?i(arguments[0],arguments[1]):i}function Zc(i,v){var M=i.__data__;return hR(v)?M[typeof v=="string"?"string":"hash"]:M.map}function ep(i){for(var v=br(i),M=v.length;M--;){var j=v[M],G=i[j];v[M]=[j,G,$b(G)]}return v}function zs(i,v){var M=ie(i,v);return V0(M)?M:t}function iR(i){var v=dn.call(i,Ds),M=i[Ds];try{i[Ds]=t;var j=!0}catch{}var G=Mc.call(i);return j&&(v?i[Ds]=M:delete i[Ds]),G}var tp=Td?function(i){return i==null?[]:(i=Wt(i),Rr(Td(i),function(v){return E0.call(i,v)}))}:bp,Sb=Td?function(i){for(var v=[];i;)T(v,tp(i)),i=Lc(i);return v}:bp,Nr=zr;(Md&&Nr(new Md(new ArrayBuffer(1)))!=Ze||rl&&Nr(new rl)!=at||Ed&&Nr(Ed.resolve())!=Zt||ya&&Nr(new ya)!=Pn||il&&Nr(new il)!=qe)&&(Nr=function(i){var v=zr(i),M=v==wn?i.constructor:t,j=M?js(M):"";if(j)switch(j){case BI:return Ze;case zI:return at;case jI:return Zt;case HI:return Pn;case UI:return qe}return v});function oR(i,v,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":v-=le;break;case"take":v=Or(v,i+le);break;case"takeRight":i=pr(i,v-le);break}}return{start:i,end:v}}function sR(i){var v=i.match(Vi);return v?v[1].split($s):[]}function _b(i,v,M){v=rs(v,i);for(var j=-1,G=v.length,ee=!1;++j<G;){var le=po(v[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&ou(G)&&Lo(le,G)&&(Et(i)||Hs(i)))}function aR(i){var v=i.length,M=new i.constructor(v);return v&&typeof i[0]=="string"&&dn.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function Ab(i){return typeof i.constructor=="function"&&!pl(i)?wa(Lc(i)):{}}function lR(i,v,M){var j=i.constructor;switch(v){case Ue:return Gd(i);case $e:case Te:return new j(+i);case Ze:return VL(i,M);case mt:case At:case _t:case Pt:case Nt:case pt:case Ct:case Tn:case Tr:return lb(i,M);case at:return new j;case ft:case Wn:return new j(i);case xn:return qL(i);case Pn:return new j;case rr:return KL(i)}}function cR(i,v){var M=v.length;if(!M)return i;var j=M-1;return v[j]=(M>1?"& ":"")+v[j],v=v.join(M>2?", ":" "),i.replace(io,`{
|
1469
|
+
/* [wrapped with `+v+`] */
|
1470
|
+
`)}function uR(i){return Et(i)||Hs(i)||!!(I0&&i&&i[I0])}function Lo(i,v){var M=typeof i;return v=v??U,!!v&&(M=="number"||M!="symbol"&&Cn.test(i))&&i>-1&&i%1==0&&i<v}function jr(i,v,M){if(!Nn(M))return!1;var j=typeof v;return(j=="number"?ti(M)&&Lo(v,M.length):j=="string"&&v in M)?Xi(M[v],i):!1}function np(i,v){if(Et(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||vi(i)?!0:Hi.test(i)||!ua.test(i)||v!=null&&i in Wt(v)}function hR(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function rp(i){var v=Qc(i),M=J[v];if(typeof M!="function"||!(v in Gt.prototype))return!1;if(i===M)return!0;var j=Jd(M);return!!j&&i===j[0]}function dR(i){return!!$0&&$0 in i}var pR=Ns?Ro:wp;function pl(i){var v=i&&i.constructor,M=typeof v=="function"&&v.prototype||Un;return i===M}function $b(i){return i===i&&!Nn(i)}function Tb(i,v){return function(M){return M==null?!1:M[i]===v&&(v!==t||i in Wt(M))}}function gR(i){var v=ru(i,function(j){return M.size===f&&M.clear(),j}),M=v.cache;return v}function fR(i,v){var M=i[1],j=v[1],G=M|j,ee=G<(m|w|L),le=j==L&&M==E||j==L&&M==R&&i[7].length<=v[8]||j==(L|R)&&v[7].length<=v[8]&&M==E;if(!(ee||le))return i;j&m&&(i[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=i[3];i[3]=ve?ub(ve,de,v[4]):de,i[4]=ve?ze(i[3],o):v[4]}return de=v[5],de&&(ve=i[5],i[5]=ve?hb(ve,de,v[6]):de,i[6]=ve?ze(i[5],o):v[6]),de=v[7],de&&(i[7]=de),j&L&&(i[8]=i[8]==null?v[8]:Or(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=G,i}function mR(i){var v=[];if(i!=null)for(var M in Wt(i))v.push(M);return v}function vR(i){return Mc.call(i)}function Mb(i,v,M){return v=pr(v===t?i.length-1:v,0),function(){for(var j=arguments,G=-1,ee=pr(j.length-v,0),le=xe(ee);++G<ee;)le[G]=j[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=j[G];return de[v]=M(le),fr(i,this,de)}}function Eb(i,v){return v.length<2?i:Bs(i,Li(v,0,-1))}function yR(i,v){for(var M=i.length,j=Or(v.length,M),G=ei(i);j--;){var ee=v[j];i[j]=Lo(ee,M)?G[ee]:t}return i}function ip(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var Ib=Rb(eb),gl=RI||function(i,v){return pn.setTimeout(i,v)},op=Rb(zL);function Lb(i,v,M){var j=v+"";return op(i,cR(j,bR(sR(j),M)))}function Rb(i){var v=0,M=0;return function(){var j=FI(),G=O-(j-M);if(M=j,G>0){if(++v>=P)return arguments[0]}else v=0;return i.apply(t,arguments)}}function Jc(i,v){var M=-1,j=i.length,G=j-1;for(v=v===t?j:v;++M<v;){var ee=zd(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=v,i}var Ob=gR(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Xn,function(M,j,G,ee){v.push(G?ee.replace(el,"$1"):j||M)}),v});function po(i){if(typeof i=="string"||vi(i))return i;var v=i+"";return v=="0"&&1/i==-B?"-0":v}function js(i){if(i!=null){try{return Tc.call(i)}catch{}try{return i+""}catch{}}return""}function bR(i,v){return Cr(ae,function(M){var j="_."+M[0];v&M[1]&&!gi(i,j)&&i.push(j)}),i.sort()}function Nb(i){if(i instanceof Gt)return i.clone();var v=new Ei(i.__wrapped__,i.__chain__);return v.__actions__=ei(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function wR(i,v,M){(M?jr(i,v,M):v===t)?v=1:v=pr(Dt(v),0);var j=i==null?0:i.length;if(!j||v<1)return[];for(var G=0,ee=0,le=xe(Nc(j/v));G<j;)le[ee++]=Li(i,G,G+=v);return le}function xR(i){for(var v=-1,M=i==null?0:i.length,j=0,G=[];++v<M;){var ee=i[v];ee&&(G[j++]=ee)}return G}function CR(){var i=arguments.length;if(!i)return[];for(var v=xe(i-1),M=arguments[0],j=i;j--;)v[j-1]=arguments[j];return T(Et(M)?ei(M):[M],Sr(v,1))}var kR=jt(function(i,v){return Jn(i)?ll(i,Sr(v,1,Jn,!0)):[]}),SR=jt(function(i,v){var M=Ri(v);return Jn(M)&&(M=t),Jn(i)?ll(i,Sr(v,1,Jn,!0),yt(M,2)):[]}),_R=jt(function(i,v){var M=Ri(v);return Jn(M)&&(M=t),Jn(i)?ll(i,Sr(v,1,Jn,!0),t,M):[]});function AR(i,v,M){var j=i==null?0:i.length;return j?(v=M||v===t?1:Dt(v),Li(i,v<0?0:v,j)):[]}function $R(i,v,M){var j=i==null?0:i.length;return j?(v=M||v===t?1:Dt(v),v=j-v,Li(i,0,v<0?0:v)):[]}function TR(i,v){return i&&i.length?Vc(i,yt(v,3),!0,!0):[]}function MR(i,v){return i&&i.length?Vc(i,yt(v,3),!0):[]}function ER(i,v,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&jr(i,v,M)&&(M=0,j=G),CL(i,v,M,j)):[]}function Db(i,v,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Dt(M);return G<0&&(G=pr(j+G,0)),re(i,yt(v,3),G)}function Fb(i,v,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==t&&(G=Dt(M),G=M<0?pr(j+G,0):Or(G,j-1)),re(i,yt(v,3),G,!0)}function Pb(i){var v=i==null?0:i.length;return v?Sr(i,1):[]}function IR(i){var v=i==null?0:i.length;return v?Sr(i,B):[]}function LR(i,v){var M=i==null?0:i.length;return M?(v=v===t?1:Dt(v),Sr(i,v)):[]}function RR(i){for(var v=-1,M=i==null?0:i.length,j={};++v<M;){var G=i[v];j[G[0]]=G[1]}return j}function Wb(i){return i&&i.length?i[0]:t}function OR(i,v,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Dt(M);return G<0&&(G=pr(j+G,0)),se(i,v,G)}function NR(i){var v=i==null?0:i.length;return v?Li(i,0,-1):[]}var DR=jt(function(i){var v=y(i,qd);return v.length&&v[0]===i[0]?Dd(v):[]}),FR=jt(function(i){var v=Ri(i),M=y(i,qd);return v===Ri(M)?v=t:M.pop(),M.length&&M[0]===i[0]?Dd(M,yt(v,2)):[]}),PR=jt(function(i){var v=Ri(i),M=y(i,qd);return v=typeof v=="function"?v:t,v&&M.pop(),M.length&&M[0]===i[0]?Dd(M,t,v):[]});function WR(i,v){return i==null?"":NI.call(i,v)}function Ri(i){var v=i==null?0:i.length;return v?i[v-1]:t}function BR(i,v,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==t&&(G=Dt(M),G=G<0?pr(j+G,0):Or(G,j-1)),v===v?St(i,v,G):re(i,Ce,G,!0)}function zR(i,v){return i&&i.length?X0(i,Dt(v)):t}var jR=jt(Bb);function Bb(i,v){return i&&i.length&&v&&v.length?Bd(i,v):i}function HR(i,v,M){return i&&i.length&&v&&v.length?Bd(i,v,yt(M,2)):i}function UR(i,v,M){return i&&i.length&&v&&v.length?Bd(i,v,t,M):i}var VR=Io(function(i,v){var M=i==null?0:i.length,j=Ld(i,v);return J0(i,y(v,function(G){return Lo(G,M)?+G:G}).sort(cb)),j});function qR(i,v){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(v=yt(v,3);++j<ee;){var le=i[j];v(le,j,i)&&(M.push(le),G.push(j))}return J0(i,G),M}function sp(i){return i==null?i:WI.call(i)}function KR(i,v,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&jr(i,v,M)?(v=0,M=j):(v=v==null?0:Dt(v),M=M===t?j:Dt(M)),Li(i,v,M)):[]}function GR(i,v){return Uc(i,v)}function YR(i,v,M){return Hd(i,v,yt(M,2))}function XR(i,v){var M=i==null?0:i.length;if(M){var j=Uc(i,v);if(j<M&&Xi(i[j],v))return j}return-1}function QR(i,v){return Uc(i,v,!0)}function ZR(i,v,M){return Hd(i,v,yt(M,2),!0)}function JR(i,v){var M=i==null?0:i.length;if(M){var j=Uc(i,v,!0)-1;if(Xi(i[j],v))return j}return-1}function eO(i){return i&&i.length?tb(i):[]}function tO(i,v){return i&&i.length?tb(i,yt(v,2)):[]}function nO(i){var v=i==null?0:i.length;return v?Li(i,1,v):[]}function rO(i,v,M){return i&&i.length?(v=M||v===t?1:Dt(v),Li(i,0,v<0?0:v)):[]}function iO(i,v,M){var j=i==null?0:i.length;return j?(v=M||v===t?1:Dt(v),v=j-v,Li(i,v<0?0:v,j)):[]}function oO(i,v){return i&&i.length?Vc(i,yt(v,3),!1,!0):[]}function sO(i,v){return i&&i.length?Vc(i,yt(v,3)):[]}var aO=jt(function(i){return ns(Sr(i,1,Jn,!0))}),lO=jt(function(i){var v=Ri(i);return Jn(v)&&(v=t),ns(Sr(i,1,Jn,!0),yt(v,2))}),cO=jt(function(i){var v=Ri(i);return v=typeof v=="function"?v:t,ns(Sr(i,1,Jn,!0),t,v)});function uO(i){return i&&i.length?ns(i):[]}function hO(i,v){return i&&i.length?ns(i,yt(v,2)):[]}function dO(i,v){return v=typeof v=="function"?v:t,i&&i.length?ns(i,t,v):[]}function ap(i){if(!(i&&i.length))return[];var v=0;return i=Rr(i,function(M){if(Jn(M))return v=pr(M.length,v),!0}),et(v,function(M){return y(i,be(M))})}function zb(i,v){if(!(i&&i.length))return[];var M=ap(i);return v==null?M:y(M,function(j){return fr(v,t,j)})}var pO=jt(function(i,v){return Jn(i)?ll(i,v):[]}),gO=jt(function(i){return Vd(Rr(i,Jn))}),fO=jt(function(i){var v=Ri(i);return Jn(v)&&(v=t),Vd(Rr(i,Jn),yt(v,2))}),mO=jt(function(i){var v=Ri(i);return v=typeof v=="function"?v:t,Vd(Rr(i,Jn),t,v)}),vO=jt(ap);function yO(i,v){return ob(i||[],v||[],al)}function bO(i,v){return ob(i||[],v||[],hl)}var wO=jt(function(i){var v=i.length,M=v>1?i[v-1]:t;return M=typeof M=="function"?(i.pop(),M):t,zb(i,M)});function jb(i){var v=J(i);return v.__chain__=!0,v}function xO(i,v){return v(i),i}function eu(i,v){return v(i)}var CO=Io(function(i){var v=i.length,M=v?i[0]:0,j=this.__wrapped__,G=function(ee){return Ld(ee,i)};return v>1||this.__actions__.length||!(j instanceof Gt)||!Lo(M)?this.thru(G):(j=j.slice(M,+M+(v?1:0)),j.__actions__.push({func:eu,args:[G],thisArg:t}),new Ei(j,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(t),ee}))});function kO(){return jb(this)}function SO(){return new Ei(this.value(),this.__chain__)}function _O(){this.__values__===t&&(this.__values__=nw(this.value()));var i=this.__index__>=this.__values__.length,v=i?t:this.__values__[this.__index__++];return{done:i,value:v}}function AO(){return this}function $O(i){for(var v,M=this;M instanceof Wc;){var j=Nb(M);j.__index__=0,j.__values__=t,v?G.__wrapped__=j:v=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,v}function TO(){var i=this.__wrapped__;if(i instanceof Gt){var v=i;return this.__actions__.length&&(v=new Gt(this)),v=v.reverse(),v.__actions__.push({func:eu,args:[sp],thisArg:t}),new Ei(v,this.__chain__)}return this.thru(sp)}function MO(){return ib(this.__wrapped__,this.__actions__)}var EO=qc(function(i,v,M){dn.call(i,M)?++i[M]:Mo(i,M,1)});function IO(i,v,M){var j=Et(i)?kr:xL;return M&&jr(i,v,M)&&(v=t),j(i,yt(v,3))}function LO(i,v){var M=Et(i)?Rr:z0;return M(i,yt(v,3))}var RO=fb(Db),OO=fb(Fb);function NO(i,v){return Sr(tu(i,v),1)}function DO(i,v){return Sr(tu(i,v),B)}function FO(i,v,M){return M=M===t?1:Dt(M),Sr(tu(i,v),M)}function Hb(i,v){var M=Et(i)?Cr:ts;return M(i,yt(v,3))}function Ub(i,v){var M=Et(i)?Os:B0;return M(i,yt(v,3))}var PO=qc(function(i,v,M){dn.call(i,M)?i[M].push(v):Mo(i,M,[v])});function WO(i,v,M,j){i=ti(i)?i:_a(i),M=M&&!j?Dt(M):0;var G=i.length;return M<0&&(M=pr(G+M,0)),su(i)?M<=G&&i.indexOf(v,M)>-1:!!G&&se(i,v,M)>-1}var BO=jt(function(i,v,M){var j=-1,G=typeof v=="function",ee=ti(i)?xe(i.length):[];return ts(i,function(le){ee[++j]=G?fr(v,le,M):cl(le,v,M)}),ee}),zO=qc(function(i,v,M){Mo(i,M,v)});function tu(i,v){var M=Et(i)?y:K0;return M(i,yt(v,3))}function jO(i,v,M,j){return i==null?[]:(Et(v)||(v=v==null?[]:[v]),M=j?t:M,Et(M)||(M=M==null?[]:[M]),Q0(i,v,M))}var HO=qc(function(i,v,M){i[M?0:1].push(v)},function(){return[[],[]]});function UO(i,v,M){var j=Et(i)?S:Re,G=arguments.length<3;return j(i,yt(v,4),M,G,ts)}function VO(i,v,M){var j=Et(i)?D:Re,G=arguments.length<3;return j(i,yt(v,4),M,G,B0)}function qO(i,v){var M=Et(i)?Rr:z0;return M(i,iu(yt(v,3)))}function KO(i){var v=Et(i)?D0:WL;return v(i)}function GO(i,v,M){(M?jr(i,v,M):v===t)?v=1:v=Dt(v);var j=Et(i)?mL:BL;return j(i,v)}function YO(i){var v=Et(i)?vL:jL;return v(i)}function XO(i){if(i==null)return 0;if(ti(i))return su(i)?Ht(i):i.length;var v=Nr(i);return v==at||v==Pn?i.size:Pd(i).length}function QO(i,v,M){var j=Et(i)?W:HL;return M&&jr(i,v,M)&&(v=t),j(i,yt(v,3))}var ZO=jt(function(i,v){if(i==null)return[];var M=v.length;return M>1&&jr(i,v[0],v[1])?v=[]:M>2&&jr(v[0],v[1],v[2])&&(v=[v[0]]),Q0(i,Sr(v,1),[])}),nu=LI||function(){return pn.Date.now()};function JO(i,v){if(typeof v!="function")throw new gn(g);return i=Dt(i),function(){if(--i<1)return v.apply(this,arguments)}}function Vb(i,v,M){return v=M?t:v,v=i&&v==null?i.length:v,Eo(i,L,t,t,t,t,v)}function qb(i,v){var M;if(typeof v!="function")throw new gn(g);return i=Dt(i),function(){return--i>0&&(M=v.apply(this,arguments)),i<=1&&(v=t),M}}var lp=jt(function(i,v,M){var j=m;if(M.length){var G=ze(M,ka(lp));j|=k}return Eo(i,j,v,M,G)}),Kb=jt(function(i,v,M){var j=m|w;if(M.length){var G=ze(M,ka(Kb));j|=k}return Eo(v,j,i,M,G)});function Gb(i,v,M){v=M?t:v;var j=Eo(i,E,t,t,t,t,t,v);return j.placeholder=Gb.placeholder,j}function Yb(i,v,M){v=M?t:v;var j=Eo(i,$,t,t,t,t,t,v);return j.placeholder=Yb.placeholder,j}function Xb(i,v,M){var j,G,ee,le,de,ve,Ie=0,Le=!1,De=!1,Xe=!0;if(typeof i!="function")throw new gn(g);v=Oi(v)||0,Nn(M)&&(Le=!!M.leading,De="maxWait"in M,ee=De?pr(Oi(M.maxWait)||0,v):ee,Xe="trailing"in M?!!M.trailing:Xe);function lt(er){var Qi=j,No=G;return j=G=t,Ie=er,le=i.apply(No,Qi),le}function bt(er){return Ie=er,de=gl(Ut,v),Le?lt(er):le}function Bt(er){var Qi=er-ve,No=er-Ie,fw=v-Qi;return De?Or(fw,ee-No):fw}function wt(er){var Qi=er-ve,No=er-Ie;return ve===t||Qi>=v||Qi<0||De&&No>=ee}function Ut(){var er=nu();if(wt(er))return Qt(er);de=gl(Ut,Bt(er))}function Qt(er){return de=t,Xe&&j?lt(er):(j=G=t,le)}function yi(){de!==t&&sb(de),Ie=0,j=ve=G=de=t}function Hr(){return de===t?le:Qt(nu())}function bi(){var er=nu(),Qi=wt(er);if(j=arguments,G=this,ve=er,Qi){if(de===t)return bt(ve);if(De)return sb(de),de=gl(Ut,v),lt(ve)}return de===t&&(de=gl(Ut,v)),le}return bi.cancel=yi,bi.flush=Hr,bi}var e2=jt(function(i,v){return W0(i,1,v)}),t2=jt(function(i,v,M){return W0(i,Oi(v)||0,M)});function n2(i){return Eo(i,F)}function ru(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new gn(g);var M=function(){var j=arguments,G=v?v.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(ru.Cache||To),M}ru.Cache=To;function iu(i){if(typeof i!="function")throw new gn(g);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function r2(i){return qb(2,i)}var i2=UL(function(i,v){v=v.length==1&&Et(v[0])?y(v[0],ht(yt())):y(Sr(v,1),ht(yt()));var M=v.length;return jt(function(j){for(var G=-1,ee=Or(j.length,M);++G<ee;)j[G]=v[G].call(this,j[G]);return fr(i,this,j)})}),cp=jt(function(i,v){var M=ze(v,ka(cp));return Eo(i,k,t,v,M)}),Qb=jt(function(i,v){var M=ze(v,ka(Qb));return Eo(i,C,t,v,M)}),o2=Io(function(i,v){return Eo(i,R,t,t,t,v)});function s2(i,v){if(typeof i!="function")throw new gn(g);return v=v===t?v:Dt(v),jt(i,v)}function a2(i,v){if(typeof i!="function")throw new gn(g);return v=v==null?0:pr(Dt(v),0),jt(function(M){var j=M[v],G=is(M,0,v);return j&&T(G,j),fr(i,this,G)})}function l2(i,v,M){var j=!0,G=!0;if(typeof i!="function")throw new gn(g);return Nn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Xb(i,v,{leading:j,maxWait:v,trailing:G})}function c2(i){return Vb(i,1)}function u2(i,v){return cp(Kd(v),i)}function h2(){if(!arguments.length)return[];var i=arguments[0];return Et(i)?i:[i]}function d2(i){return Ii(i,l)}function p2(i,v){return v=typeof v=="function"?v:t,Ii(i,l,v)}function g2(i){return Ii(i,a|l)}function f2(i,v){return v=typeof v=="function"?v:t,Ii(i,a|l,v)}function m2(i,v){return v==null||P0(i,v,br(v))}function Xi(i,v){return i===v||i!==i&&v!==v}var v2=Xc(Nd),y2=Xc(function(i,v){return i>=v}),Hs=U0(function(){return arguments}())?U0:function(i){return Vn(i)&&dn.call(i,"callee")&&!E0.call(i,"callee")},Et=xe.isArray,b2=Jr?ht(Jr):$L;function ti(i){return i!=null&&ou(i.length)&&!Ro(i)}function Jn(i){return Vn(i)&&ti(i)}function w2(i){return i===!0||i===!1||Vn(i)&&zr(i)==$e}var os=OI||wp,x2=Jo?ht(Jo):TL;function C2(i){return Vn(i)&&i.nodeType===1&&!fl(i)}function k2(i){if(i==null)return!0;if(ti(i)&&(Et(i)||typeof i=="string"||typeof i.splice=="function"||os(i)||Sa(i)||Hs(i)))return!i.length;var v=Nr(i);if(v==at||v==Pn)return!i.size;if(pl(i))return!Pd(i).length;for(var M in i)if(dn.call(i,M))return!1;return!0}function S2(i,v){return ul(i,v)}function _2(i,v,M){M=typeof M=="function"?M:t;var j=M?M(i,v):t;return j===t?ul(i,v,t,M):!!j}function up(i){if(!Vn(i))return!1;var v=zr(i);return v==Qe||v==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!fl(i)}function A2(i){return typeof i=="number"&&L0(i)}function Ro(i){if(!Nn(i))return!1;var v=zr(i);return v==Ye||v==gt||v==fe||v==wr}function Zb(i){return typeof i=="number"&&i==Dt(i)}function ou(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Nn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Vn(i){return i!=null&&typeof i=="object"}var Jb=Hn?ht(Hn):EL;function $2(i,v){return i===v||Fd(i,v,ep(v))}function T2(i,v,M){return M=typeof M=="function"?M:t,Fd(i,v,ep(v),M)}function M2(i){return ew(i)&&i!=+i}function E2(i){if(pR(i))throw new dt(p);return V0(i)}function I2(i){return i===null}function L2(i){return i==null}function ew(i){return typeof i=="number"||Vn(i)&&zr(i)==ft}function fl(i){if(!Vn(i)||zr(i)!=wn)return!1;var v=Lc(i);if(v===null)return!0;var M=dn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&Tc.call(M)==TI}var hp=di?ht(di):IL;function R2(i){return Zb(i)&&i>=-U&&i<=U}var tw=pi?ht(pi):LL;function su(i){return typeof i=="string"||!Et(i)&&Vn(i)&&zr(i)==Wn}function vi(i){return typeof i=="symbol"||Vn(i)&&zr(i)==rr}var Sa=Ti?ht(Ti):RL;function O2(i){return i===t}function N2(i){return Vn(i)&&Nr(i)==qe}function D2(i){return Vn(i)&&zr(i)==ke}var F2=Xc(Wd),P2=Xc(function(i,v){return i<=v});function nw(i){if(!i)return[];if(ti(i))return su(i)?Tt(i):ei(i);if(nl&&i[nl])return we(i[nl]());var v=Nr(i),M=v==at?Me:v==Pn?Ge:_a;return M(i)}function Oo(i){if(!i)return i===0?i:0;if(i=Oi(i),i===B||i===-B){var v=i<0?-1:1;return v*K}return i===i?i:0}function Dt(i){var v=Oo(i),M=v%1;return v===v?M?v-M:v:0}function rw(i){return i?Ws(Dt(i),0,te):0}function Oi(i){if(typeof i=="number")return i;if(vi(i))return Z;if(Nn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Nn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=Sn(i);var M=da.test(i);return M||Qn.test(i)?kn(i.slice(2),M?2:8):qt.test(i)?Z:+i}function iw(i){return ho(i,ni(i))}function W2(i){return i?Ws(Dt(i),-U,U):i===0?i:0}function cn(i){return i==null?"":mi(i)}var B2=xa(function(i,v){if(pl(v)||ti(v)){ho(v,br(v),i);return}for(var M in v)dn.call(v,M)&&al(i,M,v[M])}),ow=xa(function(i,v){ho(v,ni(v),i)}),au=xa(function(i,v,M,j){ho(v,ni(v),i,j)}),z2=xa(function(i,v,M,j){ho(v,br(v),i,j)}),j2=Io(Ld);function H2(i,v){var M=wa(i);return v==null?M:F0(M,v)}var U2=jt(function(i,v){i=Wt(i);var M=-1,j=v.length,G=j>2?v[2]:t;for(G&&jr(v[0],v[1],G)&&(j=1);++M<j;)for(var ee=v[M],le=ni(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Le=i[Ie];(Le===t||Xi(Le,Un[Ie])&&!dn.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),V2=jt(function(i){return i.push(t,Cb),fr(sw,t,i)});function q2(i,v){return Q(i,yt(v,3),uo)}function K2(i,v){return Q(i,yt(v,3),Od)}function G2(i,v){return i==null?i:Rd(i,yt(v,3),ni)}function Y2(i,v){return i==null?i:j0(i,yt(v,3),ni)}function X2(i,v){return i&&uo(i,yt(v,3))}function Q2(i,v){return i&&Od(i,yt(v,3))}function Z2(i){return i==null?[]:jc(i,br(i))}function J2(i){return i==null?[]:jc(i,ni(i))}function dp(i,v,M){var j=i==null?t:Bs(i,v);return j===t?M:j}function eN(i,v){return i!=null&&_b(i,v,kL)}function pp(i,v){return i!=null&&_b(i,v,SL)}var tN=vb(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Mc.call(v)),i[v]=M},fp(ri)),nN=vb(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Mc.call(v)),dn.call(i,v)?i[v].push(M):i[v]=[M]},yt),rN=jt(cl);function br(i){return ti(i)?N0(i):Pd(i)}function ni(i){return ti(i)?N0(i,!0):OL(i)}function iN(i,v){var M={};return v=yt(v,3),uo(i,function(j,G,ee){Mo(M,v(j,G,ee),j)}),M}function oN(i,v){var M={};return v=yt(v,3),uo(i,function(j,G,ee){Mo(M,G,v(j,G,ee))}),M}var sN=xa(function(i,v,M){Hc(i,v,M)}),sw=xa(function(i,v,M,j){Hc(i,v,M,j)}),aN=Io(function(i,v){var M={};if(i==null)return M;var j=!1;v=y(v,function(ee){return ee=rs(ee,i),j||(j=ee.length>1),ee}),ho(i,Zd(i),M),j&&(M=Ii(M,a|c|l,tR));for(var G=v.length;G--;)Ud(M,v[G]);return M});function lN(i,v){return aw(i,iu(yt(v)))}var cN=Io(function(i,v){return i==null?{}:DL(i,v)});function aw(i,v){if(i==null)return{};var M=y(Zd(i),function(j){return[j]});return v=yt(v),Z0(i,M,function(j,G){return v(j,G[0])})}function uN(i,v,M){v=rs(v,i);var j=-1,G=v.length;for(G||(G=1,i=t);++j<G;){var ee=i==null?t:i[po(v[j])];ee===t&&(j=G,ee=M),i=Ro(ee)?ee.call(i):ee}return i}function hN(i,v,M){return i==null?i:hl(i,v,M)}function dN(i,v,M,j){return j=typeof j=="function"?j:t,i==null?i:hl(i,v,M,j)}var lw=wb(br),cw=wb(ni);function pN(i,v,M){var j=Et(i),G=j||os(i)||Sa(i);if(v=yt(v,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:Nn(i)?M=Ro(ee)?wa(Lc(i)):{}:M={}}return(G?Cr:uo)(i,function(le,de,ve){return v(M,le,de,ve)}),M}function gN(i,v){return i==null?!0:Ud(i,v)}function fN(i,v,M){return i==null?i:rb(i,v,Kd(M))}function mN(i,v,M,j){return j=typeof j=="function"?j:t,i==null?i:rb(i,v,Kd(M),j)}function _a(i){return i==null?[]:Mn(i,br(i))}function vN(i){return i==null?[]:Mn(i,ni(i))}function yN(i,v,M){return M===t&&(M=v,v=t),M!==t&&(M=Oi(M),M=M===M?M:0),v!==t&&(v=Oi(v),v=v===v?v:0),Ws(Oi(i),v,M)}function bN(i,v,M){return v=Oo(v),M===t?(M=v,v=0):M=Oo(M),i=Oi(i),_L(i,v,M)}function wN(i,v,M){if(M&&typeof M!="boolean"&&jr(i,v,M)&&(v=M=t),M===t&&(typeof v=="boolean"?(M=v,v=t):typeof i=="boolean"&&(M=i,i=t)),i===t&&v===t?(i=0,v=1):(i=Oo(i),v===t?(v=i,i=0):v=Oo(v)),i>v){var j=i;i=v,v=j}if(M||i%1||v%1){var G=R0();return Or(i+G*(v-i+je("1e-"+((G+"").length-1))),v)}return zd(i,v)}var xN=Ca(function(i,v,M){return v=v.toLowerCase(),i+(M?uw(v):v)});function uw(i){return gp(cn(i).toLowerCase())}function hw(i){return i=cn(i),i&&i.replace(Bn,En).replace(So,"")}function CN(i,v,M){i=cn(i),v=mi(v);var j=i.length;M=M===t?j:Ws(Dt(M),0,j);var G=M;return M-=v.length,M>=0&&i.slice(M,G)==v}function kN(i){return i=cn(i),i&&Qa.test(i)?i.replace(vo,V):i}function SN(i){return i=cn(i),i&&Ui.test(i)?i.replace(Mr,"\\$&"):i}var _N=Ca(function(i,v,M){return i+(M?"-":"")+v.toLowerCase()}),AN=Ca(function(i,v,M){return i+(M?" ":"")+v.toLowerCase()}),$N=gb("toLowerCase");function TN(i,v,M){i=cn(i),v=Dt(v);var j=v?Ht(i):0;if(!v||j>=v)return i;var G=(v-j)/2;return Yc(Dc(G),M)+i+Yc(Nc(G),M)}function MN(i,v,M){i=cn(i),v=Dt(v);var j=v?Ht(i):0;return v&&j<v?i+Yc(v-j,M):i}function EN(i,v,M){i=cn(i),v=Dt(v);var j=v?Ht(i):0;return v&&j<v?Yc(v-j,M)+i:i}function IN(i,v,M){return M||v==null?v=0:v&&(v=+v),PI(cn(i).replace(Rn,""),v||0)}function LN(i,v,M){return(M?jr(i,v,M):v===t)?v=1:v=Dt(v),jd(cn(i),v)}function RN(){var i=arguments,v=cn(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var ON=Ca(function(i,v,M){return i+(M?"_":"")+v.toLowerCase()});function NN(i,v,M){return M&&typeof M!="number"&&jr(i,v,M)&&(v=M=t),M=M===t?te:M>>>0,M?(i=cn(i),i&&(typeof v=="string"||v!=null&&!hp(v))&&(v=mi(v),!v&&oe(i))?is(Tt(i),0,M):i.split(v,M)):[]}var DN=Ca(function(i,v,M){return i+(M?" ":"")+gp(v)});function FN(i,v,M){return i=cn(i),M=M==null?0:Ws(Dt(M),0,i.length),v=mi(v),i.slice(M,M+v.length)==v}function PN(i,v,M){var j=J.templateSettings;M&&jr(i,v,M)&&(v=t),i=cn(i),v=au({},v,j,xb);var G=au({},v.imports,j.imports,xb),ee=br(G),le=Mn(G,ee),de,ve,Ie=0,Le=v.interpolate||Ci,De="__p += '",Xe=Br((v.escape||Ci).source+"|"+Le.source+"|"+(Le===As?qi:Ci).source+"|"+(v.evaluate||Ci).source+"|$","g"),lt="//# sourceURL="+(dn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++co+"]")+`
|
1471
|
+
`;i.replace(Xe,function(wt,Ut,Qt,yi,Hr,bi){return Qt||(Qt=yi),De+=i.slice(Ie,bi).replace(Lr,X),Ut&&(de=!0,De+=`' +
|
1472
|
+
__e(`+Ut+`) +
|
1473
|
+
'`),Hr&&(ve=!0,De+=`';
|
1474
|
+
`+Hr+`;
|
1475
|
+
__p += '`),Qt&&(De+=`' +
|
1476
|
+
((__t = (`+Qt+`)) == null ? '' : __t) +
|
1477
|
+
'`),Ie=bi+wt.length,wt}),De+=`';
|
1478
|
+
`;var bt=dn.call(v,"variable")&&v.variable;if(!bt)De=`with (obj) {
|
1479
|
+
`+De+`
|
1480
|
+
}
|
1481
|
+
`;else if(Ja.test(bt))throw new dt(b);De=(ve?De.replace(Xr,""):De).replace(ji,"$1").replace(mo,"$1;"),De="function("+(bt||"obj")+`) {
|
1482
|
+
`+(bt?"":`obj || (obj = {});
|
1483
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
|
1484
|
+
function print() { __p += __j.call(arguments, '') }
|
1485
|
+
`:`;
|
1486
|
+
`)+De+`return __p
|
1487
|
+
}`;var Bt=pw(function(){return Ot(ee,lt+"return "+De).apply(t,le)});if(Bt.source=De,up(Bt))throw Bt;return Bt}function WN(i){return cn(i).toLowerCase()}function BN(i){return cn(i).toUpperCase()}function zN(i,v,M){if(i=cn(i),i&&(M||v===t))return Sn(i);if(!i||!(v=mi(v)))return i;var j=Tt(i),G=Tt(v),ee=Rt(j,G),le=or(j,G)+1;return is(j,ee,le).join("")}function jN(i,v,M){if(i=cn(i),i&&(M||v===t))return i.slice(0,zt(i)+1);if(!i||!(v=mi(v)))return i;var j=Tt(i),G=or(j,Tt(v))+1;return is(j,0,G).join("")}function HN(i,v,M){if(i=cn(i),i&&(M||v===t))return i.replace(Rn,"");if(!i||!(v=mi(v)))return i;var j=Tt(i),G=Rt(j,Tt(v));return is(j,G).join("")}function UN(i,v){var M=I,j=H;if(Nn(v)){var G="separator"in v?v.separator:G;M="length"in v?Dt(v.length):M,j="omission"in v?mi(v.omission):j}i=cn(i);var ee=i.length;if(oe(i)){var le=Tt(i);ee=le.length}if(M>=ee)return i;var de=M-Ht(j);if(de<1)return j;var ve=le?is(le,0,de).join(""):i.slice(0,de);if(G===t)return ve+j;if(le&&(de+=ve.length-de),hp(G)){if(i.slice(de).search(G)){var Ie,Le=ve;for(G.global||(G=Br(G.source,cn(ui.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Le);)var De=Ie.index;ve=ve.slice(0,De===t?de:De)}}else if(i.indexOf(mi(G),de)!=de){var Xe=ve.lastIndexOf(G);Xe>-1&&(ve=ve.slice(0,Xe))}return ve+j}function VN(i){return i=cn(i),i&&jo.test(i)?i.replace(xr,vt):i}var qN=Ca(function(i,v,M){return i+(M?" ":"")+v.toUpperCase()}),gp=gb("toUpperCase");function dw(i,v,M){return i=cn(i),v=M?t:v,v===t?ge(i)?In(i):Y(i):i.match(v)||[]}var pw=jt(function(i,v){try{return fr(i,t,v)}catch(M){return up(M)?M:new dt(M)}}),KN=Io(function(i,v){return Cr(v,function(M){M=po(M),Mo(i,M,lp(i[M],i))}),i});function GN(i){var v=i==null?0:i.length,M=yt();return i=v?y(i,function(j){if(typeof j[1]!="function")throw new gn(g);return[M(j[0]),j[1]]}):[],jt(function(j){for(var G=-1;++G<v;){var ee=i[G];if(fr(ee[0],this,j))return fr(ee[1],this,j)}})}function YN(i){return wL(Ii(i,a))}function fp(i){return function(){return i}}function XN(i,v){return i==null||i!==i?v:i}var QN=mb(),ZN=mb(!0);function ri(i){return i}function mp(i){return q0(typeof i=="function"?i:Ii(i,a))}function JN(i){return G0(Ii(i,a))}function eD(i,v){return Y0(i,Ii(v,a))}var tD=jt(function(i,v){return function(M){return cl(M,i,v)}}),nD=jt(function(i,v){return function(M){return cl(i,M,v)}});function vp(i,v,M){var j=br(v),G=jc(v,j);M==null&&!(Nn(v)&&(G.length||!j.length))&&(M=v,v=i,i=this,G=jc(v,br(v)));var ee=!(Nn(M)&&"chain"in M)||!!M.chain,le=Ro(i);return Cr(G,function(de){var ve=v[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Le=i(this.__wrapped__),De=Le.__actions__=ei(this.__actions__);return De.push({func:ve,args:arguments,thisArg:i}),Le.__chain__=Ie,Le}return ve.apply(i,T([this.value()],arguments))})}),i}function rD(){return pn._===this&&(pn._=MI),this}function yp(){}function iD(i){return i=Dt(i),jt(function(v){return X0(v,i)})}var oD=Yd(y),sD=Yd(kr),aD=Yd(W);function gw(i){return np(i)?be(po(i)):FL(i)}function lD(i){return function(v){return i==null?t:Bs(i,v)}}var cD=yb(),uD=yb(!0);function bp(){return[]}function wp(){return!1}function hD(){return{}}function dD(){return""}function pD(){return!0}function gD(i,v){if(i=Dt(i),i<1||i>U)return[];var M=te,j=Or(i,te);v=yt(v),i-=te;for(var G=et(j,v);++M<i;)v(M);return G}function fD(i){return Et(i)?y(i,po):vi(i)?[i]:ei(Ob(cn(i)))}function mD(i){var v=++$I;return cn(i)+v}var vD=Gc(function(i,v){return i+v},0),yD=Xd("ceil"),bD=Gc(function(i,v){return i/v},1),wD=Xd("floor");function xD(i){return i&&i.length?zc(i,ri,Nd):t}function CD(i,v){return i&&i.length?zc(i,yt(v,2),Nd):t}function kD(i){return me(i,ri)}function SD(i,v){return me(i,yt(v,2))}function _D(i){return i&&i.length?zc(i,ri,Wd):t}function AD(i,v){return i&&i.length?zc(i,yt(v,2),Wd):t}var $D=Gc(function(i,v){return i*v},1),TD=Xd("round"),MD=Gc(function(i,v){return i-v},0);function ED(i){return i&&i.length?ut(i,ri):0}function ID(i,v){return i&&i.length?ut(i,yt(v,2)):0}return J.after=JO,J.ary=Vb,J.assign=B2,J.assignIn=ow,J.assignInWith=au,J.assignWith=z2,J.at=j2,J.before=qb,J.bind=lp,J.bindAll=KN,J.bindKey=Kb,J.castArray=h2,J.chain=jb,J.chunk=wR,J.compact=xR,J.concat=CR,J.cond=GN,J.conforms=YN,J.constant=fp,J.countBy=EO,J.create=H2,J.curry=Gb,J.curryRight=Yb,J.debounce=Xb,J.defaults=U2,J.defaultsDeep=V2,J.defer=e2,J.delay=t2,J.difference=kR,J.differenceBy=SR,J.differenceWith=_R,J.drop=AR,J.dropRight=$R,J.dropRightWhile=TR,J.dropWhile=MR,J.fill=ER,J.filter=LO,J.flatMap=NO,J.flatMapDeep=DO,J.flatMapDepth=FO,J.flatten=Pb,J.flattenDeep=IR,J.flattenDepth=LR,J.flip=n2,J.flow=QN,J.flowRight=ZN,J.fromPairs=RR,J.functions=Z2,J.functionsIn=J2,J.groupBy=PO,J.initial=NR,J.intersection=DR,J.intersectionBy=FR,J.intersectionWith=PR,J.invert=tN,J.invertBy=nN,J.invokeMap=BO,J.iteratee=mp,J.keyBy=zO,J.keys=br,J.keysIn=ni,J.map=tu,J.mapKeys=iN,J.mapValues=oN,J.matches=JN,J.matchesProperty=eD,J.memoize=ru,J.merge=sN,J.mergeWith=sw,J.method=tD,J.methodOf=nD,J.mixin=vp,J.negate=iu,J.nthArg=iD,J.omit=aN,J.omitBy=lN,J.once=r2,J.orderBy=jO,J.over=oD,J.overArgs=i2,J.overEvery=sD,J.overSome=aD,J.partial=cp,J.partialRight=Qb,J.partition=HO,J.pick=cN,J.pickBy=aw,J.property=gw,J.propertyOf=lD,J.pull=jR,J.pullAll=Bb,J.pullAllBy=HR,J.pullAllWith=UR,J.pullAt=VR,J.range=cD,J.rangeRight=uD,J.rearg=o2,J.reject=qO,J.remove=qR,J.rest=s2,J.reverse=sp,J.sampleSize=GO,J.set=hN,J.setWith=dN,J.shuffle=YO,J.slice=KR,J.sortBy=ZO,J.sortedUniq=eO,J.sortedUniqBy=tO,J.split=NN,J.spread=a2,J.tail=nO,J.take=rO,J.takeRight=iO,J.takeRightWhile=oO,J.takeWhile=sO,J.tap=xO,J.throttle=l2,J.thru=eu,J.toArray=nw,J.toPairs=lw,J.toPairsIn=cw,J.toPath=fD,J.toPlainObject=iw,J.transform=pN,J.unary=c2,J.union=aO,J.unionBy=lO,J.unionWith=cO,J.uniq=uO,J.uniqBy=hO,J.uniqWith=dO,J.unset=gN,J.unzip=ap,J.unzipWith=zb,J.update=fN,J.updateWith=mN,J.values=_a,J.valuesIn=vN,J.without=pO,J.words=dw,J.wrap=u2,J.xor=gO,J.xorBy=fO,J.xorWith=mO,J.zip=vO,J.zipObject=yO,J.zipObjectDeep=bO,J.zipWith=wO,J.entries=lw,J.entriesIn=cw,J.extend=ow,J.extendWith=au,vp(J,J),J.add=vD,J.attempt=pw,J.camelCase=xN,J.capitalize=uw,J.ceil=yD,J.clamp=yN,J.clone=d2,J.cloneDeep=g2,J.cloneDeepWith=f2,J.cloneWith=p2,J.conformsTo=m2,J.deburr=hw,J.defaultTo=XN,J.divide=bD,J.endsWith=CN,J.eq=Xi,J.escape=kN,J.escapeRegExp=SN,J.every=IO,J.find=RO,J.findIndex=Db,J.findKey=q2,J.findLast=OO,J.findLastIndex=Fb,J.findLastKey=K2,J.floor=wD,J.forEach=Hb,J.forEachRight=Ub,J.forIn=G2,J.forInRight=Y2,J.forOwn=X2,J.forOwnRight=Q2,J.get=dp,J.gt=v2,J.gte=y2,J.has=eN,J.hasIn=pp,J.head=Wb,J.identity=ri,J.includes=WO,J.indexOf=OR,J.inRange=bN,J.invoke=rN,J.isArguments=Hs,J.isArray=Et,J.isArrayBuffer=b2,J.isArrayLike=ti,J.isArrayLikeObject=Jn,J.isBoolean=w2,J.isBuffer=os,J.isDate=x2,J.isElement=C2,J.isEmpty=k2,J.isEqual=S2,J.isEqualWith=_2,J.isError=up,J.isFinite=A2,J.isFunction=Ro,J.isInteger=Zb,J.isLength=ou,J.isMap=Jb,J.isMatch=$2,J.isMatchWith=T2,J.isNaN=M2,J.isNative=E2,J.isNil=L2,J.isNull=I2,J.isNumber=ew,J.isObject=Nn,J.isObjectLike=Vn,J.isPlainObject=fl,J.isRegExp=hp,J.isSafeInteger=R2,J.isSet=tw,J.isString=su,J.isSymbol=vi,J.isTypedArray=Sa,J.isUndefined=O2,J.isWeakMap=N2,J.isWeakSet=D2,J.join=WR,J.kebabCase=_N,J.last=Ri,J.lastIndexOf=BR,J.lowerCase=AN,J.lowerFirst=$N,J.lt=F2,J.lte=P2,J.max=xD,J.maxBy=CD,J.mean=kD,J.meanBy=SD,J.min=_D,J.minBy=AD,J.stubArray=bp,J.stubFalse=wp,J.stubObject=hD,J.stubString=dD,J.stubTrue=pD,J.multiply=$D,J.nth=zR,J.noConflict=rD,J.noop=yp,J.now=nu,J.pad=TN,J.padEnd=MN,J.padStart=EN,J.parseInt=IN,J.random=wN,J.reduce=UO,J.reduceRight=VO,J.repeat=LN,J.replace=RN,J.result=uN,J.round=TD,J.runInContext=pe,J.sample=KO,J.size=XO,J.snakeCase=ON,J.some=QO,J.sortedIndex=GR,J.sortedIndexBy=YR,J.sortedIndexOf=XR,J.sortedLastIndex=QR,J.sortedLastIndexBy=ZR,J.sortedLastIndexOf=JR,J.startCase=DN,J.startsWith=FN,J.subtract=MD,J.sum=ED,J.sumBy=ID,J.template=PN,J.times=gD,J.toFinite=Oo,J.toInteger=Dt,J.toLength=rw,J.toLower=WN,J.toNumber=Oi,J.toSafeInteger=W2,J.toString=cn,J.toUpper=BN,J.trim=zN,J.trimEnd=jN,J.trimStart=HN,J.truncate=UN,J.unescape=VN,J.uniqueId=mD,J.upperCase=qN,J.upperFirst=gp,J.each=Hb,J.eachRight=Ub,J.first=Wb,vp(J,function(){var i={};return uo(J,function(v,M){dn.call(J.prototype,M)||(i[M]=v)}),i}(),{chain:!1}),J.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),Cr(["drop","take"],function(i,v){Gt.prototype[i]=function(M){M=M===t?1:pr(Dt(M),0);var j=this.__filtered__&&!v?new Gt(this):this.clone();return j.__filtered__?j.__takeCount__=Or(M,j.__takeCount__):j.__views__.push({size:Or(M,te),type:i+(j.__dir__<0?"Right":"")}),j},Gt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),Cr(["filter","map","takeWhile"],function(i,v){var M=v+1,j=M==A||M==N;Gt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:yt(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),Cr(["head","last"],function(i,v){var M="take"+(v?"Right":"");Gt.prototype[i]=function(){return this[M](1).value()[0]}}),Cr(["initial","tail"],function(i,v){var M="drop"+(v?"":"Right");Gt.prototype[i]=function(){return this.__filtered__?new Gt(this):this[M](1)}}),Gt.prototype.compact=function(){return this.filter(ri)},Gt.prototype.find=function(i){return this.filter(i).head()},Gt.prototype.findLast=function(i){return this.reverse().find(i)},Gt.prototype.invokeMap=jt(function(i,v){return typeof i=="function"?new Gt(this):this.map(function(M){return cl(M,i,v)})}),Gt.prototype.reject=function(i){return this.filter(iu(yt(i)))},Gt.prototype.slice=function(i,v){i=Dt(i);var M=this;return M.__filtered__&&(i>0||v<0)?new Gt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),v!==t&&(v=Dt(v),M=v<0?M.dropRight(-v):M.take(v-i)),M)},Gt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Gt.prototype.toArray=function(){return this.take(te)},uo(Gt.prototype,function(i,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),j=/^(?:head|last)$/.test(v),G=J[j?"take"+(v=="last"?"Right":""):v],ee=j||/^find/.test(v);G&&(J.prototype[v]=function(){var le=this.__wrapped__,de=j?[1]:arguments,ve=le instanceof Gt,Ie=de[0],Le=ve||Et(le),De=function(Ut){var Qt=G.apply(J,T([Ut],de));return j&&Xe?Qt[0]:Qt};Le&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Le=!1);var Xe=this.__chain__,lt=!!this.__actions__.length,bt=ee&&!Xe,Bt=ve&&!lt;if(!ee&&Le){le=Bt?le:new Gt(this);var wt=i.apply(le,de);return wt.__actions__.push({func:eu,args:[De],thisArg:t}),new Ei(wt,Xe)}return bt&&Bt?i.apply(this,de):(wt=this.thru(De),bt?j?wt.value()[0]:wt.value():wt)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(i){var v=yr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return v.apply(Et(ee)?ee:[],G)}return this[M](function(le){return v.apply(Et(le)?le:[],G)})}}),uo(Gt.prototype,function(i,v){var M=J[v];if(M){var j=M.name+"";dn.call(ba,j)||(ba[j]=[]),ba[j].push({name:v,func:M})}}),ba[Kc(t,w).name]=[{name:"wrapper",func:t}],Gt.prototype.clone=VI,Gt.prototype.reverse=qI,Gt.prototype.value=KI,J.prototype.at=CO,J.prototype.chain=kO,J.prototype.commit=SO,J.prototype.next=_O,J.prototype.plant=$O,J.prototype.reverse=TO,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=MO,J.prototype.first=J.prototype.head,nl&&(J.prototype[nl]=AO),J},Xt=sr();ir?((ir.exports=Xt)._=Xt,An._=Xt):pn._=Xt}).call(Wk)}(Wl,Wl.exports)),Wl.exports}var zk=Bk();ar("O",bl(zk)).debounce(function(){this.rebuildDisplayText()},300);var _f={exports:{}},Af;function jk(){return Af||(Af=1,function(n,e){(function(){ace.require(["ace/mode/text"],function(t){n&&(n.exports=t)})})()}(_f)),_f.exports}jk();const Hk=!0,lr="u-",Uk="uplot",Vk=lr+"hz",qk=lr+"vt",Kk=lr+"title",Gk=lr+"wrap",Yk=lr+"under",Xk=lr+"over",Qk=lr+"axis",ms=lr+"off",Zk=lr+"select",Jk=lr+"cursor-x",eS=lr+"cursor-y",tS=lr+"cursor-pt",nS=lr+"legend",rS=lr+"live",iS=lr+"inline",oS=lr+"series",sS=lr+"marker",$f=lr+"label",aS=lr+"value",Da="width",Fa="height",Pa="top",Tf="bottom",Qs="left",Wu="right",Bu="#000",Mf=Bu+"0",zu="mousemove",Ef="mousedown",ju="mouseup",If="mouseenter",Lf="mouseleave",Rf="dblclick",lS="resize",cS="scroll",Of="change",Bl="dppxchange",Hu="--",Zs=typeof window<"u",Uu=Zs?document:null,Js=Zs?window:null,uS=Zs?navigator:null;let nn,zl;function Vu(){let n=devicePixelRatio;nn!=n&&(nn=n,zl&&Gu(Of,zl,Vu),zl=matchMedia(`(min-resolution: ${nn-.001}dppx) and (max-resolution: ${nn+.001}dppx)`),vs(Of,zl,Vu),Js.dispatchEvent(new CustomEvent(Bl)))}function oi(n,e){if(e!=null){let t=n.classList;!t.contains(e)&&t.add(e)}}function qu(n,e){let t=n.classList;t.contains(e)&&t.remove(e)}function _n(n,e,t){n.style[e]=t+"px"}function Pi(n,e,t,r){let d=Uu.createElement(n);return e!=null&&oi(d,e),t!=null&&t.insertBefore(d,r),d}function wi(n,e){return Pi("div",n,e)}const Nf=new WeakMap;function eo(n,e,t,r,d){let p="translate("+e+"px,"+t+"px)",g=Nf.get(n);p!=g&&(n.style.transform=p,Nf.set(n,p),e<0||t<0||e>r||t>d?oi(n,ms):qu(n,ms))}const Df=new WeakMap;function Ff(n,e,t){let r=e+t,d=Df.get(n);r!=d&&(Df.set(n,r),n.style.background=e,n.style.borderColor=t)}const Pf=new WeakMap;function Wf(n,e,t,r){let d=e+""+t,p=Pf.get(n);d!=p&&(Pf.set(n,d),n.style.height=t+"px",n.style.width=e+"px",n.style.marginLeft=r?-e/2+"px":0,n.style.marginTop=r?-t/2+"px":0)}const Ku={passive:!0},hS={...Ku,capture:!0};function vs(n,e,t,r){e.addEventListener(n,t,r?hS:Ku)}function Gu(n,e,t,r){e.removeEventListener(n,t,Ku)}Zs&&Vu();function Wi(n,e,t,r){let d;t=t||0,r=r||e.length-1;let p=r<=2147483647;for(;r-t>1;)d=p?t+r>>1:ai((t+r)/2),e[d]<n?t=d:r=d;return n-e[t]<=e[r]-n?t:r}function Bf(n){return(e,t,r)=>{let d=-1,p=-1;for(let g=t;g<=r;g++)if(n(e[g])){d=g;break}for(let g=r;g>=t;g--)if(n(e[g])){p=g;break}return[d,p]}}const zf=n=>n!=null,jf=n=>n!=null&&n>0,jl=Bf(zf),dS=Bf(jf);function pS(n,e,t,r=0,d=!1){let p=d?dS:jl,g=d?jf:zf;[e,t]=p(n,e,t);let b=n[e],h=n[e];if(e>-1)if(r==1)b=n[e],h=n[t];else if(r==-1)b=n[t],h=n[e];else for(let f=e;f<=t;f++){let o=n[f];g(o)&&(o<b?b=o:o>h&&(h=o))}return[b??fn,h??-fn]}function Hl(n,e,t,r){let d=Vf(n),p=Vf(e);n==e&&(d==-1?(n*=t,e/=t):(n/=t,e*=t));let g=t==10?go:qf,b=d==1?ai:xi,h=p==1?xi:ai,f=b(g(cr(n))),o=h(g(cr(e))),a=ea(t,f),c=ea(t,o);return t==10&&(f<0&&(a=mn(a,-f)),o<0&&(c=mn(c,-o))),r||t==2?(n=a*d,e=c*p):(n=Jf(n,a),e=ql(e,c)),[n,e]}function Yu(n,e,t,r){let d=Hl(n,e,t,r);return n==0&&(d[0]=0),e==0&&(d[1]=0),d}const Xu=.1,Hf={mode:3,pad:Xu},Wa={pad:0,soft:null,mode:0},gS={min:Wa,max:Wa};function Ul(n,e,t,r){return Kl(t)?Uf(n,e,t):(Wa.pad=t,Wa.soft=r?0:null,Wa.mode=r?3:0,Uf(n,e,gS))}function en(n,e){return n??e}function fS(n,e,t){for(e=en(e,0),t=en(t,n.length-1);e<=t;){if(n[e]!=null)return!0;e++}return!1}function Uf(n,e,t){let r=t.min,d=t.max,p=en(r.pad,0),g=en(d.pad,0),b=en(r.hard,-fn),h=en(d.hard,fn),f=en(r.soft,fn),o=en(d.soft,-fn),a=en(r.mode,0),c=en(d.mode,0),l=e-n,s=go(l),u=Dr(cr(n),cr(e)),m=go(u),w=cr(m-s);(l<1e-24||w>10)&&(l=0,(n==0||e==0)&&(l=1e-24,a==2&&f!=fn&&(p=0),c==2&&o!=-fn&&(g=0)));let x=l||u||1e3,E=go(x),$=ea(10,ai(E)),k=x*(l==0?n==0?.1:1:p),C=mn(Jf(n-k,$/10),24),L=n>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:fn,R=Dr(b,C<L&&n>=L?L:Bi(L,C)),F=x*(l==0?e==0?.1:1:g),I=mn(ql(e+F,$/10),24),H=e<=o&&(c==1||c==3&&I>=o||c==2&&I<=o)?o:-fn,P=Bi(h,I>H&&e<=H?H:Dr(H,I));return R==P&&R==0&&(P=100),[R,P]}const mS=new Intl.NumberFormat(Zs?uS.language:"en-US"),Qu=n=>mS.format(n),si=Math,Vl=si.PI,cr=si.abs,ai=si.floor,ur=si.round,xi=si.ceil,Bi=si.min,Dr=si.max,ea=si.pow,Vf=si.sign,go=si.log10,qf=si.log2,vS=(n,e=1)=>si.sinh(n)*e,Zu=(n,e=1)=>si.asinh(n/e),fn=1/0;function Kf(n){return(go((n^n>>31)-(n>>31))|0)+1}function Ju(n,e,t){return Bi(Dr(n,e),t)}function Gf(n){return typeof n=="function"}function Vt(n){return Gf(n)?n:()=>n}const yS=()=>{},Yf=n=>n,Xf=(n,e)=>e,bS=n=>null,Qf=n=>!0,Zf=(n,e)=>n==e,wS=/\.\d*?(?=9{6,}|0{6,})/gm,ys=n=>{if(tm(n)||Bo.has(n))return n;const e=`${n}`,t=e.match(wS);if(t==null)return n;let r=t[0].length-1;if(e.indexOf("e-")!=-1){let[d,p]=e.split("e");return+`${ys(d)}e${p}`}return mn(n,r)};function bs(n,e){return ys(mn(ys(n/e))*e)}function ql(n,e){return ys(xi(ys(n/e))*e)}function Jf(n,e){return ys(ai(ys(n/e))*e)}function mn(n,e=0){if(tm(n))return n;let t=10**e,r=n*t*(1+Number.EPSILON);return ur(r)/t}const Bo=new Map;function em(n){return((""+n).split(".")[1]||"").length}function Ba(n,e,t,r){let d=[],p=r.map(em);for(let g=e;g<t;g++){let b=cr(g),h=mn(ea(n,g),b);for(let f=0;f<r.length;f++){let o=n==10?+`${r[f]}e${g}`:r[f]*h,a=(g>=0?0:b)+(g>=p[f]?0:p[f]),c=n==10?o:mn(o,a);d.push(c),Bo.set(c,a)}}return d}const za={},eh=[],ta=[null,null],zo=Array.isArray,tm=Number.isInteger,xS=n=>n===void 0;function nm(n){return typeof n=="string"}function Kl(n){let e=!1;if(n!=null){let t=n.constructor;e=t==null||t==Object}return e}function CS(n){return n!=null&&typeof n=="object"}const kS=Object.getPrototypeOf(Uint8Array),rm="__proto__";function na(n,e=Kl){let t;if(zo(n)){let r=n.find(d=>d!=null);if(zo(r)||e(r)){t=Array(n.length);for(let d=0;d<n.length;d++)t[d]=na(n[d],e)}else t=n.slice()}else if(n instanceof kS)t=n.slice();else if(e(n)){t={};for(let r in n)r!=rm&&(t[r]=na(n[r],e))}else t=n;return t}function nr(n){let e=arguments;for(let t=1;t<e.length;t++){let r=e[t];for(let d in r)d!=rm&&(Kl(n[d])?nr(n[d],na(r[d])):n[d]=na(r[d]))}return n}const SS=0,_S=1,AS=2;function $S(n,e,t){for(let r=0,d,p=-1;r<e.length;r++){let g=e[r];if(g>p){for(d=g-1;d>=0&&n[d]==null;)n[d--]=null;for(d=g+1;d<t&&n[d]==null;)n[p=d++]=null}}}function TS(n,e){if(IS(n)){let g=n[0].slice();for(let b=1;b<n.length;b++)g.push(...n[b].slice(1));return LS(g[0])||(g=ES(g)),g}let t=new Set;for(let g=0;g<n.length;g++){let b=n[g][0],h=b.length;for(let f=0;f<h;f++)t.add(b[f])}let r=[Array.from(t).sort((g,b)=>g-b)],d=r[0].length,p=new Map;for(let g=0;g<d;g++)p.set(r[0][g],g);for(let g=0;g<n.length;g++){let b=n[g],h=b[0];for(let f=1;f<b.length;f++){let o=b[f],a=Array(d).fill(void 0),c=e?e[g][f]:_S,l=[];for(let s=0;s<o.length;s++){let u=o[s],m=p.get(h[s]);u===null?c!=SS&&(a[m]=u,c==AS&&l.push(m)):a[m]=u}$S(a,l,d),r.push(a)}}return r}const MS=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function ES(n){let e=n[0],t=e.length,r=Array(t);for(let p=0;p<r.length;p++)r[p]=p;r.sort((p,g)=>e[p]-e[g]);let d=[];for(let p=0;p<n.length;p++){let g=n[p],b=Array(t);for(let h=0;h<t;h++)b[h]=g[r[h]];d.push(b)}return d}function IS(n){let e=n[0][0],t=e.length;for(let r=1;r<n.length;r++){let d=n[r][0];if(d.length!=t)return!1;if(d!=e){for(let p=0;p<t;p++)if(d[p]!=e[p])return!1}}return!0}function LS(n,e=100){const t=n.length;if(t<=1)return!0;let r=0,d=t-1;for(;r<=d&&n[r]==null;)r++;for(;d>=r&&n[d]==null;)d--;if(d<=r)return!0;const p=Dr(1,ai((d-r+1)/e));for(let g=n[r],b=r+p;b<=d;b+=p){const h=n[b];if(h!=null){if(h<=g)return!1;g=h}}return!0}const im=["January","February","March","April","May","June","July","August","September","October","November","December"],om=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function sm(n){return n.slice(0,3)}const RS=om.map(sm),OS=im.map(sm),NS={MMMM:im,MMM:OS,WWWW:om,WWW:RS};function ja(n){return(n<10?"0":"")+n}function DS(n){return(n<10?"00":n<100?"0":"")+n}const FS={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,e)=>e.MMMM[n.getMonth()],MMM:(n,e)=>e.MMM[n.getMonth()],MM:n=>ja(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>ja(n.getDate()),D:n=>n.getDate(),WWWW:(n,e)=>e.WWWW[n.getDay()],WWW:(n,e)=>e.WWW[n.getDay()],HH:n=>ja(n.getHours()),H:n=>n.getHours(),h:n=>{let e=n.getHours();return e==0?12:e>12?e-12:e},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>ja(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>ja(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>DS(n.getMilliseconds())};function th(n,e){e=e||NS;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)t.push(d[0][0]=="{"?FS[d[1]]:d[0]);return p=>{let g="";for(let b=0;b<t.length;b++)g+=typeof t[b]=="string"?t[b]:t[b](p,e);return g}}const PS=new Intl.DateTimeFormat().resolvedOptions().timeZone;function WS(n,e){let t;return e=="UTC"||e=="Etc/UTC"?t=new Date(+n+n.getTimezoneOffset()*6e4):e==PS?t=n:(t=new Date(n.toLocaleString("en-US",{timeZone:e})),t.setMilliseconds(n.getMilliseconds())),t}const am=n=>n%1==0,Gl=[1,2,2.5,5],BS=Ba(10,-32,0,Gl),lm=Ba(10,0,32,Gl),zS=lm.filter(am),ws=BS.concat(lm),nh=`
|
1488
|
+
`,cm="{YYYY}",um=nh+cm,hm="{M}/{D}",Ha=nh+hm,Yl=Ha+"/{YY}",dm="{aa}",jS="{h}:{mm}",ra=jS+dm,pm=nh+ra,gm=":{ss}",ln=null;function fm(n){let e=n*1e3,t=e*60,r=t*60,d=r*24,p=d*30,g=d*365,b=(n==1?Ba(10,0,3,Gl).filter(am):Ba(10,-3,0,Gl)).concat([e,e*5,e*10,e*15,e*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,d,d*2,d*3,d*4,d*5,d*6,d*7,d*8,d*9,d*10,d*15,p,p*2,p*3,p*4,p*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const h=[[g,cm,ln,ln,ln,ln,ln,ln,1],[d*28,"{MMM}",um,ln,ln,ln,ln,ln,1],[d,hm,um,ln,ln,ln,ln,ln,1],[r,"{h}"+dm,Yl,ln,Ha,ln,ln,ln,1],[t,ra,Yl,ln,Ha,ln,ln,ln,1],[e,gm,Yl+" "+ra,ln,Ha+" "+ra,ln,pm,ln,1],[n,gm+".{fff}",Yl+" "+ra,ln,Ha+" "+ra,ln,pm,ln,1]];function f(o){return(a,c,l,s,u,m)=>{let w=[],x=u>=g,E=u>=p&&u<g,$=o(l),k=mn($*n,3),C=rh($.getFullYear(),x?0:$.getMonth(),E||x?1:$.getDate()),L=mn(C*n,3);if(E||x){let R=E?u/p:0,F=x?u/g:0,I=k==L?k:mn(rh(C.getFullYear()+F,C.getMonth()+R,1)*n,3),H=new Date(ur(I/n)),P=H.getFullYear(),O=H.getMonth();for(let A=0;I<=s;A++){let _=rh(P+F*A,O+R*A,1),N=_-o(mn(_*n,3));I=mn((+_+N)*n,3),I<=s&&w.push(I)}}else{let R=u>=d?d:u,F=ai(l)-ai(k),I=L+F+ql(k-L,R);w.push(I);let H=o(I),P=H.getHours()+H.getMinutes()/t+H.getSeconds()/r,O=u/r,A=a.axes[c]._space,_=m/A;for(;I=mn(I+u,n==1?0:3),!(I>s);)if(O>1){let N=ai(mn(P+O,6))%24,B=o(I).getHours()-N;B>1&&(B=-1),I-=B*r,P=(P+O)%24;let U=w[w.length-1];mn((I-U)/u,3)*_>=.7&&w.push(I)}else w.push(I)}return w}}return[b,h,f]}const[HS,US,VS]=fm(1),[qS,KS,GS]=fm(.001);Ba(2,-53,53,[1]);function mm(n,e){return n.map(t=>t.map((r,d)=>d==0||d==8||r==null?r:e(d==1||t[8]==0?r:t[1]+r)))}function vm(n,e){return(t,r,d,p,g)=>{let b=e.find(s=>g>=s[0])||e[e.length-1],h,f,o,a,c,l;return r.map(s=>{let u=n(s),m=u.getFullYear(),w=u.getMonth(),x=u.getDate(),E=u.getHours(),$=u.getMinutes(),k=u.getSeconds(),C=m!=h&&b[2]||w!=f&&b[3]||x!=o&&b[4]||E!=a&&b[5]||$!=c&&b[6]||k!=l&&b[7]||b[1];return h=m,f=w,o=x,a=E,c=$,l=k,C(u)})}}function YS(n,e){let t=th(e);return(r,d,p,g,b)=>d.map(h=>t(n(h)))}function rh(n,e,t){return new Date(n,e,t)}function ym(n,e){return e(n)}const XS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function bm(n,e){return(t,r,d,p)=>p==null?Hu:e(n(r))}function QS(n,e){let t=n.series[e];return t.width?t.stroke(n,e):t.points.width?t.points.stroke(n,e):null}function ZS(n,e){return n.series[e].fill(n,e)}const JS={show:!0,live:!0,isolate:!1,mount:yS,markers:{show:!0,width:2,stroke:QS,fill:ZS,dash:"solid"},idx:null,idxs:null,values:[]};function e_(n,e){let t=n.cursor.points,r=wi(),d=t.size(n,e);_n(r,Da,d),_n(r,Fa,d);let p=d/-2;_n(r,"marginLeft",p),_n(r,"marginTop",p);let g=t.width(n,e,d);return g&&_n(r,"borderWidth",g),r}function t_(n,e){let t=n.series[e].points;return t._fill||t._stroke}function n_(n,e){let t=n.series[e].points;return t._stroke||t._fill}function r_(n,e){return n.series[e].points.size}const ih=[0,0];function i_(n,e,t){return ih[0]=e,ih[1]=t,ih}function Xl(n,e,t,r=!0){return d=>{d.button==0&&(!r||d.target==e)&&t(d)}}function oh(n,e,t,r=!0){return d=>{(!r||d.target==e)&&t(d)}}const o_={show:!0,x:!0,y:!0,lock:!1,move:i_,points:{one:!1,show:e_,size:r_,width:0,stroke:n_,fill:t_},bind:{mousedown:Xl,mouseup:Xl,click:Xl,dblclick:Xl,mousemove:oh,mouseleave:oh,mouseenter:oh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,e,t,r,d)=>r-d,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},wm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},sh=nr({},wm,{filter:Xf}),xm=nr({},sh,{size:10}),Cm=nr({},wm,{show:!1}),ah='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',km="bold "+ah,Sm=1.5,_m={show:!0,scale:"x",stroke:Bu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:km,side:2,grid:sh,ticks:xm,border:Cm,font:ah,lineGap:Sm,rotate:0},s_="Value",a_="Time",Am={show:!0,scale:"x",auto:!1,sorted:1,min:fn,max:-fn,idxs:[]};function l_(n,e,t,r,d){return e.map(p=>p==null?"":Qu(p))}function c_(n,e,t,r,d,p,g){let b=[],h=Bo.get(d)||0;t=g?t:mn(ql(t,d),h);for(let f=t;f<=r;f=mn(f+d,h))b.push(Object.is(f,-0)?0:f);return b}function lh(n,e,t,r,d,p,g){const b=[],h=n.scales[n.axes[e].scale].log,f=h==10?go:qf,o=ai(f(t));d=ea(h,o),h==10&&(d=ws[Wi(d,ws)]);let a=t,c=d*h;h==10&&(c=ws[Wi(c,ws)]);do b.push(a),a=a+d,h==10&&!Bo.has(a)&&(a=mn(a,Bo.get(d))),a>=c&&(d=a,c=d*h,h==10&&(c=ws[Wi(c,ws)]));while(a<=r);return b}function u_(n,e,t,r,d,p,g){let b=n.scales[n.axes[e].scale].asinh,h=r>b?lh(n,e,Dr(b,t),r,d):[b],f=r>=0&&t<=0?[0]:[];return(t<-b?lh(n,e,Dr(b,-r),-t,d):[b]).reverse().map(o=>-o).concat(f,h)}const $m=/./,h_=/[12357]/,d_=/[125]/,Tm=/1/,ch=(n,e,t,r)=>n.map((d,p)=>e==4&&d==0||p%r==0&&t.test(d.toExponential()[d<0?1:0])?d:null);function p_(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=n.scales[g],h=n.valToPos,f=p._space,o=h(10,g),a=h(9,g)-o>=f?$m:h(7,g)-o>=f?h_:h(5,g)-o>=f?d_:Tm;if(a==Tm){let c=cr(h(1,g)-o);if(c<f)return ch(e.slice().reverse(),b.distr,a,xi(f/c)).reverse()}return ch(e,b.distr,a,1)}function g_(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=p._space,h=n.valToPos,f=cr(h(1,g)-h(2,g));return f<b?ch(e.slice().reverse(),3,$m,xi(b/f)).reverse():e}function f_(n,e,t,r){return r==null?Hu:e==null?"":Qu(e)}const Mm={show:!0,scale:"y",stroke:Bu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:km,side:3,grid:sh,ticks:xm,border:Cm,font:ah,lineGap:Sm,rotate:0};function m_(n,e){let t=3+(n||1)*2;return mn(t*e,3)}function v_(n,e){let{scale:t,idxs:r}=n.series[0],d=n._data[0],p=n.valToPos(d[r[0]],t,!0),g=n.valToPos(d[r[1]],t,!0),b=cr(g-p),h=n.series[e],f=b/(h.points.space*nn);return r[1]-r[0]<=f}const Em={scale:null,auto:!0,sorted:0,min:fn,max:-fn},Im=(n,e,t,r,d)=>d,Lm={show:!0,auto:!0,sorted:0,gaps:Im,alpha:1,facets:[nr({},Em,{scale:"x"}),nr({},Em,{scale:"y"})]},Rm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Im,alpha:1,points:{show:v_,filter:null},values:null,min:fn,max:-fn,idxs:[],path:null,clip:null};function y_(n,e,t,r,d){return t/10}const Om={time:Hk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},b_=nr({},Om,{time:!1,ori:1}),Nm={};function Dm(n,e){let t=Nm[n];return t||(t={key:n,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(d=>d!=r)},pub(r,d,p,g,b,h,f){for(let o=0;o<t.plots.length;o++)t.plots[o]!=d&&t.plots[o].pub(r,d,p,g,b,h,f)}},n!=null&&(Nm[n]=t)),t}const ia=1,uh=2;function xs(n,e,t){const r=n.mode,d=n.series[e],p=r==2?n._data[e]:n._data,g=n.scales,b=n.bbox;let h=p[0],f=r==2?p[1]:p[e],o=r==2?g[d.facets[0].scale]:g[n.series[0].scale],a=r==2?g[d.facets[1].scale]:g[d.scale],c=b.left,l=b.top,s=b.width,u=b.height,m=n.valToPosH,w=n.valToPosV;return o.ori==0?t(d,h,f,o,a,m,w,c,l,s,u,Zl,oa,ec,Wm,zm):t(d,h,f,o,a,w,m,l,c,u,s,Jl,sa,ph,Bm,jm)}function hh(n,e){let t=0,r=0,d=en(n.bands,eh);for(let p=0;p<d.length;p++){let g=d[p];g.series[0]==e?t=g.dir:g.series[1]==e&&(g.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function w_(n,e,t,r,d){let p=n.mode,g=n.series[e],b=p==2?g.facets[1].scale:g.scale,h=n.scales[b];return d==-1?h.min:d==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function fo(n,e,t,r,d,p){return xs(n,e,(g,b,h,f,o,a,c,l,s,u,m)=>{let w=g.pxRound;const x=f.dir*(f.ori==0?1:-1),E=f.ori==0?oa:sa;let $,k;x==1?($=t,k=r):($=r,k=t);let C=w(a(b[$],f,u,l)),L=w(c(h[$],o,m,s)),R=w(a(b[k],f,u,l)),F=w(c(p==1?o.max:o.min,o,m,s)),I=new Path2D(d);return E(I,R,F),E(I,C,F),E(I,C,L),I})}function Ql(n,e,t,r,d,p){let g=null;if(n.length>0){g=new Path2D;const b=e==0?ec:ph;let h=t;for(let a=0;a<n.length;a++){let c=n[a];if(c[1]>c[0]){let l=c[0]-h;l>0&&b(g,h,r,l,r+p),h=c[1]}}let f=t+d-h,o=10;f>0&&b(g,h,r-o/2,f,r+p+o)}return g}function x_(n,e,t){let r=n[n.length-1];r&&r[0]==e?r[1]=t:n.push([e,t])}function dh(n,e,t,r,d,p,g){let b=[],h=n.length;for(let f=d==1?t:r;f>=t&&f<=r;f+=d)if(e[f]===null){let o=f,a=f;if(d==1)for(;++f<=r&&e[f]===null;)a=f;else for(;--f>=t&&e[f]===null;)a=f;let c=p(n[o]),l=a==o?c:p(n[a]),s=o-d;c=g<=0&&s>=0&&s<h?p(n[s]):c;let u=a+d;l=g>=0&&u>=0&&u<h?p(n[u]):l,l>=c&&b.push([c,l])}return b}function Fm(n){return n==0?Yf:n==1?ur:e=>bs(e,n)}function Pm(n){let e=n==0?Zl:Jl,t=n==0?(d,p,g,b,h,f)=>{d.arcTo(p,g,b,h,f)}:(d,p,g,b,h,f)=>{d.arcTo(g,p,h,b,f)},r=n==0?(d,p,g,b,h)=>{d.rect(p,g,b,h)}:(d,p,g,b,h)=>{d.rect(g,p,h,b)};return(d,p,g,b,h,f=0,o=0)=>{f==0&&o==0?r(d,p,g,b,h):(f=Bi(f,b/2,h/2),o=Bi(o,b/2,h/2),e(d,p+f,g),t(d,p+b,g,p+b,g+h,f),t(d,p+b,g+h,p,g+h,o),t(d,p,g+h,p,g,o),t(d,p,g,p+b,g,f),d.closePath())}}const Zl=(n,e,t)=>{n.moveTo(e,t)},Jl=(n,e,t)=>{n.moveTo(t,e)},oa=(n,e,t)=>{n.lineTo(e,t)},sa=(n,e,t)=>{n.lineTo(t,e)},ec=Pm(0),ph=Pm(1),Wm=(n,e,t,r,d,p)=>{n.arc(e,t,r,d,p)},Bm=(n,e,t,r,d,p)=>{n.arc(t,e,r,d,p)},zm=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(e,t,r,d,p,g)},jm=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(t,e,d,r,g,p)};function Hm(n){return(e,t,r,d,p)=>xs(e,t,(g,b,h,f,o,a,c,l,s,u,m)=>{let{pxRound:w,points:x}=g,E,$;f.ori==0?(E=Zl,$=Wm):(E=Jl,$=Bm);const k=mn(x.width*nn,3);let C=(x.size-x.width)/2*nn,L=mn(C*2,3),R=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;ec(F,I-L,H-L,P+L*2,O+L*2);const A=_=>{if(h[_]!=null){let N=w(a(b[_],f,u,l)),B=w(c(h[_],o,m,s));E(R,N+C,B),$(R,N,B,C,0,Vl*2)}};if(p)p.forEach(A);else for(let _=r;_<=d;_++)A(_);return{stroke:k>0?R:null,fill:R,clip:F,flags:ia|uh}})}function Um(n){return(e,t,r,d,p,g)=>{r!=d&&(p!=r&&g!=r&&n(e,t,r),p!=d&&g!=d&&n(e,t,d),n(e,t,g))}}const C_=Um(oa),k_=Um(sa);function Vm(n){const e=en(n==null?void 0:n.alignGaps,0);return(t,r,d,p)=>xs(t,r,(g,b,h,f,o,a,c,l,s,u,m)=>{[d,p]=jl(h,d,p);let w=g.pxRound,x=P=>w(a(P,f,u,l)),E=P=>w(c(P,o,m,s)),$,k;f.ori==0?($=oa,k=C_):($=sa,k=k_);const C=f.dir*(f.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},R=L.stroke;let F=!1;if(p-d>=u*4){let P=he=>t.posToVal(he,f.key,!0),O=null,A=null,_,N,B,U=x(b[C==1?d:p]),K=x(b[d]),Z=x(b[p]),te=P(C==1?K+1:Z-1);for(let he=C==1?d:p;he>=d&&he<=p;he+=C){let ne=b[he],ae=(C==1?ne<te:ne>te)?U:x(ne),ue=h[he];ae==U?ue!=null?(N=ue,O==null?($(R,ae,E(N)),_=O=A=N):N<O?O=N:N>A&&(A=N)):ue===null&&(F=!0):(O!=null&&k(R,U,E(O),E(A),E(_),E(N)),ue!=null?(N=ue,$(R,ae,E(N)),O=A=_=N):(O=A=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=A&&B!=U&&k(R,U,E(O),E(A),E(_),E(N))}else for(let P=C==1?d:p;P>=d&&P<=p;P+=C){let O=h[P];O===null?F=!0:O!=null&&$(R,x(b[P]),E(O))}let[I,H]=hh(t,r);if(g.fill!=null||I!=0){let P=L.fill=new Path2D(R),O=g.fillTo(t,r,g.min,g.max,I),A=E(O),_=x(b[d]),N=x(b[p]);C==-1&&([N,_]=[_,N]),$(P,N,A),$(P,_,A)}if(!g.spanGaps){let P=[];F&&P.push(...dh(b,h,d,p,C,x,e)),L.gaps=P=g.gaps(t,r,d,p,P),L.clip=Ql(P,f.ori,l,s,u,m)}return H!=0&&(L.band=H==2?[fo(t,r,d,p,R,-1),fo(t,r,d,p,R,1)]:fo(t,r,d,p,R,H)),L})}function S_(n){const e=en(n.align,1),t=en(n.ascDesc,!1),r=en(n.alignGaps,0),d=en(n.extend,!1);return(p,g,b,h)=>xs(p,g,(f,o,a,c,l,s,u,m,w,x,E)=>{[b,h]=jl(a,b,h);let $=f.pxRound,{left:k,width:C}=p.bbox,L=Z=>$(s(Z,c,x,m)),R=Z=>$(u(Z,l,E,w)),F=c.ori==0?oa:sa;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},H=I.stroke,P=c.dir*(c.ori==0?1:-1);let O=R(a[P==1?b:h]),A=L(o[P==1?b:h]),_=A,N=A;d&&e==-1&&(N=k,F(H,N,O)),F(H,A,O);for(let Z=P==1?b:h;Z>=b&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=L(o[Z]),ne=R(te);e==1?F(H,he,O):F(H,_,ne),F(H,he,ne),O=ne,_=he}let B=_;d&&e==1&&(B=k+C,F(H,B,O));let[U,K]=hh(p,g);if(f.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=f.fillTo(p,g,f.min,f.max,U),he=R(te);F(Z,B,he),F(Z,N,he)}if(!f.spanGaps){let Z=[];Z.push(...dh(o,a,b,h,P,L,r));let te=f.width*nn/2,he=t||e==1?te:-te,ne=t||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=f.gaps(p,g,b,h,Z),I.clip=Ql(Z,c.ori,m,w,x,E)}return K!=0&&(I.band=K==2?[fo(p,g,b,h,H,-1),fo(p,g,b,h,H,1)]:fo(p,g,b,h,H,K)),I})}function qm(n,e,t,r,d,p,g=fn){if(n.length>1){let b=null;for(let h=0,f=1/0;h<n.length;h++)if(e[h]!==void 0){if(b!=null){let o=cr(n[h]-n[b]);o<f&&(f=o,g=cr(t(n[h],r,d,p)-t(n[b],r,d,p)))}b=h}}return g}function __(n){n=n||za;const e=en(n.size,[.6,fn,1]),t=n.align||0,r=n.gap||0;let d=n.radius;d=d==null?[0,0]:typeof d=="number"?[d,0]:d;const p=Vt(d),g=1-e[0],b=en(e[1],fn),h=en(e[2],1),f=en(n.disp,za),o=en(n.each,l=>{}),{fill:a,stroke:c}=f;return(l,s,u,m)=>xs(l,s,(w,x,E,$,k,C,L,R,F,I,H)=>{let P=w.pxRound,O=t,A=r*nn,_=b*nn,N=h*nn,B,U;$.ori==0?[B,U]=p(l,s):[U,B]=p(l,s);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?ec:ph,te=$.ori==0?o:(qe,ke,Ue,Ze,mt,At,_t)=>{o(qe,ke,Ue,mt,Ze,_t,At)},he=en(l.bands,eh).find(qe=>qe.series[0]==s),ne=he!=null?he.dir:0,ae=w.fillTo(l,s,w.min,w.max,ne),ue=P(L(ae,k,H,F)),ce,fe,$e,Te=I,Ee=P(w.width*nn),Qe=!1,Ye=null,gt=null,at=null,ft=null;a!=null&&(Ee==0||c!=null)&&(Qe=!0,Ye=a.values(l,s,u,m),gt=new Map,new Set(Ye).forEach(qe=>{qe!=null&>.set(qe,new Path2D)}),Ee>0&&(at=c.values(l,s,u,m),ft=new Map,new Set(at).forEach(qe=>{qe!=null&&ft.set(qe,new Path2D)})));let{x0:on,size:wn}=f;if(on!=null&&wn!=null){O=1,x=on.values(l,s,u,m),on.unit==2&&(x=x.map(ke=>l.posToVal(R+ke*I,$.key,!0)));let qe=wn.values(l,s,u,m);wn.unit==2?fe=qe[0]*I:fe=C(qe[0],$,I,R)-C(0,$,I,R),Te=qm(x,E,C,$,I,R,Te),$e=Te-fe+A}else Te=qm(x,E,C,$,I,R,Te),$e=Te*g+A,fe=Te-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(P=Yf);let Zt=$e>0,wr=Te-$e-(Zt?Ee:0);fe=P(Ju(wr,N,_)),ce=(O==0?fe/2:O==K?0:fe)-O*K*((O==0?A/2:0)+(Zt?Ee/2:0));const xn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Pn=Qe?null:new Path2D;let Wn=null;if(he!=null)Wn=l.data[he.series[1]];else{let{y0:qe,y1:ke}=f;qe!=null&&ke!=null&&(E=ke.values(l,s,u,m),Wn=qe.values(l,s,u,m))}let rr=B*fe,xt=U*fe;for(let qe=K==1?u:m;qe>=u&&qe<=m;qe+=K){let ke=E[qe];if(ke==null)continue;if(Wn!=null){let pt=Wn[qe]??0;if(ke-pt==0)continue;ue=L(pt,k,H,F)}let Ue=$.distr!=2||f!=null?x[qe]:qe,Ze=C(Ue,$,I,R),mt=L(en(ke,ae),k,H,F),At=P(Ze-ce),_t=P(Dr(mt,ue)),Pt=P(Bi(mt,ue)),Nt=_t-Pt;if(ke!=null){let pt=ke<0?xt:rr,Ct=ke<0?rr:xt;Qe?(Ee>0&&at[qe]!=null&&Z(ft.get(at[qe]),At,Pt+ai(Ee/2),fe,Dr(0,Nt-Ee),pt,Ct),Ye[qe]!=null&&Z(gt.get(Ye[qe]),At,Pt+ai(Ee/2),fe,Dr(0,Nt-Ee),pt,Ct)):Z(Pn,At,Pt+ai(Ee/2),fe,Dr(0,Nt-Ee),pt,Ct),te(l,s,qe,At-Ee/2,Pt,fe+Ee,Nt)}}return Ee>0?xn.stroke=Qe?ft:Pn:Qe||(xn._fill=w.width==0?w._fill:w._stroke??w._fill,xn.width=0),xn.fill=Qe?gt:Pn,xn})}function A_(n,e){const t=en(e==null?void 0:e.alignGaps,0);return(r,d,p,g)=>xs(r,d,(b,h,f,o,a,c,l,s,u,m,w)=>{[p,g]=jl(f,p,g);let x=b.pxRound,E=B=>x(c(B,o,m,s)),$=B=>x(l(B,a,w,u)),k,C,L;o.ori==0?(k=Zl,L=oa,C=zm):(k=Jl,L=sa,C=jm);const R=o.dir*(o.ori==0?1:-1);let F=E(h[R==1?p:g]),I=F,H=[],P=[];for(let B=R==1?p:g;B>=p&&B<=g;B+=R)if(f[B]!=null){let U=h[B],K=E(U);H.push(I=K),P.push($(f[B]))}const O={stroke:n(H,P,k,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ia},A=O.stroke;let[_,N]=hh(r,d);if(b.fill!=null||_!=0){let B=O.fill=new Path2D(A),U=b.fillTo(r,d,b.min,b.max,_),K=$(U);L(B,I,K),L(B,F,K)}if(!b.spanGaps){let B=[];B.push(...dh(h,f,p,g,R,E,t)),O.gaps=B=b.gaps(r,d,p,g,B),O.clip=Ql(B,o.ori,s,u,m,w)}return N!=0&&(O.band=N==2?[fo(r,d,p,g,A,-1),fo(r,d,p,g,A,1)]:fo(r,d,p,g,A,N)),O})}function $_(n){return A_(T_,n)}function T_(n,e,t,r,d,p){const g=n.length;if(g<2)return null;const b=new Path2D;if(t(b,n[0],e[0]),g==2)r(b,n[1],e[1]);else{let h=Array(g),f=Array(g-1),o=Array(g-1),a=Array(g-1);for(let c=0;c<g-1;c++)o[c]=e[c+1]-e[c],a[c]=n[c+1]-n[c],f[c]=o[c]/a[c];h[0]=f[0];for(let c=1;c<g-1;c++)f[c]===0||f[c-1]===0||f[c-1]>0!=f[c]>0?h[c]=0:(h[c]=3*(a[c-1]+a[c])/((2*a[c]+a[c-1])/f[c-1]+(a[c]+2*a[c-1])/f[c]),isFinite(h[c])||(h[c]=0));h[g-1]=f[g-2];for(let c=0;c<g-1;c++)d(b,n[c]+a[c]/3,e[c]+h[c]*a[c]/3,n[c+1]-a[c]/3,e[c+1]-h[c+1]*a[c]/3,n[c+1],e[c+1])}return b}const gh=new Set;function Km(){for(let n of gh)n.syncRect(!0)}Zs&&(vs(lS,Js,Km),vs(cS,Js,Km,!0),vs(Bl,Js,()=>{Ar.pxRatio=nn}));const M_=Vm(),E_=Hm();function Gm(n,e,t,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,p)=>fh(d,p,e,t))}function I_(n,e){return n.map((t,r)=>r==0?{}:nr({},e,t))}function fh(n,e,t,r){return nr({},e==0?t:r,n)}function Ym(n,e,t){return e==null?ta:[e,t]}const L_=Ym;function R_(n,e,t){return e==null?ta:Ul(e,t,Xu,!0)}function Xm(n,e,t,r){return e==null?ta:Hl(e,t,n.scales[r].log,!1)}const O_=Xm;function Qm(n,e,t,r){return e==null?ta:Yu(e,t,n.scales[r].log,!1)}const N_=Qm;function D_(n,e,t,r,d){let p=Dr(Kf(n),Kf(e)),g=e-n,b=Wi(d/r*g,t);do{let h=t[b],f=r*h/g;if(f>=d&&p+(h<5?Bo.get(h):0)<=17)return[h,f]}while(++b<t.length);return[0,0]}function Zm(n){let e,t;return n=n.replace(/(\d+)px/,(r,d)=>(e=ur((t=+d)*nn))+"px"),[n,e,t]}function F_(n){n.show&&[n.font,n.labelFont].forEach(e=>{let t=mn(e[2]*nn,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t})}function Ar(n,e,t){const r={mode:en(n.mode,1)},d=r.mode;function p(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function g(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function b(V,X,ie,oe){return X.ori==0?p(V,X,ie,oe):g(V,X,ie,oe)}r.valToPosH=p,r.valToPosV=g;let h=!1;r.status=0;const f=r.root=wi(Uk);if(n.id!=null&&(f.id=n.id),oi(f,n.class),n.title){let V=wi(Kk,f);V.textContent=n.title}const o=Pi("canvas"),a=r.ctx=o.getContext("2d"),c=wi(Gk,f);vs("click",c,V=>{V.target===s&&(an!=_i||Kt!=co)&&zn.click(r,V)},!0);const l=r.under=wi(Yk,c);c.appendChild(o);const s=r.over=wi(Xk,c);n=na(n);const u=+en(n.pxAlign,1),m=Fm(u);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,x=r.series=d==1?Gm(n.series||[],Am,Rm,!1):I_(n.series||[null],Lm),E=r.axes=Gm(n.axes||[],_m,Mm,!0),$=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=Vt(V.fill||null),V.dir=en(V.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,L={axes:xo,series:pa},R=(n.drawOrder||["axes","series"]).map(V=>L[V]);function F(V){const X=V.distr==3?ie=>go(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Zu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:we}=V,Me=we-ge;return(oe-ge)/Me}}function I(V){let X=$[V];if(X==null){let ie=(n.scales||za)[V]||za;if(ie.from!=null){I(ie.from);let oe=nr({},$[ie.from],ie,{key:V});oe.valToPct=F(oe),$[V]=oe}else{X=$[V]=nr({},V==C?Om:b_,ie),X.key=V;let oe=X.time,ge=X.range,we=zo(ge);if((V!=C||d==2&&!oe)&&(we&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Hf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Hf:{mode:1,hard:ge[1],soft:ge[1]}},we=!1),!we&&Kl(ge))){let Me=ge;ge=(Pe,ze,Ge)=>ze==null?ta:Ul(ze,Ge,Me)}X.range=Vt(ge||(oe?L_:V==C?X.distr==3?O_:X.distr==4?N_:Ym:X.distr==3?Xm:X.distr==4?Qm:R_)),X.auto=Vt(we?!1:X.auto),X.clamp=Vt(X.clamp||y_),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),d==1&&x.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const H=$[C],P=H.distr;let O,A;H.ori==0?(oi(f,Vk),O=p,A=g):(oi(f,qk),O=g,A=p);const _={};for(let V in $){let X=$[V];(X.min!=null||X.max!=null)&&(_[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(ur(V/w))),B=n.fmtDate||th,U=w==1?VS(N):GS(N),K=vm(N,mm(w==1?US:KS,B)),Z=bm(N,ym(XS,B)),te=[],he=r.legend=nr({},JS,n.legend),ne=r.cursor=nr({},o_,{drag:{y:d==2}},n.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Vt(ce.width),ce.dash=Vt(ce.dash),ce.stroke=Vt(ce.stroke),ce.fill=Vt(ce.fill);let fe,$e,Te,Ee=[],Qe=[],Ye,gt=!1,at={};if(he.live){const V=x[1]?x[1].values:null;gt=V!=null,Ye=gt?V(r,1,0):{_:0};for(let X in Ye)at[X]=Hu}if(ae)if(fe=Pi("table",nS,f),Te=Pi("tbody",null,fe),he.mount(r,fe),gt){$e=Pi("thead",null,fe,Te);let V=Pi("tr",null,$e);Pi("th",null,V);for(var ft in Ye)Pi("th",$f,V).textContent=ft}else oi(fe,iS),he.live&&oi(fe,rS);const on={show:!0},wn={show:!1};function Zt(V,X){if(X==0&&(gt||!he.live||d==2))return ta;let ie=[],oe=Pi("tr",oS,Te,Te.childNodes[X]);oi(oe,V.class),V.show||oi(oe,ms);let ge=Pi("th",null,oe);if(ce.show){let Pe=wi(sS,ge);if(X>0){let ze=ce.width(r,X);ze&&(Pe.style.border=ze+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Pe.style.background=ce.fill(r,X)}}let we=wi($f,ge);V.label instanceof HTMLElement?we.appendChild(V.label):we.textContent=V.label,X>0&&(ce.show||(we.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),xn("click",ge,Pe=>{if(ne._lock)return;Hi(Pe);let ze=x.indexOf(V);if((Pe.ctrlKey||Pe.metaKey)!=he.isolate){let Ge=x.some((Je,tt)=>tt>0&&tt!=ze&&Je.show);x.forEach((Je,tt)=>{tt>0&&Wr(tt,Ge?tt==ze?on:wn:on,!0,ht.setSeries)})}else Wr(ze,{show:!V.show},!0,ht.setSeries)},!1),Ui&&xn(If,ge,Pe=>{ne._lock||(Hi(Pe),Wr(x.indexOf(V),Ti,!0,ht.setSeries))},!1));for(var Me in Ye){let Pe=Pi("td",aS,oe);Pe.textContent="--",ie.push(Pe)}return[oe,ie]}const wr=new Map;function xn(V,X,ie,oe=!0){const ge=wr.get(X)||{},we=ne.bind[V](r,X,ie,oe);we&&(vs(V,X,ge[V]=we),wr.set(X,ge))}function Pn(V,X,ie){const oe=wr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Gu(ge,X,oe[ge]),delete oe[ge]);V==null&&wr.delete(X)}let Wn=0,rr=0,xt=0,qe=0,ke=0,Ue=0,Ze=ke,mt=Ue,At=xt,_t=qe,Pt=0,Nt=0,pt=0,Ct=0;r.bbox={};let Tn=!1,Tr=!1,Xr=!1,ji=!1,mo=!1,xr=!1;function vo(V,X,ie){(ie||V!=r.width||X!=r.height)&&jo(V,X),Gi(!1),Xr=!0,Tr=!0,lo()}function jo(V,X){r.width=Wn=xt=V,r.height=rr=qe=X,ke=Ue=0,As(),ua();let ie=r.bbox;Pt=ie.left=bs(ke*nn,.5),Nt=ie.top=bs(Ue*nn,.5),pt=ie.width=bs(xt*nn,.5),Ct=ie.height=bs(qe*nn,.5)}const Qa=3;function ci(){let V=!1,X=0;for(;!V;){X++;let ie=ga(X),oe=tl(X);V=X==Qa||ie&&oe,V||(jo(r.width,r.height),Tr=!0)}}function Za({width:V,height:X}){vo(V,X)}r.setSize=Za;function As(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((ge,we)=>{if(ge.show&&ge._show){let{side:Me,_size:Pe}=ge,ze=Me%2,Ge=ge.label!=null?ge.labelSize:0,Je=Pe+Ge;Je>0&&(ze?(xt-=Je,Me==3?(ke+=Je,oe=!0):ie=!0):(qe-=Je,Me==0?(Ue+=Je,V=!0):X=!0))}}),qi[0]=V,qi[1]=ie,qi[2]=X,qi[3]=oe,xt-=Ir[1]+Ir[3],ke+=Ir[3],qe-=Ir[2]+Ir[0],Ue+=Ir[0]}function ua(){let V=ke+xt,X=Ue+qe,ie=ke,oe=Ue;function ge(we,Me){switch(we){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((we,Me)=>{if(we.show&&we._show){let Pe=we.side;we._pos=ge(Pe,we._size),we.label!=null&&(we._lpos=ge(Pe,we.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Vt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,we,Me,Pe)=>{if(we==0)return Me;let ze=Me,Ge=ie(ge,we,Me,Pe)??fn,Je=Ge>=0&&Ge<fn,tt=H.ori==0?xt:qe,St=ne.left,Ht=e[0],Tt=e[we];if(X.has(Tt[Me])){ze=null;let zt=null,vt=null,ct;if(oe==0||oe==-1)for(ct=Me;zt==null&&ct-- >0;)X.has(Tt[ct])||(zt=ct);if(oe==0||oe==1)for(ct=Me;vt==null&&ct++<Tt.length;)X.has(Tt[ct])||(vt=ct);if(zt!=null||vt!=null)if(Je){let vn=zt==null?-1/0:O(Ht[zt],H,tt,0),In=vt==null?1/0:O(Ht[vt],H,tt,0),sr=St-vn,Xt=In-St;sr<=Xt?sr<=Ge&&(ze=zt):Xt<=Ge&&(ze=vt)}else ze=vt==null?zt:zt==null?vt:Me-zt<=vt-Me?zt:vt}else Je&&cr(St-O(Ht[Me],H,tt,0))>Ge&&(ze=null);return ze}}const Hi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Xn=ne.points;Xn.show=Vt(Xn.show),Xn.size=Vt(Xn.size),Xn.stroke=Vt(Xn.stroke),Xn.width=Vt(Xn.width),Xn.fill=Vt(Xn.fill);const Mr=r.focus=nr({},n.focus||{alpha:.3},ne.focus),Ui=Mr.prox>=0,Rn=Ui&&Xn.one;let Er=[],io=[],Vi=[];function $s(V,X){let ie=Xn.show(r,X);if(ie instanceof HTMLElement)return oi(ie,tS),oi(ie,V.class),eo(ie,-10,-10,xt,qe),s.insertBefore(ie,Er[X]),ie}function ha(V,X){if(d==1||X>0){let ie=d==1&&$[V.scale].time,oe=V.value;V.value=ie?nm(oe)?bm(N,ym(oe,B)):oe||Z:oe||f_,V.label=V.label||(ie?a_:s_)}if(Rn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||M_||bS,V.fillTo=Vt(V.fillTo||w_),V.pxAlign=+en(V.pxAlign,u),V.pxRound=Fm(V.pxAlign),V.stroke=Vt(V.stroke||null),V.fill=Vt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=m_(Dr(1,V.width),1),oe=V.points=nr({},{size:ie,width:Dr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:E_,_stroke:null,_fill:null},V.points);oe.show=Vt(oe.show),oe.filter=Vt(oe.filter),oe.fill=Vt(oe.fill),oe.stroke=Vt(oe.stroke),oe.paths=Vt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Zt(V,X);Ee.splice(X,0,ie[0]),Qe.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Rn?X==0&&(ie=$s(V,X)):X>0&&(ie=$s(V,X)),Er.splice(X,0,ie),io.splice(X,0,0),Vi.splice(X,0,0)}st("addSeries",X)}function Ja(V,X){X=X??x.length,V=d==1?fh(V,X,Am,Rm):fh(V,X,{},Lm),x.splice(X,0,V),ha(x[X],X)}r.addSeries=Ja;function el(V){if(x.splice(V,1),ae){he.values.splice(V,1),Qe.splice(V,1);let X=Ee.splice(V,1)[0];Pn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Er.splice(V,1)[0].remove(),io.splice(V,1),Vi.splice(V,1)),st("delSeries",V)}r.delSeries=el;const qi=[!1,!1,!1,!1];function ui(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=$[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=$[V.scale]);let ge=oe.time;V.size=Vt(V.size),V.space=Vt(V.space),V.rotate=Vt(V.rotate),zo(V.incrs)&&V.incrs.forEach(Me=>{!Bo.has(Me)&&Bo.set(Me,em(Me))}),V.incrs=Vt(V.incrs||(oe.distr==2?zS:ge?w==1?HS:qS:ws)),V.splits=Vt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?lh:oe.distr==4?u_:c_)),V.stroke=Vt(V.stroke),V.grid.stroke=Vt(V.grid.stroke),V.ticks.stroke=Vt(V.ticks.stroke),V.border.stroke=Vt(V.border.stroke);let we=V.values;V.values=zo(we)&&!zo(we[0])?Vt(we):ge?zo(we)?vm(N,mm(we,B)):nm(we)?YS(N,we):we||K:we||l_,V.filter=Vt(V.filter||(oe.distr>=3&&oe.log==10?p_:oe.distr==3&&oe.log==2?g_:Xf)),V.font=Zm(V.font),V.labelFont=Zm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(qi[X]=!0,V._el=wi(Qk,c))}}function qt(V,X,ie,oe){let[ge,we,Me,Pe]=ie,ze=X%2,Ge=0;return ze==0&&(Pe||we)&&(Ge=X==0&&!ge||X==2&&!Me?ur(_m.size/3):0),ze==1&&(ge||Me)&&(Ge=X==1&&!we||X==3&&!Pe?ur(Mm.size/2):0),Ge}const da=r.padding=(n.padding||[qt,qt,qt,qt]).map(V=>Vt(en(V,qt))),Ir=r._padding=da.map((V,X)=>V(r,X,qi,0));let Qn,Cn=null,Bn=null;const Ci=d==1?x[0].idxs:null;let Lr=null,ki=!1;function Ho(V,X){if(e=V??[],r.data=r._data=e,d==2){Qn=0;for(let ie=1;ie<x.length;ie++)Qn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Lr=e[0],Qn=Lr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Qn);for(let ge=0;ge<Qn;ge++)oe[ge]=ge}r._data=e=ie}if(Gi(!0),st("setData"),P==2&&(Xr=!0),X!==!1){let ie=H;ie.auto(r,ki)?Ts():ir(C,ie.min,ie.max),ji=ji||ne.left>=0,xr=!0,lo()}}r.setData=Ho;function Ts(){ki=!0;let V,X;d==1&&(Qn>0?(Cn=Ci[0]=0,Bn=Ci[1]=Qn-1,V=e[0][Cn],X=e[0][Bn],P==2?(V=Cn,X=Bn):V==X&&(P==3?[V,X]=Hl(V,V,H.log,!1):P==4?[V,X]=Yu(V,V,H.log,!1):H.time?X=V+ur(86400/w):[V,X]=Ul(V,X,Xu,!0))):(Cn=Ci[0]=V=null,Bn=Ci[1]=X=null)),ir(C,V,X)}let oo,Qr,yo,Uo,Zr,Vo,Ms,Es,qo,hr;function Is(V,X,ie,oe,ge,we){V??(V=Mf),ie??(ie=eh),oe??(oe="butt"),ge??(ge=Mf),we??(we="round"),V!=oo&&(a.strokeStyle=oo=V),ge!=Qr&&(a.fillStyle=Qr=ge),X!=yo&&(a.lineWidth=yo=X),we!=Zr&&(a.lineJoin=Zr=we),oe!=Vo&&(a.lineCap=Vo=oe),ie!=Uo&&a.setLineDash(Uo=ie)}function bo(V,X,ie,oe){X!=Qr&&(a.fillStyle=Qr=X),V!=Ms&&(a.font=Ms=V),ie!=Es&&(a.textAlign=Es=ie),oe!=qo&&(a.textBaseline=qo=oe)}function Ko(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,ki)&&(X==null||X.min==null)){let we=en(Cn,0),Me=en(Bn,oe.length-1),Pe=ie.min==null?pS(oe,we,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Bi(V.min,ie.min=Pe[0]),V.max=Dr(V.max,ie.max=Pe[1])}}const Go={min:null,max:null};function so(){for(let oe in $){let ge=$[oe];_[oe]==null&&(ge.min==null||_[C]!=null&&ge.auto(r,ki))&&(_[oe]=Go)}for(let oe in $){let ge=$[oe];_[oe]==null&&ge.from!=null&&_[ge.from]!=null&&(_[oe]=Go)}_[C]!=null&&Gi(!0);let V={};for(let oe in _){let ge=_[oe];if(ge!=null){let we=V[oe]=na($[oe],CS);if(ge.min!=null)nr(we,ge);else if(oe!=C||d==2)if(Qn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=fn,we.max=-fn}}if(Qn>0){x.forEach((oe,ge)=>{if(d==1){let we=oe.scale,Me=_[we];if(Me==null)return;let Pe=V[we];if(ge==0){let ze=Pe.range(r,Pe.min,Pe.max,we);Pe.min=ze[0],Pe.max=ze[1],Cn=Wi(Pe.min,e[0]),Bn=Wi(Pe.max,e[0]),Bn-Cn>1&&(e[0][Cn]<Pe.min&&Cn++,e[0][Bn]>Pe.max&&Bn--),oe.min=Lr[Cn],oe.max=Lr[Bn]}else oe.show&&oe.auto&&Ko(Pe,Me,oe,e[ge],oe.sorted);oe.idxs[0]=Cn,oe.idxs[1]=Bn}else if(ge>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Pe=we.scale,ze=Me.scale,[Ge,Je]=e[ge],tt=V[Pe],St=V[ze];tt!=null&&Ko(tt,_[Pe],we,Ge,we.sorted),St!=null&&Ko(St,_[ze],Me,Je,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],we=_[oe];if(ge.from==null&&(we==null||we.min==null)){let Me=ge.range(r,ge.min==fn?null:ge.min,ge.max==-fn?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let we=V[ge.from];if(we.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,we.min,we.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],we=$[oe];if(we.min!=ge.min||we.max!=ge.max){we.min=ge.min,we.max=ge.max;let Me=we.distr;we._min=Me==3?go(we.min):Me==4?Zu(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?go(we.max):Me==4?Zu(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,ge)=>{d==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Xr=!0,st("setScale",oe);ue&&ne.left>=0&&(ji=xr=!0)}for(let oe in _)_[oe]=null}function Ls(V){let X=Ju(Cn-1,0,Qn-1),ie=Ju(Bn+1,0,Qn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Qn-1;)ie++;return[X,ie]}function pa(){if(Qn>0){let V=x.some(X=>X._focus)&&hr!=Mr.alpha;V&&(a.globalAlpha=hr=Mr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(Yo(ie,!1),Yo(ie,!0),X._paths==null)){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha);let ge=d==2?[0,e[ie][0].length-1]:Ls(e[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),hr!=oe&&(a.globalAlpha=hr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha),X._paths!=null&&Xo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,Cn,Bn,ge),Me=X.points.filter(r,ie,we,ge);(we||Me)&&(X.points._paths=X.points.paths(r,ie,Cn,Bn,Me),Xo(ie,!0))}hr!=oe&&(a.globalAlpha=hr=oe),st("drawSeries",ie)}}),V&&(a.globalAlpha=hr=1)}}function Yo(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Xo(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:ge,clip:we,flags:Me,_stroke:Pe=ie._stroke,_fill:ze=ie._fill,_width:Ge=ie.width}=ie._paths;Ge=mn(Ge*nn,3);let Je=null,tt=Ge%2/2;X&&ze==null&&(ze=Ge>0?"#fff":Pe);let St=ie.pxAlign==1&&tt>0;if(St&&a.translate(tt,tt),!X){let Ht=Pt-Ge/2,Tt=Nt-Ge/2,zt=pt+Ge,vt=Ct+Ge;Je=new Path2D,Je.rect(Ht,Tt,zt,vt)}X?wo(Pe,Ge,ie.dash,ie.cap,ze,oe,ge,Me,we):Rs(V,Pe,Ge,ie.dash,ie.cap,ze,oe,ge,Me,Je,we),St&&a.translate(-tt,-tt)}function Rs(V,X,ie,oe,ge,we,Me,Pe,ze,Ge,Je){let tt=!1;ze!=0&&k.forEach((St,Ht)=>{if(St.series[0]==V){let Tt=x[St.series[1]],zt=e[St.series[1]],vt=(Tt._paths||za).band;zo(vt)&&(vt=St.dir==1?vt[0]:vt[1]);let ct,vn=null;Tt.show&&vt&&fS(zt,Cn,Bn)?(vn=St.fill(r,Ht)||we,ct=Tt._paths.clip):vt=null,wo(X,ie,oe,ge,vn,Me,Pe,ze,Ge,Je,ct,vt),tt=!0}}),tt||wo(X,ie,oe,ge,we,Me,Pe,ze,Ge,Je)}const Qo=ia|uh;function wo(V,X,ie,oe,ge,we,Me,Pe,ze,Ge,Je,tt){Is(V,X,ie,oe,ge),(ze||Ge||tt)&&(a.save(),ze&&a.clip(ze),Ge&&a.clip(Ge)),tt?(Pe&Qo)==Qo?(a.clip(tt),Je&&a.clip(Je),dr(ge,Me),Si(V,we,X)):Pe&uh?(dr(ge,Me),a.clip(tt),Si(V,we,X)):Pe&ia&&(a.save(),a.clip(tt),Je&&a.clip(Je),dr(ge,Me),a.restore(),Si(V,we,X)):(dr(ge,Me),Si(V,we,X)),(ze||Ge||tt)&&a.restore()}function Si(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=oo=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function dr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Qr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function ao(V,X,ie,oe){let ge=E[V],we;if(oe<=0)we=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Pe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);we=D_(X,ie,Pe,oe,Me)}return ge._found=we}function Ki(V,X,ie,oe,ge,we,Me,Pe,ze,Ge){let Je=Me%2/2;u==1&&a.translate(Je,Je),Is(Pe,Me,ze,Ge,Pe),a.beginPath();let tt,St,Ht,Tt,zt=ge+(oe==0||oe==3?-we:we);ie==0?(St=ge,Tt=zt):(tt=ge,Ht=zt);for(let vt=0;vt<V.length;vt++)X[vt]!=null&&(ie==0?tt=Ht=V[vt]:St=Tt=V[vt],a.moveTo(tt,St),a.lineTo(Ht,Tt));a.stroke(),u==1&&a.translate(-Je,-Je)}function ga(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Gi(!1));return}else ie._show||(X=!1,ie._show=!0,Gi(!1));let we=ie.side,Me=we%2,{min:Pe,max:ze}=ge,[Ge,Je]=ao(oe,Pe,ze,Me==0?xt:qe);if(Je==0)return;let tt=ge.distr==2,St=ie._splits=ie.splits(r,oe,Pe,ze,Ge,Je,tt),Ht=ge.distr==2?St.map(ct=>Lr[ct]):St,Tt=ge.distr==2?Lr[St[1]]-Lr[St[0]]:Ge,zt=ie._values=ie.values(r,ie.filter(r,Ht,oe,Je,Tt),oe,Je,Tt);ie._rotate=we==2?ie.rotate(r,zt,oe,Je):0;let vt=ie._size;ie._size=xi(ie.size(r,zt,oe,V)),vt!=null&&ie._size!=vt&&(X=!1)}),X}function tl(V){let X=!0;return da.forEach((ie,oe)=>{let ge=ie(r,oe,qi,V);ge!=Ir[oe]&&(X=!1),Ir[oe]=ge}),X}function xo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,we,Me=X.stroke(r,V),Pe=ie==0||ie==3?-1:1,[ze,Ge]=X._found;if(X.label!=null){let gn=X.labelGap*Pe,yr=ur((X._lpos+gn)*nn);bo(X.labelFont[0],Me,"center",ie==2?Pa:Tf),a.save(),oe==1?(ge=we=0,a.translate(yr,ur(Nt+Ct/2)),a.rotate((ie==3?-Vl:Vl)/2)):(ge=ur(Pt+pt/2),we=yr);let Ao=Gf(X.label)?X.label(r,V,ze,Ge):X.label;a.fillText(Ao,ge,we),a.restore()}if(Ge==0)continue;let Je=$[X.scale],tt=oe==0?pt:Ct,St=oe==0?Pt:Nt,Ht=X._splits,Tt=Je.distr==2?Ht.map(gn=>Lr[gn]):Ht,zt=Je.distr==2?Lr[Ht[1]]-Lr[Ht[0]]:ze,vt=X.ticks,ct=X.border,vn=vt.show?vt.size:0,In=ur(vn*nn),sr=ur((X.alignTo==2?X._size-vn-X.gap:X.gap)*nn),Xt=X._rotate*-Vl/180,pe=m(X._pos*nn),Se=(In+sr)*Pe,xe=pe+Se;we=oe==0?xe:0,ge=oe==1?xe:0;let Ve=X.font[0],dt=X.align==1?Qs:X.align==2?Wu:Xt>0?Qs:Xt<0?Wu:oe==0?"center":ie==3?Wu:Qs,Ot=Xt||oe==1?"middle":ie==2?Pa:Tf;bo(Ve,Me,dt,Ot);let Jt=X.font[1]*X.lineGap,Wt=Ht.map(gn=>m(b(gn,Je,tt,St))),Br=X._values;for(let gn=0;gn<Br.length;gn++){let yr=Br[gn];if(yr!=null){oe==0?ge=Wt[gn]:we=Wt[gn],yr=""+yr;let Ao=yr.indexOf(`
|
1489
|
+
`)==-1?[yr]:yr.split(/\n/gm);for(let Un=0;Un<Ao.length;Un++){let Ns=Ao[Un];Xt?(a.save(),a.translate(ge,we+Un*Jt),a.rotate(Xt),a.fillText(Ns,0,0),a.restore()):a.fillText(Ns,ge,we+Un*Jt)}}}vt.show&&Ki(Wt,vt.filter(r,Tt,V,Ge,zt),oe,ie,pe,In,mn(vt.width*nn,3),vt.stroke(r,V),vt.dash,vt.cap);let Mi=X.grid;Mi.show&&Ki(Wt,Mi.filter(r,Tt,V,Ge,zt),oe,oe==0?2:1,oe==0?Nt:Pt,oe==0?Ct:pt,mn(Mi.width*nn,3),Mi.stroke(r,V),Mi.dash,Mi.cap),ct.show&&Ki([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nt:Pt,oe==1?Ct:pt,mn(ct.width*nn,3),ct.stroke(r,V),ct.dash,ct.cap)}st("drawAxes")}function Gi(V){x.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(d==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Co=!1,Zo=!1,ko=[];function fa(){Zo=!1;for(let V=0;V<ko.length;V++)st(...ko[V]);ko.length=0}function lo(){Co||(MS(ma),Co=!0)}function Be(V,X=!1){Co=!0,Zo=X,V(r),ma(),X&&ko.length>0&&queueMicrotask(fa)}r.batch=Be;function ma(){if(Tn&&(so(),Tn=!1),Xr&&(ci(),Xr=!1),Tr){if(_n(l,Qs,ke),_n(l,Pa,Ue),_n(l,Da,xt),_n(l,Fa,qe),_n(s,Qs,ke),_n(s,Pa,Ue),_n(s,Da,xt),_n(s,Fa,qe),_n(c,Da,Wn),_n(c,Fa,rr),o.width=ur(Wn*nn),o.height=ur(rr*nn),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let we=ge===3||ge===0?ie:0,Me=ge%2==1;_n(V,Me?"left":"top",oe-we),_n(V,Me?"width":"height",ie),_n(V,Me?"top":"left",Me?Ue:ke),_n(V,Me?"height":"width",Me?qe:xt),qu(V,ms)}else oi(V,ms)}),oo=Qr=yo=Zr=Vo=Ms=Es=qo=Uo=null,hr=1,W(!0),ke!=Ze||Ue!=mt||xt!=At||qe!=_t){Gi(!1);let V=xt/At,X=qe/_t;if(ue&&!ji&&ne.left>=0){ne.left*=V,ne.top*=X,hi&&eo(hi,ur(ne.left),0,xt,qe),Zn&&eo(Zn,0,ur(ne.top),xt,qe);for(let ie=0;ie<Er.length;ie++){let oe=Er[ie];oe!=null&&(io[ie]*=V,Vi[ie]*=X,eo(oe,xi(io[ie]),xi(Vi[ie]),xt,qe))}}if(kt.show&&!mo&&kt.left>=0&&kt.width>0){kt.left*=V,kt.width*=V,kt.top*=X,kt.height*=X;for(let ie in Y)_n(Pr,ie,kt[ie])}Ze=ke,mt=Ue,At=xt,_t=qe}st("setSize"),Tr=!1}Wn>0&&rr>0&&(a.clearRect(0,0,o.width,o.height),st("drawClear"),R.forEach(V=>V()),st("draw")),kt.show&&mo&&(pn(kt),mo=!1),ue&&ji&&(S(null,!0,!1),ji=!1),he.show&&he.live&&xr&&(y(),xr=!1),h||(h=!0,r.status=1,st("ready")),ki=!1,Co=!1}r.redraw=(V,X)=>{Xr=X||!1,V!==!1?ir(C,H.min,H.max):lo()};function Ne(V,X){let ie=$[V];if(ie.from==null){if(Qn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Qn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Qn>0&&(X.min=Wi(X.min,e[0]),X.max=Wi(X.max,e[0]),X.min==X.max&&X.max++),_[V]=X,Tn=!0,lo()}}r.setScale=Ne;let On,So,hi,Zn,va,_o,_i,co,sn,tn,an,Kt,Ai=!1;const zn=ne.drag;let je=zn.x,kn=zn.y;ue&&(ne.x&&(On=wi(Jk,s)),ne.y&&(So=wi(eS,s)),H.ori==0?(hi=On,Zn=So):(hi=So,Zn=On),an=ne.left,Kt=ne.top);const kt=r.select=nr({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Pr=kt.show?wi(Zk,kt.over?s:l):null;function pn(V,X){if(kt.show){for(let ie in V)kt[ie]=V[ie],ie in Y&&_n(Pr,ie,V[ie]);X!==!1&&st("setSelect")}}r.setSelect=pn;function An(V){if(x[V].show)ae&&qu(Ee[V],ms);else if(ae&&oi(Ee[V],ms),ue){let X=Rn?Er[0]:Er[V];X!=null&&eo(X,-10,-10,xt,qe)}}function ir(V,X,ie){Ne(V,{min:X,max:ie})}function Wr(V,X,ie,oe){X.focus!=null&&fr(V),X.show!=null&&x.forEach((ge,we)=>{we>0&&(V==we||V==null)&&(ge.show=X.show,An(we),d==2?(ir(ge.facets[0].scale,null,null),ir(ge.facets[1].scale,null,null)):ir(ge.scale,null,null),lo())}),ie!==!1&&st("setSeries",V,X),oe&&Rt("setSeries",r,V,X)}r.setSeries=Wr;function $i(V,X){nr(k[V],X)}function jn(V,X){V.fill=Vt(V.fill||null),V.dir=en(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Jr(V){V==null?k.length=0:k.splice(V,1)}r.addBand=jn,r.setBand=$i,r.delBand=Jr;function Jo(V,X){x[V].alpha=X,ue&&Er[V]!=null&&(Er[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let Hn,di,pi;const Ti={focus:!0};function fr(V){if(V!=pi){let X=V==null,ie=Mr.alpha!=1;x.forEach((oe,ge)=>{if(d==1||ge>0){let we=X||ge==0||ge==V;oe._focus=X?null:we,ie&&Jo(ge,we?1:Mr.alpha)}}),pi=V,ie&&lo()}}ae&&Ui&&xn(Lf,fe,V=>{ne._lock||(Hi(V),pi!=null&&Wr(null,Ti,!0,ht.setSeries))});function mr(V,X,ie){let oe=$[X];ie&&(V=V/nn-(oe.ori==1?Ue:ke));let ge=xt;oe.ori==1&&(ge=qe,V=ge-V),oe.dir==-1&&(V=ge-V);let we=oe._min,Me=oe._max,Pe=V/ge,ze=we+(Me-we)*Pe,Ge=oe.distr;return Ge==3?ea(10,ze):Ge==4?vS(ze,oe.asinh):Ge==100?oe.bwd(ze):ze}function Cr(V,X){let ie=mr(V,C,X);return Wi(ie,e[0],Cn,Bn)}r.valToIdx=V=>Wi(V,e[0]),r.posToIdx=Cr,r.posToVal=mr,r.valToPos=(V,X,ie)=>$[X].ori==0?p(V,$[X],ie?pt:xt,ie?Pt:0):g(V,$[X],ie?Ct:qe,ie?Nt:0),r.setCursor=(V,X,ie)=>{an=V.left,Kt=V.top,S(null,X,ie)};function Os(V,X){_n(Pr,Qs,kt.left=V),_n(Pr,Da,kt.width=X)}function kr(V,X){_n(Pr,Pa,kt.top=V),_n(Pr,Fa,kt.height=X)}let Rr=H.ori==0?Os:kr,gi=H.ori==1?Os:kr;function fi(){if(ae&&he.live)for(let V=d==2?1:0;V<x.length;V++){if(V==0&>)continue;let X=he.values[V],ie=0;for(let oe in X)Qe[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):xS(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||d==1&&!gt)&&T(ie,te[ie]);fi()}xr=!1,X!==!1&&st("setLegend")}r.setLegend=y;function T(V,X){let ie=x[V],oe=V==0&&P==2?Lr:e[V],ge;gt?ge=ie.values(r,V,X)??at:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?at:{_:ge}),he.values[V]=ge}function S(V,X,ie){sn=an,tn=Kt,[an,Kt]=ne.move(r,an,Kt),ne.left=an,ne.top=Kt,ue&&(hi&&eo(hi,ur(an),0,xt,qe),Zn&&eo(Zn,0,ur(Kt),xt,qe));let oe,ge=Cn>Bn;Hn=fn,di=null;let we=H.ori==0?xt:qe,Me=H.ori==1?xt:qe;if(an<0||Qn==0||ge){oe=ne.idx=null;for(let Pe=0;Pe<x.length;Pe++){let ze=Er[Pe];ze!=null&&eo(ze,-10,-10,xt,qe)}Ui&&Wr(null,Ti,!0,V==null&&ht.setSeries),he.live&&(te.fill(oe),xr=!0)}else{let Pe,ze,Ge;d==1&&(Pe=H.ori==0?an:Kt,ze=mr(Pe,C),oe=ne.idx=Wi(ze,e[0],Cn,Bn),Ge=O(e[0][oe],H,we,0));let Je=-10,tt=-10,St=0,Ht=0,Tt=!0,zt="",vt="";for(let ct=d==2?1:0;ct<x.length;ct++){let vn=x[ct],In=te[ct],sr=In==null?null:d==1?e[ct][In]:e[ct][1][In],Xt=ne.dataIdx(r,ct,oe,ze),pe=Xt==null?null:d==1?e[ct][Xt]:e[ct][1][Xt];if(xr=xr||pe!=sr||Xt!=In,te[ct]=Xt,ct>0&&vn.show){let Se=Xt==null?-10:Xt==oe?Ge:O(d==1?e[0][Xt]:e[ct][0][Xt],H,we,0),xe=pe==null?-10:A(pe,d==1?$[vn.scale]:$[vn.facets[1].scale],Me,0);if(Ui&&pe!=null){let Ve=H.ori==1?an:Kt,dt=cr(Mr.dist(r,ct,Xt,xe,Ve));if(dt<Hn){let Ot=Mr.bias;if(Ot!=0){let Jt=mr(Ve,vn.scale),Wt=pe>=0?1:-1,Br=Jt>=0?1:-1;Br==Wt&&(Br==1?Ot==1?pe>=Jt:pe<=Jt:Ot==1?pe<=Jt:pe>=Jt)&&(Hn=dt,di=ct)}else Hn=dt,di=ct}}if(xr||Rn){let Ve,dt;H.ori==0?(Ve=Se,dt=xe):(Ve=xe,dt=Se);let Ot,Jt,Wt,Br,Mi,gn,yr=!0,Ao=Xn.bbox;if(Ao!=null){yr=!1;let Un=Ao(r,ct);Wt=Un.left,Br=Un.top,Ot=Un.width,Jt=Un.height}else Wt=Ve,Br=dt,Ot=Jt=Xn.size(r,ct);if(gn=Xn.fill(r,ct),Mi=Xn.stroke(r,ct),Rn)ct==di&&Hn<=Mr.prox&&(Je=Wt,tt=Br,St=Ot,Ht=Jt,Tt=yr,zt=gn,vt=Mi);else{let Un=Er[ct];Un!=null&&(io[ct]=Wt,Vi[ct]=Br,Wf(Un,Ot,Jt,yr),Ff(Un,gn,Mi),eo(Un,xi(Wt),xi(Br),xt,qe))}}}}if(Rn){let ct=Mr.prox,vn=pi==null?Hn<=ct:Hn>ct||di!=pi;if(xr||vn){let In=Er[0];In!=null&&(io[0]=Je,Vi[0]=tt,Wf(In,St,Ht,Tt),Ff(In,zt,vt),eo(In,xi(Je),xi(tt),xt,qe))}}}if(kt.show&&Ai)if(V!=null){let[Pe,ze]=ht.scales,[Ge,Je]=ht.match,[tt,St]=V.cursor.sync.scales,Ht=V.cursor.drag;if(je=Ht._x,kn=Ht._y,je||kn){let{left:Tt,top:zt,width:vt,height:ct}=V.select,vn=V.scales[tt].ori,In=V.posToVal,sr,Xt,pe,Se,xe,Ve=Pe!=null&&Ge(Pe,tt),dt=ze!=null&&Je(ze,St);Ve&&je?(vn==0?(sr=Tt,Xt=vt):(sr=zt,Xt=ct),pe=$[Pe],Se=O(In(sr,tt),pe,we,0),xe=O(In(sr+Xt,tt),pe,we,0),Rr(Bi(Se,xe),cr(xe-Se))):Rr(0,we),dt&&kn?(vn==1?(sr=Tt,Xt=vt):(sr=zt,Xt=ct),pe=$[ze],Se=A(In(sr,St),pe,Me,0),xe=A(In(sr+Xt,St),pe,Me,0),gi(Bi(Se,xe),cr(xe-Se))):gi(0,Me)}else Q()}else{let Pe=cr(sn-va),ze=cr(tn-_o);if(H.ori==1){let St=Pe;Pe=ze,ze=St}je=zn.x&&Pe>=zn.dist,kn=zn.y&&ze>=zn.dist;let Ge=zn.uni;Ge!=null?je&&kn&&(je=Pe>=Ge,kn=ze>=Ge,!je&&!kn&&(ze>Pe?kn=!0:je=!0)):zn.x&&zn.y&&(je||kn)&&(je=kn=!0);let Je,tt;je&&(H.ori==0?(Je=_i,tt=an):(Je=co,tt=Kt),Rr(Bi(Je,tt),cr(tt-Je)),kn||gi(0,Me)),kn&&(H.ori==1?(Je=_i,tt=an):(Je=co,tt=Kt),gi(Bi(Je,tt),cr(tt-Je)),je||Rr(0,we)),!je&&!kn&&(Rr(0,0),gi(0,0))}if(zn._x=je,zn._y=kn,V==null){if(ie){if(Mn!=null){let[Pe,ze]=ht.scales;ht.values[0]=Pe!=null?mr(H.ori==0?an:Kt,Pe):null,ht.values[1]=ze!=null?mr(H.ori==1?an:Kt,ze):null}Rt(zu,r,an,Kt,xt,qe,oe)}if(Ui){let Pe=ie&&ht.setSeries,ze=Mr.prox;pi==null?Hn<=ze&&Wr(di,Ti,!0,Pe):Hn>ze?Wr(null,Ti,!0,Pe):di!=pi&&Wr(di,Ti,!0,Pe)}}xr&&(he.idx=oe,y()),X!==!1&&st("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=s.getBoundingClientRect(),st("syncRect",D))}function z(V,X,ie,oe,ge,we,Me){ne._lock||Ai&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,we,Me,!1,V!=null),V!=null?S(null,!0,!0):S(X,!0,!1))}function q(V,X,ie,oe,ge,we,Me,Pe,ze){if(D==null&&W(!1),Hi(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){an=-10,Kt=-10;return}let[Ge,Je]=ht.scales,tt=X.cursor.sync,[St,Ht]=tt.values,[Tt,zt]=tt.scales,[vt,ct]=ht.match,vn=X.axes[0].side%2==1,In=H.ori==0?xt:qe,sr=H.ori==1?xt:qe,Xt=vn?we:ge,pe=vn?ge:we,Se=vn?oe:ie,xe=vn?ie:oe;if(Tt!=null?ie=vt(Ge,Tt)?b(St,$[Ge],In,0):-10:ie=In*(Se/Xt),zt!=null?oe=ct(Je,zt)?b(Ht,$[Je],sr,0):-10:oe=sr*(xe/pe),H.ori==1){let Ve=ie;ie=oe,oe=Ve}}ze&&(X==null||X.cursor.event.type==zu)&&((ie<=1||ie>=xt-1)&&(ie=bs(ie,xt)),(oe<=1||oe>=qe-1)&&(oe=bs(oe,qe))),Pe?(va=ie,_o=oe,[_i,co]=ne.move(r,ie,oe)):(an=ie,Kt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){pn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,we,Me){Ai=!0,je=kn=zn._x=zn._y=!1,q(V,X,ie,oe,ge,we,Me,!0,!1),V!=null&&(xn(ju,Uu,be,!1),Rt(Ef,r,_i,co,xt,qe,null));let{left:Pe,top:ze,width:Ge,height:Je}=kt;re=Pe,se=ze,ye=Ge,Ce=Je}function be(V,X,ie,oe,ge,we,Me){Ai=zn._x=zn._y=!1,q(V,X,ie,oe,ge,we,Me,!1,!0);let{left:Pe,top:ze,width:Ge,height:Je}=kt,tt=Ge>0||Je>0,St=re!=Pe||se!=ze||ye!=Ge||Ce!=Je;if(tt&&St&&pn(kt),zn.setScale&&tt&&St){let Ht=Pe,Tt=Ge,zt=ze,vt=Je;if(H.ori==1&&(Ht=ze,Tt=Je,zt=Pe,vt=Ge),je&&ir(C,mr(Ht,C),mr(Ht+Tt,C)),kn)for(let ct in $){let vn=$[ct];ct!=C&&vn.from==null&&vn.min!=fn&&ir(ct,mr(zt+vt,ct),mr(zt,ct))}Q()}else ne.lock&&(ne._lock=!ne._lock,S(X,!0,V!=null));V!=null&&(Pn(ju,Uu),Rt(ju,r,an,Kt,xt,qe,null))}function Oe(V,X,ie,oe,ge,we,Me){if(ne._lock)return;Hi(V);let Pe=Ai;if(Ai){let ze=!0,Ge=!0,Je=10,tt,St;H.ori==0?(tt=je,St=kn):(tt=kn,St=je),tt&&St&&(ze=an<=Je||an>=xt-Je,Ge=Kt<=Je||Kt>=qe-Je),tt&&ze&&(an=an<_i?0:xt),St&&Ge&&(Kt=Kt<co?0:qe),S(null,!0,!0),Ai=!1}an=-10,Kt=-10,te.fill(null),S(null,!0,!0),Pe&&(Ai=Pe)}function Re(V,X,ie,oe,ge,we,Me){ne._lock||(Hi(V),Ts(),Q(),V!=null&&Rt(Rf,r,an,Kt,xt,qe,null))}function Ke(){E.forEach(F_),vo(r.width,r.height,!0)}vs(Bl,Js,Ke);const ut={};ut.mousedown=me,ut.mousemove=z,ut.mouseup=be,ut.dblclick=Re,ut.setSeries=(V,X,ie,oe)=>{let ge=ht.match[2];ie=ge(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ue&&(xn(Ef,s,me),xn(zu,s,z),xn(If,s,V=>{Hi(V),W(!1)}),xn(Lf,s,Oe),xn(Rf,s,Re),gh.add(r),r.syncRect=W);const et=r.hooks=n.hooks||{};function st(V,X,ie){Zo?ko.push([V,X,ie]):V in et&&et[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)et[X]=(et[X]||[]).concat(V.hooks[X])});const Sn=(V,X,ie)=>ie,ht=nr({key:null,setSeries:!1,filters:{pub:Qf,sub:Qf},scales:[C,x[1]?x[1].scale:null],match:[Zf,Zf,Sn],values:[null,null]},ne.sync);ht.match.length==2&&ht.match.push(Sn),ne.sync=ht;const Mn=ht.key,$t=Dm(Mn);function Rt(V,X,ie,oe,ge,we,Me){ht.filters.pub(V,X,ie,oe,ge,we,Me)&&$t.pub(V,X,ie,oe,ge,we,Me)}$t.sub(r);function or(V,X,ie,oe,ge,we,Me){ht.filters.sub(V,X,ie,oe,ge,we,Me)&&ut[V](null,X,ie,oe,ge,we,Me)}r.pub=or;function vr(){$t.unsub(r),gh.delete(r),wr.clear(),Gu(Bl,Js,Ke),f.remove(),fe==null||fe.remove(),st("destroy")}r.destroy=vr;function En(){st("init",n,e),Ho(e||n.data,!1),_[C]?Ne(C,_[C]):Ts(),mo=kt.show&&(kt.width>0||kt.height>0),ji=xr=!0,vo(n.width,n.height)}return x.forEach(ha),E.forEach(ui),t?t instanceof HTMLElement?(t.appendChild(f),En()):t(r,En):En(),r}Ar.assign=nr,Ar.fmtNum=Qu,Ar.rangeNum=Ul,Ar.rangeLog=Hl,Ar.rangeAsinh=Yu,Ar.orient=xs,Ar.pxRatio=nn,Ar.join=TS,Ar.fmtDate=th,Ar.tzDate=WS,Ar.sync=Dm;{Ar.addGap=x_,Ar.clipGaps=Ql;let n=Ar.paths={points:Hm};n.linear=Vm,n.stepped=S_,n.bars=__,n.spline=$_}var Jm,ev;function P_(){return ev||(ev=1,Jm=function(n,e,t,r,d){var p,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(d===void 0)d=n.length-1;else if(d=d|0,d<r||d>=n.length)throw new RangeError("invalid upper bound");for(;r<=d;)if(p=r+(d-r>>>1),g=+t(n[p],e,p,n),g<0)r=p+1;else if(g>0)d=p-1;else return p;return~r}),Jm}var W_=P_();const ZD=ar("e",bl(W_));var mh,tv;function B_(){if(tv)return mh;tv=1;function n(e,t,r){var d=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var g=Array(p);++d<p;)g[d]=e[d+t];return g}return mh=n,mh}var vh,nv;function z_(){if(nv)return vh;nv=1;var n=B_();function e(t,r,d){var p=t.length;return d=d===void 0?p:d,!r&&d>=p?t:n(t,r,d)}return vh=e,vh}var yh,rv;function iv(){if(rv)return yh;rv=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\ufe0e\\ufe0f",g="\\u200d",b=RegExp("["+g+n+d+p+"]");function h(f){return b.test(f)}return yh=h,yh}var bh,ov;function j_(){if(ov)return bh;ov=1;function n(e){return e.split("")}return bh=n,bh}var wh,sv;function H_(){if(sv)return wh;sv=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\ufe0e\\ufe0f",g="["+n+"]",b="["+d+"]",h="\\ud83c[\\udffb-\\udfff]",f="(?:"+b+"|"+h+")",o="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",s=f+"?",u="["+p+"]?",m="(?:"+l+"(?:"+[o,a,c].join("|")+")"+u+s+")*",w=u+s+m,x="(?:"+[o+b+"?",b,a,c,g].join("|")+")",E=RegExp(h+"(?="+h+")|"+x+w,"g");function $(k){return k.match(E)||[]}return wh=$,wh}var xh,av;function U_(){if(av)return xh;av=1;var n=j_(),e=iv(),t=H_();function r(d){return e(d)?t(d):n(d)}return xh=r,xh}var Ch,lv;function V_(){if(lv)return Ch;lv=1;var n=typeof Wo=="object"&&Wo&&Wo.Object===Object&&Wo;return Ch=n,Ch}var kh,cv;function q_(){if(cv)return kh;cv=1;var n=V_(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return kh=t,kh}var Sh,uv;function _h(){if(uv)return Sh;uv=1;var n=q_(),e=n.Symbol;return Sh=e,Sh}var Ah,hv;function K_(){if(hv)return Ah;hv=1;function n(e,t){for(var r=-1,d=e==null?0:e.length,p=Array(d);++r<d;)p[r]=t(e[r],r,e);return p}return Ah=n,Ah}var $h,dv;function G_(){if(dv)return $h;dv=1;var n=Array.isArray;return $h=n,$h}var Th,pv;function Y_(){if(pv)return Th;pv=1;var n=_h(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,d=n?n.toStringTag:void 0;function p(g){var b=t.call(g,d),h=g[d];try{g[d]=void 0;var f=!0}catch{}var o=r.call(g);return f&&(b?g[d]=h:delete g[d]),o}return Th=p,Th}var Mh,gv;function X_(){if(gv)return Mh;gv=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Mh=t,Mh}var Eh,fv;function Q_(){if(fv)return Eh;fv=1;var n=_h(),e=Y_(),t=X_(),r="[object Null]",d="[object Undefined]",p=n?n.toStringTag:void 0;function g(b){return b==null?b===void 0?d:r:p&&p in Object(b)?e(b):t(b)}return Eh=g,Eh}var Ih,mv;function Z_(){if(mv)return Ih;mv=1;function n(e){return e!=null&&typeof e=="object"}return Ih=n,Ih}var Lh,vv;function J_(){if(vv)return Lh;vv=1;var n=Q_(),e=Z_(),t="[object Symbol]";function r(d){return typeof d=="symbol"||e(d)&&n(d)==t}return Lh=r,Lh}var Rh,yv;function eA(){if(yv)return Rh;yv=1;var n=_h(),e=K_(),t=G_(),r=J_(),d=n?n.prototype:void 0,p=d?d.toString:void 0;function g(b){if(typeof b=="string")return b;if(t(b))return e(b,g)+"";if(r(b))return p?p.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Rh=g,Rh}var Oh,bv;function tc(){if(bv)return Oh;bv=1;var n=eA();function e(t){return t==null?"":n(t)}return Oh=e,Oh}var Nh,wv;function tA(){if(wv)return Nh;wv=1;var n=z_(),e=iv(),t=U_(),r=tc();function d(p){return function(g){g=r(g);var b=e(g)?t(g):void 0,h=b?b[0]:g.charAt(0),f=b?n(b,1).join(""):g.slice(1);return h[p]()+f}}return Nh=d,Nh}var Dh,xv;function Cv(){if(xv)return Dh;xv=1;var n=tA(),e=n("toUpperCase");return Dh=e,Dh}var nA=Cv();const rA=bl(nA);var Fh,kv;function iA(){if(kv)return Fh;kv=1;var n=tc(),e=Cv();function t(r){return e(n(r).toLowerCase())}return Fh=t,Fh}var Ph,Sv;function oA(){if(Sv)return Ph;Sv=1;function n(e,t,r,d){var p=-1,g=e==null?0:e.length;for(d&&g&&(r=e[++p]);++p<g;)r=t(r,e[p],p,e);return r}return Ph=n,Ph}var Wh,_v;function sA(){if(_v)return Wh;_v=1;function n(e){return function(t){return e==null?void 0:e[t]}}return Wh=n,Wh}var Bh,Av;function aA(){if(Av)return Bh;Av=1;var n=sA(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t=n(e);return Bh=t,Bh}var zh,$v;function lA(){if($v)return zh;$v=1;var n=aA(),e=tc(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",d="\\ufe20-\\ufe2f",p="\\u20d0-\\u20ff",g=r+d+p,b="["+g+"]",h=RegExp(b,"g");function f(o){return o=e(o),o&&o.replace(t,n).replace(h,"")}return zh=f,zh}var jh,Tv;function cA(){if(Tv)return jh;Tv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(n)||[]}return jh=e,jh}var Hh,Mv;function uA(){if(Mv)return Hh;Mv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(t){return n.test(t)}return Hh=e,Hh}var Uh,Ev;function hA(){if(Ev)return Uh;Ev=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",l=b+h+f+o,s="['’]",u="["+l+"]",m="["+d+"]",w="\\d+",x="["+p+"]",E="["+g+"]",$="[^"+n+l+w+p+g+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",L="[^"+n+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",H="\\u200d",P="(?:"+E+"|"+$+")",O="(?:"+I+"|"+$+")",A="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+c+"]?",U="(?:"+H+"(?:"+[L,R,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[x,R,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+A+"(?="+[u,I,"$"].join("|")+")",O+"+"+_+"(?="+[u,I+P,"$"].join("|")+")",I+"?"+P+"+"+A,I+"+"+_,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return Uh=ae,Uh}var Vh,Iv;function dA(){if(Iv)return Vh;Iv=1;var n=cA(),e=uA(),t=tc(),r=hA();function d(p,g,b){return p=t(p),g=b?void 0:g,g===void 0?e(p)?r(p):n(p):p.match(g)||[]}return Vh=d,Vh}var qh,Lv;function pA(){if(Lv)return qh;Lv=1;var n=oA(),e=lA(),t=dA(),r="['’]",d=RegExp(r,"g");function p(g){return function(b){return n(t(e(b).replace(d,"")),g,"")}}return qh=p,qh}var Kh,Rv;function gA(){if(Rv)return Kh;Rv=1;var n=iA(),e=pA(),t=e(function(r,d,p){return d=d.toLowerCase(),r+(p?n(d):d)});return Kh=t,Kh}var fA=gA();const mA=bl(fA),vA=Object.assign({"./ArrayWidget.vue":()=>rt(()=>nt.import("./ArrayWidget-CC3iwyQc-581e617eccbe68bbb1af.js"),void 0),"./ArrayplotWidget.vue":()=>rt(()=>nt.import("./ArrayplotWidget-CiQdsmVy-859543a10edfa3592fff.js"),void 0),"./BlockWidget.vue":()=>rt(()=>nt.import("./BlockWidget-LLPHBYVU-7d355eeaa43df376e7d3.js"),void 0),"./ButtonWidget.vue":()=>rt(()=>nt.import("./ButtonWidget-Co0KMkIG-ac76564a2d47d87aefb4.js"),void 0),"./CanvasWidget.vue":()=>rt(()=>nt.import("./CanvasWidget-DPrxnI7M-37d0ad98197e46edd19f.js"),void 0),"./CanvasdotWidget.vue":()=>rt(()=>nt.import("./CanvasdotWidget-s1ALDR4k-84c7695ba707edab97e8.js"),void 0),"./CanvasimageWidget.vue":()=>rt(()=>nt.import("./CanvasimageWidget-Cs-KjdqK-b873acfda15b467afe38.js"),void 0),"./CanvasimagevalueWidget.vue":()=>rt(()=>nt.import("./CanvasimagevalueWidget-B-wBQisl-38a1aaecf7ac0c399680.js"),void 0),"./CanvaslabelWidget.vue":()=>rt(()=>nt.import("./CanvaslabelWidget-CLBK52pP-194e97a305f00fc1e4ee.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>rt(()=>nt.import("./CanvaslabelvalueWidget-CAa70y_o-c43ce9ba98d4a4f16068.js"),void 0),"./CanvaslineWidget.vue":()=>rt(()=>nt.import("./CanvaslineWidget-PdwVJOQ5-6f063c05e5c69cee895b.js"),void 0),"./CanvaslinevalueWidget.vue":()=>rt(()=>nt.import("./CanvaslinevalueWidget-CKrp1f3Z-f1551999d3dad2b122e2.js"),void 0),"./CheckbuttonWidget.vue":()=>rt(()=>nt.import("./CheckbuttonWidget-CTSfH4NN-71b8c8474c541be28c32.js"),void 0),"./ComboboxWidget.vue":()=>rt(()=>nt.import("./ComboboxWidget-BQzv9zk5-9d77f62e586ae18b4b8e.js"),void 0),"./DateWidget.vue":()=>rt(()=>nt.import("./DateWidget-DKXxXT1g-a8af81dd994d4d59a35a.js"),void 0),"./DynamicWidget.vue":()=>rt(()=>nt.import("./DynamicWidget-CfMtj7H8-829f9b990afd83ce5713.js"),void 0),"./FormatvalueWidget.vue":()=>rt(()=>nt.import("./FormatvalueWidget-7Yp9jfgX-edadfe8dc88f95cda3d6.js"),void 0),"./HorizontalWidget.vue":()=>rt(()=>nt.import("./HorizontalWidget-BFzi3rMl-96af6b9c2e1d7667e92c.js"),void 0),"./HorizontalboxWidget.vue":()=>rt(()=>nt.import("./HorizontalboxWidget-DIagyace-b3069aff2e4657d6cdc7.js"),void 0),"./HorizontallineWidget.vue":()=>rt(()=>nt.import("./HorizontallineWidget-BOZNWM3a-53d1205c5a16674a8f96.js"),void 0),"./IframeWidget.vue":()=>rt(()=>nt.import("./IframeWidget-BU24bhc2-6ecb4335c709e54ca8da.js"),void 0),"./ImageviewerWidget.vue":()=>rt(()=>nt.import("./ImageviewerWidget-YMA4CVsl-4e57a23289aea71289e2.js"),void 0),"./LabelWidget.vue":()=>rt(()=>nt.import("./LabelWidget-2402SA18-cad254101a69584c6290.js"),void 0),"./LabelledWidget.vue":()=>rt(()=>nt.import("./LabelledWidget-Cbubzj_g-ce3bf5c2bcb90ef75b37.js"),void 0),"./LabelprogressbarWidget.vue":()=>rt(()=>nt.import("./LabelprogressbarWidget-s8V7w6LJ-fe2d791eebe3fbeee1fd.js"),void 0),"./LabelsparklineWidget.vue":()=>rt(()=>nt.import("./LabelsparklineWidget-qbM_OXLh-f4b66d7d95ea2df54502.js"),void 0),"./LabelvalueWidget.vue":()=>rt(()=>nt.import("./LabelvalueWidget-B5Ihc2yP-960ee83b3dcae90f3480.js"),void 0),"./LabelvaluedescWidget.vue":()=>rt(()=>nt.import("./LabelvaluedescWidget-Cl3JHPGR-43830e3e8dd8a007d5c3.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitsbarWidget-DnpfRyHl-453a5db741548c187f25.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitscolumnWidget-D4L9L5oa-d1ace11d4eec94b9100a.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>rt(()=>nt.import("./LabelvaluerangebarWidget-BivnHCbE-fce7d2c515011c094b7f.js"),void 0),"./LedWidget.vue":()=>rt(()=>nt.import("./LedWidget-DpdthKEd-e8cc1479defba776ae7a.js"),void 0),"./LimitsbarWidget.vue":()=>rt(()=>nt.import("./LimitsbarWidget-CLyj3Kb--906cca8ff1bf51ab12ec.js"),void 0),"./LimitscolorWidget.vue":()=>rt(()=>nt.import("./LimitscolorWidget-ChvzYoug-a3e71b7a308085e50c6c.js"),void 0),"./LimitscolumnWidget.vue":()=>rt(()=>nt.import("./LimitscolumnWidget-IOhsLFZ1-0363e0f7dc874050da92.js"),void 0),"./LinegraphWidget.vue":()=>rt(()=>nt.import("./LinegraphWidget-DZdqMqjw-6a57fc795406bbe9edf1.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>rt(()=>nt.import("./MatrixbycolumnsWidget-BzGYMhJ2-7bd5d04031a6fafb7bba.js"),void 0),"./ProgressbarWidget.vue":()=>rt(()=>nt.import("./ProgressbarWidget-Bre-0zcS-bd24a237e1f96d1ed242.js"),void 0),"./RadiobuttonWidget.vue":()=>rt(()=>nt.import("./RadiobuttonWidget-CLbfhrkc-d6c883f689cdf48c55d8.js"),void 0),"./RadiogroupWidget.vue":()=>rt(()=>nt.import("./RadiogroupWidget-DvRc70_Q-96beebc8d864908ff2b3.js"),void 0),"./RangebarWidget.vue":()=>rt(()=>nt.import("./RangebarWidget-BvzVWcfZ-84f51b2e633d105638f6.js"),void 0),"./RollupWidget.vue":()=>rt(()=>nt.import("./RollupWidget-KT243Ed8-d2d04263bc64617f43cc.js"),void 0),"./ScrollwindowWidget.vue":()=>rt(()=>nt.import("./ScrollwindowWidget-DcpdXyrP-61cf502cc8e4590c630c.js"),void 0),"./SignalWidget.vue":()=>rt(()=>nt.import("./SignalWidget-CoTi0Uzy-b369e6623de47e6e3d9b.js"),void 0),"./SpacerWidget.vue":()=>rt(()=>nt.import("./SpacerWidget-CTekSgNO-1231f8bb7aab613445cd.js"),void 0),"./SparklineWidget.vue":()=>rt(()=>nt.import("./SparklineWidget-BxwPKrIr-de9c14c6b396549e8270.js"),void 0),"./TabbookWidget.vue":()=>rt(()=>nt.import("./TabbookWidget-B6Nx3Kmt-94db5ac8af9b8cae4231.js"),void 0),"./TextboxWidget.vue":()=>rt(()=>nt.import("./TextboxWidget-DJgAfLFU-7c5683c20169aa6432a3.js"),void 0),"./TextfieldWidget.vue":()=>rt(()=>nt.import("./TextfieldWidget-Bc2xGs8v-156afeec5be0d510de36.js"),void 0),"./TimeWidget.vue":()=>rt(()=>nt.import("./TimeWidget-DO6ZuMLO-74d012d09ac38ea7855e.js"),void 0),"./TitleWidget.vue":()=>rt(()=>nt.import("./TitleWidget-CkZhMme1-d8b9e6f29a438ef388ce.js"),void 0),"./ValueWidget.vue":()=>rt(()=>nt.import("./ValueWidget-tieHz2H1-b5c769505bd3f691ba23.js"),void 0),"./ValuelimitsbarWidget.vue":()=>rt(()=>nt.import("./ValuelimitsbarWidget-oFqxZu0t-119b6bc83470c4518630.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>rt(()=>nt.import("./ValuelimitscolumnWidget-DYBv8POg-151ddaef24d784faba9e.js"),void 0),"./ValuerangebarWidget.vue":()=>rt(()=>nt.import("./ValuerangebarWidget-m3gFyG4v-1caba7e8ec9ae994114a.js"),void 0),"./VerticalWidget.vue":()=>rt(()=>nt.import("./VerticalWidget-CcdRZmQK-426a549005de0ca8db13.js"),void 0),"./VerticalboxWidget.vue":()=>rt(()=>nt.import("./VerticalboxWidget-DfsCYhrX-4bc593f181e61289ca28.js"),void 0)}),yA=Object.entries(vA).reduce((n,[e,t])=>{e=e.split("/").pop();const r=rA(mA(e.replace(/\.\w+$/,"")));return{...n,[r]:Cp(t)}},{}),JD=ar("U",{components:yA}),Ov="openc3-ace-vim-mode-enabled",Gh="ace/keyboard/vim",nc=ar("X",{isVimModeEnabled(){return localStorage.getItem(Ov)==="true"},setVimMode(n){localStorage.setItem(Ov,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(Gh),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:e}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(Gh),ace.config.loadModule(Gh,t=>{t.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)}}),bA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()},subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},wA={class:"app-title mr-2"};function xA(n,e,t,r,d,p){const g=He("v-col"),b=He("v-row"),h=He("v-icon"),f=He("v-btn"),o=He("v-divider"),a=He("v-list-item-title"),c=He("v-list-item"),l=He("v-list"),s=He("v-menu"),u=He("v-radio"),m=He("v-list-item-action"),w=He("v-radio-group"),x=He("v-checkbox");return ot(),Yt(kp,{to:"#openc3-menu"},[We(b,{"no-gutters":""},{default:Fe(()=>[We(g,{"align-self":"end"},{default:Fe(()=>[gr("span",wA,yn(t.title),1)]),_:1})]),_:1}),We(b,{dense:"",class:"flex-nowrap"},{default:Fe(()=>[(ot(!0),un(ii,null,Zi(t.menus,(E,$)=>(ot(),Yt(s,{ref_for:!0,ref:"topmenu",key:$},{activator:Fe(({props:k})=>[We(f,ml({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":p.formatDT(`${t.title} ${E.label}`)}),{append:Fe(()=>[We(h,{class:"menu-button-icon"},{default:Fe(()=>e[0]||(e[0]=[Ft(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(ot(!0),un(ii,null,Zi(E.items,(k,C)=>(ot(),un(ii,null,[k.divider?(ot(),Yt(o,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(ot(),un("div",{key:C+"-submenu"},[(ot(),Yt(s,{"open-on-hover":"",location:"right",key:C},{activator:Fe(({props:L})=>[(ot(),Yt(c,ml({ref_for:!0},L,{disabled:k.disabled,key:C}),lu({append:Fe(()=>[We(h,null,{default:Fe(()=>e[1]||(e[1]=[Ft(" mdi-chevron-right ")])),_:1})]),default:Fe(()=>[!k.radio&&!k.checkbox?(ot(),Yt(a,{key:0,style:ss("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ft(yn(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{disabled:k.disabled},{default:Fe(()=>[Ft(yn(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(ot(!0),un(ii,null,Zi(k.subMenu,(L,R)=>(ot(),Yt(c,{key:R,"prepend-icon":L.icon,onClick:F=>p.subMenuClick(L)},{default:Fe(()=>[We(a,null,{default:Fe(()=>[Ft(yn(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(ot(),Yt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Fe(()=>[(ot(!0),un(ii,null,Zi(k.choices,(L,R)=>(ot(),Yt(c,{key:R+"-choice"},{default:Fe(()=>[We(m,{class:"list-action"},{default:Fe(()=>[We(u,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(ot(),Yt(c,{onClick:L=>k.command(k),disabled:k.disabled,"data-test":p.formatDT(`${t.title} ${E.label} ${k.label}`),key:C+"-list"},lu({default:Fe(()=>[k.checkbox?(ot(),Yt(m,{key:0,class:"list-action"},{default:Fe(()=>[We(x,{modelValue:k.checked,"onUpdate:modelValue":L=>k.checked=L,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!k.radio&&!k.checkbox?(ot(),Yt(a,{key:1,style:ss("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ft(yn(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const CA=Ni(bA,[["render",xA],["__scopeId","data-v-4d454b93"]]);function Nv(n,e){return function(){return n.apply(e,arguments)}}const{toString:kA}=Object.prototype,{getPrototypeOf:Yh}=Object,{iterator:rc,toStringTag:Dv}=Symbol,ic=(n=>e=>{const t=kA.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),zi=n=>(n=n.toLowerCase(),e=>ic(e)===n),oc=n=>e=>typeof e===n,{isArray:aa}=Array,Ua=oc("undefined");function SA(n){return n!==null&&!Ua(n)&&n.constructor!==null&&!Ua(n.constructor)&&Kr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Fv=zi("ArrayBuffer");function _A(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Fv(n.buffer),e}const AA=oc("string"),Kr=oc("function"),Pv=oc("number"),sc=n=>n!==null&&typeof n=="object",$A=n=>n===!0||n===!1,ac=n=>{if(ic(n)!=="object")return!1;const e=Yh(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Dv in n)&&!(rc in n)},TA=zi("Date"),MA=zi("File"),EA=zi("Blob"),IA=zi("FileList"),LA=n=>sc(n)&&Kr(n.pipe),RA=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Kr(n.append)&&((e=ic(n))==="formdata"||e==="object"&&Kr(n.toString)&&n.toString()==="[object FormData]"))},OA=zi("URLSearchParams"),[NA,DA,FA,PA]=["ReadableStream","Request","Response","Headers"].map(zi),WA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),aa(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{const p=t?Object.getOwnPropertyNames(n):Object.keys(n),g=p.length;let b;for(r=0;r<g;r++)b=p[r],e.call(null,n[b],b,n)}}function Wv(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,d;for(;r-- >0;)if(d=t[r],e===d.toLowerCase())return d;return null}const Cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bv=n=>!Ua(n)&&n!==Cs;function Xh(){const{caseless:n}=Bv(this)&&this||{},e={},t=(r,d)=>{const p=n&&Wv(e,d)||d;ac(e[p])&&ac(r)?e[p]=Xh(e[p],r):ac(r)?e[p]=Xh({},r):aa(r)?e[p]=r.slice():e[p]=r};for(let r=0,d=arguments.length;r<d;r++)arguments[r]&&Va(arguments[r],t);return e}const BA=(n,e,t,{allOwnKeys:r}={})=>(Va(e,(d,p)=>{t&&Kr(d)?n[p]=Nv(d,t):n[p]=d},{allOwnKeys:r}),n),zA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),jA=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},HA=(n,e,t,r)=>{let d,p,g;const b={};if(e=e||{},n==null)return e;do{for(d=Object.getOwnPropertyNames(n),p=d.length;p-- >0;)g=d[p],(!r||r(g,n,e))&&!b[g]&&(e[g]=n[g],b[g]=!0);n=t!==!1&&Yh(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},UA=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},VA=n=>{if(!n)return null;if(aa(n))return n;let e=n.length;if(!Pv(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},qA=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Yh(Uint8Array)),KA=(n,e)=>{const t=(n&&n[rc]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},GA=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},YA=zi("HTMLFormElement"),XA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),zv=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),QA=zi("RegExp"),jv=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Va(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},ZA=n=>{jv(n,(e,t)=>{if(Kr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Kr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},JA=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return aa(n)?r(n):r(String(n).split(e)),t},e$=()=>{},t$=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function n$(n){return!!(n&&Kr(n.append)&&n[Dv]==="FormData"&&n[rc])}const r$=n=>{const e=new Array(10),t=(r,d)=>{if(sc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[d]=r;const p=aa(r)?[]:{};return Va(r,(g,b)=>{const h=t(g,d+1);!Ua(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},i$=zi("AsyncFunction"),o$=n=>n&&(sc(n)||Kr(n))&&Kr(n.then)&&Kr(n.catch),Hv=((n,e)=>n?setImmediate:e?((t,r)=>(Cs.addEventListener("message",({source:d,data:p})=>{d===Cs&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),Cs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Kr(Cs.postMessage)),s$=typeof queueMicrotask<"u"?queueMicrotask.bind(Cs):typeof process<"u"&&process.nextTick||Hv,a$=n=>n!=null&&Kr(n[rc]),Ae={isArray:aa,isArrayBuffer:Fv,isBuffer:SA,isFormData:RA,isArrayBufferView:_A,isString:AA,isNumber:Pv,isBoolean:$A,isObject:sc,isPlainObject:ac,isReadableStream:NA,isRequest:DA,isResponse:FA,isHeaders:PA,isUndefined:Ua,isDate:TA,isFile:MA,isBlob:EA,isRegExp:QA,isFunction:Kr,isStream:LA,isURLSearchParams:OA,isTypedArray:qA,isFileList:IA,forEach:Va,merge:Xh,extend:BA,trim:WA,stripBOM:zA,inherits:jA,toFlatObject:HA,kindOf:ic,kindOfTest:zi,endsWith:UA,toArray:VA,forEachEntry:KA,matchAll:GA,isHTMLForm:YA,hasOwnProperty:zv,hasOwnProp:zv,reduceDescriptors:jv,freezeMethods:ZA,toObjectSet:JA,toCamelCase:XA,noop:e$,toFiniteNumber:t$,findKey:Wv,global:Cs,isContextDefined:Bv,isSpecCompliantForm:n$,toJSONObject:r$,isAsyncFn:i$,isThenable:o$,setImmediate:Hv,asap:s$,isIterable:a$};function Lt(n,e,t,r,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),d&&(this.response=d,this.status=d.status?d.status:null)}Ae.inherits(Lt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Uv=Lt.prototype,Vv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Vv[n]={value:n}}),Object.defineProperties(Lt,Vv),Object.defineProperty(Uv,"isAxiosError",{value:!0}),Lt.from=(n,e,t,r,d,p)=>{const g=Object.create(Uv);return Ae.toFlatObject(n,g,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(g,n.message,e,t,r,d),g.cause=n,g.name=n.name,p&&Object.assign(g,p),g};const l$=null;function Qh(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function qv(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function Kv(n,e,t){return n?n.concat(e).map(function(r,d){return r=qv(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function c$(n){return Ae.isArray(n)&&!n.some(Qh)}const u$=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function lc(n,e,t){if(!Ae.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Ae.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,s){return!Ae.isUndefined(s[l])});const r=t.metaTokens,d=t.visitor||f,p=t.dots,g=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(d))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(!b&&Ae.isBlob(l))throw new Lt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function f(l,s,u){let m=l;if(l&&!u&&typeof l=="object"){if(Ae.endsWith(s,"{}"))s=r?s:s.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&c$(l)||(Ae.isFileList(l)||Ae.endsWith(s,"[]"))&&(m=Ae.toArray(l)))return s=qv(s),m.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(g===!0?Kv([s],x,p):g===null?s:s+"[]",h(w))}),!1}return Qh(l)?!0:(e.append(Kv(u,s,p),h(l)),!1)}const o=[],a=Object.assign(u$,{defaultVisitor:f,convertValue:h,isVisitable:Qh});function c(l,s){if(!Ae.isUndefined(l)){if(o.indexOf(l)!==-1)throw Error("Circular reference detected in "+s.join("."));o.push(l),Ae.forEach(l,function(u,m){(!(Ae.isUndefined(u)||u===null)&&d.call(e,u,Ae.isString(m)?m.trim():m,s,a))===!0&&c(u,s?s.concat(m):[m])}),o.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return c(n),e}function Gv(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Zh(n,e){this._pairs=[],n&&lc(n,this,e)}const Yv=Zh.prototype;Yv.append=function(n,e){this._pairs.push([n,e])},Yv.toString=function(n){const e=n?function(t){return n.call(this,t,Gv)}:Gv;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function h$(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xv(n,e,t){if(!e)return n;const r=t&&t.encode||h$;Ae.isFunction(t)&&(t={serialize:t});const d=t&&t.serialize;let p;if(d?p=d(e,t):p=Ae.isURLSearchParams(e)?e.toString():new Zh(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}let Qv=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,function(t){t!==null&&e(t)})}};const Zv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},d$=typeof URLSearchParams<"u"?URLSearchParams:Zh,p$=typeof FormData<"u"?FormData:null,g$=typeof Blob<"u"?Blob:null,f$={isBrowser:!0,classes:{URLSearchParams:d$,FormData:p$,Blob:g$},protocols:["http","https","file","blob","url","data"]},Jh=typeof window<"u"&&typeof document<"u",ed=typeof navigator=="object"&&navigator||void 0,m$=Jh&&(!ed||["ReactNative","NativeScript","NS"].indexOf(ed.product)<0),v$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",y$=Jh&&window.location.href||"http://localhost",b$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jh,hasStandardBrowserEnv:m$,hasStandardBrowserWebWorkerEnv:v$,navigator:ed,origin:y$},Symbol.toStringTag,{value:"Module"})),$r={...b$,...f$};function w$(n,e){return lc(n,new $r.classes.URLSearchParams,Object.assign({visitor:function(t,r,d,p){return $r.isNode&&Ae.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)}},e))}function x$(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function C$(n){const e={},t=Object.keys(n);let r;const d=t.length;let p;for(r=0;r<d;r++)p=t[r],e[p]=n[p];return e}function Jv(n){function e(t,r,d,p){let g=t[p++];if(g==="__proto__")return!0;const b=Number.isFinite(+g),h=p>=t.length;return g=!g&&Ae.isArray(d)?d.length:g,h?(Ae.hasOwnProp(d,g)?d[g]=[d[g],r]:d[g]=r,!b):((!d[g]||!Ae.isObject(d[g]))&&(d[g]=[]),e(t,r,d[g],p)&&Ae.isArray(d[g])&&(d[g]=C$(d[g])),!b)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const t={};return Ae.forEachEntry(n,(r,d)=>{e(x$(r),d,t,0)}),t}return null}function k$(n,e,t){if(Ae.isString(n))try{return(e||JSON.parse)(n),Ae.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const qa={transitional:Zv,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,d=Ae.isObject(n);if(d&&Ae.isHTMLForm(n)&&(n=new FormData(n)),Ae.isFormData(n))return r?JSON.stringify(Jv(n)):n;if(Ae.isArrayBuffer(n)||Ae.isBuffer(n)||Ae.isStream(n)||Ae.isFile(n)||Ae.isBlob(n)||Ae.isReadableStream(n))return n;if(Ae.isArrayBufferView(n))return n.buffer;if(Ae.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let p;if(d){if(t.indexOf("application/x-www-form-urlencoded")>-1)return w$(n,this.formSerializer).toString();if((p=Ae.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return lc(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),k$(n)):n}],transformResponse:[function(n){const e=this.transitional||qa.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(n)||Ae.isReadableStream(n))return n;if(n&&Ae.isString(n)&&(t&&!this.responseType||r)){const d=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(p){if(d)throw p.name==="SyntaxError"?Lt.from(p,Lt.ERR_BAD_RESPONSE,this,null,this.response):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],n=>{qa.headers[n]={}});const S$=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_$=n=>{const e={};let t,r,d;return n&&n.split(`
|
1490
|
+
`).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&S$[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},ey=Symbol("internals");function Ka(n){return n&&String(n).trim().toLowerCase()}function cc(n){return n===!1||n==null?n:Ae.isArray(n)?n.map(cc):String(n)}function A$(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const $$=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function td(n,e,t,r,d){if(Ae.isFunction(r))return r.call(this,e,t);if(d&&(e=t),!!Ae.isString(e)){if(Ae.isString(r))return e.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(e)}}function T$(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function M$(n,e){const t=Ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(d,p,g){return this[r].call(this,e,d,p,g)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,t,r){const d=this;function p(b,h,f){const o=Ka(h);if(!o)throw new Error("header name must be a non-empty string");const a=Ae.findKey(d,o);(!a||d[a]===void 0||f===!0||f===void 0&&d[a]!==!1)&&(d[a||h]=cc(b))}const g=(b,h)=>Ae.forEach(b,(f,o)=>p(f,o,h));if(Ae.isPlainObject(e)||e instanceof this.constructor)g(e,t);else if(Ae.isString(e)&&(e=e.trim())&&!$$(e))g(_$(e),t);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},h,f;for(const o of e){if(!Ae.isArray(o))throw TypeError("Object iterator must return a key-value pair");b[f=o[0]]=(h=b[f])?Ae.isArray(h)?[...h,o[1]]:[h,o[1]]:o[1]}g(b,t)}else e!=null&&p(t,e,r);return this}get(e,t){if(e=Ka(e),e){const r=Ae.findKey(this,e);if(r){const d=this[r];if(!t)return d;if(t===!0)return A$(d);if(Ae.isFunction(t))return t.call(this,d,r);if(Ae.isRegExp(t))return t.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ka(e),e){const r=Ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||td(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let d=!1;function p(g){if(g=Ka(g),g){const b=Ae.findKey(r,g);b&&(!t||td(r,r[b],b,t))&&(delete r[b],d=!0)}}return Ae.isArray(e)?e.forEach(p):p(e),d}clear(e){const t=Object.keys(this);let r=t.length,d=!1;for(;r--;){const p=t[r];(!e||td(this,this[p],p,e,!0))&&(delete this[p],d=!0)}return d}normalize(e){const t=this,r={};return Ae.forEach(this,(d,p)=>{const g=Ae.findKey(r,p);if(g){t[g]=cc(d),delete t[p];return}const b=e?T$(p):String(p).trim();b!==p&&delete t[p],t[b]=cc(d),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ae.forEach(this,(r,d)=>{r!=null&&r!==!1&&(t[d]=e&&Ae.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
1491
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(d=>r.set(d)),r}static accessor(e){const t=(this[ey]=this[ey]={accessors:{}}).accessors,r=this.prototype;function d(p){const g=Ka(p);t[g]||(M$(r,p),t[g]=!0)}return Ae.isArray(e)?e.forEach(d):d(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Gr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Ae.freezeMethods(Gr);function nd(n,e){const t=this||qa,r=e||t,d=Gr.from(r.headers);let p=r.data;return Ae.forEach(n,function(g){p=g.call(t,p,d.normalize(),e?e.status:void 0)}),d.normalize(),p}function ty(n){return!!(n&&n.__CANCEL__)}function la(n,e,t){Lt.call(this,n??"canceled",Lt.ERR_CANCELED,e,t),this.name="CanceledError"}Ae.inherits(la,Lt,{__CANCEL__:!0});function ny(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Lt("Request failed with status code "+t.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function E$(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function I$(n,e){n=n||10;const t=new Array(n),r=new Array(n);let d=0,p=0,g;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),f=r[p];g||(g=h),t[d]=b,r[d]=h;let o=p,a=0;for(;o!==d;)a+=t[o++],o=o%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const c=f&&h-f;return c?Math.round(a*1e3/c):void 0}}function L$(n,e){let t=0,r=1e3/e,d,p;const g=(b,h=Date.now())=>{t=h,d=null,p&&(clearTimeout(p),p=null),n.apply(null,b)};return[(...b)=>{const h=Date.now(),f=h-t;f>=r?g(b,h):(d=b,p||(p=setTimeout(()=>{p=null,g(d)},r-f)))},()=>d&&g(d)]}const uc=(n,e,t=3)=>{let r=0;const d=I$(50,250);return L$(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),o=g<=b;r=g;const a={loaded:g,total:b,progress:b?g/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&o?(b-g)/f:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(a)},t)},ry=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},iy=n=>(...e)=>Ae.asap(()=>n(...e)),R$=$r.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,$r.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL($r.origin),$r.navigator&&/(msie|trident)/i.test($r.navigator.userAgent)):()=>!0,O$=$r.hasStandardBrowserEnv?{write(n,e,t,r,d,p){const g=[n+"="+encodeURIComponent(e)];Ae.isNumber(t)&&g.push("expires="+new Date(t).toGMTString()),Ae.isString(r)&&g.push("path="+r),Ae.isString(d)&&g.push("domain="+d),p===!0&&g.push("secure"),document.cookie=g.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function N$(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function D$(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function oy(n,e,t){let r=!N$(e);return n&&(r||t==!1)?D$(n,e):e}const sy=n=>n instanceof Gr?{...n}:n;function ks(n,e){e=e||{};const t={};function r(f,o,a,c){return Ae.isPlainObject(f)&&Ae.isPlainObject(o)?Ae.merge.call({caseless:c},f,o):Ae.isPlainObject(o)?Ae.merge({},o):Ae.isArray(o)?o.slice():o}function d(f,o,a,c){if(Ae.isUndefined(o)){if(!Ae.isUndefined(f))return r(void 0,f,a,c)}else return r(f,o,a,c)}function p(f,o){if(!Ae.isUndefined(o))return r(void 0,o)}function g(f,o){if(Ae.isUndefined(o)){if(!Ae.isUndefined(f))return r(void 0,f)}else return r(void 0,o)}function b(f,o,a){if(a in e)return r(f,o);if(a in n)return r(void 0,f)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b,headers:(f,o,a)=>d(sy(f),sy(o),a,!0)};return Ae.forEach(Object.keys(Object.assign({},n,e)),function(f){const o=h[f]||d,a=o(n[f],e[f],f);Ae.isUndefined(a)&&o!==b||(t[f]=a)}),t}const ay=n=>{const e=ks({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;e.headers=g=Gr.from(g),e.url=Xv(oy(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&g.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Ae.isFormData(t)){if($r.hasStandardBrowserEnv||$r.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if((h=g.getContentType())!==!1){const[f,...o]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];g.setContentType([f||"multipart/form-data",...o].join("; "))}}if($r.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&R$(e.url))){const f=d&&p&&O$.read(p);f&&g.set(d,f)}return e},F$=typeof XMLHttpRequest<"u",P$=F$&&function(n){return new Promise(function(e,t){const r=ay(n);let d=r.data;const p=Gr.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,o,a,c,l;function s(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=Gr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:n,request:u};ny(function($){e($),s()},function($){t($),s()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(t(new Lt("Request aborted",Lt.ECONNABORTED,n,u)),u=null)},u.onerror=function(){t(new Lt("Network Error",Lt.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Zv;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new Lt(x,E.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,n,u)),u=null},d===void 0&&p.setContentType(null),"setRequestHeader"in u&&Ae.forEach(p.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Ae.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),g&&g!=="json"&&(u.responseType=r.responseType),h&&([a,l]=uc(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([o,c]=uc(b),u.upload.addEventListener("progress",o),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{u&&(t(!x||x.type?new la(null,n,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=E$(r.url);if(w&&$r.protocols.indexOf(w)===-1){t(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,n));return}u.send(d||null)})},W$=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,d;const p=function(f){if(!d){d=!0,b();const o=f instanceof Error?f:this.reason;r.abort(o instanceof Lt?o:new la(o instanceof Error?o.message:o))}};let g=e&&setTimeout(()=>{g=null,p(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(p):f.removeEventListener("abort",p)}),n=null)};n.forEach(f=>f.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(b),h}},B$=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,d;for(;r<t;)d=r+e,yield n.slice(r,d),r=d},z$=async function*(n,e){for await(const t of j$(n))yield*B$(t,e)},j$=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},ly=(n,e,t,r)=>{const d=z$(n,e);let p=0,g,b=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:o}=await d.next();if(f){b(),h.close();return}let a=o.byteLength;if(t){let c=p+=a;t(c)}h.enqueue(new Uint8Array(o))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},hc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cy=hc&&typeof ReadableStream=="function",H$=hc&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),uy=(n,...e)=>{try{return!!n(...e)}catch{return!1}},U$=cy&&uy(()=>{let n=!1;const e=new Request($r.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),hy=64*1024,rd=cy&&uy(()=>Ae.isReadableStream(new Response("").body)),dc={stream:rd&&(n=>n.body)};hc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!dc[e]&&(dc[e]=Ae.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const V$=async n=>{if(n==null)return 0;if(Ae.isBlob(n))return n.size;if(Ae.isSpecCompliantForm(n))return(await new Request($r.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(n)||Ae.isArrayBuffer(n))return n.byteLength;if(Ae.isURLSearchParams(n)&&(n=n+""),Ae.isString(n))return(await H$(n)).byteLength},q$=async(n,e)=>Ae.toFiniteNumber(n.getContentLength())??V$(e),K$=hc&&(async n=>{let{url:e,method:t,data:r,signal:d,cancelToken:p,timeout:g,onDownloadProgress:b,onUploadProgress:h,responseType:f,headers:o,withCredentials:a="same-origin",fetchOptions:c}=ay(n);f=f?(f+"").toLowerCase():"text";let l=W$([d,p&&p.toAbortSignal()],g),s;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&U$&&t!=="get"&&t!=="head"&&(m=await q$(o,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=k.headers.get("content-type"))&&o.setContentType(C),k.body){const[L,R]=ry(m,uc(iy(h)));r=ly(k.body,hy,L,R)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;s=new Request(e,{...c,signal:l,method:t.toUpperCase(),headers:o.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(s);const E=rd&&(f==="stream"||f==="response");if(rd&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Ae.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&ry(C,uc(iy(b),!0))||[];x=new Response(ly(x.body,hy,L,()=>{R&&R(),u&&u()}),k)}f=f||"text";let $=await dc[Ae.findKey(dc,f)||"text"](x,n);return!E&&u&&u(),await new Promise((k,C)=>{ny(k,C,{data:$,headers:Gr.from(x.headers),status:x.status,statusText:x.statusText,config:n,request:s})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,n,s),{cause:w.cause||w}):Lt.from(w,w&&w.code,n,s)}}),id={http:l$,xhr:P$,fetch:K$};Ae.forEach(id,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const dy=n=>`- ${n}`,G$=n=>Ae.isFunction(n)||n===null||n===!1,py={getAdapter:n=>{n=Ae.isArray(n)?n:[n];const{length:e}=n;let t,r;const d={};for(let p=0;p<e;p++){t=n[p];let g;if(r=t,!G$(t)&&(r=id[(g=String(t)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${g}'`);if(r)break;d[g||"#"+p]=r}if(!r){const p=Object.entries(d).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let g=e?p.length>1?`since :
|
1492
|
+
`+p.map(dy).join(`
|
1493
|
+
`):" "+dy(p[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return r},adapters:id};function od(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new la(null,n)}function gy(n){return od(n),n.headers=Gr.from(n.headers),n.data=nd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),py.getAdapter(n.adapter||qa.adapter)(n).then(function(e){return od(n),e.data=nd.call(n,n.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return ty(e)||(od(n),e&&e.response&&(e.response.data=nd.call(n,n.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const fy="1.9.0",pc={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{pc[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const my={};pc.transitional=function(n,e,t){function r(d,p){return"[Axios v"+fy+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new Lt(r(p," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!my[p]&&(my[p]=!0,console.warn(r(p," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(d,p,g):!0}},pc.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function Y$(n,e,t){if(typeof n!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const p=r[d],g=e[p];if(g){const b=n[p],h=b===void 0||g(b,p,n);if(h!==!0)throw new Lt("option "+p+" must be "+h,Lt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Lt("Unknown option "+p,Lt.ERR_BAD_OPTION)}}const gc={assertOptions:Y$,validators:pc},to=gc.validators;let Ss=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Qv,response:new Qv}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const p=d.stack?d.stack.replace(/^.+\n/,""):"";try{r.stack?p&&!String(r.stack).endsWith(p.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1494
|
+
`+p):r.stack=p}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ks(this.defaults,t);const{transitional:r,paramsSerializer:d,headers:p}=t;r!==void 0&&gc.assertOptions(r,{silentJSONParsing:to.transitional(to.boolean),forcedJSONParsing:to.transitional(to.boolean),clarifyTimeoutError:to.transitional(to.boolean)},!1),d!=null&&(Ae.isFunction(d)?t.paramsSerializer={serialize:d}:gc.assertOptions(d,{encode:to.function,serialize:to.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),gc.assertOptions(t,{baseUrl:to.spelling("baseURL"),withXsrfToken:to.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=p&&Ae.merge(p.common,p[t.method]);p&&Ae.forEach(["delete","get","head","post","put","patch","common"],s=>{delete p[s]}),t.headers=Gr.concat(g,p);const b=[];let h=!0;this.interceptors.request.forEach(function(s){typeof s.runWhen=="function"&&s.runWhen(t)===!1||(h=h&&s.synchronous,b.unshift(s.fulfilled,s.rejected))});const f=[];this.interceptors.response.forEach(function(s){f.push(s.fulfilled,s.rejected)});let o,a=0,c;if(!h){const s=[gy.bind(this),void 0];for(s.unshift.apply(s,b),s.push.apply(s,f),c=s.length,o=Promise.resolve(t);a<c;)o=o.then(s[a++],s[a++]);return o}c=b.length;let l=t;for(a=0;a<c;){const s=b[a++],u=b[a++];try{l=s(l)}catch(m){u.call(this,m);break}}try{o=gy.call(this,l)}catch(s){return Promise.reject(s)}for(a=0,c=f.length;a<c;)o=o.then(f[a++],f[a++]);return o}getUri(e){e=ks(this.defaults,e);const t=oy(e.baseURL,e.url,e.allowAbsoluteUrls);return Xv(t,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){Ss.prototype[n]=function(e,t){return this.request(ks(t||{},{method:n,url:e,data:(t||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function e(t){return function(r,d,p){return this.request(ks(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Ss.prototype[n]=e(),Ss.prototype[n+"Form"]=e(!0)});let X$=class vw{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let p=r._listeners.length;for(;p-- >0;)r._listeners[p](d);r._listeners=null}),this.promise.then=d=>{let p;const g=new Promise(b=>{r.subscribe(b),p=b}).then(d);return g.cancel=function(){r.unsubscribe(p)},g},e(function(d,p,g){r.reason||(r.reason=new la(d,p,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vw(function(t){e=t}),cancel:e}}};function Q$(n){return function(e){return n.apply(null,e)}}function Z$(n){return Ae.isObject(n)&&n.isAxiosError===!0}const sd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sd).forEach(([n,e])=>{sd[e]=n});function vy(n){const e=new Ss(n),t=Nv(Ss.prototype.request,e);return Ae.extend(t,Ss.prototype,e,{allOwnKeys:!0}),Ae.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return vy(ks(n,r))},t}const Kn=ar("E",vy(qa));Kn.Axios=Ss,Kn.CanceledError=la,Kn.CancelToken=X$,Kn.isCancel=ty,Kn.VERSION=fy,Kn.toFormData=lc,Kn.AxiosError=Lt,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=Q$,Kn.isAxiosError=Z$,Kn.mergeConfig=ks,Kn.AxiosHeaders=Gr,Kn.formToJSON=n=>Jv(Ae.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=py.getAdapter,Kn.HttpStatusCode=sd,Kn.default=Kn;const{Axios:eF,AxiosError:tF,CanceledError:nF,isCancel:rF,CancelToken:iF,VERSION:oF,all:sF,Cancel:aF,isAxiosError:lF,spread:cF,toFormData:uF,AxiosHeaders:hF,HttpStatusCode:dF,formToJSON:pF,getAdapter:gF,mergeConfig:fF}=Kn;function yy(){return Object.assign({},Vs())}function J$(n,e,t){const r=$n(n,void 0);return r.setTime(r.getTime()+e*vl),r}function eT(n,e){const t=()=>tr(void 0,NaN),r=iT(n);let d;if(r.date){const h=oT(r.date,2);d=sT(h.restDateString,h.year)}if(!d||isNaN(+d))return t();const p=+d;let g=0,b;if(r.time&&(g=aT(r.time),isNaN(g)))return t();if(r.timezone){if(b=lT(r.timezone),isNaN(b))return t()}else{const h=new Date(p+g),f=$n(0,void 0);return f.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),f.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),f}return $n(p+g+b,void 0)}const fc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,nT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,rT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function iT(n){const e={},t=n.split(fc.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],fc.timeZoneDelimiter.test(e.date)&&(e.date=n.split(fc.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const d=fc.timezone.exec(r);d?(e.time=r.replace(d[1],""),e.timezone=d[1]):e.time=r}return e}function oT(n,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};const d=r[1]?parseInt(r[1]):null,p=r[2]?parseInt(r[2]):null;return{year:p===null?d:p*100,restDateString:n.slice((r[1]||r[2]).length)}}function sT(n,e){if(e===null)return new Date(NaN);const t=n.match(tT);if(!t)return new Date(NaN);const r=!!t[4],d=Ga(t[1]),p=Ga(t[2])-1,g=Ga(t[3]),b=Ga(t[4]),h=Ga(t[5])-1;if(r)return pT(e,b,h)?cT(e,b,h):new Date(NaN);{const f=new Date(0);return!hT(e,p,g)||!dT(e,d)?new Date(NaN):(f.setUTCFullYear(e,p,Math.max(d,g)),f)}}function Ga(n){return n?parseInt(n):1}function aT(n){const e=n.match(nT);if(!e)return NaN;const t=ad(e[1]),r=ad(e[2]),d=ad(e[3]);return gT(t,r,d)?t*du+r*vl+d*1e3:NaN}function ad(n){return n&&parseFloat(n.replace(",","."))||0}function lT(n){if(n==="Z")return 0;const e=n.match(rT);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),d=e[3]&&parseInt(e[3])||0;return fT(r,d)?t*(r*du+d*vl):NaN}function cT(n,e,t){const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,p=(e-1)*7+t+1-d;return r.setUTCDate(r.getUTCDate()+p),r}const uT=[31,null,31,30,31,30,31,31,30,31,30,31];function by(n){return n%400===0||n%4===0&&n%100!==0}function hT(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(uT[e]||(by(n)?29:28))}function dT(n,e){return e>=1&&e<=(by(n)?366:365)}function pT(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function gT(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function fT(n,e){return e>=0&&e<=59}function mT(n,e,t){return J$(n,-e)}function wy(n,e,t){const r=yy(),d=bT(n,t.timeZone,t.locale??r.locale);return"formatToParts"in d?vT(d,e):yT(d,e)}function vT(n,e){const t=n.formatToParts(e);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function yT(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function bT(n,e,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:e,timeZoneName:n})}function wT(n,e){const t=_T(e);return"formatToParts"in t?CT(t,n):kT(t,n)}const xT={year:0,month:1,day:2,hour:3,minute:4,second:5};function CT(n,e){try{const t=n.formatToParts(e),r=[];for(let d=0;d<t.length;d++){const p=xT[t[d].type];p!==void 0&&(r[p]=parseInt(t[d].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function kT(n,e){const t=n.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const ld={},xy=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),ST=xy==="06/25/2014, 00:00:00"||xy==="06/25/2014 00:00:00";function _T(n){return ld[n]||(ld[n]=ST?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),ld[n]}function Cy(n,e,t,r,d,p,g){const b=new Date(0);return b.setUTCFullYear(n,e,t),b.setUTCHours(r,d,p,g),b}const ky=36e5,AT=6e4,cd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ud(n,e,t){if(!n)return 0;let r=cd.timezoneZ.exec(n);if(r)return 0;let d,p;if(r=cd.timezoneHH.exec(n),r)return d=parseInt(r[1],10),Sy(d)?-(d*ky):NaN;if(r=cd.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const g=parseInt(r[3],10);return Sy(d,g)?(p=Math.abs(d)*ky+g*AT,r[1]==="+"?-p:p):NaN}if(MT(n)){e=new Date(e||Date.now());const g=t?e:$T(e),b=hd(g,n);return-(t?b:TT(e,b,n))}return NaN}function $T(n){return Cy(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function hd(n,e){const t=wT(n,e),r=Cy(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let d=n.getTime();const p=d%1e3;return d-=p>=0?p:1e3+p,r-d}function TT(n,e,t){let r=n.getTime()-e;const d=hd(new Date(r),t);if(e===d)return e;r-=d-e;const p=hd(new Date(r),t);return d===p?d:Math.max(d,p)}function Sy(n,e){return-23<=n&&n<=23&&(e==null||0<=e&&e<=59)}const _y={};function MT(n){if(_y[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),_y[n]=!0,!0}catch{return!1}}const ET=60*1e3,IT={X:function(n,e,t){const r=dd(t.timeZone,n);if(r===0)return"Z";switch(e){case"X":return Ay(r);case"XXXX":case"XX":return ca(r);case"XXXXX":case"XXX":default:return ca(r,":")}},x:function(n,e,t){const r=dd(t.timeZone,n);switch(e){case"x":return Ay(r);case"xxxx":case"xx":return ca(r);case"xxxxx":case"xxx":default:return ca(r,":")}},O:function(n,e,t){const r=dd(t.timeZone,n);switch(e){case"O":case"OO":case"OOO":return"GMT"+LT(r,":");case"OOOO":default:return"GMT"+ca(r,":")}},z:function(n,e,t){switch(e){case"z":case"zz":case"zzz":return wy("short",n,t);case"zzzz":default:return wy("long",n,t)}}};function dd(n,e){const t=n?ud(n,e,!0)/ET:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+n);return t}function mc(n,e){const t=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<e;)r="0"+r;return t+r}function ca(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=mc(Math.floor(r/60),2),p=mc(Math.floor(r%60),2);return t+d+e+p}function Ay(n,e){return n%60===0?(n>0?"-":"+")+mc(Math.abs(n)/60,2):ca(n,e)}function LT(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=Math.floor(r/60),p=r%60;return p===0?t+String(d):t+String(d)+e+mc(p,2)}function $y(n){const e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+n-+e}const RT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,pd=36e5,Ty=6e4,OT=2,Fr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:RT};function My(n,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const t=e.additionalDigits==null?OT:Number(e.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=NT(n),{year:d,restDateString:p}=DT(r.date,t),g=FT(p,d);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const b=g.getTime();let h=0,f;if(r.time&&(h=PT(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(f=ud(r.timeZone||e.timeZone,new Date(b+h)),isNaN(f))return new Date(NaN)}else f=$y(new Date(b+h)),f=$y(new Date(b+h+f));return new Date(b+h+f)}else return new Date(NaN)}function NT(n){const e={};let t=Fr.dateTimePattern.exec(n),r;if(t?(e.date=t[1],r=t[3]):(t=Fr.datePattern.exec(n),t?(e.date=t[1],r=t[2]):(e.date=null,r=n)),r){const d=Fr.timeZone.exec(r);d?(e.time=r.replace(d[1],""),e.timeZone=d[1].trim()):e.time=r}return e}function DT(n,e){if(n){const t=Fr.YYY[e],r=Fr.YYYYY[e];let d=Fr.YYYY.exec(n)||r.exec(n);if(d){const p=d[1];return{year:parseInt(p,10),restDateString:n.slice(p.length)}}if(d=Fr.YY.exec(n)||t.exec(n),d){const p=d[1];return{year:parseInt(p,10)*100,restDateString:n.slice(p.length)}}}return{year:null}}function FT(n,e){if(e===null)return null;let t,r,d;if(!n||!n.length)return t=new Date(0),t.setUTCFullYear(e),t;let p=Fr.MM.exec(n);if(p)return t=new Date(0),r=parseInt(p[1],10)-1,Ly(e,r)?(t.setUTCFullYear(e,r),t):new Date(NaN);if(p=Fr.DDD.exec(n),p){t=new Date(0);const g=parseInt(p[1],10);return zT(e,g)?(t.setUTCFullYear(e,0,g),t):new Date(NaN)}if(p=Fr.MMDD.exec(n),p){t=new Date(0),r=parseInt(p[1],10)-1;const g=parseInt(p[2],10);return Ly(e,r,g)?(t.setUTCFullYear(e,r,g),t):new Date(NaN)}if(p=Fr.Www.exec(n),p)return d=parseInt(p[1],10)-1,Ry(d)?Ey(e,d):new Date(NaN);if(p=Fr.WwwD.exec(n),p){d=parseInt(p[1],10)-1;const g=parseInt(p[2],10)-1;return Ry(d,g)?Ey(e,d,g):new Date(NaN)}return null}function PT(n){let e,t,r=Fr.HH.exec(n);if(r)return e=parseFloat(r[1].replace(",",".")),gd(e)?e%24*pd:NaN;if(r=Fr.HHMM.exec(n),r)return e=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),gd(e,t)?e%24*pd+t*Ty:NaN;if(r=Fr.HHMMSS.exec(n),r){e=parseInt(r[1],10),t=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return gd(e,t,d)?e%24*pd+t*Ty+d*1e3:NaN}return null}function Ey(n,e,t){e=e||0,t=t||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,p=e*7+t+1-d;return r.setUTCDate(r.getUTCDate()+p),r}const WT=[31,28,31,30,31,30,31,31,30,31,30,31],BT=[31,29,31,30,31,30,31,31,30,31,30,31];function Iy(n){return n%400===0||n%4===0&&n%100!==0}function Ly(n,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const r=Iy(n);if(r&&t>BT[e]||!r&&t>WT[e])return!1}return!0}function zT(n,e){if(e<1)return!1;const t=Iy(n);return!(t&&e>366||!t&&e>365)}function Ry(n,e){return!(n<0||n>52||e!=null&&(e<0||e>6))}function gd(n,e,t){return!(n<0||n>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}const jT=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function HT(n,e,t={}){e=String(e);const r=e.match(jT);if(r){const d=My(t.originalDate||n,t);e=r.reduce(function(p,g){if(g[0]==="'")return p;const b=p.indexOf(g),h=p[b-1]==="'",f=p.replace(g,"'"+IT[g[0]](d,g,t)+"'");return h?f.substring(0,b-1)+f.substring(b+1):f},e)}return Po(n,e,t)}function UT(n,e,t){n=My(n,t);const r=ud(e,n,!0),d=new Date(n.getTime()-r),p=new Date(0);return p.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),p.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),p}function vc(n,e,t,r){return r={...r,timeZone:e,originalDate:n},HT(UT(n,e,{timeZone:r.timeZone}),t,r)}const yc="yyyy-MM-dd",Oy="HH:mm:ss.SSS",Ny="HH:mm:ss",bc=`${yc} ${Oy}`,Dy=`${yc} ${Ny}`,mF=ar("R",{methods:{parseDateTime(n,e){return n.includes(" ")&&(n=n.replace(" ","T")),e&&e==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,e){return Po(!e||e==="local"?mT(n,n.getTimezoneOffset()):n,bc)},formatDateTime(n,e){return!e||e==="local"?Po(n,bc):vc(n,e,bc)},formatDateTimeHMS(n,e){return!e||e==="local"?Po(n,Dy):vc(n,e,Dy)},formatDate:function(n,e){return!e||e==="local"?Po(n,yc):vc(n,this.timeZone,yc)},formatTime:function(n,e,t=Oy){return!e||e==="local"?Po(n,t):vc(n,this.timeZone,t)},formatTimeHMS:function(n,e){return this.formatTime(n,e,Ny)},formatTimestamp(n,e){return this.formatDateTime(eT(n),e)},formatSeconds(n,e){return this.formatDateTime(new Date(n*1e3),e)},formatNanoseconds(n,e){return this.formatDateTime(new Date(parseInt(n)/1e6),e)}}});var VT=Object.defineProperty,qT=(n,e,t)=>e in n?VT(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,it=(n,e,t)=>qT(n,typeof e!="symbol"?e+"":e,t);function fd(n,e,t){const r=$n(n,t==null?void 0:t.in);return isNaN(e)?tr((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function KT(n,e){const t=$n(n,void 0).getDay();return t===0?7:t}function GT(n,e){const t=YT(e)?new e(0):tr(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function YT(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const XT=10;class Fy{constructor(){it(this,"subPriority",0)}validate(e,t){return!0}}let QT=class extends Fy{constructor(e,t,r,d,p){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=d,p&&(this.subPriority=p)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}},ZT=class extends Fy{constructor(e,t){super(),it(this,"priority",XT),it(this,"subPriority",-1),this.context=e||(r=>tr(t,r))}set(e,t){return t.timestampIsSet?e:tr(e,GT(e,this.context))}};class rn{run(e,t,r,d){const p=this.parse(e,t,r,d);return p?{setter:new QT(p.value,this.validate,this.set,this.priority,this.subPriority),rest:p.rest}:null}validate(e,t,r){return!0}}let JT=class extends rn{constructor(){super(...arguments),it(this,"priority",140),it(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}};const Gn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},no={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Yn(n,e){return n&&{value:e(n.value),rest:n.rest}}function Ln(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ro(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,d=t[2]?parseInt(t[2],10):0,p=t[3]?parseInt(t[3],10):0,g=t[5]?parseInt(t[5],10):0;return{value:r*(d*du+p*vl+g*Nw),rest:e.slice(t[0].length)}}function Py(n){return Ln(Gn.anyDigitsSigned,n)}function Dn(n,e){switch(n){case 1:return Ln(Gn.singleDigit,e);case 2:return Ln(Gn.twoDigits,e);case 3:return Ln(Gn.threeDigits,e);case 4:return Ln(Gn.fourDigits,e);default:return Ln(new RegExp("^\\d{1,"+n+"}"),e)}}function Wy(n,e){switch(n){case 1:return Ln(Gn.singleDigitSigned,e);case 2:return Ln(Gn.twoDigitsSigned,e);case 3:return Ln(Gn.threeDigitsSigned,e);case 4:return Ln(Gn.fourDigitsSigned,e);default:return Ln(new RegExp("^-?\\d{1,"+n+"}"),e)}}function md(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function By(n,e){const t=e>0,r=t?e:1-e;let d;if(r<=50)d=n||100;else{const p=r+50,g=Math.trunc(p/100)*100,b=n>=p%100;d=n+g-(b?100:0)}return t?d:1-d}function zy(n){return n%400===0||n%4===0&&n%100!==0}let eM=class extends rn{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const d=p=>({year:p,isTwoDigitYear:t==="yy"});switch(t){case"y":return Yn(Dn(4,e),d);case"yo":return Yn(r.ordinalNumber(e,{unit:"year"}),d);default:return Yn(Dn(t.length,e),d)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const d=e.getFullYear();if(r.isTwoDigitYear){const g=By(r.year,d);return e.setFullYear(g,0,1),e.setHours(0,0,0,0),e}const p=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}},tM=class extends rn{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,r){const d=p=>({year:p,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Yn(Dn(4,e),d);case"Yo":return Yn(r.ordinalNumber(e,{unit:"year"}),d);default:return Yn(Dn(t.length,e),d)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,d){const p=gu(e,d);if(r.isTwoDigitYear){const b=By(r.year,p);return e.setFullYear(b,0,d.firstWeekContainsDate),e.setHours(0,0,0,0),Do(e,d)}const g=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(g,0,d.firstWeekContainsDate),e.setHours(0,0,0,0),Do(e,d)}},nM=class extends rn{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Wy(t==="R"?4:t.length,e)}set(e,t,r){const d=tr(e,0);return d.setFullYear(r,0,4),d.setHours(0,0,0,0),qs(d)}},rM=class extends rn{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Wy(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},iM=class extends rn{constructor(){super(...arguments),it(this,"priority",120),it(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"Q":case"QQ":return Dn(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},oM=class extends rn{constructor(){super(...arguments),it(this,"priority",120),it(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"q":case"qq":return Dn(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},sM=class extends rn{constructor(){super(...arguments),it(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),it(this,"priority",110)}parse(e,t,r){const d=p=>p-1;switch(t){case"M":return Yn(Ln(Gn.month,e),d);case"MM":return Yn(Dn(2,e),d);case"Mo":return Yn(r.ordinalNumber(e,{unit:"month"}),d);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},aM=class extends rn{constructor(){super(...arguments),it(this,"priority",110),it(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,r){const d=p=>p-1;switch(t){case"L":return Yn(Ln(Gn.month,e),d);case"LL":return Yn(Dn(2,e),d);case"Lo":return Yn(r.ordinalNumber(e,{unit:"month"}),d);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function lM(n,e,t){const r=$n(n,t==null?void 0:t.in),d=Yp(r,t)-e;return r.setDate(r.getDate()-d*7),$n(r,t==null?void 0:t.in)}let cM=class extends rn{constructor(){super(...arguments),it(this,"priority",100),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,r){switch(t){case"w":return Ln(Gn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Dn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,d){return Do(lM(e,r,d),d)}};function uM(n,e,t){const r=$n(n,void 0),d=Gp(r)-e;return r.setDate(r.getDate()-d*7),r}let hM=class extends rn{constructor(){super(...arguments),it(this,"priority",100),it(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,r){switch(t){case"I":return Ln(Gn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Dn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return qs(uM(e,r))}};const dM=[31,28,31,30,31,30,31,31,30,31,30,31],pM=[31,29,31,30,31,30,31,31,30,31,30,31];class gM extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"subPriority",1),it(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"d":return Ln(Gn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Dn(t.length,e)}}validate(e,t){const r=e.getFullYear(),d=zy(r),p=e.getMonth();return d?t>=1&&t<=pM[p]:t>=1&&t<=dM[p]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}let fM=class extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"subpriority",1),it(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,r){switch(t){case"D":case"DD":return Ln(Gn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Dn(t.length,e)}}validate(e,t){const r=e.getFullYear();return zy(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}};function vd(n,e,t){var r,d,p,g;const b=Vs(),h=(t==null?void 0:t.weekStartsOn)??((d=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:d.weekStartsOn)??b.weekStartsOn??((g=(p=b.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,f=$n(n,t==null?void 0:t.in),o=f.getDay(),a=(e%7+7)%7,c=7-h,l=e<0||e>6?e-(o+c)%7:(a+c)%7-(o+c)%7;return fd(f,l,t)}let mM=class extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=vd(e,r,d),e.setHours(0,0,0,0),e}},vM=class extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,r,d){const p=g=>{const b=Math.floor((g-1)/7)*7;return(g+d.weekStartsOn+6)%7+b};switch(t){case"e":case"ee":return Yn(Dn(t.length,e),p);case"eo":return Yn(r.ordinalNumber(e,{unit:"day"}),p);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=vd(e,r,d),e.setHours(0,0,0,0),e}};class yM extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,r,d){const p=g=>{const b=Math.floor((g-1)/7)*7;return(g+d.weekStartsOn+6)%7+b};switch(t){case"c":case"cc":return Yn(Dn(t.length,e),p);case"co":return Yn(r.ordinalNumber(e,{unit:"day"}),p);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=vd(e,r,d),e.setHours(0,0,0,0),e}}function bM(n,e,t){const r=$n(n,void 0),d=KT(r),p=e-d;return fd(r,p,t)}let wM=class extends rn{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,r){const d=p=>p===0?7:p;switch(t){case"i":case"ii":return Dn(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Yn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d);case"iiiii":return Yn(r.day(e,{width:"narrow",context:"formatting"}),d);case"iiiiii":return Yn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d);case"iiii":default:return Yn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=bM(e,r),e.setHours(0,0,0,0),e}};class xM extends rn{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(md(r),0,0,0),e}}let CM=class extends rn{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(md(r),0,0,0),e}},kM=class extends rn{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(md(r),0,0,0),e}};class SM extends rn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return Ln(Gn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Dn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const d=e.getHours()>=12;return d&&r<12?e.setHours(r+12,0,0,0):!d&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class _M extends rn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return Ln(Gn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Dn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class AM extends rn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return Ln(Gn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Dn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class $M extends rn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return Ln(Gn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Dn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const d=r<=24?r%24:r;return e.setHours(d,0,0,0),e}}class TM extends rn{constructor(){super(...arguments),it(this,"priority",60),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return Ln(Gn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Dn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}let MM=class extends rn{constructor(){super(...arguments),it(this,"priority",50),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return Ln(Gn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Dn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}};class EM extends rn{constructor(){super(...arguments),it(this,"priority",30),it(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=d=>Math.trunc(d*Math.pow(10,-t.length+3));return Yn(Dn(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class IM extends rn{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return ro(no.basicOptionalMinutes,e);case"XX":return ro(no.basic,e);case"XXXX":return ro(no.basicOptionalSeconds,e);case"XXXXX":return ro(no.extendedOptionalSeconds,e);case"XXX":default:return ro(no.extended,e)}}set(e,t,r){return t.timestampIsSet?e:tr(e,e.getTime()-yl(e)-r)}}let LM=class extends rn{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return ro(no.basicOptionalMinutes,e);case"xx":return ro(no.basic,e);case"xxxx":return ro(no.basicOptionalSeconds,e);case"xxxxx":return ro(no.extendedOptionalSeconds,e);case"xxx":default:return ro(no.extended,e)}}set(e,t,r){return t.timestampIsSet?e:tr(e,e.getTime()-yl(e)-r)}},RM=class extends rn{constructor(){super(...arguments),it(this,"priority",40),it(this,"incompatibleTokens","*")}parse(e){return Py(e)}set(e,t,r){return[tr(e,r*1e3),{timestampIsSet:!0}]}},OM=class extends rn{constructor(){super(...arguments),it(this,"priority",20),it(this,"incompatibleTokens","*")}parse(e){return Py(e)}set(e,t,r){return[tr(e,r),{timestampIsSet:!0}]}};const NM={G:new JT,y:new eM,Y:new tM,R:new nM,u:new rM,Q:new iM,q:new oM,M:new sM,L:new aM,w:new cM,I:new hM,d:new gM,D:new fM,E:new mM,e:new vM,c:new yM,i:new wM,a:new xM,b:new CM,B:new kM,h:new SM,H:new _M,K:new AM,k:new $M,m:new TM,s:new MM,S:new EM,X:new IM,x:new LM,t:new RM,T:new OM},DM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PM=/^'([^]*?)'?$/,WM=/''/g,BM=/\S/,zM=/[a-zA-Z]/;function jM(n,e,t,r){var d,p,g,b;const h=()=>tr(t,NaN),f=yy(),o=f.locale??Kp,a=f.firstWeekContainsDate??((p=(d=f.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,c=f.weekStartsOn??((b=(g=f.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0;if(!e)return n?h():$n(t,void 0);const l={firstWeekContainsDate:a,weekStartsOn:c,locale:o},s=[new ZT(void 0,t)],u=e.match(FM).map($=>{const k=$[0];if(k in fu){const C=fu[k];return C($,o.formatLong)}return $}).join("").match(DM),m=[];for(let $ of u){ng($)&&mu($,e,n),tg($)&&mu($,e,n);const k=$[0],C=NM[k];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const F=m.find(I=>L.includes(I.token)||I.token===k);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);m.push({token:k,fullToken:$});const R=C.run(n,$,o.match,l);if(!R)return h();s.push(R.setter),n=R.rest}else{if(k.match(zM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if($==="''"?$="'":k==="'"&&($=HM($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&BM.test(n))return h();const w=s.map($=>$.priority).sort(($,k)=>k-$).filter(($,k,C)=>C.indexOf($)===k).map($=>s.filter(k=>k.priority===$).sort((k,C)=>C.subPriority-k.subPriority)).map($=>$[0]);let x=$n(t,void 0);if(isNaN(+x))return h();const E={};for(const $ of w){if(!$.validate(x,l))return h();const k=$.set(x,E,l);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function HM(n){return n.match(PM)[1].replace(WM,"'")}const UM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",VM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return UM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=ZM.indexOf(jy[this.status]),e=1-(n-1)*.05,t=224*this.scaleFactor*e,r=32*this.scaleFactor*e,d=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${n*d}px;`,`background-size: ${t}px ${r}px;`,`height: ${d}px;`,`width: ${d}px;`,`padding-top: ${n-1}px;`].join("")}}};function qM(n,e,t,r,d,p){return ot(),un("div",{style:ss(p.iconStyle)},null,4)}const KM=Ni(VM,[["render",qM]]),GM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function YM(n,e,t,r,d,p){const g=He("rux-icon");return ot(),Yt(g,{size:t.size,icon:t.icon,style:ss(p.colorStyle)},null,8,["size","icon","style"])}const XM=Ni(GM,[["render",YM],["__scopeId","data-v-9af48e85"]]),jy={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},yd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},QM=function(n){const e="#000000",t="#ffffff",r=yd[jy[n]];if(r){const d=+`0x${r.slice(1,3)}`,p=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((d*299+p*587+g*114)/1e3>128)return e}return t},ZM=Object.keys(yd),JM={astro:{component:n=>Us(XM,{...n})},"astro-status":{component:n=>Us(KM,{...n,status:n.icon})}},eE={extras:{component:n=>Us(Ow,{...n})}},Hy="single-spa:app-change",tE={data(){return{show:!1}},created(){window.addEventListener(Hy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=Dp().length===0},150)},unmounted(){window.removeEventListener(Hy,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},nE={class:"mx-1"};function rE(n,e,t,r,d,p){const g=He("v-card-title"),b=He("v-card-text"),h=He("v-card");return d.show?(ot(),Yt(h,{key:0},{default:Fe(()=>[We(g,null,{default:Fe(()=>e[0]||(e[0]=[Ft(" 404 Not Found ")])),_:1}),We(b,{class:"d-flex align-center mt-3"},{default:Fe(()=>[e[1]||(e[1]=Ft(" The requested URL ")),gr("code",nE,yn(n.$route.fullPath),1),e[2]||(e[2]=Ft(" was not routable. ")),e[3]||(e[3]=gr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0)}const iE=Ni(tE,[["render",rE]]),oE={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(e=>n.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,Kn.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const e=document.createElement("a");e.href=n.url,e.setAttribute("download",n.name),e.click(),e.remove()}}},sE={class:"pa-3"},aE={class:"px-2"},lE={key:0,class:"mt-4"},cE={key:1,class:"mt-4"};function uE(n,e,t,r,d,p){const g=He("v-spacer"),b=He("v-toolbar"),h=He("v-row"),f=He("v-icon"),o=He("v-btn"),a=He("v-col"),c=He("v-list-item-title"),l=He("v-progress-circular"),s=He("v-list-item"),u=He("v-divider"),m=He("v-card-text"),w=He("v-card"),x=He("v-dialog");return ot(),Yt(x,{modelValue:p.show,"onUpdate:modelValue":e[0]||(e[0]=E=>p.show=E),width:"600"},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(g),e[1]||(e[1]=gr("span",null," Download Gems ",-1)),We(g)]),_:1}),We(m,null,{default:Fe(()=>[gr("div",sE,[We(h,{class:"my-2"},{default:Fe(()=>e[2]||(e[2]=[Ft(" Select a download option ")])),_:1}),We(h,null,{default:Fe(()=>[We(a,null,{default:Fe(()=>[gr("div",aE,[We(o,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:p.searchGithub},{default:Fe(()=>[e[4]||(e[4]=Ft(" Github ")),We(f,{end:"",theme:"dark"},{default:Fe(()=>e[3]||(e[3]=[Ft(" mdi-github ")])),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(h,{class:"mt-5"},{default:Fe(()=>e[5]||(e[5]=[Ft(" Community Gems ")])),_:1}),p.listData.length<1?(ot(),un("div",lE,[We(h,{class:"mx-2"},{default:Fe(()=>e[6]||(e[6]=[gr("span",null," I’m sorry, Dave. No gems available.... ",-1)])),_:1})])):(ot(),un("div",cE,[(ot(!0),un(ii,null,Zi(p.listData,(E,$)=>(ot(),un("div",{key:$},[We(s,null,{default:Fe(()=>[We(c,null,{default:Fe(()=>[Ft(yn(E.name),1)]),_:2},1024),We(s,{icon:""},{default:Fe(()=>[d.activeDownload?(ot(),Yt(l,{key:0,indeterminate:"",color:"primary"})):(ot(),Yt(o,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:d.activeDownload,onClick:k=>p.downloadGem(E)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),$<p.listData.length-1?(ot(),Yt(u,{key:$})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const vF=ar("K",Ni(oE,[["render",uE]])),hE={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)bC.get(`/openc3-api/targets/${n.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:n.name,files:e.data})})}};function dE(n,e,t,r,d,p){const g=He("v-spacer"),b=He("v-toolbar"),h=He("v-list-item-title"),f=He("v-list-item-subtitle"),o=He("v-list-item"),a=He("v-checkbox"),c=He("v-card-text"),l=He("v-btn"),s=He("v-card-actions"),u=He("v-card"),m=He("v-dialog");return ot(),Yt(m,{modelValue:p.show,"onUpdate:modelValue":e[3]||(e[3]=w=>p.show=w),width:"600"},{default:Fe(()=>[We(u,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(g),e[4]||(e[4]=gr("span",null," Modified Plugin ",-1)),We(g)]),_:1}),We(c,{class:"pa-3"},{default:Fe(()=>[gr("div",null," Plugin "+yn(t.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(ot(!0),un(ii,null,Zi(d.modifiedTargets,(w,x)=>(ot(),Yt(o,{key:x,lines:"two"},{default:Fe(()=>[We(h,null,{default:Fe(()=>[Ft(yn(w.name),1)]),_:2},1024),(ot(!0),un(ii,null,Zi(w.files,(E,$)=>(ot(),Yt(f,{key:$},{default:Fe(()=>[Ft(yn(E),1)]),_:2},1024))),128))]),_:2},1024))),128)),We(a,{modelValue:d.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>d.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(s,{class:"px-2"},{default:Fe(()=>[We(g),We(l,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{p.show=!1,n.$emit("cancel")})},{default:Fe(()=>e[5]||(e[5]=[Ft(" Cancel ")])),_:1}),We(l,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{p.show=!1,n.$emit("submit",d.deleteModified)})},{default:Fe(()=>e[6]||(e[6]=[Ft(" Confirm ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const yF=ar("J",Ni(hE,[["render",dE]])),bd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>rt(()=>nt.import("./PluginsTab-Diu6vzUR-f034b5fc22864596cf17.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>rt(()=>nt.import("./TargetsTab-u-6nY7FX-dd5cfdb20f201fd1344d.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>rt(()=>nt.import("./InterfacesTab-Cv50gOTl-af03b3a32df3bf9bb68c.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>rt(()=>nt.import("./RoutersTab-CLwJ6J7T-4b2a45df9eba7d0107b1.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>rt(()=>nt.import("./MicroservicesTab-DrqUNTBZ-89c4923b60a2a7a46223.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>rt(()=>nt.import("./PackagesTab-CjcBp95A-b1a616601b1391e35dcc.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>rt(()=>nt.import("./ToolsTab-BI6lImcw-4dcdfcc74f90390a9900.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>rt(()=>nt.import("./RedisTab-BWYQfcqX-ca89cb81591e8f373dec.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>rt(()=>nt.import("./SecretsTab-CQNTFJAM-d87c77862ed8f0edbeea.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>rt(()=>nt.import("./SettingsTab-BAOaLzuc-c2761e5fc0e91c016160.js"),void 0)}],pE={components:{TopBar:CA},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return bd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function gE(n,e,t,r,d,p){const g=He("top-bar"),b=He("v-tab"),h=He("v-tabs"),f=He("router-view"),o=He("v-card");return ot(),un("div",null,[We(g,{title:d.title},null,8,["title"]),We(o,null,{default:Fe(()=>[We(h,{modelValue:d.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>d.curTab=a),"fixed-tabs":""},{default:Fe(()=>[(ot(!0),un(ii,null,Zi(p.tabs,(a,c)=>(ot(),Yt(b,{key:c,to:a.path},{default:Fe(()=>[Ft(yn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(f)]),_:1})])}const fE=Ni(pE,[["render",gE]]);function wd(n){const[e,t]=n;return[e,t]}function Uy(n,e){let t=n,r=e;const d=t.length,p=r.length;if(d===0||p===0)return 0;d>p?t=t.substring(d-p):d<p&&(r=r.substring(0,d));const g=Math.min(d,p);if(t===r)return g;let b=0,h=1;for(let f=0;f!==-1;){const o=t.substring(g-h);if(f=r.indexOf(o),f===-1)return b;h+=f,(f===0||t.substring(g-h)===r.substring(0,h))&&(b=h,h++)}return b}function xd(n,e){if(!n||!e||n[0]!==e[0])return 0;let t=0,r=Math.min(n.length,e.length),d=r,p=0;for(;t<d;)n.substring(p,d)===e.substring(p,d)?(t=d,p=t):r=d,d=Math.floor((r-t)/2+t);return d}function wc(n,e){if(!n||!e||n[n.length-1]!==e[e.length-1])return 0;let t=0,r=Math.min(n.length,e.length),d=r,p=0;for(;t<d;)n.substring(n.length-d,n.length-p)===e.substring(e.length-d,e.length-p)?(t=d,p=t):r=d,d=Math.floor((r-t)/2+t);return d}function mE(n){const e=n.charCodeAt(0);return e>=55296&&e<=56319}function vE(n){const e=n.charCodeAt(0);return e>=56320&&e<=57343}function yE(n,e,t){const r=n.length,d=e.length,p=Math.ceil((r+d)/2),g=p,b=2*p,h=new Array(b),f=new Array(b);for(let m=0;m<b;m++)h[m]=-1,f[m]=-1;h[g+1]=0,f[g+1]=0;const o=r-d,a=o%2!==0;let c=0,l=0,s=0,u=0;for(let m=0;m<p&&!(Date.now()>t);m++){for(let w=-m+c;w<=m-l;w+=2){const x=g+w;let E;w===-m||w!==m&&h[x-1]<h[x+1]?E=h[x+1]:E=h[x-1]+1;let $=E-w;for(;E<r&&$<d&&n.charAt(E)===e.charAt($);)E++,$++;if(h[x]=E,E>r)l+=2;else if($>d)c+=2;else if(a){const k=g+o-w;if(k>=0&&k<b&&f[k]!==-1){const C=r-f[k];if(E>=C)return Vy(n,e,E,$,t)}}}for(let w=-m+s;w<=m-u;w+=2){const x=g+w;let E;w===-m||w!==m&&f[x-1]<f[x+1]?E=f[x+1]:E=f[x-1]+1;let $=E-w;for(;E<r&&$<d&&n.charAt(r-E-1)===e.charAt(d-$-1);)E++,$++;if(f[x]=E,E>r)u+=2;else if($>d)s+=2;else if(!a){const k=g+o-w;if(k>=0&&k<b&&h[k]!==-1){const C=h[k],L=g+C-k;if(E=r-E,C>=E)return Vy(n,e,C,L,t)}}}}return[[li,n],[Yr,e]]}function Vy(n,e,t,r,d){const p=n.substring(0,t),g=e.substring(0,r),b=n.substring(t),h=e.substring(r),f=_s(p,g,{checkLines:!1,deadline:d}),o=_s(b,h,{checkLines:!1,deadline:d});return f.concat(o)}function bE(n,e,t=1){if(t<=0)return null;const r=n.length>e.length?n:e,d=n.length>e.length?e:n;if(r.length<4||d.length*2<r.length)return null;const p=qy(r,d,Math.ceil(r.length/4)),g=qy(r,d,Math.ceil(r.length/2));let b;if(p&&g)b=p[4].length>g[4].length?p:g;else{if(!p&&!g)return null;g?p||(b=g):b=p}if(!b)throw new Error("Unable to find a half match.");let h,f,o,a;n.length>e.length?(h=b[0],f=b[1],o=b[2],a=b[3]):(o=b[0],a=b[1],h=b[2],f=b[3]);const c=b[4];return[h,f,o,a,c]}function qy(n,e,t){const r=n.slice(t,t+Math.floor(n.length/4));let d=-1,p="",g,b,h,f;for(;(d=e.indexOf(r,d+1))!==-1;){const o=xd(n.slice(t),e.slice(d)),a=wc(n.slice(0,t),e.slice(0,d));p.length<a+o&&(p=e.slice(d-a,d)+e.slice(d,d+o),g=n.slice(0,t-a),b=n.slice(t+o),h=e.slice(0,d-a),f=e.slice(d+o))}return p.length*2>=n.length?[g||"",b||"",h||"",f||"",p||""]:null}function wE(n,e){for(let t=0;t<n.length;t++){const r=n[t][1],d=[];for(let p=0;p<r.length;p++)d[p]=e[r.charCodeAt(p)];n[t][1]=d.join("")}}function xE(n,e){const t=[],r={};t[0]="";function d(h){let f="",o=0,a=-1,c=t.length;for(;a<h.length-1;){a=h.indexOf(`
|
1495
|
+
`,o),a===-1&&(a=h.length-1);let l=h.slice(o,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):r[l]!==void 0)?f+=String.fromCharCode(r[l]):(c===p&&(l=h.slice(o),a=h.length),f+=String.fromCharCode(c),r[l]=c,t[c++]=l),o=a+1}return f}let p=4e4;const g=d(n);p=65535;const b=d(e);return{chars1:g,chars2:b,lineArray:t}}function CE(n,e,t){let r=n,d=e;const p=xE(r,d);r=p.chars1,d=p.chars2;const g=p.lineArray;let b=_s(r,d,{checkLines:!1,deadline:t.deadline});wE(b,g),b=Xy(b),b.push([Fn,""]);let h=0,f=0,o=0,a="",c="";for(;h<b.length;){switch(b[h][0]){case Yr:o++,c+=b[h][1];break;case li:f++,a+=b[h][1];break;case Fn:if(f>=1&&o>=1){b.splice(h-f-o,f+o),h=h-f-o;const l=_s(a,c,{checkLines:!1,deadline:t.deadline});for(let s=l.length-1;s>=0;s--)b.splice(h,0,l[s]);h+=l.length}o=0,f=0,a="",c="";break;default:throw new Error("Unknown diff operation.")}h++}return b.pop(),b}function kE(n,e,t){let r;if(!n)return[[Yr,e]];if(!e)return[[li,n]];const d=n.length>e.length?n:e,p=n.length>e.length?e:n,g=d.indexOf(p);if(g!==-1)return r=[[Yr,d.substring(0,g)],[Fn,p],[Yr,d.substring(g+p.length)]],n.length>e.length&&(r[0][0]=li,r[2][0]=li),r;if(p.length===1)return[[li,n],[Yr,e]];const b=bE(n,e);if(b){const h=b[0],f=b[1],o=b[2],a=b[3],c=b[4],l=_s(h,o,t),s=_s(f,a,t);return l.concat([[Fn,c]],s)}return t.checkLines&&n.length>100&&e.length>100?CE(n,e,t):yE(n,e,t.deadline)}var SE=Object.defineProperty,Ky=Object.getOwnPropertySymbols,_E=Object.prototype.hasOwnProperty,AE=Object.prototype.propertyIsEnumerable,Gy=(n,e,t)=>e in n?SE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$E=(n,e)=>{for(var t in e||(e={}))_E.call(e,t)&&Gy(n,t,e[t]);if(Ky)for(var t of Ky(e))AE.call(e,t)&&Gy(n,t,e[t]);return n};const li=-1,Yr=1,Fn=0;function TE(n,e,t){if(n===null||e===null)throw new Error("Null input. (diff)");const r=_s(n,e,EE({}));return LE(r),r}function _s(n,e,t){let r=n,d=e;if(r===d)return r?[[Fn,r]]:[];let p=xd(r,d);const g=r.substring(0,p);r=r.substring(p),d=d.substring(p),p=wc(r,d);const b=r.substring(r.length-p);r=r.substring(0,r.length-p),d=d.substring(0,d.length-p);let h=kE(r,d,t);return g&&h.unshift([Fn,g]),b&&h.push([Fn,b]),h=Cd(h),h}function ME(n){let e=1;return typeof n<"u"&&(e=n<=0?Number.MAX_VALUE:n),Date.now()+e*1e3}function EE(n){return $E({checkLines:!0,deadline:ME(n.timeout||1)},n)}function xc(n,e,t){return t===1?n+e:e+n}function Cc(n,e){return e===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function IE(n,e,t,r){return r===1?n[e][1][n[e][1].length-1]===n[t][1][n[t][1].length-1]:n[e][1][0]===n[t][1][0]}function Yy(n,e,t){const r=t===1?-1:1;let d=null,p=null,g=e+t;for(;g>=0&&g<n.length&&(d===null||p===null);g+=t){const[f,o]=n[g];if(o.length!==0){if(f===Yr){d===null&&(d=g);continue}else if(f===li){p===null&&(p=g);continue}else if(f===Fn){if(d===null&&p===null){const[a,c]=Cc(n[e][1],t);n[e][1]=a,n[g][1]=xc(n[g][1],c,r);return}break}}}if(d!==null&&p!==null&&IE(n,d,p,t)){const[f,o]=Cc(n[d][1],r),[a]=Cc(n[p][1],r);n[d][1]=f,n[p][1]=a,n[e][1]=xc(n[e][1],o,t);return}const[b,h]=Cc(n[e][1],t);n[e][1]=b,d===null?(n.splice(g,0,[Yr,h]),p!==null&&p>=g&&p++):n[d][1]=xc(n[d][1],h,r),p===null?n.splice(g,0,[li,h]):n[p][1]=xc(n[p][1],h,r)}function LE(n){for(let e=0;e<n.length;e++){const[t,r]=n[e];if(r.length===0)continue;const d=r[0],p=r[r.length-1];mE(p)&&t===Fn&&Yy(n,e,1),vE(d)&&t===Fn&&Yy(n,e,-1)}for(let e=0;e<n.length;e++)n[e][1].length===0&&n.splice(e,1)}function Xy(n){let e=n.map(a=>wd(a)),t=!1;const r=[];let d=0,p=null,g=0,b=0,h=0,f=0,o=0;for(;g<e.length;)e[g][0]===Fn?(r[d++]=g,b=f,h=o,f=0,o=0,p=e[g][1]):(e[g][0]===Yr?f+=e[g][1].length:o+=e[g][1].length,p&&p.length<=Math.max(b,h)&&p.length<=Math.max(f,o)&&(e.splice(r[d-1],0,[li,p]),e[r[d-1]+1][0]=Yr,d--,d--,g=d>0?r[d-1]:-1,b=0,h=0,f=0,o=0,p=null,t=!0)),g++;for(t&&(e=Cd(e)),e=NE(e),g=1;g<e.length;){if(e[g-1][0]===li&&e[g][0]===Yr){const a=e[g-1][1],c=e[g][1],l=Uy(a,c),s=Uy(c,a);l>=s?(l>=a.length/2||l>=c.length/2)&&(e.splice(g,0,[Fn,c.substring(0,l)]),e[g-1][1]=a.substring(0,a.length-l),e[g+1][1]=c.substring(l),g++):(s>=a.length/2||s>=c.length/2)&&(e.splice(g,0,[Fn,a.substring(0,s)]),e[g-1][0]=Yr,e[g-1][1]=c.substring(0,c.length-s),e[g+1][0]=li,e[g+1][1]=a.substring(s),g++),g++}g++}return e}const Qy=/[^a-zA-Z0-9]/,Zy=/\s/,Jy=/[\r\n]/,RE=/\n\r?\n$/,OE=/^\r?\n\r?\n/;function NE(n){const e=n.map(d=>wd(d));function t(d,p){if(!d||!p)return 6;const g=d.charAt(d.length-1),b=p.charAt(0),h=g.match(Qy),f=b.match(Qy),o=h&&g.match(Zy),a=f&&b.match(Zy),c=o&&g.match(Jy),l=a&&b.match(Jy),s=c&&d.match(RE),u=l&&p.match(OE);return s||u?5:c||l?4:h&&!o&&a?3:o||a?2:h||f?1:0}let r=1;for(;r<e.length-1;){if(e[r-1][0]===Fn&&e[r+1][0]===Fn){let d=e[r-1][1],p=e[r][1],g=e[r+1][1];const b=wc(d,p);if(b){const c=p.substring(p.length-b);d=d.substring(0,d.length-b),p=c+p.substring(0,p.length-b),g=c+g}let h=d,f=p,o=g,a=t(d,p)+t(p,g);for(;p.charAt(0)===g.charAt(0);){d+=p.charAt(0),p=p.substring(1)+g.charAt(0),g=g.substring(1);const c=t(d,p)+t(p,g);c>=a&&(a=c,h=d,f=p,o=g)}e[r-1][1]!==h&&(h?e[r-1][1]=h:(e.splice(r-1,1),r--),e[r][1]=f,o?e[r+1][1]=o:(e.splice(r+1,1),r--))}r++}return e}function Cd(n){let e=n.map(f=>wd(f));e.push([Fn,""]);let t=0,r=0,d=0,p="",g="",b;for(;t<e.length;)switch(e[t][0]){case Yr:d++,g+=e[t][1],t++;break;case li:r++,p+=e[t][1],t++;break;case Fn:r+d>1?(r!==0&&d!==0&&(b=xd(g,p),b!==0&&(t-r-d>0&&e[t-r-d-1][0]===Fn?e[t-r-d-1][1]+=g.substring(0,b):(e.splice(0,0,[Fn,g.substring(0,b)]),t++),g=g.substring(b),p=p.substring(b)),b=wc(g,p),b!==0&&(e[t][1]=g.substring(g.length-b)+e[t][1],g=g.substring(0,g.length-b),p=p.substring(0,p.length-b))),t-=r+d,e.splice(t,r+d),p.length&&(e.splice(t,0,[li,p]),t++),g.length&&(e.splice(t,0,[Yr,g]),t++),t++):t!==0&&e[t-1][0]===Fn?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,d=0,r=0,p="",g="";break;default:throw new Error("Unknown diff operation")}e[e.length-1][1]===""&&e.pop();let h=!1;for(t=1;t<e.length-1;)e[t-1][0]===Fn&&e[t+1][0]===Fn&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),h=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),h=!0)),t++;return h&&(e=Cd(e)),e}function kc(n){return n&&typeof n=="object"&&!Array.isArray(n)&&n!==null}function kd(n,e){return kc(n)&&kc(e)&&Object.keys(e).forEach(t=>{t==="__proto__"||t==="constructor"||(kc(e[t])?((!n[t]||!kc(n[t]))&&(n[t]=e[t]),kd(n[t],e[t])):Object.assign(n,{[t]:e[t]}))}),n}function e0(n,e,t=!1){let r=null,d=!0;return(...p)=>{const g=t&&d,b=()=>{n.apply(this,p),r=null};g&&(d=!1,b()),r||(r=setTimeout(b,e))}}function DE(n,e){let t;return(...r)=>{const d=this;clearTimeout(t),t=setTimeout(()=>n.apply(d,r),e)}}function t0(n=""){return n.replace(/\r\n/g,`
|
1496
|
+
`)}function n0(n,e,t,r){const d=t-n,p=n+d/2;return`M ${n} ${e} C ${p},${e} ${p},${r} ${t},${r}`}var bn={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"};function r0(n,e){let{mode:t}=n.options;return e===bn.EDITOR_LEFT&&n.options.left.mode!==null&&(t=n.options.left.mode),e===bn.EDITOR_RIGHT&&n.options.right.mode!==null&&(t=n.options.right.mode),t}function i0(n,e){let{theme:t}=n.options;return e===bn.EDITOR_LEFT&&n.options.left.theme!==null&&(t=n.options.left.theme),e===bn.EDITOR_RIGHT&&n.options.right.theme!==null&&(t=n.options.right.theme),t}function o0(n,e){return n.ace.getSession().doc.getLine(e)}function FE(n){return document.getElementById(n.options.left.id).offsetHeight}function s0(n){const e=document.createElement("div"),t={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(const r in t)e.setAttribute(r,t[r]);return e.innerHTML=n.arrowContent,e}function Sd(n,e){const t=Math.random().toString(36).substr(2,5),r=`js-${e}-${t}`,d=n.querySelector(`.${e}`);if(d)return d.id=d.id||r,d.id;const p=document.createElement("div");return n.appendChild(p),p.className=e,p.id=r,p.id}function a0(n,e,t,r){const d=n==="document"?document:document.querySelector(n);d.addEventListener(e,p=>{const g=d.querySelectorAll(t),{target:b}=p;for(let h=0,f=g.length;h<f;h+=1){let o=b;const a=g[h];for(;o&&o!==d;)o===a&&r.call(a,p),o=o.parentNode}})}let Sc;function PE(n){if(n.Range)return n.Range;const e=n.acequire||n.require;return e?e("ace/range"):!1}function _c(n={}){if(!(this instanceof _c))return new _c(n);const e=this,t=()=>window?window.ace:void 0;e.options=kd({ace:t(),mode:null,theme:null,element:null,diffGranularity:bn.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},n);const{ace:r}=e.options;if(!r){const d="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(d),new Error(d)}if(Sc=PE(r),!Sc){const d="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";return console.error(d),new Error(d)}if(e.options.element===null){const d="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(d),new Error(d)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const d=`Can't find the specified element ${e.options.element}`;return console.error(d),new Error(d)}e.options.left.id=Sd(e.el,"acediff__left"),e.options.classes.gutterID=Sd(e.el,"acediff__gutter"),e.options.right.id=Sd(e.el,"acediff__right"),e.el.innerHTML=`<div class="acediff__wrap">${e.el.innerHTML}</div>`,e.editors={left:{ace:r.edit(e.options.left.id),markers:[],lineLengths:[]},right:{ace:r.edit(e.options.right.id),markers:[],lineLengths:[]},editorHeight:null},e.editors.left.ace.getSession().setMode(r0(e,bn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(r0(e,bn.EDITOR_RIGHT)),e.editors.left.ace.setReadOnly(!e.options.left.editable),e.editors.right.ace.setReadOnly(!e.options.right.editable),e.editors.left.ace.setTheme(i0(e,bn.EDITOR_LEFT)),e.editors.right.ace.setTheme(i0(e,bn.EDITOR_RIGHT)),e.editors.left.ace.setValue(t0(e.options.left.content),-1),e.editors.right.ace.setValue(t0(e.options.right.content),-1),e.editors.editorHeight=FE(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,WE(e),HE(e),m0(e),e.diff()},1)}_c.prototype={setOptions(n){kd(this.options,n),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const n=this.editors.left.ace.getSession().getValue(),e=this.editors.right.ace.getSession().getValue(),t=Xy(TE(e,n));this.editors.left.lineLengths=c0(this.editors.left),this.editors.right.lineLengths=c0(this.editors.right);const r=[],d={left:0,right:0};t.forEach(p=>{const g=p[0];let b=p[1];b.length!==0&&(g===bn.DIFF_EQUAL?(d.left+=b.length,d.right+=b.length):g===bn.DIFF_DELETE?(r.push(p0(this,bn.DIFF_DELETE,d.left,d.right,b)),d.right+=b.length):g===bn.DIFF_INSERT&&(r.push(p0(this,bn.DIFF_INSERT,d.left,d.right,b)),d.left+=b.length))},this),this.diffs=qE(this,r),!(this.diffs.length>this.options.maxDiffs)&&(d0(this),y0(this))},destroy(){const n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,t=e.cloneNode(!1);t.textContent=n,e.parentNode.replaceChild(t,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,t=e.cloneNode(!1),t.textContent=r,e.parentNode.replaceChild(t,e);const d=document.getElementById(this.options.classes.gutterID);d&&(d.innerHTML=""),this.removeEventHandlers()}};function WE(n){n.editors.left.ace.getSession().on("changeScrollTop",e0(()=>{h0(n)},16)),n.editors.right.ace.getSession().on("changeScrollTop",e0(()=>{h0(n)},16));const e=n.diff.bind(n);n.editors.left.ace.on("change",e),n.editors.right.ace.on("change",e),n.options.left.copyLinkEnabled&&a0(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.newCodeConnectorLink}`,r=>{l0(n,r,bn.LTR)}),n.options.right.copyLinkEnabled&&a0(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.deletedCodeConnectorLink}`,r=>{l0(n,r,bn.RTL)});const t=DE(()=>{n.editors.availableHeight=document.getElementById(n.options.left.id).offsetHeight,n.diff()},250);window.addEventListener("resize",t),n.removeEventHandlers=()=>{window.removeEventListener("resize",t)}}function l0(n,e,t){const r=parseInt(e.target.getAttribute("data-diff-index"),10),d=n.diffs[r];let p,g,b,h,f,o;t===bn.LTR?(p=n.editors.left,g=n.editors.right,b=d.leftStartLine,h=d.leftEndLine,f=d.rightStartLine,o=d.rightEndLine):(p=n.editors.right,g=n.editors.left,b=d.rightStartLine,h=d.rightEndLine,f=d.leftStartLine,o=d.leftEndLine);let a="";for(let l=b;l<h;l+=1)a+=o0(p,l),l<p.ace.getSession().getLength()-1&&(a+=`
|
1497
|
+
`);const c=g.ace.getSession().getScrollTop();g.ace.getSession().replace(new Sc(f,0,o,0),a),g.ace.getSession().setScrollTop(parseInt(c,10)),n.diff()}function c0(n){const e=n.ace.getSession().doc.getAllLines(),t=[];return e.forEach(r=>{t.push(r.length+1)}),t}function u0(n,e,t,r,d){const p=n.editors[e];r<t&&(r=t);const g=`${d} ${r>t?"lines":"targetOnly"}`;r>t&&(r-=1),p.markers.push(p.ace.session.addMarker(new Sc(t,0,r,1),g,"fullLine"))}function h0(n){d0(n),y0(n),jE(n)}function d0(n){n.editors.left.markers.forEach(e=>{n.editors.left.ace.getSession().removeMarker(e)},n),n.editors.right.markers.forEach(e=>{n.editors.right.ace.getSession().removeMarker(e)},n)}function BE(n,e,t,r,d){const p=n.editors.left.ace.getSession().getScrollTop(),g=n.editors.right.ace.getSession().getScrollTop();n.connectorYOffset=1;const b=-1,h=e*n.lineHeight-p+.5,f=n.gutterWidth+1,o=r*n.lineHeight-g+.5,a=-1,c=t*n.lineHeight-p+n.connectorYOffset+.5,l=n.gutterWidth+1,s=d*n.lineHeight-g+n.connectorYOffset+.5,u=n0(b,h,f,o),m=n0(l,s,a,c),w=`L${f},${o} ${l},${s}`,x=`L${a},${c} ${b},${h}`,E=`${u} ${w} ${m} ${x}`,$=document.createElementNS(bn.SVG_NS,"path");$.setAttribute("d",E),$.setAttribute("class",n.options.classes.connector),n.gutterSVG.appendChild($)}function zE(n,e,t){if(e.leftEndLine>e.leftStartLine&&n.options.left.copyLinkEnabled){const r=s0({className:n.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*n.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:n.options.classes.newCodeConnectorLinkContent});n.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&n.options.right.copyLinkEnabled){const r=s0({className:n.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*n.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:n.options.classes.deletedCodeConnectorLinkContent});n.copyLeftContainer.appendChild(r)}}function jE(n){const e=n.editors.left.ace.getSession().getScrollTop(),t=n.editors.right.ace.getSession().getScrollTop();n.copyRightContainer.style.cssText=`top: ${-e}px`,n.copyLeftContainer.style.cssText=`top: ${-t}px`}function p0(n,e,t,r,d){let p={};if(e===bn.DIFF_INSERT){let g=g0(n.editors.left,t,d),b=f0(n.editors.right,r),h=Ya(n.editors.right,b);const f=Ya(n.editors.left,g.startLine);let o=b,a=g.startLine===g.endLine,c=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&c++,p={leftStartLine:g.startLine,leftEndLine:g.endLine+1,rightStartLine:o,rightEndLine:o+c}}else{let g=g0(n.editors.right,r,d),b=f0(n.editors.left,t),h=Ya(n.editors.left,b);const f=Ya(n.editors.right,g.startLine);let o=b,a=g.startLine===g.endLine,c=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&c++,p={leftStartLine:o,leftEndLine:o+c,rightStartLine:g.startLine,rightEndLine:g.endLine+1}}return p}function g0(n,e,t){const r={startLine:0,startChar:0,endLine:0,endChar:0},d=e+t.length;let p=0,g=!1,b=!1;n.lineLengths.forEach((f,o)=>{p+=f,!g&&e<p&&(r.startLine=o,r.startChar=e-p+f,g=!0),!b&&d<=p&&(r.endLine=o,r.endChar=d-p+f,b=!0)}),r.startChar>0&&Ya(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const h=/\n$/.test(t);return r.startChar>0&&h&&r.endLine++,r}function Ya(n,e){return o0(n,e).length}function f0(n,e){const t=n.ace.getSession().doc.getAllLines();let r=0,d=0;for(let p=0;p<t.length;p+=1)if(d+=t[p].length+1,e<=d){r=p,e===d&&p<t.length-1&&(r+=1);break}return d>=n.ace.getSession().getValue().length&&(r+=1),r}function m0(n){n.gutterHeight=document.getElementById(n.options.classes.gutterID).clientHeight,n.gutterWidth=document.getElementById(n.options.classes.gutterID).clientWidth;const e=v0(n,bn.EDITOR_LEFT),t=v0(n,bn.EDITOR_RIGHT),r=Math.max(e,t,n.gutterHeight);n.gutterSVG=document.createElementNS(bn.SVG_NS,"svg"),n.gutterSVG.setAttribute("width",n.gutterWidth),n.gutterSVG.setAttribute("height",r),document.getElementById(n.options.classes.gutterID).appendChild(n.gutterSVG)}function v0(n,e){return(e===bn.EDITOR_LEFT?n.editors.left:n.editors.right).ace.getSession().getLength()*n.lineHeight}function HE(n){n.copyRightContainer=document.createElement("div"),n.copyRightContainer.setAttribute("class",n.options.classes.copyRightContainer),n.copyLeftContainer=document.createElement("div"),n.copyLeftContainer.setAttribute("class",n.options.classes.copyLeftContainer),document.getElementById(n.options.classes.gutterID).appendChild(n.copyRightContainer),document.getElementById(n.options.classes.gutterID).appendChild(n.copyLeftContainer)}function UE(n){document.getElementById(n.options.classes.gutterID).removeChild(n.gutterSVG),m0(n)}function VE(n){n.copyLeftContainer.innerHTML="",n.copyRightContainer.innerHTML=""}function qE(n,e){const t=[];function r(p){return n.options.diffGranularity===bn.DIFF_GRANULARITY_SPECIFIC?p<1:p<=1}e.forEach((p,g)=>{if(g===0){t.push(p);return}let b=!1;for(let h=0;h<t.length;h+=1)if(r(Math.abs(p.leftStartLine-t[h].leftEndLine))&&r(Math.abs(p.rightStartLine-t[h].rightEndLine))){t[h].leftStartLine=Math.min(p.leftStartLine,t[h].leftStartLine),t[h].rightStartLine=Math.min(p.rightStartLine,t[h].rightStartLine),t[h].leftEndLine=Math.max(p.leftEndLine,t[h].leftEndLine),t[h].rightEndLine=Math.max(p.rightEndLine,t[h].rightEndLine),b=!0;break}b||t.push(p)});const d=[];return t.forEach(p=>{p.leftStartLine===p.leftEndLine&&p.rightStartLine===p.rightEndLine||d.push(p)}),d}function y0(n){UE(n),VE(n),n.diffs.forEach((e,t)=>{n.options.showDiffs&&(u0(n,bn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,n.options.classes.diff),u0(n,bn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,n.options.classes.diff),n.options.showConnectors&&BE(n,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),zE(n,e,t))},n)}const KE={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1},modelValue:Boolean},data(){return{tab:0,localVariables:[],localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){this.localVariables=JSON.parse(JSON.stringify(this.variables)),this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=us.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),nc.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new _c({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),nc.applyVimModeIfEnabled(this.differ.getEditors().left),nc.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let n=us.require("ace/lib/oop"),e=us.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,t=["VARIABLE"],r=new RegExp(`(\\b${t.join("\\b|\\b")}\\b)`),d=function(){e.call(this);for(let o in this.$rules)this.$rules[o].unshift({regex:r,token:"support.function"})};n.inherits(d,e);let p=us.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=us.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=us.require("ace/mode/folding/ruby").FoldMode,h=function(){this.HighlightRules=d,this.$outdent=new p,this.$behaviour=new g,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},f=us.require("ace/mode/ruby").Mode;return n.inherits(h,f),(function(){this.$id="ace/mode/openc3"}).call(h.prototype),h},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
|
1498
|
+
`)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
1499
|
+
`)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
1500
|
+
`))}).catch(n=>{})},emitSubmit(n){let e={name:this.pluginName,variables:Sp(this.localVariables),plugin_txt_lines:n};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let e=this.editor.getCursorPosition(),t=this.editor.session.getTokenAt(e.row,e.column);if(t){let r=t.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&nc.toggleVimMode(this.editor)}}},GE={style:{flex:"1"}},YE={class:"pa-3"},XE={ref:"editor",class:"editor"},QE={key:0};function ZE(n,e,t,r,d,p){const g=He("v-card-title"),b=He("v-icon"),h=He("v-row"),f=He("v-tab"),o=He("v-tabs"),a=He("v-text-field"),c=He("v-col"),l=He("v-window-item"),s=He("v-list-item-title"),u=He("v-list-item"),m=He("v-divider"),w=He("v-list"),x=He("v-menu"),E=He("v-window"),$=He("v-btn"),k=He("v-spacer"),C=He("v-card-actions"),L=He("v-card-text"),R=He("v-card"),F=He("v-dialog");return ot(),Yt(F,{modelValue:p.show,"onUpdate:modelValue":e[5]||(e[5]=I=>p.show=I),persistent:"",width:"80vw"},{default:Fe(()=>[We(R,null,{default:Fe(()=>[We(L,null,{default:Fe(()=>[We(g,null,{default:Fe(()=>[Ft(yn(t.pluginName),1)]),_:1}),t.existingPluginTxt!==null?(ot(),Yt(h,{key:0,class:"notice d-flex flex-row"},{default:Fe(()=>[We(b,{size:"x-large",start:"",color:"yellow"},{default:Fe(()=>e[6]||(e[6]=[Ft(" mdi-alert-box ")])),_:1}),gr("div",GE," The existing plugin.txt is different from the "+yn(t.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+yn(t.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),We(h,{class:"pb-3 pr-3"},{default:Fe(()=>[We(o,{modelValue:d.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>d.tab=I),class:"ml-3"},{default:Fe(()=>[(ot(),Yt(f,{key:0},{default:Fe(()=>e[7]||(e[7]=[Ft(" Variables ")])),_:1})),(ot(),Yt(f,{key:1},{default:Fe(()=>e[8]||(e[8]=[Ft(" plugin.txt ")])),_:1}))]),_:1},8,["modelValue"])]),_:1}),gr("form",{onSubmit:e[4]||(e[4]=Aa((...I)=>n.onSubmit&&n.onSubmit(...I),["prevent"]))},[We(E,{modelValue:d.tab,"onUpdate:modelValue":e[3]||(e[3]=I=>d.tab=I)},{default:Fe(()=>[(ot(),Yt(l,{key:0,eager:"true",class:"tab"},{default:Fe(()=>[gr("div",YE,[We(h,{class:"mt-3"},{default:Fe(()=>[(ot(!0),un(ii,null,Zi(d.localVariables,(I,H)=>(ot(),un("div",{key:H},[We(c,{style:{width:"220px"}},{default:Fe(()=>[We(a,{modelValue:d.localVariables[H],"onUpdate:modelValue":P=>d.localVariables[H]=P,clearable:"",type:"text",label:H},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),t.existingPluginTxt===null?(ot(),Yt(l,{key:"1-new",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[9]||(e[9]=[Ft(" This can be edited before installation. ")])),_:1})]),_:1}),gr("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=Aa((...I)=>p.showContextMenu&&p.showContextMenu(...I),["prevent"]))},null,544),We(x,{modelValue:d.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=I=>d.contextMenu=I),target:[d.menuX,d.menuY]},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(u,{link:""},{default:Fe(()=>[We(s,{onClick:n.openDocumentation},{default:Fe(()=>[Ft(yn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(m),We(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:p.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(ot(),Yt(l,{key:"1-existing",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[10]||(e[10]=[Ft(" Existing plugin.txt. This can be edited before installation. ")])),_:1}),We(c,{class:"ml-6"},{default:Fe(()=>e[11]||(e[11]=[Ft(" Uneditable plugin.txt from the new plugin. ")])),_:1})]),_:1}),gr("pre",XE,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(C,{class:"px-2 mt-2"},{default:Fe(()=>[t.existingPluginTxt!==null?(ot(),un("div",QE,[We($,{variant:"text",onClick:p.nextDiff},{default:Fe(()=>e[12]||(e[12]=[Ft(" Next Diff ")])),_:1},8,["onClick"]),We($,{variant:"text",onClick:p.previousDiff},{default:Fe(()=>e[13]||(e[13]=[Ft(" Previous Diff ")])),_:1},8,["onClick"])])):Ur("",!0),We(k),We($,{variant:"outlined","data-test":"edit-cancel",onClick:Aa(p.close,["prevent"])},{default:Fe(()=>e[14]||(e[14]=[Ft(" Cancel ")])),_:1},8,["onClick"]),We($,{variant:"flat","data-test":"edit-submit",onClick:p.submit},{default:Fe(()=>e[15]||(e[15]=[Ft(" Install ")])),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const bF=ar("Z",Ni(KE,[["render",ZE],["__scopeId","data-v-5b18ccf5"]])),JE=bd.find(n=>n.name==="PluginsTab"),b0=[{path:"/",component:fE,children:[{component:JE.component,path:""},...bd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:iE}];b0.forEach(Bp);const eI=Op({history:Np(),routes:b0}),tI={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},nI={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,e,t){this.params=n,this.show=!0,this.resolve=e,this.reject=t},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},rI=["innerHTML"],iI={key:2},oI={key:3,class:"validate mt-4"};function sI(n,e,t,r,d,p){const g=He("v-spacer"),b=He("v-toolbar"),h=He("v-icon"),f=He("v-text-field"),o=He("v-card-text"),a=He("v-btn"),c=He("v-card-actions"),l=He("v-card"),s=He("v-dialog"),u=He("v-app");return ot(),Yt(u,null,{default:Fe(()=>[We(s,{modelValue:n.show,"onUpdate:modelValue":e[1]||(e[1]=m=>n.show=m),width:"600"},{default:Fe(()=>[We(l,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(g),gr("span",null,yn(n.params.title),1),We(g)]),_:1}),We(o,{class:"mt-4 pa-3"},{default:Fe(()=>[n.params.validateText?(ot(),Yt(h,{key:0,class:"mr-2"},{default:Fe(()=>e[2]||(e[2]=[Ft(" mdi-alert ")])),_:1})):Ur("",!0),n.params.html?(ot(),un("span",{key:1,innerHTML:n.params.text},null,8,rI)):(ot(),un("span",iI,yn(n.params.text),1)),n.params.validateText?(ot(),un("div",oI,[Ft(" Enter "+yn(n.params.validateText)+" to confirm! ",1),We(f,{modelValue:n.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),We(c,{class:"px-2"},{default:Fe(()=>[We(g),n.params.cancelText?(ot(),Yt(a,{key:0,variant:"outlined","data-test":p.dataTestCancel,onClick:p.cancel},{default:Fe(()=>[Ft(yn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),We(a,{variant:"flat",color:n.params.okClass,"data-test":p.dataTestOk,onClick:p.ok},{default:Fe(()=>[Ft(yn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const aI=Ni(nI,[["render",sI],["__scopeId","data-v-de532a0f"]]);class lI{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(aI);e.use(Ad);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=e.mount(t),this.mounted=!0}open({title:e,text:t,okText:r,okClass:d,validateText:p,cancelText:g,html:b}){return this.mount(),new Promise((h,f)=>{this.$root.dialog({title:e,text:t,okText:r,okClass:d,validateText:p,cancelText:g,html:b},h,f)})}confirm(e,{okText:t="Ok",cancelText:r="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:e,okText:t,okClass:d,validateText:null,cancelText:r,html:!1})}alert(e,{okText:t="Ok",html:r=!1,okClass:d="primary"}){return this.open({title:"Alert",text:e,okText:t,okClass:d,validateText:null,cancelText:null,html:r})}validate(e,{okText:t="Ok",validateText:r="CONFIRM",cancelText:d="Cancel",okClass:p="primary"}){return this.open({title:"Confirm",text:e,okText:t,okClass:p,validateText:r,cancelText:d,html:!1})}}const cI={install(n,e){const t=new lI;n.provide("dialog",t),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=t)}},uI={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
|
1501
|
+
--toast-bg-color:${yd[this.toastNotification.level]};
|
1502
|
+
--toast-fg-color:${QM(this.toastNotification.level)};
|
1503
|
+
`},contentStyle:function(){return`
|
1504
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1505
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1506
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1507
|
+
`}},methods:{toast:function(n,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),e&&(this.timeout=setTimeout(()=>{this.hide()},e)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},hI={key:0,class:"text-subtitle-1 mr-1 notification-text"},dI={key:1,class:"text-body-2 notification-text"},pI={key:2,class:"text-body-2 notification-text"};function gI(n,e,t,r,d,p){const g=He("v-icon"),b=He("v-spacer"),h=He("v-btn"),f=He("v-sheet"),o=He("v-slide-y-transition");return ot(),Yt(o,null,{default:Fe(()=>[Lp(We(f,{style:ss(p.toastStyle),class:"toast-notification",onClick:p.expand},{default:Fe(()=>[We(g,{class:"mr-1 notification-text"},{default:Fe(()=>[Ft(yn(p.toastNotificationIcon),1)]),_:1}),gr("div",{class:"toast-content",style:ss(p.contentStyle)},[n.toastNotification.title?(ot(),un("span",hI,[n.toastNotification.body||n.toastNotification.message?(ot(),un(ii,{key:0},[Ft(yn(n.toastNotification.title)+": ",1)],64)):(ot(),un(ii,{key:1},[Ft(yn(n.toastNotification.title),1)],64))])):Ur("",!0),n.toastNotification.body?(ot(),un("span",dI,yn(n.toastNotification.body),1)):Ur("",!0),n.toastNotification.message?(ot(),un("span",pI,yn(n.toastNotification.message),1)):Ur("",!0)],4),We(b),We(h,{variant:"text",class:"notification-text",onClick:Aa(p.hide,["stop"])},{default:Fe(()=>e[0]||(e[0]=[Ft(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Rp,n.showToast]])]),_:1})}const fI=Ni(uI,[["render",gI],["__scopeId","data-v-84833581"]]);class mI{constructor(e={}){var t;this.$store=e.store,this.mounted=!1,this.$root=null,(t=window.$cosmosNotify)!=null&&t.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=uu(fI);e.use(Ad);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=e.mount(t),this.mounted=!0}open({method:e,title:t,body:r,message:d,level:p,duration:g,type:b="alert",logToConsole:h=!1,saveToHistory:f=!0}){this.mount(),h&&console.log(d?`${p.toUpperCase()} - ${d}`:`${p.toUpperCase()} - ${t}: ${r}`),f&&this.$store.commit("notifyAddHistory",{title:t,body:r,message:d,level:p}),this[e]({title:t,body:r,message:d,level:p,duration:g,type:b})}toast({title:e,body:t,message:r,level:d,duration:p,type:g}){this.$root.toast({title:e,body:t,message:r,level:d,type:g},p)}critical({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}caution({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}off({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}}const vI={install(n,e){const t=new mI(e);n.provide("notify",t),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=t)}},w0=100,x0=Fp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>e=>n.namedWidgets[e]},mutations:{notifyAddHistory:(n,e)=>{n.notifyHistory.length>=w0&&(n.notifyHistory.length=w0-1),n.notifyHistory.unshift(e)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,e)=>{Object.assign(n.namedWidgets,e)},clearNamedWidget:(n,e)=>{delete n.namedWidgets[e]}},modules:{}});function C0(n){let e;return n!==null&&typeof n=="object"&&((e=Object.getPrototypeOf(n))===Object.prototype||e===null)}function yI(n,e){const t={};for(const r of e)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}function k0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const r={};for(const d in n)r[d]=n[d];for(const d in e){const p=n[d],g=e[d];if(C0(p)&&C0(g)){r[d]=k0(p,g,t);continue}if(t&&Array.isArray(p)&&Array.isArray(g)){r[d]=t(p,g);continue}r[d]=g}return r}function Xa(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Xa.cache.has(n))return Xa.cache.get(n);const e=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Xa.cache.set(n,e),e}Xa.cache=new Map;function bI(n){Ap(`Vuetify: ${n}`)}function S0(n,e){return t=>Object.keys(n).reduce((r,d)=>{const p=typeof n[d]=="object"&&n[d]!=null&&!Array.isArray(n[d])?n[d]:{type:n[d]};return t&&d in t?r[d]={...p,default:t[d]}:r[d]=p,e&&!r[d].source&&(r[d].source=e),r},{})}function _0(n,e){const t=Ep();if(!t)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return t}function wI(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_0("injectSelf");const{provides:t}=e;if(t&&n in t)return t[n]}const _d=Symbol.for("vuetify:defaults");function A0(){const n=$p(_d);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function xI(n,e){return n.props&&(typeof n.props[e]<"u"||typeof n.props[Xa(e)]<"u")}function CI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A0();const r=_0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const d=cu(()=>{var h;return(h=t.value)==null?void 0:h[n._as??e]}),p=new Proxy(n,{get(h,f){var o,a,c,l;const s=Reflect.get(h,f);if(f==="class"||f==="style")return[(o=d.value)==null?void 0:o[f],s].filter(w=>w!=null);if(xI(r.vnode,f))return s;const u=(a=d.value)==null?void 0:a[f];if(u!==void 0)return u;const m=(l=(c=t.value)==null?void 0:c.global)==null?void 0:l[f];return m!==void 0?m:s}}),g=Tp();Mp(()=>{if(d.value){const h=Object.entries(d.value).filter(f=>{let[o]=f;return o.startsWith(o[0].toUpperCase())});g.value=h.length?Object.fromEntries(h):void 0}else g.value=void 0});function b(){const h=wI(_d,r);Ip(_d,cu(()=>g.value?k0((h==null?void 0:h.value)??{},g.value):h==null?void 0:h.value))}return{props:p,provideSubDefaults:b}}function Ac(n){if(n._setup=n._setup??n.setup,!n.name)return bI("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=S0(n.props??{},n.name)();const e=Object.keys(n.props).filter(t=>t!=="class"&&t!=="style");n.filterProps=function(t){return yI(t,e)},n.props._as=String,n.setup=function(t,r){const d=A0();if(!d.value)return n._setup(t,r);const{props:p,provideSubDefaults:g}=CI(t,t._as??n.name,d),b=n._setup(p,r);return g(),b}}return n}function kI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?Ac:_p)(e)}const SI=[String,Function,Object,Array],$c=S0({icon:{type:SI},tag:{type:[String,Object,Function],required:!0}},"icon");kI()({name:"VComponentIcon",props:$c(),setup(n,e){let{slots:t}=e;return()=>{const r=n.icon;return We(n.tag,null,{default:()=>{var d;return[n.icon?We(r,null,null):(d=t.default)==null?void 0:d.call(t)]}})}}}),Ac({name:"VSvgIcon",inheritAttrs:!1,props:$c(),setup(n,e){let{attrs:t}=e;return()=>We(n.tag,ml(t,{style:null}),{default:()=>[We("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?We("path",{d:r[0],"fill-opacity":r[1]},null):We("path",{d:r},null)):We("path",{d:n.icon},null)])]})}}),Ac({name:"VLigatureIcon",props:$c(),setup(n){return()=>We(n.tag,null,{default:()=>[n.icon]})}});const _I=Ac({name:"VClassIcon",props:$c(),setup(n){return()=>We(n.tag,{class:n.icon},null)}}),AI={component:n=>Us(_I,{...n,class:"mdi"})},Ad=Pp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:tI}},icons:{defaultSet:"mdi",sets:{mdi:AI,...JM,...eE}}}),$d=ww({createApp:uu,appOptions:{render(){return Us(Tw,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(eI),n.use(x0),n.use(Ad),n.use(cI),n.use(vI,{store:x0})}}),wF=ar("f",$d.bootstrap),xF=ar("g",$d.mount),CF=ar("u",$d.unmount)}}});
|