openc3-cosmos-tool-admin 6.9.0 → 6.9.2
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-C59wpWWk-c030a56edd4dd22834bf.js +2 -0
- data/tools/admin/{ArrayplotWidget-CoRsUxHG-9f96a78d35484babbcc2.js → ArrayplotWidget-tKqIV461-13b02d203d4fad3838c4.js} +1 -1
- data/tools/admin/{BarColumn-DHP-zQ4R-71e3fbbd9eaa015f859d.js → BarColumn-CUO9ur6W-631667a05c84f7ed1001.js} +1 -1
- data/tools/admin/BlockWidget-BdlMR_1A-4f610ac4d0126b68dd03.js +2 -0
- data/tools/admin/{ButtonWidget-C3ZWRjZZ-cb9cd7aecb9f8bb23ec8.js → ButtonWidget-C2JVmh3p-926c3617ffb55188d12f.js} +2 -2
- data/tools/admin/{CanvasWidget-CL-XzPF4-2fbb6ee544800ad39962.js → CanvasWidget-BRbdw1fu-7953b285c3b97e8dadbd.js} +1 -1
- data/tools/admin/{CanvasdotWidget-D8Y9DgVE-ca03cd798c694a9f76da.js → CanvasdotWidget-C8T_w03p-10a087ad609ba06ca41b.js} +1 -1
- data/tools/admin/{CanvasimageWidget-DHSGK_tD-958e8d8c0d7a25a9a931.js → CanvasimageWidget-C1w2vSsG-f70a99fd3d3b576f375b.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-Btt_fQfC-2c7d4bdcfc3c850193d5.js → CanvasimagevalueWidget-BMv2SmEq-7a00b79bc596c12da93e.js} +1 -1
- data/tools/admin/{CanvaslabelWidget-BF_8RTjv-988781975173716c6752.js → CanvaslabelWidget-LEBZQ3DR-6cedd062ecc369fd509c.js} +1 -1
- data/tools/admin/{CanvaslabelvalueWidget-scbwaujI-5e58478e5cd3f15189a1.js → CanvaslabelvalueWidget-Q6UdEanF-32500eff0f1c6a2e955e.js} +1 -1
- data/tools/admin/CanvaslineWidget-BhvBCDoS-dfcc85ac5f45faa098d3.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-CljziRek-3f688369236ad348e0d7.js → CanvaslinevalueWidget-EaASC9TU-3ed142406f005eadc7aa.js} +1 -1
- data/tools/admin/CheckbuttonWidget-C3bjQwrp-7e3d2f8bd79fdb619cce.js +1 -0
- data/tools/admin/{ComboboxWidget-BLXNYFiY-fb0d798e48d988bfc2fa.js → ComboboxWidget-CmruSbJy-82a693f4ac1333fb743a.js} +1 -1
- data/tools/admin/{DateWidget-BTqLCtLS-485bd9a637881db50566.js → DateWidget-CcUxRlJ2-20274e9b43415b68da00.js} +1 -1
- data/tools/admin/{DetailsDialog-BNCS3QAe-6cb0ae8e55ec14871521.js → DetailsDialog-DxYZre4A-4d969b653152d72660f7.js} +1 -1
- data/tools/admin/{DynamicWidget-CfMtj7H8-adb5c16912a8cc73444e.js → DynamicWidget-DHL7pbgW-9dd7c4740f9216c96ad6.js} +1 -1
- data/tools/admin/{FormatvalueWidget-CLYx8qbg-7c96f196e42c1f3467cd.js → FormatvalueWidget-Lk5K0wTL-e3ba95ef3dcc4c431a42.js} +1 -1
- data/tools/admin/Graph-CjEE2WxX-abe59337ea0aa8159bdd.js +1 -0
- data/tools/admin/{GraphWidget-Cb6Ozf54-f301ffe4b81faab7f209.js → GraphWidget-BaO2FpKo-81b0be0885ac22d2ab1c.js} +1 -1
- data/tools/admin/{HorizontalWidget-AY2M01qP-dcb248d4557a94df6bc9.js → HorizontalWidget-D3Q5IUQg-9292a6765c3d61202751.js} +1 -1
- data/tools/admin/{HorizontalboxWidget-2MEKvq_C-3f613b3bc4a7e73b0016.js → HorizontalboxWidget-D7bUUqfG-91e16e9104903f863667.js} +1 -1
- data/tools/admin/HorizontallineWidget-DZcIetQh-9afd02e29a101ef79be4.js +1 -0
- data/tools/admin/{IframeWidget-UKKUl7k5-327adf87e2effc5fe229.js → IframeWidget-Df7vTYZj-c232216652e566c18435.js} +1 -1
- data/tools/admin/{ImageLoader-C-CIL4YD-b538496d655832654258.js → ImageLoader-DpKY46fX-24c2408a969f6d951fb6.js} +1 -1
- data/tools/admin/{ImageviewerWidget-DhuQH5Io-201c0147cfdd171f8fb0.js → ImageviewerWidget-wHbhv08x-94ad73e53f75b76feb4e.js} +1 -1
- data/tools/admin/{InterfacesTab-Dq3oAKqz-f2fd85c98880ee9ace58.js → InterfacesTab-Bu__UqSA-168d8ee44f9045f073ef.js} +1 -1
- data/tools/admin/{LabelWidget-SO9zqcNN-42beb86aa876f0d83fa6.js → LabelWidget-BehwzOCR-79f76b1c4f02acaf408a.js} +1 -1
- data/tools/admin/LabelledWidget-DJKR8ikj-a2d1f6d0cca12f7a6013.js +1 -0
- data/tools/admin/LabelprogressbarWidget-D4Qzq894-cd3da652044cb8d6391c.js +1 -0
- data/tools/admin/LabelsparklineWidget-CwCOklZG-8be710bf8c28e5d76f00.js +1 -0
- data/tools/admin/{LabelvalueWidget-B6BbNFnk-51a0aef39666ca5f3c98.js → LabelvalueWidget-DW8Q7BTX-4b08f7ec25d3eb90008a.js} +1 -1
- data/tools/admin/{LabelvaluedescWidget-CxfL-H9C-956accb49897f765ab83.js → LabelvaluedescWidget-DgNX7tK2-d8bfc1397c5ff3a1a091.js} +1 -1
- data/tools/admin/{LabelvaluelimitsbarWidget-BT5k9mHv-1275978c2fd98de217d7.js → LabelvaluelimitsbarWidget-DAEBW0hU-bac254fcd06ea319afc7.js} +1 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-Dok-of6n-37aebf00cc3cbf57cda0.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-DexAc2UB-4d48398c0e41cbb046a8.js → LabelvaluerangebarWidget-CQ0xCUFU-de8a26cc92101c3a7ece.js} +1 -1
- data/tools/admin/{Layout-Dd6dRf3R-887413ce3863101360d5.js → Layout-CrCMUbtG-b43cfac34878cbc348c9.js} +1 -1
- data/tools/admin/{LedWidget-D1RwHb_V-a9b7d3265fd1aee98578.js → LedWidget-DzQNEDF7-378847eba3af9bf5d574.js} +1 -1
- data/tools/admin/{LimitsbarWidget-ClOmoV50-61ed5764d851e804cace.js → LimitsbarWidget-zkoAz9SQ-475e9519dab395d9966b.js} +1 -1
- data/tools/admin/{LimitscolorWidget-CBUoEYKp-e993ee30cabee34bbdd0.js → LimitscolorWidget-dez316Rk-785ec6cf03663679c3ee.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-hsHkmY-_-c48e5f428df7da0bed22.js → LimitscolumnWidget-D-IPNDVg-14a9cfd60151cf7a93a6.js} +1 -1
- data/tools/admin/LinegraphWidget-CicnZgjt-5a5eb20eb64c130da951.js +1 -0
- data/tools/admin/{MatrixbycolumnsWidget-CsogVU9c-6ed1a295d7136445b9eb.js → MatrixbycolumnsWidget-D3qN6GTr-38bd523f73b358685856.js} +1 -1
- data/tools/admin/{MicroservicesTab-DzEvbxlM-d1318f6aefa06ed61d37.js → MicroservicesTab-Dj8i8j6a-3be1fd147874266ef2b4.js} +1 -1
- data/tools/admin/{OutputDialog-7M4L50tA-4d8bb8551f214ac0b862.js → OutputDialog-D5A9vjUN-bf19e4bea5a3c940c066.js} +1 -1
- data/tools/admin/{PackagesTab-N4SD1Pxj-58779e5bc07cf0321e09.js → PackagesTab-Csom4SGV-d4089e64ca22bd0ca3ab.js} +1 -1
- data/tools/admin/PluginsTab-7hWw-8mN-e7f0ca3060f4fc5827bd.js +5 -0
- data/tools/admin/{ProgressbarWidget-CO6CEkxP-aa9097ef0634366583d6.js → ProgressbarWidget-CLilcPBe-7895197b2b7cc262777a.js} +1 -1
- data/tools/admin/{RadiobuttonWidget-DrxUclws-14e36b68c13972132456.js → RadiobuttonWidget-Dsy01RJ--1b9b30a93bb64653d5e8.js} +1 -1
- data/tools/admin/RadiogroupWidget-BNcVGNj1-6f7f07264bc6bfd9d00a.js +1 -0
- data/tools/admin/{RangebarWidget-5uQTfLMP-a066e0c203198215bb39.js → RangebarWidget-DhcoIdNf-c17a68e5f31cd091d07e.js} +1 -1
- data/tools/admin/{RedisTab-Cyrr_g9k-71dde9352231b057d343.js → RedisTab-B98KxQbA-2f65a1c212d3b78e8f85.js} +1 -1
- data/tools/admin/{RollupWidget-B0DCULnu-ae9320088f6cc1bd019b.js → RollupWidget-BypuPvE7-8ef0295c2b9d2d007ee3.js} +1 -1
- data/tools/admin/{RoutersTab-BAfpG8k3-9e3ada931881ddb91d96.js → RoutersTab-BtC6UKqX-5c55a1fad40a7a19f061.js} +1 -1
- data/tools/admin/{ScrollwindowWidget-BOkZQgtf-5238338c7af7cf429b07.js → ScrollwindowWidget-DNQgHoNO-723a735f85b1a79ab4e2.js} +1 -1
- data/tools/admin/{SecretsTab-D5RxHYVp-85d671ddd7e3c3854aff.js → SecretsTab-XHmiVk-n-efeb7f78ce02b5708050.js} +1 -1
- data/tools/admin/{SettingsTab-CKGQEwd_-4bb1f250c177aef622b1.js → SettingsTab-CMpo6tq0-90c7e707b083ce1456da.js} +2 -2
- data/tools/admin/{SignalWidget-Cis0Xkea-ca8be270511647909b11.js → SignalWidget-BHwyScCG-9efc8462a3f89e5e46d5.js} +1 -1
- data/tools/admin/{SimpleTextDialog-D2mEDvGY-bc7c7ff7fc43c9a6b3b5.js → SimpleTextDialog-HgnMOCj_-ce0729fc05e6f2c3b007.js} +1 -1
- data/tools/admin/{SpacerWidget-CLcqC2Qk-7a5e4b687c662cd5cfaf.js → SpacerWidget-CFxXXTm7-350648d7eead464d0797.js} +1 -1
- data/tools/admin/{SparklineWidget-CTp83eZ--ce6ee4faac034e6b5e14.js → SparklineWidget-C0lRpRrp-d2ac085b20d20093ddf4.js} +1 -1
- data/tools/admin/{TabbookWidget-uucd-zsX-d82ce4e8e40e83291fd6.js → TabbookWidget-CeeBOYOt-49c342f05c2a5c749294.js} +1 -1
- data/tools/admin/{TargetsTab-CM4ABe5y-afd5cde7a2299325b130.js → TargetsTab-5DVtVqPl-87159b4ab20fd7bf5eb2.js} +1 -1
- data/tools/admin/TextboxWidget-DoA2b3YU-f9478720ba4c78611dab.js +1 -0
- data/tools/admin/TextfieldWidget-Dj4DV74o-34abe84687a57bd2ce54.js +1 -0
- data/tools/admin/{TimeWidget-CPNVZaUM-642993622fb28ab114da.js → TimeWidget-DAQDQ0UM-45e6062597bfbeea981a.js} +1 -1
- data/tools/admin/TitleWidget-Ct0JlY9s-5d22357415e6540c4792.js +1 -0
- data/tools/admin/{ToolsTab-DGjyBWkp-78afb2c1f2a66aacb366.js → ToolsTab-CbkfaXrn-f1c6e5b4ec3a66151085.js} +2 -2
- data/tools/admin/{VWidget-DQGJRgAk-7b045b0f559a9315f4ff.js → VWidget-A802LGvR-756e66dab6f21a59d94f.js} +1 -1
- data/tools/admin/{ValueWidget-Bk1RFjks-cf3eac099ae59ca39db8.js → ValueWidget-QaBYsiZz-118de6e0f9d53ef9c72f.js} +1 -1
- data/tools/admin/ValuelimitsbarWidget-CFToRM7w-6ffe9552cd597d51f2d9.js +1 -0
- data/tools/admin/ValuelimitscolumnWidget-BG7naMYx-88beb81c6900bb9e12b6.js +1 -0
- data/tools/admin/{ValuerangebarWidget-CcQw_XK9-ad2b7851b35260b5e13d.js → ValuerangebarWidget-CChK2Lmm-ca3fa31259084f38789a.js} +1 -1
- data/tools/admin/{VerticalWidget-CNtFQv3R-60f2084f54c114d2945a.js → VerticalWidget-C8iN5DJK-2d9fcd7f089cfb0461d6.js} +1 -1
- data/tools/admin/{VerticalboxWidget-Yxmz1SnU-aeee73a1a8be56267bcb.js → VerticalboxWidget-CXwUSWrP-2673ce43389276c28024.js} +1 -1
- data/tools/admin/{Widget-LsyjS7ZS-cb641f7a8059edf8be8f.js → Widget-Cx1jBJHK-d7201e880775e512a014.js} +1 -1
- data/tools/admin/main-b809200616cdd76b7c39.js +1509 -0
- data/tools/admin/main.js +1 -1
- data/tools/admin/{settings-DCxXjkio-a694e1ee5ad29e564bfa.js → settings-DIkEgX30-22b66a3741eb7787b6b1.js} +1 -1
- metadata +80 -80
- data/tools/admin/ArrayWidget-DLfNWDzN-e5dda102920cdc58df21.js +0 -2
- data/tools/admin/BlockWidget-BmHSFvOq-1d1d3a1a21d0232d3d25.js +0 -2
- data/tools/admin/CanvaslineWidget-gRvm_-TT-8463efc10e7e5f475e6d.js +0 -1
- data/tools/admin/CheckbuttonWidget-BOabI_jE-f9701442b0a6ee763674.js +0 -1
- data/tools/admin/Graph-BliBYJxD-12dab47709e511c35275.js +0 -1
- data/tools/admin/HorizontallineWidget-DgpOPA7q-9990fdf6559340723255.js +0 -1
- data/tools/admin/LabelledWidget-DWoM5AJ5-a7ceb818d3ba46de3cc3.js +0 -1
- data/tools/admin/LabelprogressbarWidget-D3vnkvQZ-b33a1b6faa99b0af5ace.js +0 -1
- data/tools/admin/LabelsparklineWidget-DO0T-Jot-577ba59d876076f4fdff.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-DUbmxh4p-45ec5740e448af4235c3.js +0 -1
- data/tools/admin/LinegraphWidget-CXrKtxOo-b365bcb5db673346c905.js +0 -1
- data/tools/admin/PluginsTab-C7PH2Wym-860a289fc08b19a3a34a.js +0 -5
- data/tools/admin/RadiogroupWidget-DN9C38cg-b40b88eb8f6a001bf8eb.js +0 -1
- data/tools/admin/TextboxWidget-C2n38ti5-785c5c28db2a8d1f7a43.js +0 -1
- data/tools/admin/TextfieldWidget--HTv9ddk-e21c35eaf43cbc82e6c6.js +0 -1
- data/tools/admin/TitleWidget-Cp0cb6V8-dd7a7125d73e92b9445e.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-C0HIBYh2-8b1d7333204dfad9047b.js +0 -1
- data/tools/admin/ValuelimitscolumnWidget-BTT90uyX-a30c6d2f4086e52a477f.js +0 -1
- data/tools/admin/main-81d6c06ada3eed99ae7f.js +0 -1509
|
@@ -0,0 +1,1509 @@
|
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(pr,nt){"use strict";var Ve,Kt,ot,Pe,je,rn,Fn,Vp,qp,Kp,Cn,ci,vo,Rt,Ll,Au,Kr,Cs,ia,Ol,Wa,Gp,Yp,Xp,Qp,Su,Zp,Jp,ef,tf,nf,_u,rf,of,sf,af,$u,lf,cf;return{setters:[Ct=>{Ve=Ct.resolveComponent,Kt=Ct.createBlock,ot=Ct.openBlock,Pe=Ct.withCtx,je=Ct.createVNode,rn=Ct.createElementBlock,Fn=Ct.createElementVNode,Vp=Ct.useCssVars,qp=Ct.defineAsyncComponent,Kp=Ct.Teleport,Cn=Ct.toDisplayString,ci=Ct.Fragment,vo=Ct.renderList,Rt=Ct.createTextVNode,Ll=Ct.mergeProps,Au=Ct.createSlots,Kr=Ct.createCommentVNode,Cs=Ct.normalizeStyle,ia=Ct.h,Ol=Ct.withKeys,Wa=Ct.withModifiers,Gp=Ct.toRaw,Yp=Ct.defineComponent,Xp=Ct.warn,Qp=Ct.inject,Su=Ct.computed,Zp=Ct.shallowRef,Jp=Ct.watchEffect,ef=Ct.normalizeClass,tf=Ct.getCurrentInstance,nf=Ct.provide,_u=Ct.createApp,rf=Ct.withDirectives,of=Ct.vShow},Ct=>{sf=Ct.createRouter,af=Ct.createWebHistory},Ct=>{$u=Ct.getMountedApps},Ct=>{lf=Ct.createStore},Ct=>{cf=Ct.createVuetify}],execute:function(){pr({$:vf,c:$E,f:Wr,l:In,p:ts,y:lr,z:Ed});var Ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uf(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 ks(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(t),!0).forEach(function(r){ax(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):uf(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ax(n,e,t){return(e=function(r){var d=function(p,g){if(As(p)!=="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var h=b.call(p,g);if(As(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)}(r,"string");return As(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 As(n){return As=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},As(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})(Ct);var lx={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function cx(n){if(As(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=ks(ks({},lx),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(As(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var t={};return{bootstrap:ux.bind(null,e,t),mount:hx.bind(null,e,t),unmount:px.bind(null,e,t),update:dx.bind(null,e,t)}}function ux(n){return n.loadRootComponent?n.loadRootComponent().then(function(e){return n.rootComponent=e}):Promise.resolve()}function hx(n,e,t){var r={};return Promise.resolve().then(function(){return function(d,p){return typeof d.appOptions=="function"?d.appOptions(p):Promise.resolve(ks({},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 ks(ks({},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 dx(n,e,t){return Promise.resolve().then(function(){var r=e[t.name],d=ks(ks({},n.appOptions.data||{}),t),p=r.root||r.vueInstance;for(var g in d)p[g]=d[g]})}function px(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 fx=(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t},gx={};function mx(n,e){const t=Ve("router-view"),r=Ve("v-app");return ot(),Kt(r,{id:"innerapp"},{default:Pe(()=>[je(t)]),_:1})}const vx=fx(gx,[["render",mx]]),hf=function(n){var e;!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),(e=n.children)==null||e.forEach(hf)},jF="modulepreload",UF=function(n){return"/"+n},VF={},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)})},to=pr("d",(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t}),yx="/icons/customIcons.svg",Tu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return yx+"#"+this.icon}}},df=()=>{Vp(n=>({v259824e2:n.color}))},pf=Tu.setup;Tu.setup=pf?(n,e)=>(df(),pf(n,e)):df;const bx={class:"cosmos-custom-icon"},wx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},xx=["href"];function Cx(n,e,t,r,d,p){return ot(),rn("span",bx,[(ot(),rn("svg",wx,[Fn("use",{href:p.iconSrc},null,8,xx)]))])}const kx=to(Tu,[["render",Cx],["__scopeId","data-v-4b6f1199"]]),Nl=6e4,Mu=36e5,Ax=1e3,ff=Symbol.for("constructDateFrom");function lr(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&ff in n?n[ff](e):n instanceof Date?new n.constructor(e):new Date(e)}function In(n,e){return lr(e||n,n)}let Sx={};function oa(){return Sx}function Jo(n,e){var t,r,d,p;const g=oa(),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=In(n,e==null?void 0:e.in),f=h.getDay(),s=(f<b?7:0)+f-b;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function sa(n,e){return Jo(n,{...e,weekStartsOn:1})}function gf(n,e){const t=In(n,void 0),r=t.getFullYear(),d=lr(t,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const p=sa(d),g=lr(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const b=sa(g);return t.getTime()>=p.getTime()?r+1:t.getTime()>=b.getTime()?r:r-1}function Dl(n){const e=In(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 _x(n,...e){const t=lr.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function mf(n,e){const t=In(n,void 0);return t.setHours(0,0,0,0),t}function $x(n,e,t){const[r,d]=_x(void 0,n,e),p=mf(r),g=mf(d),b=+p-Dl(p),h=+g-Dl(g);return Math.round((b-h)/864e5)}function Tx(n,e){const t=gf(n),r=lr(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),sa(r)}function Mx(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function vf(n){return!(!Mx(n)&&typeof n!="number"||isNaN(+In(n)))}function Ex(n,e){const t=In(n,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const Ix={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"}},Rx=(n,e,t)=>{let r;const d=Ix[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 Eu(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const Lx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ox={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Nx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dx={date:Eu({formats:Lx,defaultWidth:"full"}),time:Eu({formats:Ox,defaultWidth:"full"}),dateTime:Eu({formats:Nx,defaultWidth:"full"})},Fx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Px=(n,e,t,r)=>Fx[n];function Ba(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 Wx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Bx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hx={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"]},zx={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"]},jx={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"}},Ux={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"}},Vx=(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"},qx={ordinalNumber:Vx,era:Ba({values:Wx,defaultWidth:"wide"}),quarter:Ba({values:Bx,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ba({values:Hx,defaultWidth:"wide"}),day:Ba({values:zx,defaultWidth:"wide"}),dayPeriod:Ba({values:jx,defaultWidth:"wide",formattingValues:Ux,defaultFormattingWidth:"wide"})};function Ha(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)?Gx(b,a=>a.test(g)):Kx(b,a=>a.test(g));let f;f=n.valueCallback?n.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const s=e.slice(g.length);return{value:f,rest:s}}}function Kx(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Gx(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Yx(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 Xx=/^(\d+)(th|st|nd|rd)?/i,Qx=/\d+/i,Zx={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},Jx={any:[/^b/i,/^(a|c)/i]},e1={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},t1={any:[/1/i,/2/i,/3/i,/4/i]},n1={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},r1={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]},i1={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},o1={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]},s1={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},a1={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}},l1={ordinalNumber:Yx({matchPattern:Xx,parsePattern:Qx,valueCallback:n=>parseInt(n,10)}),era:Ha({matchPatterns:Zx,defaultMatchWidth:"wide",parsePatterns:Jx,defaultParseWidth:"any"}),quarter:Ha({matchPatterns:e1,defaultMatchWidth:"wide",parsePatterns:t1,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ha({matchPatterns:n1,defaultMatchWidth:"wide",parsePatterns:r1,defaultParseWidth:"any"}),day:Ha({matchPatterns:i1,defaultMatchWidth:"wide",parsePatterns:o1,defaultParseWidth:"any"}),dayPeriod:Ha({matchPatterns:s1,defaultMatchWidth:"any",parsePatterns:a1,defaultParseWidth:"any"})},yf={code:"en-US",formatDistance:Rx,formatLong:Dx,formatRelative:Px,localize:qx,match:l1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function c1(n,e){const t=In(n,void 0);return $x(t,Ex(t))+1}function bf(n,e){const t=In(n,void 0),r=+sa(t)-+Tx(t);return Math.round(r/6048e5)+1}function Iu(n,e){var t,r,d,p;const g=In(n,e==null?void 0:e.in),b=g.getFullYear(),h=oa(),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,s=lr((e==null?void 0:e.in)||n,0);s.setFullYear(b+1,0,f),s.setHours(0,0,0,0);const a=Jo(s,e),u=lr((e==null?void 0:e.in)||n,0);u.setFullYear(b,0,f),u.setHours(0,0,0,0);const c=Jo(u,e);return+g>=+a?b+1:+g>=+c?b:b-1}function u1(n,e){var t,r,d,p;const g=oa(),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=Iu(n,e),f=lr((e==null?void 0:e.in)||n,0);return f.setFullYear(h,0,b),f.setHours(0,0,0,0),Jo(f,e)}function wf(n,e){const t=In(n,e==null?void 0:e.in),r=+Jo(t,e)-+u1(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 es={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)}},aa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xf={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 es.y(n,e)},Y:function(n,e,t,r){const d=Iu(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=gf(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 es.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=wf(n,r);return e==="wo"?t.ordinalNumber(d,{unit:"week"}):hn(d,e.length)},I:function(n,e,t){const r=bf(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"}):es.d(n,e)},D:function(n,e,t){const r=c1(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=aa.noon:r===0?d=aa.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=aa.evening:r>=12?d=aa.afternoon:r>=4?d=aa.morning:d=aa.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 es.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):es.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"}):es.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):es.s(n,e)},S:function(n,e){return es.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return kf(r);case"XXXX":case"XX":return Ss(r);case"XXXXX":case"XXX":default:return Ss(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return kf(r);case"xxxx":case"xx":return Ss(r);case"xxxxx":case"xxx":default:return Ss(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Cf(r,":");case"OOOO":default:return"GMT"+Ss(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Cf(r,":");case"zzzz":default:return"GMT"+Ss(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 Cf(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 kf(n,e){return n%60===0?(n>0?"-":"+")+hn(Math.abs(n)/60,2):Ss(n,e)}function Ss(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 Af=(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"})}},Sf=(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"})}},h1=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],d=t[2];if(!d)return Af(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}}",Af(r,e)).replace("{{time}}",Sf(d,e))},Ru={p:Sf,P:h1},d1=/^D+$/,p1=/^Y+$/,f1=["D","DD","YY","YYYY"];function _f(n){return d1.test(n)}function $f(n){return p1.test(n)}function Lu(n,e,t){const r=g1(n,e,t);if(console.warn(r),f1.includes(n))throw new RangeError(r)}function g1(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 m1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,y1=/^'([^]*?)'?$/,b1=/''/g,w1=/[a-zA-Z]/;function ts(n,e,t){var r,d,p,g,b,h,f,s;const a=oa(),u=(t==null?void 0:t.locale)??a.locale??yf,c=(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,i=(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??((s=(f=a.locale)==null?void 0:f.options)==null?void 0:s.weekStartsOn)??0,l=In(n,t==null?void 0:t.in);if(!vf(l))throw new RangeError("Invalid time value");let m=e.match(v1).map(x=>{const E=x[0];if(E==="p"||E==="P"){const _=Ru[E];return _(x,u.formatLong)}return x}).join("").match(m1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:x1(x)};if(xf[E])return{isToken:!0,value:x};if(E.match(w1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});u.localize.preprocessor&&(m=u.localize.preprocessor(l,m));const w={firstWeekContainsDate:c,weekStartsOn:i,locale:u};return m.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&$f(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&_f(E))&&Lu(E,e,String(n));const _=xf[E[0]];return _(l,E,u.localize,w)}).join("")}function x1(n){const e=n.match(y1);return e?e[1].replace(b1,"'"):n}var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tf={exports:{}},Mf;function C1(){return Mf||(Mf=1,function(n,e){(function(){var t="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var d=function(s,a,u){if(typeof s!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),d.modules[s]||(d.payloads[s]=u,d.modules[s]=null)};d.modules={},d.payloads={};var p=function(s,a,u){if(typeof a=="string"){var c=h(s,a);if(c!=null)return u&&u(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var i=[],l=0,m=a.length;l<m;++l){var w=h(s,a[l]);if(w==null&&g.original)return;i.push(w)}return u&&u.apply(null,i)||!0}},g=function(s,a){var u=p("",s,a);return u==null&&g.original?g.original.apply(this,arguments):u},b=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return b(s,u[0])+"!"+b(s,u[1])}if(a.charAt(0)=="."){var c=s.split("/").slice(0,-1).join("/");for(a=c+"/"+a;a.indexOf(".")!==-1&&i!=a;){var i=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var u=d.modules[a];if(!u){if(u=d.payloads[a],typeof u=="function"){var c={},i={id:a,uri:"",exports:c,packaged:!0},l=function(w,x){return p(a,w,x)},m=u(l,c,i);c=m||i.exports,d.modules[a]=c,delete d.payloads[a]}u=d.modules[a]=c||u}return u};function f(s){var a=r;r[s]||(r[s]={}),a=r[s],(!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(s){b[s]=f[s]})}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 s=this[f];if(g.call(h,s,f,this))return s}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(g){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var s=this[f];if(g.call(h,s,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],s=f>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],c=u===void 0?h:u>>0,i=c<0?Math.max(h+c,0):Math.min(c,h);a<i;)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,s=b.length;f<s;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(s){f.push({offset:arguments[arguments.length-2],length:s.length})}),f},r.deferredCall=function(b){var h=null,f=function(){h=null,b()},s=function(a){return s.cancel(),h=setTimeout(f,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),b(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(b,h){var f=null,s=function(){f=null,b()},a=function(u){f==null&&(f=setTimeout(s,u||h))};return a.delay=function(u){f&&clearTimeout(f),f=setTimeout(s,u||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 u(c,i,l){if(typeof c=="string"&&c){var m=document.createTextNode(c);return i&&i.appendChild(m),m}if(!Array.isArray(c))return c&&c.appendChild&&i&&i.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var w=[],x=0;x<c.length;x++){var E=u(c[x],i,l);E&&w.push(E)}return w}var _=document.createElement(c[0]),k=c[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<c.length;x++)u(c[x],_,l);return C==2&&Object.keys(k).forEach(function(R){var D=k[R];R==="class"?_.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||R=="value"||R[0]=="$"?_[R]=D:R==="ref"?l&&(l[D]=_):R==="style"?typeof D=="string"&&(_.style.cssText=D):D!=null&&_.setAttribute(R,D)}),i&&i.appendChild(_),_},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,c){return document.createElementNS?document.createElementNS(c||g,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,c){var i=c?c.ownerDocument:document;return i.createTextNode(u)},r.createFragment=function(u){var c=u?u.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(u,c){var i=(u.className+"").split(/\s+/g);return i.indexOf(c)!==-1},r.addCssClass=function(u,c){r.hasCssClass(u,c)||(u.className+=" "+c)},r.removeCssClass=function(u,c){for(var i=u.className.split(/\s+/g);;){var l=i.indexOf(c);if(l==-1)break;i.splice(l,1)}u.className=i.join(" ")},r.toggleCssClass=function(u,c){for(var i=u.className.split(/\s+/g),l=!0;;){var m=i.indexOf(c);if(m==-1)break;l=!1,i.splice(m,1)}return l&&i.push(c),u.className=i.join(" "),l},r.setCssClass=function(u,c,i){i?r.addCssClass(u,c):r.removeCssClass(u,c)},r.hasCssString=function(u,c){var i=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;i<l.length;)if(l[i++].id===u)return!0}},r.removeElementById=function(u,c){c=c||document,c.getElementById(u)&&c.getElementById(u).remove()};var b,h=[];r.useStrictCSP=function(u){b=u,u==!1?f():h||(h=[])};function f(){var u=h;h=null,u&&u.forEach(function(c){s(c[0],c[1])})}function s(u,c,i){if(!(typeof document>"u")){if(h){if(i)f();else if(i===!1)return h.push([u,c])}if(!b){var l=i;!i||!i.getRootNode?l=document:(l=i.getRootNode(),(!l||l==i)&&(l=document));var m=l.ownerDocument||l;if(c&&r.hasCssString(c,l))return null;c&&(u+=`
|
|
2
|
+
/*# sourceURL=ace/css/`+c+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(u)),c&&(w.id=c),l==m&&(l=r.getDocumentHead(m)),l.insertBefore(w,l.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,c){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(c))},r.$fixPositionBug=function(u){var c=u.getBoundingClientRect();if(u.style.left){var i=parseFloat(u.style.left),l=+c.left;Math.abs(i-l)>1&&(u.style.left=2*i-l+"px")}if(u.style.right){var i=parseFloat(u.style.right),l=window.innerWidth-c.right;Math.abs(i-l)>1&&(u.style.right=2*i-l+"px")}if(u.style.top){var i=parseFloat(u.style.top),l=+c.top;Math.abs(i-l)>1&&(u.style.top=2*i-l+"px")}if(u.style.bottom){var i=parseFloat(u.style.bottom),l=window.innerHeight-c.bottom;Math.abs(i-l)>1&&(u.style.bottom=2*i-l+"px")}},r.scrollbarWidth=function(u){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var i=r.createElement("ace_outer"),l=i.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",i.appendChild(c);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(i);var w=c.offsetWidth;l.overflow="scroll";var x=c.offsetWidth;return w===x&&(x=i.clientWidth),m.removeChild(i),w-x},r.computedStyle=function(u,c){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,c,i){u[c]!==i&&(u[c]=i)},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(u,c,i){u.style.transform="translate("+Math.round(c)+"px, "+Math.round(i)+"px)"}:r.translate=function(u,c,i){u.style.top=Math.round(i)+"px",u.style.left=Math.round(c)+"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(s,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 s=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!s.length&&!a)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=h),f.stopPropagation||(f.stopPropagation=g),f.preventDefault||(f.preventDefault=b),s=s.slice();for(var u=0;u<s.length&&(s[u](f,this),!f.propagationStopped);u++);if(a&&!f.defaultPrevented)return a(f,this)}},p._signal=function(h,f){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](f,this)}},p.once=function(h,f){var s=this;if(this.on(h,function a(){s.off(h,a),f.apply(null,arguments)}),!f)return new Promise(function(a){f=a})},p.setDefaultHandler=function(h,f){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],u=s._disabled_[h];u||(s._disabled_[h]=u=[]),u.push(a);var c=u.indexOf(f);c!=-1&&u.splice(c,1)}s[h]=f},p.removeDefaultHandler=function(h,f){var s=this._defaultHandlers;if(s){var a=s._disabled_[h];if(s[h]==f)a&&this.setDefaultHandler(h,a.pop());else if(a){var u=a.indexOf(f);u!=-1&&a.splice(u,1)}}},p.on=p.addEventListener=function(h,f,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(f)==-1&&a[s?"unshift":"push"](f),f},p.off=p.removeListener=p.removeEventListener=function(h,f){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var a=s.indexOf(f);a!==-1&&s.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(i){Object.keys(i).forEach(function(l){this.setOption(l,i[l])},this)},getOptions:function(i){var l={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var m=this.$options;i=Object.keys(m).filter(function(w){return!m[w].hidden})}return i.forEach(function(w){l[w]=this.getOption(w)},this),l},setOption:function(i,l){if(this["$"+i]!==l){var m=this.$options[i];if(!m)return s('misspelled option "'+i+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(i,l);m.handlesSet||(this["$"+i]=l),m&&m.set&&m.set.call(this,l)}},getOption:function(i){var l=this.$options[i];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(i):l&&l.get?l.get.call(this):this["$"+i]:s('misspelled option "'+i+'"')}};function s(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,c=function(){function i(){this.$defaultOptions={},a=h,u="dollarSigns"}return i.prototype.defineOptions=function(l,m,w){return l.$options||(this.$defaultOptions[m]=l.$options={}),Object.keys(w).forEach(function(x){var E=w[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),p.implement(l,f),this},i.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(m){var w=l.$options[m];"value"in w&&l.setOption(m,w.value)})},i.prototype.setDefaultValue=function(l,m,w){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][m])break;if(!this.$defaultOptions[l][m])return!1}var x=this.$defaultOptions[l]||(this.$defaultOptions[l]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},i.prototype.setDefaultValues=function(l,m){Object.keys(m).forEach(function(w){this.setDefaultValue(l,w,m[w])},this)},i.prototype.setMessages=function(l,m){a=l,m&&m.placeholders&&(u=m.placeholders)},i.prototype.nls=function(l,m,w){a[l]||(s("No message found for the key '"+l+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||s("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[l]||a[m]||m;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,_){return _=="$"?"$":w[_]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,_){return w[_]}))),x},i}();c.prototype.warn=s,c.prototype.reportError=b,p.implement(c.prototype,g),r.AppConfig=c}),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(c){if(!f.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return f[c]},r.set=function(c,i){if(f.hasOwnProperty(c))f[c]=i;else if(this.setDefaultValue("",c,i)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&b.useStrictCSP(i)},r.all=function(){return p.copyObject(f)},r.$modes={},r.moduleUrl=function(c,i){if(f.$moduleUrls[c])return f.$moduleUrls[c];var l=c.split("/");i=i||l[l.length-2]||"";var m=i=="snippets"?"/":"-",w=l[l.length-1];if(i=="worker"&&m=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");w=w.replace(x,"")}(!w||w==i)&&l.length>1&&(w=l[l.length-2]);var E=f[i+"Path"];return E==null?E=f.basePath:m=="/"&&(i=m=""),E&&E.slice(-1)!="/"&&(E+="/"),E+i+m+w+this.get("suffix")},r.setModuleUrl=function(c,i){return f.$moduleUrls[c]=i};var s=function(c,i){if(c==="ace/theme/textmate"||c==="./theme/textmate")return i(null,t("./theme/textmate"));if(a)return a(c,i);console.error("loader is not configured")},a;r.setLoader=function(c){a=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,i){var l;if(Array.isArray(c))var m=c[0],w=c[1];else if(typeof c=="string")var w=c;var x=function(E){if(E&&!r.$loading[w])return i&&i(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(i),!(r.$loading[w].length>1)){var _=function(){s(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return _();g.loadScript(r.moduleUrl(w,m),_),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?x(E.default):x(E)});else{try{l=this.$require(w)}catch{}x(l||r.$loaded[w])}},r.$require=function(c){if(typeof d.require=="function"){var i="require";return d[i](c)}},r.setModuleLoader=function(c,i){r.dynamicModules[c]=i};var u=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"),u=function(){})};r.version="1.43.4"}),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,s){t([f],function(a){s(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 s={},a="",u=document.currentScript||document._currentScript,c=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=c.getElementsByTagName("script"),l=0;l<i.length;l++){var m=i[l],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&&(s[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&p.set(R,s[R])}}function h(f){return f.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,r,d){var p=function(){function g(b,h,f,s){this.start={row:b,column:h},this.end={row:f,column:s}}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,s=b.start;return h=this.compare(f.row,f.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.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 s={row:h+1,column:0};else if(this.start.row<b)var s={row:b,column:0};return g.fromPoints(s||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 s={row:b,column:h};else var a={row:b,column:h};return g.fromPoints(s||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 s={Shift:16,Control:17,Alt:18,Meta:224};for(var a in s)b[a]=b[a+"Left"]=b[a+"Right"]=s[a];r.$codeToKeyCode=b,g.PRINTABLE_KEYS[173]="-";for(var u in g.FUNCTION_KEYS){var c=g.FUNCTION_KEYS[u].toLowerCase();g[c]=parseInt(u,10)}for(var u in g.PRINTABLE_KEYS){var c=g.PRINTABLE_KEYS[u].toLowerCase();g[c]=parseInt(u,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 i=["cmd","ctrl","alt","shift"],l=Math.pow(2,i.length);l--;)g.KEY_MODS[l]=i.filter(function(m){return l&g.KEY_MODS[m]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",p.mixin(r,g),r.default=r,r.keyCodeToString=function(i){var l=g[i];return typeof l!="string"&&(l=String.fromCharCode(i)),l.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 s(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function a(){return f==null&&s(),f}function u(E,_,k){this.elem=E,this.type=_,this.callback=k}u.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(E,_,k,C){E.addEventListener(_,k,a()),C&&C.$toDestroy.push(new u(E,_,k))},i=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 R(D){_&&_(D),k&&k(D),i(C,"mousemove",_),i(C,"mouseup",R),i(C,"dragstart",R)}return c(C,"mousemove",_),c(C,"mouseup",R),c(C,"dragstart",R),R},r.addMouseWheelListener=function(E,_,k){c(E,"wheel",function(C){var R=.15,D=C.deltaX||0,L=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*R,C.wheelY=L*R;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=D*I,C.wheelY=L*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=D*H,C.wheelY=L*H;break}_(C)},k)},r.addMultiMouseDownListener=function(E,_,k,C,R){var D=0,L,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O($){if(r.getButton($)!==0?D=0:$.detail>1?(D++,D>4&&(D=1)):D=1,g.isIE){var A=Math.abs($.clientX-L)>5||Math.abs($.clientY-I)>5;(!H||A)&&(D=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},_[D-1]||600),D==1&&(L=$.clientX,I=$.clientY)}if($._clicks=D,k[C]("mousedown",$),D>4)D=0;else if(D>1)return k[C](P[D],$)}Array.isArray(E)||(E=[E]),E.forEach(function($){c($,"mousedown",O,R)})};function l(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[l(E)]};function m(E,_,k){var C=l(_);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 R=_.location;if(k===17&&R===1)b[k]==1&&(h=_.timeStamp);else if(k===18&&C===3&&R===2){var D=_.timeStamp-h;D<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;c(E,"keydown",function(R){b[R.keyCode]=(b[R.keyCode]||0)+1;var D=m(_,R,R.keyCode);return C=R.defaultPrevented,D},k),c(E,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},k),c(E,"keyup",function(R){b[R.keyCode]=null},k),b||(w(),c(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(R){R.data==k&&(r.stopPropagation(R),i(_,"message",C),E())};c(_,"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"),s=t("../clipboard"),a=b.isChrome<18,u=b.isIE,c=b.isChrome>63,i=400,l=t("../lib/keys"),m=l.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,E=b.isMobile,_=function(){function k(C,R){var D=this;this.host=R,this.text=h.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),p.addListener(this.text,"blur",function(L){D.ignoreFocusEvents||(R.onBlur(L),D.$isFocused=!1)},R),p.addListener(this.text,"focus",function(L){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(L),b.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var L=R.curOp,I=L&&L.command&&L.command.name;if(I!="insertstring"){var H=I&&(L.docChanged||L.selectionChanged);D.inComposition&&H&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,p.addCommandKeyListener(this.text,function(L,I,H){if(!D.inComposition)return R.onCommandKey(L,I,H)},R),p.addListener(this.text,"select",this.onSelect.bind(this),R),p.addListener(this.text,"input",this.onInput.bind(this),R),p.addListener(this.text,"cut",this.onCut.bind(this),R),p.addListener(this.text,"copy",this.onCopy.bind(this),R),p.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&p.addListener(C,"keydown",function(L){if(!(b.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:D.onCopy(L);break;case 86:D.onPaste(L);break;case 88:D.onCut(L);break}},R),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),p.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),p.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),p.addListener(this.text,"keyup",this.onKeyup.bind(this),R),p.addListener(this.text,"keydown",this.syncComposition.bind(this),R),p.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,p.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),p.addListener(this.text,"mousedown",function(L){L.preventDefault(),D.onContextMenuClose()},R),p.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),p.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),w&&this.addIosSelectionHandler(C,R,this.text)}return k.prototype.addIosSelectionHandler=function(C,R,D){var L=this,I=null,H=!1;D.addEventListener("keydown",function(O){I&&clearTimeout(I),H=!0},!0),D.addEventListener("keyup",function(O){I=setTimeout(function(){H=!1},100)},!0);var P=function(O){if(document.activeElement===D&&!(H||L.inComposition||R.$mouseHandler.isMousePressed)&&!L.copied){var $=D.selectionStart,A=D.selectionEnd,N=null,B=0;if($==0?N=l.up:$==1?N=l.home:A>L.lastSelectionEnd&&L.lastValue[A]==`
|
|
167
|
+
`?N=l.end:$<L.lastSelectionStart&&L.lastValue[$-1]==" "?(N=l.left,B=m.option):$<L.lastSelectionStart||$==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&$==A?N=l.left:A>L.lastSelectionEnd&&L.lastValue.slice(0,A).split(`
|
|
168
|
+
`).length>2?N=l.down:A>L.lastSelectionEnd&&L.lastValue[A-1]==" "?(N=l.right,B=m.option):(A>L.lastSelectionEnd||A==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&$==A)&&(N=l.right),$!==A&&(B|=m.shift),N){var U=R.onCommandKey({},B,N);if(!U&&R.commands){N=l.keyCodeToString(N);var K=R.commands.findKeyCommand(B,N);K&&R.execCommand(K)}L.lastSelectionStart=$,L.lastSelectionEnd=A,L.resetSelection("")}}};document.addEventListener("selectionchange",P),R.on("destroy",function(){document.removeEventListener("selectionchange",P)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var R=this.handleClipboardData(C);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,C),b.isIE&&setTimeout(this.resetSelection),p.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,R){var D=this,L=this.host.getCopyText();if(!L)return p.preventDefault(C);this.handleClipboardData(C,L)?(w&&(this.resetSelection(L),this.copied=L,setTimeout(function(){D.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),p.preventDefault(C)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),R?D.host.onCut():D.host.onCopy()}))},k.prototype.handleClipboardData=function(C,R,D){var L=C.clipboardData||window.clipboardData;if(!(!L||a)){var I=u||D?"Text":"text/plain";try{return R?L.setData(I,R)!==!1:L.getData(I)}catch(H){if(!D)return this.handleClipboardData(H,R,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,D=this.sendText(R,!0);(R.length>i+100||x.test(D)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var D=this.text.selectionStart,L=this.text.selectionEnd,I=this.lastSelectionStart,H=this.lastValue.length-this.lastSelectionEnd,P=C,O=C.length-D,$=C.length-L,A=0;I>0&&this.lastValue[A]==C[A];)A++,I--;for(P=P.slice(A),A=1;H>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,H--;O-=A-1,$-=A-1;var N=P.length-A+1;if(N<0&&(I=-N,N=0),P=P.slice(0,N),!R&&!P&&!O&&!I&&!H&&!$)return"";this.sendingText=!0;var B=!1;return b.isAndroid&&P==". "&&(P=" ",B=!0),P&&!I&&!H&&!O&&!$||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:I,extendRight:H,restoreStart:O,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=L,this.lastRestoreEnd=$,B?`
|
|
169
|
+
`:P},k.prototype.onSelect=function(C){var R=this;if(!this.inComposition){var D=function(L){return L.selectionStart===0&&L.selectionEnd>=R.lastValue.length&&L.value===R.lastValue&&R.lastValue&&L.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var R=`
|
|
170
|
+
ab`+C+`cde fg
|
|
171
|
+
`;R!=this.text.value&&(this.text.value=this.lastValue=R);var D=4,L=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(D,L),this.lastSelectionStart=D,this.lastSelectionEnd=L}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,D=0,L="",I=function(K,Z){for(var J=Z,he=1;he<=K-C.rowStart&&he<2*C.numberOfExtraLines+1;he++)J+=C.host.session.getLine(K-he).length+1;return J};if(this.host.session){var H=this.host.selection,P=H.getRange(),O=H.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],A=this.rowStart;A<=this.rowEnd;A++)$.push(this.host.session.getLine(A));if(L=$.join(`
|
|
172
|
+
`),R=I(P.start.row,P.start.column),D=I(P.end.row,P.end.column),P.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);R=P.start.row<this.rowStart-1?0:R,D+=N.length+1,L=N+`
|
|
173
|
+
`+L}else if(P.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);D=P.end.row>this.rowEnd+1?B.length:P.end.column,D+=L.length+1,L=L+`
|
|
174
|
+
`+B}else E&&O>0&&(L=`
|
|
175
|
+
`+L,D+=1,R+=1);L.length>i&&(R<i&&D<i?L=L.slice(0,i):(L=`
|
|
176
|
+
`,R==D?R=D=0:(R=0,D=1)));var U=L+`
|
|
177
|
+
|
|
178
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,D),this.lastSelectionStart=R,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||c||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(D)for(var I=this.text.parentElement;I&&I.nodeType==1;)L.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),D&&L.forEach(function(H){H.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,R){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),I=h.computedStyle(this.host.container),H=L.top+(parseInt(I.borderTopWidth)||0),P=L.left+(parseInt(I.borderLeftWidth)||0),O=L.bottom-H-this.text.clientHeight-2,$=function(A){h.translate(D.text,A.clientX-P-2,Math.min(A.clientY-H-2,O))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&p.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k}();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(u){u.$clickSelection=null;var c=u.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(l){u[l]=this[l]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var c=u.inSelection(),i=u.getDocumentPosition();this.mousedownEvent=u;var l=this.editor,m=u.getButton();if(m!==0){var w=l.getSelectionRange(),x=w.isEmpty();(x||m==1)&&l.selection.moveToPosition(i),m==2&&(l.textInput.onContextMenu(u.domEvent),p.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(i,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,c){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(u):c||i.selection.moveToPosition(u),c||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,c=this.editor,i=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(i);if(l==-1)u=this.$clickSelection.end;else if(l==1)u=this.$clickSelection.start;else{var m=s(this.$clickSelection,i,c.session);i=m.cursor,u=m.anchor}c.selection.setSelectionAnchor(u.row,u.column)}c.selection.selectToPosition(i),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var c,i=this.editor,l=i.renderer.screenToTextCoordinates(this.x,this.y),m=i.selection[u](l.row,l.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)c=this.$clickSelection.end,(m.end.row!=l.row||m.end.column!=l.column)&&(l=m.start);else if(x==1&&w>=0)c=this.$clickSelection.start,(m.start.row!=l.row||m.start.column!=l.column)&&(l=m.end);else if(w==-1&&x==1)l=m.end,c=m.start;else{var E=s(this.$clickSelection,l,i.session);l=E.cursor,c=E.anchor}i.selection.setSelectionAnchor(c.row,c.column)}i.selection.selectToPosition(l),i.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(u>g||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var c=u.getDocumentPosition(),i=this.editor,l=i.session,m=l.getBracketRange(c);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=i.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(u){var c=u.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var l=i.getSelectionRange();l.isMultiLine()&&l.contains(c.row,c.column)?(this.$clickSelection=i.selection.getLineRange(l.start.row),this.$clickSelection.end=i.selection.getLineRange(l.end.row).end):this.$clickSelection=i.selection.getLineRange(c.row),this.select()},a.prototype.onQuadClick=function(u){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,l=u.domEvent.timeStamp,m=l-i.t,w=m?u.wheelX/m:i.vx,x=m?u.wheelY/m:i.vy;m<b&&(w=(w+i.vx)/2,x=(x+i.vy)/2);var E=Math.abs(w/x),_=!1;if(E>=1&&c.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(_=!0),E<=1&&c.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(_=!0),_)i.allowed=l;else if(l-i.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);k?(_=!0,i.allowed=l):i.allowed=0}if(i.t=l,i.vx=w,i.vy=x,_)return c.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.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,u,c,i){return Math.sqrt(Math.pow(c-a,2)+Math.pow(i-u,2))}function s(a,u,c){if(a.start.row==a.end.row)var i=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var i=3*u.column-2*c.getLine(a.start.row).length;else var i=2*u.row-a.start.row-a.end.row;return i<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),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,s){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=s,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,s=this.editor.session.documentToScreenRow(f,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,s=f.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.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/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 l=function(m,w){return l=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[_])},l(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");l(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(l){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&l[m],x=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};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,s="ace_tooltip",a=function(){function l(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return l.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(m){this.getElement().textContent=m},l.prototype.setHtml=function(m){this.getElement().innerHTML=m},l.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},l.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},l.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&b.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&b.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&b.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&b.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},l.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)},l.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l}(),u=function(){function l(){this.popups=[]}return l.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},l.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},l.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 R=C.value,D=!0;try{for(var L=(x=void 0,g(_)),I=L.next();!I.done;I=L.next()){var H=I.value;if(this.doPopupsOverlap(H,R)){D=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(E=L.return)&&E.call(L)}finally{if(x)throw x.error}}D?_.push(R):R.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},l.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},l}(),c=new u;r.popupManager=c,r.Tooltip=a;var i=function(l){p(m,l);function m(w){w===void 0&&(w=document.body);var x=l.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);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.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,_){if(!(_&&_!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=w.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=h.fromPoints(x.start,x.end);var C=k.textToScreenCoordinates(x.start.row,x.start.column),R=k.scroller.getBoundingClientRect();C.pageX<R.left&&(C.pageX=R.left);var D=this.getElement();D.innerHTML="",D.appendChild(E),D.style.maxHeight="",D.style.display="block",this.$setPosition(w,C,!0,x),b.$fixPositionBug(D)}},m.prototype.$setPosition=function(w,x,E,_){var k=10;E&&this.addMarker(_,w.session);var C=w.renderer,R=this.getElement(),D=R.offsetHeight,L=R.offsetWidth,I=x.pageY,H=x.pageX,P=window.innerHeight-I-C.lineHeight,O=this.$shouldPlaceAbove(D,I,P-k);R.style.maxHeight=(O?I:P)-k+"px",R.style.top=O?"":I+C.lineHeight+"px",R.style.bottom=O?window.innerHeight-I+"px":"",R.style.left=Math.min(H,window.innerWidth-L-k)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,E){return!(x-w<0&&x<E)},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&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!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.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.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=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,d){var p=this&&this.__extends||function(){var i=function(l,m){return i=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])},i(l,m)};return function(l,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(l,m);function w(){this.constructor=l}l.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),g=this&&this.__values||function(i){var l=typeof Symbol=="function"&&Symbol.iterator,m=l&&i[l],w=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&w>=i.length&&(i=void 0),{value:i&&i[w++],done:!i}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("../lib/dom"),h=t("./mouse_event").MouseEvent,f=t("../tooltip").HoverTooltip,s=t("../config").nls,a=t("../range").Range;function u(i){var l=i.editor,m=l.renderer.$gutterLayer;i.$tooltip=new c(l),i.$tooltip.addToEditor(l),i.$tooltip.setDataProvider(function(w,x){var E=w.getDocumentPosition().row;i.$tooltip.showTooltip(E)}),i.editor.setDefaultHandler("guttermousedown",function(w){if(!(!l.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var E=w.getDocumentPosition().row,_=l.session.selection;if(w.getShiftKey())_.selectTo(E,0);else{if(w.domEvent.detail==2)return l.selectAll(),w.preventDefault();i.$clickSelection=l.selection.getLineRange(E)}return i.setState("selectByLines"),i.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=u;var c=function(i){p(l,i);function l(m){var w=i.call(this,m.container)||this;w.id="gt"+ ++l.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return l.prototype.onDomMouseMove=function(m){var w=new h(m,this.editor);this.onMouseMove(w,this.editor)},l.prototype.onDomMouseOut=function(m){var w=new h(m,this.editor);this.onMouseOut(w)},l.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,m)},l.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,m)},l.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,E=x.$annotations[m],_;E?_={displayText:Array.from(E.displayText),type:Array.from(E.type)}:_={displayText:[],type:[]};var k=x.session.getFoldLine(m);if(k&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},D,L=m+1;L<=k.end.row;L++)if(x.$annotations[L])for(var I=0;I<x.$annotations[L].text.length;I++){var H=x.$annotations[L].type[I];C[H].push(x.$annotations[L].text[I]),(!D||R[H]<R[D])&&(D=H)}if(["error","security","warning"].includes(D)){var P="".concat(l.annotationsToSummaryString(C)," in folded code.");_.displayText.push(P),_.type.push(D+"_fold")}}if(_.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<_.displayText.length;L++){var A=b.createElement("span"),N=b.createElement("span");(w=N.classList).add.apply(w,["ace_".concat(_.type[L]),$]),N.setAttribute("aria-label","".concat(l.annotationLabels[_.type[L].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(b.createTextNode(" ")),A.appendChild(N),A.appendChild(b.createTextNode(_.displayText[L])),A.appendChild(b.createElement("br")),O[_.type[L].replace("_fold","")].push(A)}var B=b.createElement("span");O.error.forEach(function(Z){return B.appendChild(Z)}),O.security.forEach(function(Z){return B.appendChild(Z)}),O.warning.forEach(function(Z){return B.appendChild(Z)}),O.info.forEach(function(Z){return B.appendChild(Z)}),O.hint.forEach(function(Z){return B.appendChild(Z)}),B.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var K=a.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,K,B),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},l.prototype.$setPosition=function(m,w,x,E){var _=this.$findCellByRow(E.start.row);if(_){var k=_&&_.element,C=k&&k.querySelector(".ace_gutter_annotation");if(C){var R=C.getBoundingClientRect();if(R){var D={pageX:R.right,pageY:R.top};return i.prototype.$setPosition.call(this,m,D,!1,E)}}}},l.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},l.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},l.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},l.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),i.prototype.hide.call(this,m)}},l.annotationsToSummaryString=function(m){var w,x,E=[],_=["error","security","warning","info","hint"];try{for(var k=g(_),C=k.next();!C.done;C=k.next()){var R=C.value;if(m[R].length){var D=m[R].length===1?l.annotationLabels[R].singular:l.annotationLabels[R].plural;E.push("".concat(m[R].length," ").concat(D))}}}catch(L){w={error:L}}finally{try{C&&!C.done&&(x=k.return)&&x.call(k)}finally{if(w)throw w.error}}return E.join(", ")},l.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},l}(f);c.$uid=0,r.GutterTooltip=c}),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,s=5;function a(c){var i=c.editor,l=p.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){c[ne]=this[ne]},this),i.on("mousedown",this.onMouseDown.bind(c));var w=i.container,x,E,_,k,C,R,D=0,L,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ne)},0),ne.preventDefault()}C=i.getSelectionRange();var se=ne.dataTransfer;se.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(l),se.setDragImage&&se.setDragImage(l,0,0),setTimeout(function(){i.container.removeChild(l)}),se.clearData(),se.setData("Text",i.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!i.getReadOnly()){var le=ne.dataTransfer.dropEffect;!L&&le=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return E=ne.clientX,_=ne.clientY,x||B(),D++,ne.dataTransfer.dropEffect=L=he(ne),g.preventDefault(ne)},this.onDragOver=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return E=ne.clientX,_=ne.clientY,x||(B(),D++),K!==null&&(K=null),ne.dataTransfer.dropEffect=L=he(ne),g.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&x)return U(),L=null,g.preventDefault(ne)},this.onDrop=function(ne){if(R){var le=ne.dataTransfer;if(I)switch(L){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=i.moveText(C,R);break;case"copy":C=i.moveText(C,R,!0);break}else{var se=le.getData("Text");C={start:R,end:i.session.insert(R,se)},i.focus(),L=null}return U(),g.preventDefault(ne)}},g.addListener(w,"dragstart",this.onDragStart.bind(c),i),g.addListener(w,"dragend",this.onDragEnd.bind(c),i),g.addListener(w,"dragenter",this.onDragEnter.bind(c),i),g.addListener(w,"dragover",this.onDragOver.bind(c),i),g.addListener(w,"dragleave",this.onDragLeave.bind(c),i),g.addListener(w,"drop",this.onDrop.bind(c),i);function $(ne,le){var se=Date.now(),de=!le||ne.row!=le.row,me=!le||ne.column!=le.column;if(!P||de||me)i.moveCursorToPosition(ne),P=se,O={x:E,y:_};else{var _e=u(O.x,O.y,E,_);_e>s?P=null:se-P>=f&&(i.renderer.scrollCursorIntoView(),P=null)}}function A(ne,le){var se=Date.now(),de=i.renderer.layerConfig.lineHeight,me=i.renderer.layerConfig.characterWidth,_e=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:E-_e.left,right:_e.right-E},y:{top:_-_e.top,bottom:_e.bottom-_}},Me=Math.min(Te.x.left,Te.x.right),Je=Math.min(Te.y.top,Te.y.bottom),Xe={row:ne.row,column:ne.column};Me/me<=2&&(Xe.column+=Te.x.left<Te.x.right?-3:2),Je/de<=1&&(Xe.row+=Te.y.top<Te.y.bottom?-1:1);var ht=ne.row!=Xe.row,st=ne.column!=Xe.column,dt=!le||ne.row!=le.row;ht||st&&!dt?H?se-H>=h&&i.renderer.scrollCursorIntoView(Xe):H=se:H=null}function N(){var ne=R;R=i.renderer.screenToTextCoordinates(E,_),$(R,ne),A(R,ne)}function B(){C=i.selection.toOrientedRange(),x=i.session.addMarker(C,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),N(),k=setInterval(N,20),D=0,g.addListener(document,"mousemove",Z)}function U(){clearInterval(k),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!I&&i.$resetCursorStyle(),C=null,R=null,D=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 J(ne){var le=ne.types;return!le||Array.prototype.some.call(le,function(se){return se=="text/plain"||se=="Text"})}function he(ne){var le=["copy","copymove","all","uninitialized"],se=["move","copymove","linkmove","all","uninitialized"],de=b.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return de&&le.indexOf(me)>=0?_e="copy":se.indexOf(me)>=0?_e="move":le.indexOf(me)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,i=c.container;i.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var l=b.isWin?"default":"move";c.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(c){var i=this.editor.container;if(b.isIE&&this.state=="dragReady"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&i.dragDrop()}if(this.state==="dragWait"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var i=this.editor,l=c.inSelection(),m=c.getButton(),w=c.domEvent.detail||1;if(w===1&&m===0&&l){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=i.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function u(c,i,l,m){return Math.sqrt(Math.pow(l-c,2)+Math.pow(m-i,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 s="scroll",a,u,c,i,l,m,w=0,x,E=0,_=0,k=0,C,R;function D(){var $=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=f.getCopyText(),Z=f.session.getUndoManager().hasUndo();R.replaceChild(b.buildDom(A?["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"],$&&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"]),R.firstChild)},B=function(K){return f.commands.canExecute(K,f)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?$.readText().then(function(J){f.execCommand(Z,J)}):Z&&((Z=="cut"||Z=="copy")&&($?$.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(Z)),R.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&f.focus()};R=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="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 L(){if(!f.getOption("enableMobileMenu")){R&&I();return}R||D();var $=f.selection.cursor,A=f.renderer.textToScreenCoordinates($.row,$.column),N=f.renderer.textToScreenCoordinates(0,0).pageX,B=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",f.on("input",I)}function I($){R&&(R.style.display="none"),f.off("input",I)}function H(){l=null,clearTimeout(l);var $=f.selection.getRange(),A=$.contains(x.row,x.column);($.isEmpty()||!A)&&(f.selection.moveToPosition(x),f.selection.selectWord()),s="wait",L()}function P(){l=null,clearTimeout(l),f.selection.moveToPosition(x);var $=E>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);$&&!$.isEmpty()?f.selection.setRange($):f.selection.selectWord(),s="wait"}g.addListener(h,"contextmenu",function($){if(C){var A=f.textInput.getElement();A.focus()}},f),g.addListener(h,"touchstart",function($){var A=$.touches;if(l||A.length>1){clearTimeout(l),l=null,c=-1,s="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var N=f.renderer.layerConfig.lineHeight,B=f.renderer.layerConfig.lineHeight,U=$.timeStamp;i=U;var K=A[0],Z=K.clientX,J=K.clientY;Math.abs(a-Z)+Math.abs(u-J)>N&&(c=-1),a=$.clientX=Z,u=$.clientY=J,_=k=0;var he=new p($,f);if(x=he.getDocumentPosition(),U-c<500&&A.length==1&&!w)E++,$.preventDefault(),$.button=0,P();else{E=0;var ne=f.selection.cursor,le=f.selection.isEmpty()?ne:f.selection.anchor,se=f.renderer.$cursorLayer.getPixelPosition(ne,!0),de=f.renderer.$cursorLayer.getPixelPosition(le,!0),me=f.renderer.scroller.getBoundingClientRect(),_e=f.renderer.layerConfig.offset,Te=f.renderer.scrollLeft,Me=function(ht,st){return ht=ht/B,st=st/N-.75,ht*ht+st*st};if($.clientX<me.left){s="zoom";return}var Je=Me($.clientX-me.left-se.left+Te,$.clientY-me.top-se.top+_e),Xe=Me($.clientX-me.left-de.left+Te,$.clientY-me.top-de.top+_e);Je<3.5&&Xe<3.5&&(s=Je>Xe?"cursor":"anchor"),Xe<3.5?s="anchor":Je<3.5?s="cursor":s="scroll",l=setTimeout(H,450)}c=U},f),g.addListener(h,"touchend",function($){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):l?(f.selection.moveToPosition(x),w=0,L()):s=="scroll"?(O(),I()):L(),clearTimeout(l),l=null},f),g.addListener(h,"touchmove",function($){l&&(clearTimeout(l),l=null);var A=$.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=a-N.clientX,U=u-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return $.preventDefault();a=N.clientX,u=N.clientY,$.clientX=N.clientX,$.clientY=N.clientY;var K=$.timeStamp,Z=K-i;if(i=K,s=="scroll"){var J=new p($,f);J.speed=1,J.wheelX=B,J.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",J),J.propagationStopped||(_=k=0)}else{var he=new p($,f),ne=he.getDocumentPosition();s=="cursor"?f.selection.moveCursorToPosition(ne):s=="anchor"&&f.selection.setSelectionAnchor(ne.row,ne.column),f.renderer.scrollCursorIntoView(ne),$.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 $=f.session.getScrollTop();f.renderer.scrollBy(10*_,10*k),$==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,s=t("./dragdrop_handler").DragdropHandler,a=t("./touch_handler").addTouchListeners,u=t("../config"),c=function(){function i(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=l,new b(this),new h(this),new s(this);var w=function(_){var k=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());k&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},x=l.renderer.getMouseEventTarget();p.addListener(x,"click",this.onMouseEvent.bind(this,"click"),l),p.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),p.addMultiMouseDownListener([x,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),p.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),a(l.container,l);var E=l.renderer.$gutter;p.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),p.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),p.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),p.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),p.addListener(x,"mousedown",w,l),p.addListener(E,"mousedown",w,l),g.isIE&&l.renderer.scrollBarV&&(p.addListener(l.renderer.scrollBarV.element,"mousedown",w,l),p.addListener(l.renderer.scrollBarH.element,"mousedown",w,l)),l.on("mousemove",function(_){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=l.renderer.screenToTextCoordinates(_.x,_.y),C=l.session.selection.getRange(),R=l.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},l)}return i.prototype.onMouseEvent=function(l,m){this.editor.session&&this.editor._emit(l,new f(m,this.editor))},i.prototype.onMouseMove=function(l,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(l,new f(m,this.editor))},i.prototype.onMouseWheel=function(l,m){var w=new f(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(l,w)},i.prototype.setState=function(l){this.state=l},i.prototype.captureMouse=function(l,m){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,_=!0,k=function(I){if(I){if(g.isWebKit&&!I.which&&E.releaseMouse)return E.releaseMouse();E.x=I.clientX,E.y=I.clientY,m&&m(I),E.mouseEvent=new f(I,E.editor),E.$mouseMoved=!0}},C=function(I){w.off("beforeEndOperation",L),_=!1,w.session&&R(),E[E.state+"End"]&&E[E.state+"End"](I),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,I&&E.onMouseEvent("mouseup",I),w.endOperation()},R=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},D=function(){_&&(R(),p.nextFrame(D))};if(g.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){C(l)});var L=function(I){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=k,E.releaseMouse=p.capture(this.editor.container,k,C),D()},i.prototype.cancelContextMenu=function(){var l=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),m&&m.domEvent&&p.stopEvent(m.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i}();c.prototype.releaseMouse=null,u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=c}),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 s=f.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(f.getAccelKey()?a.removeFold(u):a.expandFold(u),f.stop());var c=f.domEvent&&f.domEvent.target;c&&p.hasCssClass(c,"ace_inline_button")&&p.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(f){var s=h.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,f),h.isFocused()||h.focus(),f.stop()}}),h.on("gutterdblclick",function(f){var s=h.renderer.$gutterLayer.getRegion(f);if(s=="foldWidgets"){var a=f.getDocumentPosition().row,u=h.session,c=u.getParentFoldRangeData(a,!0),i=c.range||c.firstRange;if(i){a=i.start.row;var l=u.getFoldAt(a,u.getLine(a).length,1);l?u.removeFold(l):(u.addFold("...",i),h.renderer.scrollCursorIntoView({row:i.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 s=this.$handlers;if(s[s.length-1]!=f){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(f,1)}},h.prototype.addKeyboardHandler=function(f,s){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var a=this.$handlers.indexOf(f);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(f):this.$handlers.splice(s,0,f),a==-1&&f.attach&&f.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(f){var s=this.$handlers.indexOf(f);return s==-1?!1:(this.$handlers.splice(s,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,s=f.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,f)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(f,s,a,u){for(var c,i=!1,l=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,f,s,a,u),!(!(!c||!c.command)&&(c.command=="null"?i=!0:i=l.exec(c.command,this.$editor,c.args,u),i&&u&&f!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&g.stopEvent(u),i))););return!i&&f==-1&&(c={command:"insertstring"},i=l.exec("insertstring",this.$editor,s)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),i},h.prototype.onCommandKey=function(f,s,a){var u=p.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,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,s=[[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]],u=0,c=1,i=0,l=1,m=2,w=3,x=4,E=5,_=6,k=7,C=8,R=9,D=10,L=11,I=12,H=13,P=14,O=15,$=16,A=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,L,L,L,x,x,x,x,x,D,R,D,R,R,m,m,m,m,m,m,m,m,m,m,R,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,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,R,x,L,L,L,L,x,x,x,x,i,x,x,N,x,x,L,L,m,m,x,i,x,x,x,m,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,i,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,C,E,H,P,O,$,A,R,L,L,L,L,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,R,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,le,se,de){var me=p?a:s,_e=null,Te=null,Me=null,Je=0,Xe=null,ht=null,st=-1,dt=null,Zt=null,$n=[];if(!de)for(dt=0,de=[];dt<se;dt++)de[dt]=he(ne[dt]);for(g=p,b=!1,h=!1,f=!1,Zt=0;Zt<se;Zt++){if(_e=Je,$n[Zt]=Te=J(ne,de,$n,Zt),Je=me[_e][Te],Xe=Je&240,Je&=15,le[Zt]=Me=me[Je][5],Xe>0)if(Xe==16){for(dt=st;dt<Zt;dt++)le[dt]=1;st=-1}else st=-1;if(ht=me[Je][6],ht)st==-1&&(st=Zt);else if(st>-1){for(dt=st;dt<Zt;dt++)le[dt]=Me;st=-1}de[Zt]==E&&(le[Zt]=0),g|=Me}if(f){for(dt=0;dt<se;dt++)if(de[dt]==_){le[dt]=p;for(var Ht=dt-1;Ht>=0&&de[Ht]==C;Ht--)le[Ht]=p}}}function Z(ne,le,se){if(!(g<ne)){if(ne==1&&p==c&&!h){se.reverse();return}for(var de=se.length,me=0,_e,Te,Me,Je;me<de;){if(le[me]>=ne){for(_e=me+1;_e<de&&le[_e]>=ne;)_e++;for(Te=me,Me=_e-1;Te<Me;Te++,Me--)Je=se[Te],se[Te]=se[Me],se[Me]=Je;me=_e}me++}}}function J(ne,le,se,de){var me=le[de],_e,Te,Me,Je;switch(me){case i:case l:b=!1;case x:case w:return me;case m:return b?w:m;case k:return b=!0,l;case C:return x;case R:return de<1||de+1>=le.length||(_e=se[de-1])!=m&&_e!=w||(Te=le[de+1])!=m&&Te!=w?x:(b&&(Te=w),Te==_e?Te:x);case D:return _e=de>0?se[de-1]:E,_e==m&&de+1<le.length&&le[de+1]==m?m:x;case L:if(de>0&&se[de-1]==m)return m;if(b)return x;for(Je=de+1,Me=le.length;Je<Me&&le[Je]==L;)Je++;return Je<Me&&le[Je]==m?m:x;case I:for(Me=le.length,Je=de+1;Je<Me&&le[Je]==I;)Je++;if(Je<Me){var Xe=ne[de],ht=Xe>=1425&&Xe<=2303||Xe==64286;if(_e=le[Je],ht&&(_e==l||_e==k))return l}return de<1||(_e=le[de-1])==E?x:se[de-1];case E:return b=!1,h=!0,p;case _:return f=!0,x;case H:case P:case $:case A:case O:b=!1;case N:return x}}function he(ne){var le=ne.charCodeAt(0),se=le>>8;return se==0?le>191?i:B[le]:se==5?/[\u0591-\u05f4]/.test(ne)?l:i:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:le==1642?L:/[\u06f0-\u06f9]/.test(ne)?m:k:se==32&&le<=8287?U[le&255]:se==254&&le>=65136?k:x}r.L=i,r.R=l,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,le,se){if(ne.length<2)return{};var de=ne.split(""),me=new Array(de.length),_e=new Array(de.length),Te=[];p=se?c:u,K(de,Te,de.length,le);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Z(2,Te,me),Z(1,Te,me);for(var Me=0;Me<me.length-1;Me++)le[Me]===w?Te[Me]=r.AN:Te[Me]===l&&(le[Me]>k&&le[Me]<H||le[Me]===x||le[Me]===N)?Te[Me]=r.ON_R:Me>0&&de[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(de[Me])&&(Te[Me-1]=Te[Me]=r.R_H,Me++);de[de.length-1]===r.DOT&&(Te[de.length-1]=r.B),de[0]===""&&(Te[0]=r.RLE);for(var Me=0;Me<me.length;Me++)_e[Me]=Te[me[Me]];return{logicalFromVisual:me,bidiLevels:_e}},r.hasBidiCharacters=function(ne,le){for(var se=!1,de=0;de<ne.length;de++)le[de]=he(ne.charAt(de)),!se&&(le[de]==l||le[de]==k||le[de]==w)&&(se=!0);return se},r.getVisualFromLogicalIdx=function(ne,le){for(var se=0;se<le.logicalFromVisual.length;se++)if(le.logicalFromVisual[se]==ne)return se;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(s){this.session=s,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(s.getValue())}return f.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
|
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},f.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===c);)c=u,s++;else s=this.currentRow;return s},f.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,c=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[s];i&&(a===void 0&&(a=this.getSplitIndex()),a>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=a<i.length?this.line.substring(i[a-1],i[a]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[a]),a==i.length&&(this.line+=this.showInvisibles?c:p.DOT))}else this.line+=this.showInvisibles?c:p.DOT;var l=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||l.isFullWidth(x.charCodeAt(0))?(w=x===" "?l.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 s=[];p.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=a,this.charWidths[p.R]=this.charWidths[p.AN]=u,this.charWidths[p.R_H]=u*.45,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},f.prototype.setEolChar=function(s){this.EOL=s},f.prototype.setContentWidth=function(s){this.contentWidth=s},f.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),c=s.selection.getSelectionAnchor().row;c<=u.row;c++)!a&&s.session.getLine(c).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(c,0,1):a&&s.session.getLine(c).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:c},s.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=s>a?this.session.getOverwrite()?s:s-1:a,c=p.getVisualFromLogicalIdx(u,this.bidiMap),i=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&s<=a&&i[c]%2!==0&&c++;for(var m=0;m<c;m++)l+=this.charWidths[i[m]];return!this.session.getOverwrite()&&s>a&&i[c]%2===0&&(l+=this.charWidths[i[c]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},f.prototype.getSelections=function(s,a){var u=this.bidiMap,c=u.bidiLevels,i,l=[],m=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,E=!1,_=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<c.length;R++)C=u.logicalFromVisual[R],i=c[R],E=C>=w&&C<x,E&&!_?k=m:!E&&_&&l.push({left:k,width:m-k}),m+=this.charWidths[i],_=E;if(E&&R===c.length&&l.push({left:k,width:m-k}),this.isRtlDir)for(var D=0;D<l.length;D++)l[D].left+=this.rtlLineOffset;return l},f.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),c=0,i=0,l=this.bidiMap.bidiLevels,m=this.charWidths[l[i]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>c+m/2;){if(c+=m,i===l.length-1){m=0;break}m=this.charWidths[l[++i]]}return i>0&&l[i-1]%2!==0&&l[i]%2===0?(u<c&&i--,a=this.bidiMap.logicalFromVisual[i]):i>0&&l[i-1]%2===0&&l[i]%2!==0?a=1+(u>c?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===l.length-1&&m===0&&l[i-1]%2===0||!this.isRtlDir&&i===0&&l[i]%2!==0?a=1+this.bidiMap.logicalFromVisual[i]:(i>0&&l[i-1]%2!==0&&m!==0&&i--,a=this.bidiMap.logicalFromVisual[i]),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 s(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 u=this;this.cursor.on("change",function(c){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},s.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,a):h.fromPoints(a,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,u){var c=u?a.end:a.start,i=u?a.start:a.end;this.$setSelection(c.row,c.column,i.row,i.column)},s.prototype.$setSelection=function(a,u,c,i){if(!this.$silent){var l=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(c,i),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},s.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,u){if(typeof u>"u"){var c=a||this.lead;a=c.row,u=c.column}return this.session.getWordRange(a,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(a,u){var c=typeof a=="number"?a:this.lead.row,i,l=this.session.getFoldLine(c);return l?(c=l.start.row,i=l.end.row):i=c,u===!0?new h(c,0,i,this.session.getLine(i).length):new h(c,0,i+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,u,c){var i=a.column,l=a.column+u;return c<0&&(i=a.column-u,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(i,l).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.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 c=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,c=this.session.documentToScreenRow(a,u),i=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,i.row,i.column),m=l.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(i.column+=m[0].length),this.moveCursorToPosition(i)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var c=this.session.getLine(u.row);if(u.column==c.length){var i=c.search(/\s+$/);i>0&&(u.column=i)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),i=c.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,u,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(i)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=c.substring(u)),u>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var i=this.session.getFoldStringAt(a,u,-1);i==null&&(i=this.doc.getLine(a).substring(0,u));var l=g.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(u-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,c,i=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(c=a[u])&&i.test(c);)u++;if(u<1){for(l.lastIndex=0;(c=a[u])&&!l.test(c);)if(l.lastIndex=0,u++,i.test(c))if(u>2){u--;break}else{for(;(c=a[u])&&i.test(c);)u++;if(u>2)break}}}return l.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),i=c.substring(u),l=this.session.getFoldAt(a,u,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(u==c.length){var m=this.doc.getLength();do a++,i=this.doc.getLine(a);while(a<m&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),u=0}var w=this.$shortWordEndIndex(i);this.moveCursorTo(a,u+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(c.start.row,c.start.column);var i=this.session.getLine(a).substring(0,u);if(u===0){do a--,i=this.doc.getLine(a);while(a>0&&/^\s*$/.test(i));u=i.length,/\s+$/.test(i)||(i="")}var l=g.stringReverse(i),m=this.$shortWordEndIndex(l);return this.moveCursorTo(a,u-m)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,u){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];a<0?a-=l.rowsAbove||0:a>0&&(a+=l.rowCount-(l.rowsAbove||0))}var m=this.session.screenToDocumentPosition(c.row+a,c.column,i);a!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,c){var i=this.session.getFoldAt(a,u,1);i&&(a=i.start.row,u=i.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(u))&&l.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,c){var i=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(i.row,i.column,c)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var c=this.getCursor();return h.fromPoints(u,c)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var c=u.clone();return c.isBackwards=u.cursor==u.start,c});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var c=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.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 u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},s}();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 s in this.states){for(var a=this.states[s],u=[],c=0,i=this.matchMappings[s]={defaultToken:"text"},l="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),x.unicode&&l.indexOf("u")===-1&&(l+="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)+c+1)}):(_=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),i[c]=w,c+=_,u.push(E),x.onMatch||(x.onMatch=null)}}u.length||(i[0]=0,u.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,l)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",l)}}return h.prototype.$setMaxTokenCount=function(f){g=f|0},h.prototype.$applyToken=function(f){var s=this.splitRegex.exec(f).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:f}];for(var u=[],c=0,i=a.length;c<i;c++)s[c]&&(u[u.length]={type:a[c],value:s[c]});return u},h.prototype.$arrayTokens=function(f){if(!f)return[];var s=this.splitRegex.exec(f);if(!s)return"text";for(var a=[],u=this.tokenArray,c=0,i=u.length;c<i;c++)s[c+1]&&(a[a.length]={type:u[c],value:s[c+1]});return a},h.prototype.removeCapturingGroups=function(f){var s=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},h.prototype.createSplitterRegexp=function(f,s){if(f.indexOf("(?=")!=-1){var a=0,u=!1,c={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,l,m,w,x,E){return u?u=x!="]":x?u=!0:w?(a==c.stack&&(c.end=E+1,c.stack=-1),a--):m&&(a++,m.length!=1&&(c.stack=a,c.start=E)),i}),c.end!=null&&/^\)*$/.test(f.substr(c.end))&&(f=f.substring(0,c.start)+f.substr(c.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(s||"").replace("g",""))},h.prototype.getLineTokens=function(f,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var u=s||"start",c=this.states[u];c||(u="start",c=this.states[u]);var i=this.matchMappings[u],l=this.regExps[u];l.lastIndex=0;for(var m,w=[],x=0,E=0,_={type:null,value:""};m=l.exec(f);){var k=i.defaultToken,C=null,R=m[0],D=l.lastIndex;if(D-R.length>x){var L=f.substring(x,D-R.length);_.type==k?_.value+=L:(_.type&&w.push(_),_={type:k,value:L})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=c[i[I]],C.onMatch?k=C.onMatch(R,u,a,f):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),c=this.states[u],c||(this.reportError("state doesn't exist",u),u="start",c=this.states[u]),i=this.matchMappings[u],x=D,l=this.regExps[u],l.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(R){if(typeof k=="string")(!C||C.merge!==!1)&&_.type===k?_.value+=R:(_.type&&w.push(_),_={type:k,value:R});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=D,E++>g){for(E>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:f});x<f.length;)_.type&&w.push(_),_={value:f.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return _.type&&w.push(_),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},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,s){if(!s){for(var a in f)this.$rules[a]=f[a];return}for(var a in f){for(var u=f[a],c=0;c<u.length;c++){var i=u[c];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(s)!==0&&(i.next=s+i.next),i.nextState&&i.nextState.indexOf(s)!==0&&(i.nextState=s+i.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(f,s,a,u,c){var i=typeof f=="function"?new f().getRules():f;if(u)for(var l=0;l<u.length;l++)u[l]=s+u[l];else{u=[];for(var m in i)u.push(s+m)}if(this.addRules(i,s),a)for(var w=Array.prototype[c?"push":"unshift"],l=0;l<u.length;l++)w.apply(this.$rules[u[l]],p(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var b=function(f,s){return(f!="start"||s.length)&&s.unshift(this.nextState,f),this.nextState},h=function(f,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var f=0,s=this.$rules;function a(u){var c=s[u];c.processed=!0;for(var i=0;i<c.length;i++){var l=c[i],m=null;Array.isArray(l)&&(m=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var w=l.next||l.push;if(w&&Array.isArray(w)){var x=l.stateName;x||(x=l.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=f++)),s[x]=w,l.next=x,a(x)}else w=="pop"&&(l.next=h);if(l.push&&(l.nextState=l.next||l.push,l.next=b,delete l.push),l.rules)for(var E in l.rules)s[E]?s[E].push&&s[E].push.apply(s[E],l.rules[E]):s[E]=l.rules[E];var _=typeof l=="string"?l:l.include;if(_&&(_==="$self"&&(_="start"),Array.isArray(_)?m=_.map(function(C){return s[C]}):m=s[_]),m){var k=[i,1].concat(m);l.noEscape&&(k=k.filter(function(C){return!C.next})),c.splice.apply(c,k),i--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(f,s,a,u){var c=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(i){for(var l=f[i],m=l.split(u||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),c[x]=i}},this),f=null,a?function(i){return c[i.toLowerCase()]||s}:function(i){return c[i]||s}},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,s){this.$session=h,this.$row=f,this.$rowTokens=h.getTokens(f);var a=h.getTokenAt(f,s);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,s=h[f].start;if(s!==void 0)return s;for(s=0;f>0;)f-=1,s+=h[f].value.length;return s},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"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},c={'"':'"',"'":"'"},i=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=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 R=_.getCursorPosition(),D=k.doc.getLine(R.row);if(C=="{"){i(_);var L=_.getSelectionRange(),I=k.doc.getTextRange(L),H=k.getTokenAt(R.row,R.column);if(I!==""&&I!=="{"&&_.getWrapBehavioursEnabled())return l(L,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[R.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(_,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(_,k))return/[\]\}\)]/.test(D[R.column])||_.inMultiSelectMode||w.braces?(m.recordAutoInsert(_,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(_,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i(_);var O=D.substring(R.column,R.column+1);if(O=="}"){var $=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if($!==null&&m.isAutoInsertedClosing(R,D,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
|
180
|
+
`||C==`\r
|
|
181
|
+
`){i(_);var A="";m.isMaybeInsertedClosing(R,D)&&(A=h.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=D.substring(R.column,R.column+1);if(O==="}"){var N=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var B=this.$getIndent(k.getLine(N.row))}else if(A)var B=this.$getIndent(D);else{m.clearMaybeInsertedClosing();return}var U=B+k.getTabString();return{text:`
|
|
182
|
+
`+U+`
|
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,_,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){i(_);var D=k.doc.getLine(C.start.row),L=D.substring(C.end.column,C.end.column+1);if(L=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,_,k,C){if(C=="("){i(_);var R=_.getSelectionRange(),D=k.doc.getTextRange(R);if(D!==""&&_.getWrapBehavioursEnabled())return l(R,D,"(",")");if(m.isSaneInsertion(_,k))return m.recordAutoInsert(_,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){i(_);var L=_.getCursorPosition(),I=k.doc.getLine(L.row),H=I.substring(L.column,L.column+1);if(H==")"){var P=k.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(P!==null&&m.isAutoInsertedClosing(L,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,_,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){i(_);var D=k.doc.getLine(C.start.row),L=D.substring(C.start.column+1,C.start.column+2);if(L==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,_,k,C){if(C=="["){i(_);var R=_.getSelectionRange(),D=k.doc.getTextRange(R);if(D!==""&&_.getWrapBehavioursEnabled())return l(R,D,"[","]");if(m.isSaneInsertion(_,k))return m.recordAutoInsert(_,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i(_);var L=_.getCursorPosition(),I=k.doc.getLine(L.row),H=I.substring(L.column,L.column+1);if(H=="]"){var P=k.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(P!==null&&m.isAutoInsertedClosing(L,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,_,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){i(_);var D=k.doc.getLine(C.start.row),L=D.substring(C.start.column+1,C.start.column+2);if(L=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,_,k,C){var R=k.$mode.$quotes||c;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i(_);var D=C,L=_.getSelectionRange(),I=k.doc.getTextRange(L);if(I!==""&&(I.length!=1||!R[I])&&_.getWrapBehavioursEnabled())return l(L,I,D,D);if(!I){var H=_.getCursorPosition(),P=k.doc.getLine(H.row),O=P.substring(H.column-1,H.column),$=P.substring(H.column,H.column+1),A=k.getTokenAt(H.row,H.column),N=k.getTokenAt(H.row,H.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!N||/string|escape/.test(N.type),K;if($==D)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 J=Z.test(O);Z.lastIndex=0;var he=Z.test($),ne=k.$mode.$pairQuotesAfter,le=ne&&ne[D]&&ne[D].test(O);if(!le&&J||he||$&&!/[\s;,.})\]\\]/.test($))return null;var se=P[H.column-2];if(O==D&&(se==D||Z.test(se)))return null;K=!0}return{text:K?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,_,k,C){var R=k.$mode.$quotes||c,D=k.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(D)){i(_);var L=k.doc.getLine(C.start.row),I=L.substring(C.start.column+1,C.start.column+2);if(I==D)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 R=_.getCursorPosition();if(R.column===0)return;for(var D=k.doc.getLine(R.row),L=k.doc.getLine(R.row+1),I=k.getTokens(R.row),H=0,P=0;P<I.length;P++){H+=I[P].value.length;var O=I[P];if(H>=R.column){if(H===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var $=I[P+1];if(!$||!/\.doc/.test($.type))return}}var A=R.column-(H-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&A>B&&A<B+3||N!==-1&&B!==-1&&A>=N&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(D);if(/\s*\*/.test(L))return/^\s*\*/.test(D)?{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(D.substring(0,R.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",s)},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"),s=t("../lib/lang"),a=t("../token_iterator").TokenIterator,u=t("../range").Range,c;c=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(i,l,m,w){var x=l.doc,E=!0,_=!0,k=1/0,C=l.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(s.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var D=s.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),R=l.getUseSoftTabs();var I=function(K,Z){var J=K.match(D);if(J){var he=J[1].length,ne=J[0].length;!$(K,he,ne)&&J[0][ne-1]==" "&&ne--,x.removeInLine(Z,he,ne)}},H=L+" ",P=function(K,Z){(!E||/\S/.test(K))&&($(K,k,k)?x.insertInLine({row:Z,column:k},H):x.insertInLine({row:Z,column:k},L))},O=function(K,Z){return D.test(K)},$=function(K,Z,J){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(J++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,A=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+s.escapeRegExp(L)+")"),N=new RegExp("(?:"+s.escapeRegExp(A)+")\\s*$"),P=function(le,se){O(le,se)||(!E||/\S/.test(le))&&(x.insertInLine({row:se,column:le.length},A),x.insertInLine({row:se,column:k},L))},I=function(le,se){var de;(de=le.match(N))&&x.removeInLine(se,le.length-de[0].length,le.length),(de=le.match(D))&&x.removeInLine(se,de[1].length,de[0].length)},O=function(le,se){if(D.test(le))return!0;for(var de=l.getTokens(se),me=0;me<de.length;me++)if(de[me].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 J=K.search(/\S/);J!==-1?(J<k&&(k=J),_&&!O(K,Z)&&(_=!1)):U>K.length&&(U=K.length)}),k==1/0&&(k=U,E=!1,_=!1),R&&k%C!=0&&(k=Math.floor(k/C)*C),B(_?I:P)},this.toggleBlockComment=function(i,l,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new a(l,w.row,w.column),_=E.getCurrentToken();l.selection;var k=l.selection.toOrientedRange(),C,R;if(_&&/comment/.test(_.type)){for(var D,L;_&&/comment/.test(_.type);){var I=_.value.indexOf(x.start);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;D=new u(H,P,H,P+x.start.length);break}_=E.stepBackward()}for(var E=new a(l,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;L=new u(H,P,H,P+x.end.length);break}_=E.stepForward()}L&&l.remove(L),D&&(l.remove(D),C=D.start.row,R=-x.start.length)}else R=x.start.length,C=m.start.row,l.insert(m.end,x.end),l.insert(m.start,x.start);k.start.row==C&&(k.start.column+=R),k.end.row==C&&(k.end.column+=R),l.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(i,l,m){return this.$getIndent(l)},this.checkOutdent=function(i,l,m){return!1},this.autoOutdent=function(i,l,m){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var l in i)if(i[l]){var m=i[l],w=m.prototype.$id,x=p.$modes[w];x||(p.$modes[w]=x=new m),p.$modes[l]||(p.$modes[l]=x),this.$embeds.push(l),this.$modes[l]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],_=function(R){(function(D){var L=E[R],I=D[L];D[E[R]]=function(){return this.$delegator(L,arguments,I)}})(k)},k=this,l=0;l<E.length;l++)_(l)},this.$delegator=function(i,l,m){var w=l[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[i].apply(E,[w[1]].concat([].slice.call(l,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]){l[0]=k[1];var E=this.$modes[this.$embeds[_]];return E[i].apply(E,l)}}var C=m.apply(this,l);return m?C:void 0},this.transformAction=function(i,l,m,w,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var _ in E)if(E[_][l]){var k=E[_][l].apply(this,arguments);if(k)return k}}},this.getKeywords=function(i){if(!this.completionKeywords){var l=this.$tokenizer.rules,m=[];for(var w in l)for(var x=l[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 i?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,l,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(c.prototype),r.Mode=c}),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 s=this.session.lineWidgets;s&&s.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 s=f.lineWidgets;if(!(!s||!h.action)){for(var a=h.data,u=a.start.row,c=a.end.row,i=h.action=="add",l=u+1;l<c;l++)s[l]&&(s[l].hidden=i);s[c]&&(i?s[u]?s[c].hidden=i:s[u]=s[c]:(s[u]==s[c]&&(s[u]=void 0),s[c].hidden=i))}},b.prototype.updateOnChange=function(h){var f=this.session.lineWidgets;if(f){var s=h.start.row,a=h.end.row-s;if(a!==0)if(h.action=="remove"){var u=f.splice(s+1,a);!f[s]&&u[u.length-1]&&(f[s]=u.pop()),u.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var c=new Array(a);f[s]&&f[s].column!=null&&h.start.column>f[s].column&&s++,c.unshift(s,0),f.splice.apply(f,c),this.$updateRows()}}},b.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var f=!0;h.forEach(function(s,a){if(s)for(f=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$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 s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var a=this.session.lineWidgets;h.row==s.end.row&&!a[s.start.row]?a[s.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,s=f&&f[h],a=[];s;)a.push(s),s=s.$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 s=this.session._changedWidgets,a=f.layerConfig;if(!(!s||!s.length)){for(var u=1/0,c=0;c<s.length;c++){var i=s[c];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,f.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/a.characterWidth));var l=i.h/a.lineHeight;i.coverLine&&(l-=this.session.getRowLineCount(i.row),l<0&&(l=0)),i.rowCount!=l&&(i.rowCount=l,i.row<u&&(u=i.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(h,f){var s=f.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,s.firstRow),c=Math.max(this.lastRow,s.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,f.$cursorLayer.config=s;for(var i=u;i<=c;i++){var l=a[i];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,f.container.appendChild(l.el));var m=f.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;l.coverLine||(m+=s.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=m-s.offset+"px";var w=l.coverGutter?0:f.gutterWidth;l.fixedWidth||(w-=f.scrollLeft),l.el.style.left=w+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=s.width+2*s.padding+"px"),l.fixedWidth?l.el.style.right=f.scrollBar.getWidth()+"px":l.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,s=p[h]||"";switch(g.action){case"insert":var a=g.lines;if(a.length===1)p[h]=s.substring(0,f)+g.lines[0]+s.substring(f);else{var u=[h,1].concat(g.lines);p.splice.apply(p,u),p[h]=s.substring(0,f)+p[h],p[h+g.lines.length-1]+=s.substring(f)}break;case"remove":var c=g.end.column,i=g.end.row;h===i?p[h]=s.substring(0,f)+s.substring(c):p.splice(h,i-h+1,s.substring(0,f)+p[i].substring(c));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 s(a,u,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,c)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(a,u,c){var i;if(c?i={row:a,column:u}:i=this.$clipPositionToDocument(a,u),!(this.row==i.row&&this.column==i.column)){var l={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:l,value:i})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(a,u){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,u))),u<0&&(c.column=0),c},s}();b.prototype.$insertRight=!1,p.implement(b.prototype,g);function h(s,a,u){var c=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&c}function f(s,a,u){var c=s.action=="insert",i=(c?1:-1)*(s.end.row-s.start.row),l=(c?1:-1)*(s.end.column-s.start.column),m=s.start,w=c?m:s.end;return h(a,m,u)?{row:a.row,column:a.column}:h(w,a,!u)?{row:a.row+i,column:a.column+(a.row==w.row?l: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,s=function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var c=this.getLength()-1;this.remove(new h(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,c){return new f(this,u,c)},a.prototype.$detectNewLine=function(u){var c=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[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(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
|
|
190
|
+
`||u=="\r"||u==`
|
|
191
|
+
`},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,c){return this.$lines.slice(u,c+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var c;if(u.start.row===u.end.row)c=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{c=this.getLines(u.start.row,u.end.row),c[0]=(c[0]||"").substring(u.start.column);var i=c.length-1;u.end.row-u.start.row==i&&(c[i]=c[i].substring(0,u.end.column))}return c},a.prototype.insertLines=function(u,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,c)},a.prototype.removeLines=function(u,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,c)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(u,this.$split(c))},a.prototype.insertInLine=function(u,c){var i=this.clippedPos(u.row,u.column),l=this.pos(u.row,u.column+c.length);return this.applyDelta({start:i,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(u,c){var i=this.getLength();u===void 0?u=i:u<0?u=0:u>=i&&(u=i-1,c=void 0);var l=this.getLine(u);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:u,column:c}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,c){return{row:u,column:c}},a.prototype.$clipPosition=function(u){var c=this.getLength();return u.row>=c?(u.row=Math.max(0,c-1),u.column=this.getLine(c-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,c){u=Math.min(Math.max(u,0),this.getLength());var i=0;u<this.getLength()?(c=c.concat([""]),i=0):(c=[""].concat(c),u--,i=this.$lines[u].length),this.insertMergedLines({row:u,column:i},c)},a.prototype.insertMergedLines=function(u,c){var i=this.clippedPos(u.row,u.column),l={row:i.row+c.length-1,column:(c.length==1?i.column:0)+c[c.length-1].length};return this.applyDelta({start:i,end:l,action:"insert",lines:c}),this.clonePos(l)},a.prototype.remove=function(u){var c=this.clippedPos(u.start.row,u.start.column),i=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:c,end:i,action:"remove",lines:this.getLinesForRange({start:c,end:i})}),this.clonePos(c)},a.prototype.removeInLine=function(u,c,i){var l=this.clippedPos(u,c),m=this.clippedPos(u,i);return this.applyDelta({start:l,end:m,action:"remove",lines:this.getLinesForRange({start:l,end:m})},!0),this.clonePos(l)},a.prototype.removeFullLines=function(u,c){u=Math.min(Math.max(0,u),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var i=c==this.getLength()-1&&u>0,l=c<this.getLength()-1,m=i?u-1:u,w=i?this.getLine(m).length:0,x=l?c+1:c,E=l?0:this.getLine(x).length,_=new h(m,w,x,E),k=this.$lines.slice(u,c+1);return this.applyDelta({start:_.start,end:_.end,action:"remove",lines:this.getLinesForRange(_)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,c){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),c.length===0&&u.isEmpty())return u.start;if(c==this.getTextRange(u))return u.end;this.remove(u);var i;return c?i=this.insert(u.start,c):i=u.start,i},a.prototype.applyDeltas=function(u){for(var c=0;c<u.length;c++)this.applyDelta(u[c])},a.prototype.revertDeltas=function(u){for(var c=u.length-1;c>=0;c--)this.revertDelta(u[c])},a.prototype.applyDelta=function(u,c){var i=u.action=="insert";(i?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(i&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(g(this.$lines,u,c),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var c=this.$lines.length;(u.action=="remove"&&u.start.row<c&&u.end.row<c||u.action=="insert"&&u.start.row<=c)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,c){for(var i=u.lines,l=i.length-c+1,m=u.start.row,w=u.start.column,x=0,E=0;x<l;x=E){E+=c-1;var _=i.slice(x,E);_.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+E,w=0),action:u.action,lines:_},!0)}u.lines=i.slice(x),u.start.row=m+x,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,c){for(var i=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=c||0,w=i.length;m<w;m++)if(u-=i[m].length+l,u<0)return{row:m,column:u+i[m].length+l};return{row:w-1,column:u+i[w-1].length+l}},a.prototype.positionToIndex=function(u,c){for(var i=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=0,w=Math.min(u.row,i.length),x=c||0;x<w;++x)m+=i[x].length+l;return m+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",p.implement(s.prototype,b),r.Document=s}),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,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,c=a.currentLine,i=-1,l=a.doc,m=c;a.lines[c];)c++;var w=l.getLength(),x=0;for(a.running=!1;c<w;){a.$tokenizeRow(c),i=c;do c++;while(a.lines[c]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,i==-1&&(i=c),m<=i&&a.fireUpdateEvent(m,i)}}}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,s){var a={first:f,last:s};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 s=f.start.row,a=f.end.row-s;if(a===0)this.lines[s]=null;else if(f.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var u=Array(a+1);u.unshift(s,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(s,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 s=this.doc.getLine(f),a=this.states[f-1],u=this.tokenizer.getLineTokens(s,a,f);return this.states[f]+""!=u.state+""?(this.states[f]=u.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=u.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,s,a){a===void 0&&(a="text"),this.setRegexp(f),this.clazz=s,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,s,a,u){if(this.regExp){for(var c=u.firstRow,i=u.lastRow,l={},m=a.$editor&&a.$editor.$search,w=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=c;x<=i;x++){var E=this.cache[x];if(E==null||a.getValue().length!=this.docLen){if(w){E=[];var _=m.$multiLineForward(a,this.regExp,x,i);if(_){var k=_.endRow<=i?_.endRow-1:i;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(L){return new g(x,L.offset,x,L.offset+L.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var R=E[C].toScreenRange(a),D=R.toString();l[D]||(l[D]=!0,s.drawSingleLineMarker(f,R,this.clazz,u))}}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,R,D){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-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,R){this.selections.push({value:C,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var D=this.$undoStack,L=D.length;L--;){var I=D[L][0];if(I.id<=C)break;I.id<R&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,R){for(var D=this.selections,L=D.length;L--;){var I=D[L];if(I.rev<C)return R&&(I=D[L+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var D=this.$undoStack,L=null,I=0,H=D.length;H--;){var P=D[H][0];if(P.id<R&&!L&&(L=H+1),P.id<=C){I=H+1;break}}return D.slice(I,L)},k.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(C,R){this.lastDeltas=null;var D=this.$undoStack;if(g(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=D.pop(),I=null;return L&&(I=C.undoChanges(L,R),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);_(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),I=null;return L&&(I=C.redoChanges(L,R),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],D=R&&R[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},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 R=C;R--;){var D=k[R];if(D&&!D[0].ignore){for(;R<C-1;){var L=i(k[R],k[R+1]);k[R]=L[0],k[R+1]=L[1],R++}return!0}}}var b=t("./range").Range,h=b.comparePoints;b.comparePoints;function f(k){return{row:k.row,column:k.column}}function s(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(u).join(`
|
|
195
|
+
`):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function c(k,C){var R=k.action=="insert",D=C.action=="insert";if(R&&D)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(R&&!D)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(!R&&D)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(!R&&!D)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 i(k,C){for(var R=k.length;R--;)for(var D=0;D<C.length;D++)if(!c(k[R],C[D])){for(;R<k.length;){for(;D--;)c(C[D],k[R]);D=C.length,R++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function l(k,C){var R=k.action=="insert",D=C.action=="insert";if(R&&D)h(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(R&&!D)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(!R&&D)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(!R&&!D)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 L,I;return h(k.start,C.start)<0&&(L=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&&!L&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,L,I].filter(Boolean)}return[C,k]}function m(k,C,R){w(k.start,C.start,C.end,R),w(k.end,C.start,C.end,R)}function w(k,C,R,D){k.row==(D==1?C:R).row&&(k.column+=D*(R.column-C.column)),k.row+=D*(R.row-C.row)}function x(k,C){var R=k.lines,D=k.end;k.end=f(C);var L=k.end.row-k.start.row,I=R.splice(L,R.length),H=L?C.column:C.column-k.start.column;R.push(I[0].substring(0,H)),I[0]=I[0].substr(H);var P={start:f(C),end:D,lines:I,action:k.action};return P}function E(k,C){C=s(C);for(var R=k.length;R--;){for(var D=k[R],L=0;L<D.length;L++){var I=D[L],H=l(I,C);C=H[0],H.length!=2&&(H[2]?(D.splice(L+1,1,H[1],H[2]),L++):H[1]||(D.splice(L,1),L--))}D.length||k.splice(R,1)}return k}function _(k,C){for(var R=0;R<C.length;R++)for(var D=C[R],L=0;L<D.length;L++)E(k,D[L])}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 s=f[f.length-1];this.range=new p(f[0].start.row,f[0].start.column,s.end.row,s.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,s){return-f.range.compareEnd(s.start.row,s.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,s){var a=0,u=this.folds,c,i,l,m=!0;f==null&&(f=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(c=u[w],i=c.range.compareStart(f,s),i==-1){h(null,f,s,a,m);return}if(l=h(null,c.start.row,c.start.column,a,m),l=!l&&h(c.placeholder,c.start.row,c.start.column,a),l||i===0)return;m=!c.sameRow,a=c.end.column}h(null,f,s,a,m)},b.prototype.getNextFoldTo=function(h,f){for(var s,a,u=0;u<this.folds.length;u++){if(s=this.folds[u],a=s.range.compareEnd(h,f),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},b.prototype.addRemoveChars=function(h,f,s){var a=this.getNextFoldTo(h,f),u,c;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=f&&u.start.row!=h)window.console&&window.console.log(h,f,u);else if(u.start.row==h){c=this.folds;var i=c.indexOf(u);for(i===0&&(this.start.column+=s),i;i<c.length;i++){if(u=c[i],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},b.prototype.split=function(h,f){var s=this.getNextFoldTo(h,f);if(!s||s.kind=="inside")return null;var a=s.fold,u=this.folds,c=this.foldData,i=u.indexOf(a),l=u[i-1];this.end.row=l.end.row,this.end.column=l.end.column,u=u.splice(i,u.length-i);var m=new b(c,u);return c.splice(c.indexOf(this)+1,0,m),m},b.prototype.merge=function(h){for(var f=h.folds,s=0;s<f.length;s++)this.addFold(f[s]);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,s=0;s<this.folds.length;s++){var a=this.folds[s];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,s,a){for(var u=this.ranges,c=a||0;c<u.length;c++){var i=u[c],l=g(f,i.end);if(!(l>0)){var m=g(f,i.start);return l===0?s&&m!==0?-c-2:c:m>0||m===0&&!s?c:-c-1}}return-c-1},h.prototype.add=function(f){var s=!f.isEmpty(),a=this.pointIndex(f.start,s);a<0&&(a=-a-1);var u=this.pointIndex(f.end,s,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,f)},h.prototype.addList=function(f){for(var s=[],a=f.length;a--;)s.push.apply(s,this.add(f[a]));return s},h.prototype.substractPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var f=[],s=this.ranges;s=s.sort(function(l,m){return g(l.start,m.start)});for(var a=s[0],u,c=1;c<s.length;c++){u=a,a=s[c];var i=g(u.end,a.start);i<0||i==0&&!u.isEmpty()&&!a.isEmpty()||(g(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),s.splice(c,1),f.push(a),a=u,c--)}return this.ranges=s,f},h.prototype.contains=function(f,s){return this.pointIndex({row:f,column:s})>=0},h.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},h.prototype.rangeAtPoint=function(f){var s=this.pointIndex(f);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(f,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<f)return[];var u=this.pointIndex({row:f,column:0});u<0&&(u=-u-1);var c=this.pointIndex({row:s,column:0},u);c<0&&(c=-c-1);for(var i=[],l=u;l<c;l++)i.push(a[l]);return i},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 s=f.start,a=f.end,u=s.row,c=a.row,i=this.ranges,l=0,m=i.length;l<m;l++){var w=i[l];if(w.end.row>=u)break}if(f.action=="insert")for(var x=c-u,E=-s.column+a.column;l<m;l++){var w=i[l];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=x)),w.end.row==u&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&E>0&&l<m-1&&w.end.column>w.start.column&&w.end.column==i[l+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=x}}else for(var x=u-c,E=s.column-a.column;l<m;l++){var w=i[l];if(w.start.row>c)break;w.end.row<c&&(u<w.end.row||u==w.end.row&&s.column<w.end.column)?(w.end.row=u,w.end.column=s.column):w.end.row==c?w.end.column<=a.column?(x||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=E,w.end.row+=x):w.end.row>c&&(w.end.row+=x),w.start.row<c&&(u<w.start.row||u==w.start.row&&s.column<w.start.column)?(w.start.row=u,w.start.column=s.column):w.start.row==c?w.start.column<=a.column?(x||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=E,w.start.row+=x):w.start.row>c&&(w.start.row+=x)}if(x!=0&&l<m)for(;l<m;l++){var w=i[l];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 u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(l[w]=m[w])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function l(){this.constructor=c}c.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),g=t("../range_list").RangeList,b=function(u){p(c,u);function c(i,l){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=l,m.range=i,m.start=i.start,m.end=i.end,m.sameRow=i.start.row==i.end.row,m.subFolds=m.ranges=[],m}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(l){l.setFoldLine(i)})},c.prototype.clone=function(){var i=this.range.clone(),l=new c(i,this.placeholder);return this.subFolds.forEach(function(m){l.subFolds.push(m.clone())}),l.collapseChildren=this.collapseChildren,l},c.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){f(i,this.start);for(var l=i.start.row,m=i.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(l,m),x==1);w++);var E=this.subFolds[w],_=0;if(x==0){if(E.range.containsRange(i))return E.addSubFold(i);_=1}for(var l=i.range.end.row,m=i.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(l,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,i),R=x==0?C.length-1:C.length,D=_;D<R;D++)i.addSubFold(C[D]);return i.setFoldLine(this.foldLine),i}},c.prototype.restoreRange=function(i){return a(i,this.start)},c}(g);function h(u,c){u.row-=c.row,u.row==0&&(u.column-=c.column)}function f(u,c){h(u.start,c),h(u.end,c)}function s(u,c){u.row==0&&(u.column+=c.column),u.row+=c.row}function a(u,c){s(u.start,c),s(u.end,c)}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 s(){this.getFoldAt=function(a,u,c){var i=this.getFoldLine(a);if(!i)return null;for(var l=i.folds,m=0;m<l.length;m++){var w=l[m].range;if(w.contains(a,u)){if(c==1&&w.isEnd(a,u)&&!w.isEmpty()||c==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return l[m]}}},this.getFoldsInRange=function(a){var u=a.start,c=a.end,i=this.$foldData,l=[];u.column+=1,c.column-=1;for(var m=0;m<i.length;m++){var w=i[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=i[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;l.push(_)}}}}return u.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(i){u=u.concat(this.getFoldsInRange(i))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,c=0;c<u.length;c++)for(var i=0;i<u[c].folds.length;i++)a.push(u[c].folds[i]);return a},this.getFoldStringAt=function(a,u,c,i){if(i=i||this.getFoldLine(a),!i)return null;for(var l={end:{column:0}},m,w,x=0;x<i.folds.length;x++){w=i.folds[x];var E=w.range.compareEnd(a,u);if(E==-1){m=this.getLine(w.start.row).substring(l.end.column,w.start.column);break}else if(E===0)return null;l=w}return m||(m=this.getLine(w.start.row).substring(l.end.column)),c==-1?m.substring(0,u-l.end.column):c==1?m.substring(u-l.end.column):m},this.getFoldLine=function(a,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var l=c[i];if(l.start.row<=a&&l.end.row>=a)return l;if(l.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var c=this.$foldData,i=0;for(u&&(i=c.indexOf(u)),i==-1&&(i=0),i;i<c.length;i++){var l=c[i];if(l.end.row>=a)return l}return null},this.getFoldedRowCount=function(a,u){for(var c=this.$foldData,i=u-a+1,l=0;l<c.length;l++){var m=c[l],w=m.end.row,x=m.start.row;if(w>=u){x<u&&(x>=a?i-=u-x:i=0);break}else w>=a&&(x>=a?i-=w-x:i-=w-a+1)}return i},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,c){return u.start.row-c.start.row}),a},this.addFold=function(a,u){var c=this.$foldData,i=!1,l;a instanceof b?l=a:(l=new b(u,a),l.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(l.range);var m=l.start.row,w=l.start.column,x=l.end.row,E=l.end.column,_=this.getFoldAt(m,w,1),k=this.getFoldAt(x,E,-1);if(_&&k==_)return _.addSubFold(l);_&&!_.range.isStart(m,w)&&this.removeFold(_),k&&!k.range.isEnd(x,E)&&this.removeFold(k);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(I){l.addSubFold(I)}));for(var R=0;R<c.length;R++){var D=c[R];if(x==D.start.row){D.addFold(l),i=!0;break}else if(m==D.end.row){if(D.addFold(l),i=!0,!l.sameRow){var L=c[R+1];if(L&&L.start.row==x){D.merge(L);break}}break}else if(x<=D.start.row)break}return i||(D=this.$addFoldLine(new g(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,c=u.start.row,i=u.end.row,l=this.$foldData,m=u.folds;if(m.length==1)l.splice(l.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=u.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(c,i):this.$updateRowLengthCache(c,i)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],c=0;c<a.length;c++)u.push(a[c]);u.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},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(u){this.expandFold(u)},this)},this.unfold=function(a,u){var c,i;if(a==null)c=new p(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")c=new p(a,0,a,this.getLine(a).length);else if("row"in a)c=p.fromPoints(a,a);else{if(Array.isArray(a))return i=[],a.forEach(function(m){i=i.concat(this.unfold(m))},this),i;c=a}i=this.getFoldsInRangeList(c);for(var l=i;i.length==1&&p.comparePoints(i[0].start,c.start)<0&&p.comparePoints(i[0].end,c.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(c);if(u!=!1?this.removeFolds(i):this.expandFolds(i),l.length)return l},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var c=this.getFoldLine(a,u);return c?c.end.row:a},this.getRowFoldStart=function(a,u){var c=this.getFoldLine(a,u);return c?c.start.row:a},this.getFoldDisplayLine=function(a,u,c,i,l){i==null&&(i=a.start.row),l==null&&(l=0),u==null&&(u=a.end.row),c==null&&(c=this.getLine(u).length);var m=this.doc,w="";return a.walk(function(x,E,_,k){if(!(E<i)){if(E==i){if(_<l)return;k=Math.max(l,k)}x!=null?w+=x:w+=m.getLine(E).substring(k,_)}},u,c),w},this.getDisplayLine=function(a,u,c,i){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,u,c,i);var m;return m=this.doc.getLine(a),m.substring(i||0,u||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var c=u.folds.map(function(i){return i.clone()});return new g(a,c)}),a},this.toggleFold=function(a){var u=this.selection,c=u.getRange(),i,l;if(c.isEmpty()){var m=c.start;if(i=this.getFoldAt(m.row,m.column),i){this.expandFold(i);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(l=this.findMatchingBracket(m))?c.comparePoint(l)==1?c.end=l:(c.start=l,c.start.column++,c.end.column--):(l=this.findMatchingBracket({row:m.row,column:m.column+1}))?(c.comparePoint(l)==1?c.end=l:c.start=l,c.start.column++):c=this.getCommentFoldRange(m.row,m.column)||c}else{var x=this.getFoldsInRange(c);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(c.start.row,c.start.column)),i&&i.range.toString()==c.toString()){this.expandFold(i);return}var E="...";if(!c.isMultiLine()){if(E=this.getTextRange(c),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,c)},this.getCommentFoldRange=function(a,u,c){var i=new h(this,a,u),l=i.getCurrentToken(),m=l&&l.type;if(l&&/^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(c!=1){do l=i.stepBackward();while(l&&w.test(l.type));l=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+l.value.length,i=new h(this,a,u);var E=this.getState(i.$row);if(c!=-1){var _=-1;do if(l=i.stepForward(),_==-1){var k=this.getState(i.$row);E.toString()!==k.toString()&&(_=i.$row)}else if(i.$row>_)break;while(l&&w.test(l.type));l=i.stepBackward()}else l=i.getCurrentToken();return x.end.row=i.getCurrentTokenRow(),x.end.column=i.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,c,i){c==null&&(c=1e5);var l=this.foldWidgets;if(l){u=u||this.getLength(),a=a||0;for(var m=a;m<u;m++)if(l[m]==null&&(l[m]=this.getFoldWidget(m)),l[m]=="start"&&!(i&&!i(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=c,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(u){for(var c=a.getTokens(u),i=0;i<c.length;i++){var l=c[i];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.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 u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},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,u){var c=this.foldWidgets;if(!c||u&&c[a])return{};for(var i=a-1,l;i>=0;){var m=c[i];if(m==null&&(m=c[i]=this.getFoldWidget(i)),m=="start"){var w=this.getFoldWidgetRange(i);if(l||(l=w),w&&w.end.row>=a)break}i--}return{range:i!==-1&&w,firstRange:l}},this.onFoldWidgetClick=function(a,u){u instanceof f&&(u=u.domEvent);var c={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},i=this.$toggleFoldWidget(a,c);if(!i){var l=u.target||u.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var c=this.getFoldWidget(a),i=this.getLine(a),l=c==="end"?-1:1,m=this.getFoldAt(a,l===-1?0:i.length,l);if(m)return u.children||u.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(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var E=x.range.start.row+1,_=x.range.end.row;this.foldAll(E,_,u.all?1e4:0)}else u.children?(_=w?w.end.row:this.getLength(),this.foldAll(a+1,_,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var c=this.$toggleFoldWidget(u,{});if(!c){var i=this.getParentFoldRangeData(u,!0);if(c=i.range||i.firstRange,c){u=c.start.row;var l=this.getFoldAt(u,this.getLine(u).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var u=a.start.row,c=a.end.row-u;if(c===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,c+1,null);else{var i=Array(c+1);i.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),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 s=f||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var a=s.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),s=!0,a,u=f.charAt(h.column-1),c=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(c||(u=f.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!c)return null;if(c[1]){var i=this.$findClosingBracket(c[1],h);if(!i)return null;a=g.fromPoints(h,i),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var i=this.$findOpeningBracket(c[2],h);if(!i)return null;a=g.fromPoints(i,h),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,f){var s=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,u=!f&&s.charAt(h.column-1),c=u&&u.match(a);if(c||(u=(f===void 0||f)&&s.charAt(h.column),h={row:h.row,column:h.column+1},c=u&&u.match(a)),!c)return null;var i=new g(h.row,h.column-1,h.row,h.column),l=c[1]?this.$findClosingBracket(c[1],h):this.$findOpeningBracket(c[2],h);if(!l)return[i];var m=new g(l.row,l.column,l.row,l.column+1);return[i,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,f,s){var a=this.$brackets[h],u=1,c=new p(this,f.row,f.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=f.column-c.getCurrentTokenColumn()-2,m=i.value;;){for(;l>=0;){var w=m.charAt(l);if(w==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else w==h&&(u+=1);l-=1}do i=c.stepBackward();while(i&&!s.test(i.type));if(i==null)break;m=i.value,l=m.length-1}return null}},this.$findClosingBracket=function(h,f,s){var a=this.$brackets[h],u=1,c=new p(this,f.row,f.column),i=c.getCurrentToken();if(i||(i=c.stepForward()),!!i){s||(s=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=f.column-c.getCurrentTokenColumn();;){for(var m=i.value,w=m.length;l<w;){var x=m.charAt(l);if(x==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else x==h&&(u+=1);l+=1}do i=c.stepForward();while(i&&!s.test(i.type));if(i==null)break;l=0}return null}},this.getMatchingTags=function(h){var f=new p(this,h.row,h.column),s=this.$findTagName(f);if(s){var a=f.stepBackward();return a.value==="<"?this.$findClosingTag(f,s):this.$findOpeningTag(f,s)}},this.$findTagName=function(h){var f=h.getCurrentToken(),s=!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&&(s=!0));while(f&&!s);return f},this.$findClosingTag=function(h,f){var s,a=f.value,u=f.value,c=0,i=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=h.stepForward();var l=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length),m=!1;do{if(s=f,s.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,u===a){if(s.value==="<")c++;else if(s.value==="</"&&(c--,c<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(u===a&&f.value==="/>"&&(c--,c<0))var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=x,_=E,w=new g(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(f&&c>=0);if(i&&w&&x&&_&&l&&E)return{openTag:new g(i.start.row,i.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,_.end.row,_.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(h,f){var s=h.getCurrentToken(),a=f.value,u=0,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),l=i+2,m=new g(c,i,c,l);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=s,c=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),l=i+f.value.length,s=h.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(s.value==="<"){if(u++,u>0){var E=new g(c,i,c,l),_=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 s.value==="</"&&u--}else if(f.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){u--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var D=0;D<C;D++)h.stepForward()}}while(s&&u<=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,s=t("./selection").Selection,a=t("./mode/text").Mode,u=t("./range").Range,c=t("./line_widgets").LineWidgets,i=t("./document").Document,l=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,x=function(){function P(O,$){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 l(new a().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(N){A._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new i(O)),this.setDocument(O),this.selection=new s(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($),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 $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),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 c(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 $=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;$>A&&(this.$docRowCache.splice(A,$),this.$screenRowCache.splice(A,$))},P.prototype.$getRowCacheIndex=function(O,$){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if($>U)A=B+1;else if($<U)N=B-1;else return B}return A-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 $=O.data;this.$resetRowCache($.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var $=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},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 $=new w;$.$undoStack=O.history.undo,$.$redoStack=O.history.redo,$.mark=O.history.mark,$.$rev=O.history.rev;var A=new P(O.value);return O.folds.forEach(function(N){A.addFold("...",u.fromPoints(N.start,N.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager($),A.selection.fromJSON(O.selection),A},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,$){var A=this.bgTokenizer.getTokens(O),N,B=0;if($==null){var U=A.length-1;B=this.getLine(O).length}else for(var U=0;U<A.length&&(B+=A[U].value.length,!(B>=$));U++);return N=A[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 $=this;O.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.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,$){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+$,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,$)},P.prototype.removeGutterDecoration=function(O,$){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var $=0;$<O.length;$++)this.$breakpoints[O[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[O]=$: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:A||"line",renderer:typeof A=="function"?A:null,clazz:$,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,$){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!$,$?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var $=this.$frontMarkers[O]||this.$backMarkers[O];if($){var A=$.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,$,A,N){typeof $!="number"&&(A=$,$=O),A||(A="ace_step");var B=new u(O,0,$,1/0);return B.id=this.addMarker(B,A,"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 $=O.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
|
|
198
|
+
`},P.prototype.getWordRange=function(O,$){var A=this.getLine(O),N=!1;if($>0&&(N=!!A.charAt($-1).match(this.tokenRe)),N||(N=!!A.charAt($).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice($-1,$+1)))var B=/\s/;else var B=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=$;K<A.length&&A.charAt(K).match(B);)K++;return new u(O,U,O,K)},P.prototype.getAWordRange=function(O,$){for(var A=this.getWordRange(O,$),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},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 $=O.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,$){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,N=A.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),$&&$();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return $&&$();this.$modes[N]&&!A?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,$){if($||(this.$modeId=O.$id),this.$mode!==O){var A=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,$||(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:A,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($){$&&$.screenWidth>O&&(O=$.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 $=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=$.length,J=0;J<Z;J++){if(J>K){if(J=U.end.row+1,J>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[J]==null&&(A[J]=this.$getStringScreenWidth($[J])[0]),A[J]>N&&(N=A[J])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,$){return this.doc.getLines(O,$)},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,$){return this.doc.insert(O,$)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,$){return this.doc.removeFullLines(O,$)},P.prototype.undoChanges=function(O,$){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var N=O[A];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!$&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,$){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var N=O[A];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!$&&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,$){function A(Z){return $?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){A(K)?N=u.fromPoints(K.start,K.end):N=u.fromPoints(K.start,K.start);continue}A(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=u.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(O,$){return this.doc.replace(O,$)},P.prototype.moveText=function(O,$,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=u.fromPoints($,$);if(!A){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 J=O.start,he=U.start,K=he.row-J.row,Z=he.column-J.column;this.addFolds(B.map(function(se){return se=se.clone(),se.start.row==J.row&&(se.start.column+=Z),se.end.row==J.row&&(se.end.column+=Z),se.start.row+=K,se.end.row+=K,se}))}return U},P.prototype.indentRows=function(O,$,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=$;N++)this.doc.insertInLine({row:N,column:0},A)},P.prototype.outdentRows=function(O){for(var $=O.collapseRows(),A=new u(0,0,0,0),N=this.getTabSize(),B=$.start.row;B<=$.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(A.start.column=K,A.end.column=K+1):(A.start.column=0,A.end.column=K),this.remove(A)}},P.prototype.$moveLines=function(O,$,A){if(O=this.getRowFoldStart(O),$=this.getRowFoldEnd($),A<0){var N=this.getRowFoldStart(O+A);if(N<0)return 0;var B=N-O}else if(A>0){var N=this.getRowFoldEnd($+A);if(N>this.doc.getLength()-1)return 0;var B=N-$}else{O=this.$clipRowToDocument(O),$=this.$clipRowToDocument($);var B=$-O+1}var U=new u(O,0,$,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(J){return J=J.clone(),J.start.row+=B,J.end.row+=B,J}),Z=A==0?this.doc.getLines(O,$):this.doc.removeFullLines(O,$);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,$){return this.$moveLines(O,$,-1)},P.prototype.moveLinesDown=function(O,$){return this.$moveLines(O,$,1)},P.prototype.duplicateLines=function(O,$){return this.$moveLines(O,$,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,$){return $<0?0:Math.min(this.doc.getLine(O).length,$)},P.prototype.$clipPositionToDocument=function(O,$){if($=Math.max(0,$),O<0)O=0,$=0;else{var A=this.doc.getLength();O>=A?(O=A-1,$=this.doc.getLine(A-1).length):$=Math.min(this.doc.getLine(O).length,$)}return{row:O,column:$}},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 $=this.doc.getLength()-1;return O.end.row>$?(O.end.row=$,O.end.column=this.doc.getLine($).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 $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,$){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:O,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,$){var A=this.$wrapLimitRange;A.max<0&&(A={min:$,max:$});var N=this.$constrainWrapLimit(O,A.min,A.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 $&&(O=Math.max($,O)),A&&(O=Math.min(A,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 $=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,J=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;J=this.getFoldsInRange(O),this.removeFolds(J);var ne=this.getFoldLine(B.row),le=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var se=this.getFoldLine(U);se&&se!==ne&&(se.merge(ne),ne=se),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var de=Array(Z);de.unshift(U,0);var me=$?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,de);var he=this.$foldData,ne=this.getFoldLine(U),le=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)),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(J=this.getFoldsInRange(O),this.removeFolds(J),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),J},P.prototype.$updateRowLengthCache=function(O,$){this.$rowLengthCache[O]=null,this.$rowLengthCache[$]=null},P.prototype.$updateWrapData=function(O,$){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,J=O;for($=Math.min($,A.length-1);J<=$;)Z=this.getFoldLine(J,Z),Z?(K=[],Z.walk((function(he,ne,le,se){var de;if(he!=null){de=this.$getDisplayTokens(he,K.length),de[0]=k;for(var me=1;me<de.length;me++)de[me]=C}else de=this.$getDisplayTokens(A[ne].substring(se,le),K.length);K=K.concat(de)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),J=Z.end.row+1):(K=this.$getDisplayTokens(A[J]),B[J]=this.$computeWrapSplits(K,U,N),J++)},P.prototype.$computeWrapSplits=function(O,$,A){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,J=this.$indentedSoftWrap,he=$<=Math.max(2*A,8)||J===!1?0:Math.floor($/2);function ne(){var _e=0;if(he===0)return _e;if(J)for(var Te=0;Te<O.length;Te++){var Me=O[Te];if(Me==D)_e+=1;else if(Me==L)_e+=A;else{if(Me==I)continue;break}}return Z&&J!==!1&&(_e+=A),Math.min(_e,he)}function le(_e){for(var Te=_e-U,Me=U;Me<_e;Me++){var Je=O[Me];(Je===12||Je===2)&&(Te-=1)}N.length||(se=ne(),N.indent=se),K+=Te,N.push(K),U=_e}for(var se=0;B-U>$-se;){var de=U+$-se;if(O[de-1]>=D&&O[de]>=D){le(de);continue}if(O[de]==k||O[de]==C){for(de;de!=U-1&&O[de]!=k;de--);if(de>U){le(de);continue}for(de=U+$,de;de<O.length&&O[de]==C;de++);if(de==O.length)break;le(de);continue}for(var me=Math.max(de-($-($>>2)),U-1);de>me&&O[de]<k;)de--;if(Z){for(;de>me&&O[de]<k;)de--;for(;de>me&&O[de]==R;)de--}else for(;de>me&&O[de]<D;)de--;if(de>me){le(++de);continue}de=U+$,O[de]==_&&de--,le(de-se)}return N},P.prototype.$getDisplayTokens=function(O,$){var A=[],N;$=$||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+$),A.push(L);for(var K=1;K<N;K++)A.push(I)}else U==32?A.push(D):U>39&&U<48||U>57&&U<64?A.push(R):U>=4352&&H(U)?A.push(E,_):A.push(E)}return A},P.prototype.$getStringScreenWidth=function(O,$,A){if($==0)return[0,0];$==null&&($=1/0),A=A||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?A+=this.getScreenTabSize(A):N>=4352&&H(N)?A+=2:A+=1,!(A>$));B++);return[A,B]},P.prototype.getRowLength=function(O){var $=1;return this.lineWidgets&&($+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?$:this.$wrapData[O].length+$},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 $=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[$.row];return A.length&&A[0]<$.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var $=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},P.prototype.getDocumentLastRowColumn=function(O,$){var A=this.documentToScreenRow(O,$);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,$){var A=this.documentToScreenRow(O,$);return this.screenToDocumentPosition(A,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,$){return this.screenToDocumentPosition(O,$).row},P.prototype.screenToDocumentColumn=function(O,$){return this.screenToDocumentPosition(O,$).column},P.prototype.screenToDocumentPosition=function(O,$,A){if(O<0)return{row:0,column:0};var N,le=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,J=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&J>=0)var ne=Z[J],le=this.$docRowCache[J],se=O>Z[he-1];else var se=!he;for(var de=this.getLength()-1,me=this.getNextFoldLine(le),_e=me?me.start.row:1/0;ne<=O&&(K=this.getRowLength(le),!(ne+K>O||le>=de));)ne+=K,le++,le>_e&&(le=me.end.row+1,me=this.getNextFoldLine(le,me),_e=me?me.start.row:1/0),se&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne));if(me&&me.start.row<=le)N=this.getFoldDisplayLine(me),le=me.start.row;else{if(ne+K<=O||le>de)return{row:de,column:this.getLine(de).length};N=this.getLine(le),me=null}var Te=0,Me=Math.floor(O-ne);if(this.$useWrapMode){var Je=this.$wrapData[le];Je&&(U=Je[Me],Me>0&&Je.length&&(Te=Je.indent,B=Je[Me-1]||Je[Je.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Me,le,Me)&&($=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,$-Te)[1],this.$useWrapMode&&B>=U&&(B=U-1),me?me.idxToPosition(B):{row:le,column:B}},P.prototype.documentToScreenPosition=function(O,$){if(typeof $>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,$);O=A.row,$=A.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,$,1),B&&(O=B.start.row,$=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),J=K.length;if(J&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],le=O>K[J-1];else var le=!J;for(var se=this.getNextFoldLine(he),de=se?se.start.row:1/0;he<O;){if(he>=de){if(U=se.end.row+1,U>O)break;se=this.getNextFoldLine(U,se),de=se?se.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var me="";se&&he>=de?(me=this.getFoldDisplayLine(se,O,$),N=se.start.row):(me=this.getLine(O).substring(0,$),N=O);var _e=0;if(this.$useWrapMode){var Te=this.$wrapData[N];if(Te){for(var Me=0;me.length>=Te[Me];)ne++,Me++;me=me.substring(Te[Me-1]||0,me.length),_e=Me>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(me)[0]}},P.prototype.documentToScreenColumn=function(O,$){return this.documentToScreenPosition(O,$).column},P.prototype.documentToScreenRow=function(O,$){return this.documentToScreenPosition(O,$).row},P.prototype.getScreenLength=function(){var O=0,$=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,$=this.$foldData[B++],U=$?$.start.row:1/0;N<A;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=$.end.row+1,$=this.$foldData[B++],U=$?$.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)$=Z[B],O-=$.end.row-$.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function($,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<$.length&&(B=$.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));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 $=this.getLine(O.row);return $[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,R=9,D=10,L=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 u(){this.$options={}}return u.prototype.set=function(c){return g.mixin(this.$options,c),this},u.prototype.getOptions=function(){return p.copyObject(this.$options)},u.prototype.setOptions=function(c){this.$options=c},u.prototype.find=function(c){var i=this.$options,l=this.$matchIterator(c,i);if(!l)return!1;var m=null;return l.forEach(function(w,x,E,_){return m=new b(w,x,E,_),x==_&&i.start&&i.start.start&&i.skipCurrent!=!1&&m.isEqual(i.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(c){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var l=i.range,m=l?c.getLines(l.start.row,l.end.row):c.doc.getAllLines(),w=[],x=i.re;if(i.$isMultiLine){var E=x.length,_=m.length-E,k;e:for(var C=x.offset||0;C<=_;C++){for(var R=0;R<E;R++)if(m[C+R].search(x[R])==-1)continue e;var D=m[C],L=m[C+E-1],I=D.length-D.match(x[0])[0].length,H=L.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(i)){var $=m.length-1;if(P=this.$multiLineForward(c,x,O,$),P){var A=P.endRow<=$?P.endRow-1:$;A>O&&(O=A),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=p.getMatchOffsets(m[O],x);for(var R=0;R<P.length;R++){var N=P[R];w.push(new b(O,N.offset,O,N.offset+N.length))}}if(l){for(var B=l.start.column,U=l.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=l.end.row-l.start.row;O<R&&w[R].end.column>U&&w[R].end.row==K;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=l.start.row,w[O].end.row+=l.start.row}return w},u.prototype.parseReplaceString=function(c){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",m=0,w=c.length;m<w;m++){var x=c.charCodeAt(m);if(x===i.Backslash){if(m++,m>=w){l+="\\";break}var E=c.charCodeAt(m);switch(E){case i.Backslash:l+="\\";break;case i.n:l+=`
|
|
199
|
+
`;break;case i.t:l+=" ";break}continue}if(x===i.DollarSign){if(m++,m>=w){l+="$";break}var _=c.charCodeAt(m);if(_===i.DollarSign){l+="$$";continue}if(_===i.Digit0||_===i.Ampersand){l+="$&";continue}if(i.Digit1<=_&&_<=i.Digit9){l+="$"+c[m];continue}}l+=c[m]}return l||c},u.prototype.replace=function(c,i){var l=this.$options,m=this.$assembleRegExp(l);if(l.$isMultiLine)return i;if(m){var w=this.$isMultilineSearch(l);w&&(c=c.replace(/\r\n|\r|\n/g,`
|
|
200
|
+
`));var x=m.exec(c);if(!x||!w&&x[0].length!=c.length)return null;if(i=l.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=c.replace(m,i),l.preserveCase){i=i.split("");for(var E=Math.min(c.length,c.length);E--;){var _=c[E];_&&_.toLowerCase()!=_?i[E]=i[E].toUpperCase():i[E]=i[E].toLowerCase()}i=i.join("")}return i}},u.prototype.$assembleRegExp=function(c,i){if(c.needle instanceof RegExp)return c.re=c.needle;var l=c.needle;if(!c.needle)return c.re=!1;c.regExp||(l=p.escapeRegExp(l));var m=c.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),c.$supportsUnicodeFlag=!0,m+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(l=f(l,c)),c.$isMultiLine=!i&&/[\n\r]/.test(l),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(l,m);try{var w=new RegExp(l,m)}catch{w=!1}return c.re=w},u.prototype.$assembleMultilineRegExp=function(c,i){for(var l=c.replace(/\r\n|\r|\n/g,`$
|
|
201
|
+
^`).split(`
|
|
202
|
+
`),m=[],w=0;w<l.length;w++)try{m.push(new RegExp(l[w],i))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},u.prototype.$multiLineForward=function(c,i,l,m){for(var w,x=a(c,l),E=l;E<=m;){for(var _=0;_<x&&!(E>m);_++){var k=c.getLine(E++);w=w==null?k:w+`
|
|
203
|
+
`+k}var C=i.exec(w);if(i.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
|
204
|
+
`),D=C[0].split(`
|
|
205
|
+
`),L=l+R.length-1,I=R[R.length-1].length,H=L+D.length-1,P=D.length==1?I+D[0].length:D[D.length-1].length;return{startRow:L,startCol:I,endRow:H,endCol:P}}}return null},u.prototype.$multiLineBackward=function(c,i,l,m,w){for(var x,E=a(c,m),_=c.getLine(m).length-l,k=m;k>=w;){for(var C=0;C<E&&k>=w;C++){var R=c.getLine(k--);x=x==null?R:R+`
|
|
206
|
+
`+x}var D=s(x,i,_);if(D){var L=x.slice(0,D.index).split(`
|
|
207
|
+
`),I=D[0].split(`
|
|
208
|
+
`),H=k+L.length,P=L[L.length-1].length,O=H+I.length-1,$=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:$}}}return null},u.prototype.$matchIterator=function(c,i){var l=this.$assembleRegExp(i);if(!l)return!1;var m=this.$isMultilineSearch(i),w=this.$multiLineForward,x=this.$multiLineBackward,E=i.backwards==!0,_=i.skipCurrent!=!1,k=l.unicode,C=i.range,R=i.start;R||(R=C?C[E?"end":"start"]:c.selection.getRange()),R.start&&(R=R[_!=E?"end":"start"]);var D=C?C.start.row:0,L=C?C.end.row:c.getLength()-1;if(E)var I=function(O){var $=R.row;if(!P($,R.column,O)){for($--;$>=D;$--)if(P($,Number.MAX_VALUE,O))return;if(i.wrap!=!1){for($=L,D=R.row;$>=D;$--)if(P($,Number.MAX_VALUE,O))return}}};else var I=function(O){var $=R.row;if(!P($,R.column,O)){for($=$+1;$<=L;$++)if(P($,0,O))return;if(i.wrap!=!1){for($=D,L=R.row;$<=L;$++)if(P($,0,O))return}}};if(i.$isMultiLine)var H=l.length,P=function(O,$,A){var N=E?O-H+1:O;if(!(N<0||N+H>c.getLength())){var B=c.getLine(N),U=B.search(l[0]);if(!(!E&&U<$||U===-1)){for(var K=1;K<H;K++)if(B=c.getLine(N+K),B.search(l[K])==-1)return;var Z=B.match(l[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(c,l,$,O,D);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=c.getLine(O),U=[],K,Z=0;for(l.lastIndex=0;K=l.exec(B);){var J=K[0].length;if(Z=K.index,!J){if(Z>=B.length)break;l.lastIndex=Z+=p.skipEmptyMatch(B,Z,k)}if(K.index+J>$)break;U.push(K.index,J)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],J=U[he];if(A(O,ne,O,ne+J))return!0}}};else var P=function(O,$,A){if(l.lastIndex=$,m){var N=w(c,l,O,L);if(N){var B=N.endRow<=L?N.endRow-1:L;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=c.getLine(O),K,Z;Z=l.exec(U);){var J=Z[0].length;if(K=Z.index,A(O,K,O,K+J))return!0;if(!J&&(l.lastIndex=K+=p.skipEmptyMatch(U,K,k),K>=U.length))return!1}};return{forEach:I}},u}();function f(u,c){var i=p.supportsLookbehind();function l(E,_){_===void 0&&(_=!0);var k=i&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||c.regExp?i&&c.$supportsUnicodeFlag?_?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),w=m[0],x=m[m.length-1];return l(w)+u+l(x,!1)}function s(u,c,i){for(var l=null,m=0;m<=u.length;){c.lastIndex=m;var w=c.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-i)break;(!l||x>l.index+l[0].length)&&(l=w),m=w.index+1}return l}function a(u,c){var i=5e3,l={row:c,column:0},m=u.doc.positionToIndex(l),w=m+i,x=u.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 u=function(c,i){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(l[w]=m[w])},u(c,i)};return function(c,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");u(c,i);function l(){this.constructor=c}c.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),g=t("../lib/keys"),b=t("../lib/useragent"),h=g.KEY_MODS,f=function(){function u(c,i){this.$init(c,i,!1)}return u.prototype.$init=function(c,i,l){this.platform=i||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},u.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},u.prototype.removeCommand=function(c,i){var l=c&&(typeof c=="string"?c:c.name);c=this.commands[l],i||delete this.commands[l];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==c)delete m[w];else if(Array.isArray(x)){var E=x.indexOf(c);E!=-1&&(x.splice(E,1),x.length==1&&(m[w]=x[0]))}}},u.prototype.bindKey=function(c,i,l){if(typeof c=="object"&&c&&(l==null&&(l=c.position),c=c[this.platform]),!!c){if(typeof i=="function")return this.addCommand({exec:i,bindKey:c,name:i.name||c});c.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),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(m),_=h[E.hashId]+E.key;this._addCommandToBinding(w+_,i,l)},this)}},u.prototype._addCommandToBinding=function(c,i,l){var m=this.commandKeyBinding,w;if(!i)delete m[c];else if(!m[c]||this.$singleCommand)m[c]=i;else{Array.isArray(m[c])?(w=m[c].indexOf(i))!=-1&&m[c].splice(w,1):m[c]=[m[c]],typeof l!="number"&&(l=s(i));var x=m[c];for(w=0;w<x.length;w++){var E=x[w],_=s(E);if(_>l)break}x.splice(w,0,i)}},u.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(i){var l=c[i];if(l){if(typeof l=="string")return this.bindKey(l,i);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=i),this.addCommand(l))}},this)},u.prototype.removeCommands=function(c){Object.keys(c).forEach(function(i){this.removeCommand(c[i])},this)},u.prototype.bindKeys=function(c){Object.keys(c).forEach(function(i){this.bindKey(i,c[i])},this)},u.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},u.prototype.parseKeys=function(c){var i=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(_){return _}),l=i.pop(),m=g[l];if(g.FUNCTION_KEYS[m])l=g.FUNCTION_KEYS[m].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var w=0,x=i.length;x--;){var E=g.KEY_MODS[i[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+c),!1;w|=E}return{key:l,hashId:w}},u.prototype.findKeyCommand=function(c,i){var l=h[c]+i;return this.commandKeyBinding[l]},u.prototype.handleKeyboard=function(c,i,l,m){if(!(m<0)){var w=h[i]+l,x=this.commandKeyBinding[w];return c.$keyChain&&(c.$keyChain+=" "+w,x=this.commandKeyBinding[c.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||w,{command:"null"}):(c.$keyChain&&((!i||i==4)&&l.length==1?c.$keyChain=c.$keyChain.slice(0,-w.length-1):(i==-1||m>0)&&(c.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(c,i){return i.$keyChain||""},u}();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=function(u){p(c,u);function c(i,l){var m=u.call(this,i,l)||this;return m.$singleCommand=!0,m}return c}(f);a.call=function(u,c,i){f.prototype.$init.call(u,c,i,!0)},f.call=function(u,c,i){f.prototype.$init.call(u,c,i,!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 s=function(a,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(c[l]=i[l])},s(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(a,u);function c(){this.constructor=a}a.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),g=t("../lib/oop"),b=t("../keyboard/hash_handler").MultiHashHandler,h=t("../lib/event_emitter").EventEmitter,f=function(s){p(a,s);function a(u,c){var i=s.call(this,c,u)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),i}return a.prototype.exec=function(u,c,i){if(Array.isArray(u)){for(var l=u.length;l--;)if(this.exec(u[l],c,i))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:c,command:u,args:i};return this.canExecute(u,c)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(u,c){return typeof u=="string"&&(u=this.commands[u]),!(!u||c&&c.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(c))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._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(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,u):this.exec(c[0],u,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},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(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){g.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){g.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(s,a){typeof a=="number"&&!isNaN(a)&&s.gotoLine(a),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.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(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){g.loadModule("ace/ext/searchbox",function(a){a.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.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(s){s.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(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(s,a){s.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(s){s.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(s){s.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(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(s,a){s.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(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(s){s.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(s){s.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(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(s,a){s.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(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(s){s.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(s){s.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(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(s,a){s.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.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(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var a=s.$copyWithEmptySelection&&s.selection.isEmpty(),u=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",u),u.isEmpty()||s.session.remove(u),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,a){s.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){g.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(s){var a=s.selection.getRange();a.start.column=0,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(s){var a=s.selection.getRange();a.end.column=Number.MAX_VALUE,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,a){s.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,a){s.insert(p.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var a=s.selection.getRange();a.start.column=a.end.column=0,a.end.row++,s.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var a=s.selection.isBackwards(),u=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),c=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),i=s.session.doc.getLine(u.row).length,l=s.session.doc.getTextRange(s.selection.getRange()),m=l.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),x=u.row+1;x<=c.row+1;x++){var E=p.stringTrimLeft(p.stringTrimRight(s.session.doc.getLine(x)));E.length!==0&&(E=" "+E),w+=E}c.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new b(u.row,0,c.row+2,0),w),m>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+m)):(i=s.session.doc.getLine(u.row).length>i?i+1:i,s.selection.moveCursorTo(u.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var a=s.session.doc.getLength()-1,u=s.session.doc.getLine(a).length,c=s.selection.rangeList.ranges,i=[];c.length<1&&(c=[s.selection.getRange()]);for(var l=0;l<c.length;l++)l==c.length-1&&(c[l].end.row===a&&c[l].end.column===u||i.push(new b(c[l].end.row,c[l].end.column,a,u))),l===0?c[l].start.row===0&&c[l].start.column===0||i.push(new b(0,0,c[l].start.row,c[l].start.column)):i.push(new b(c[l-1].end.row,c[l-1].end.column,c[l].start.row,c[l].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var l=0;l<i.length;l++)s.selection.addRange(i[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
|
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var a=s.getCursorPosition();s.selection.moveTo(a.row-1,Number.MAX_VALUE),s.insert(`
|
|
210
|
+
`),a.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.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(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(t,r,d){var p=t("../lib/keys"),g=function(){function h(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return h.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))},h.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))},h.prototype.$onGutterKeyDown=function(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===p.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=p.enter)return;f.preventDefault();var s=this.editor.getCursorPosition().row;this.editor.isRowVisible(s)||this.editor.scrollToLine(s,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(a),c=this.$findNearestAnnotation(a);if(!(u===null&&c===null)){var i=this.$findClosestNumber(u,c,a);if(i===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=c,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new b(f,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===p.tab){f.preventDefault();return}if(f.keyCode===p.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===p.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===p.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===p.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===p.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===p.enter||f.keyCode===p.space){switch(f.preventDefault(),this.activeLane){case"fold":var s=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[s];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(f,s);else if(this.gutterLayer.session.foldWidgets[s]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==s&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(s),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},h.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.hide()},h.prototype.$isFoldWidgetVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getFoldWidget(f).style.display!=="none";return s&&a},h.prototype.$isCustomWidgetVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=!!this.$getCustomWidget(f);return s&&a},h.prototype.$isAnnotationVisible=function(f){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),a=this.$getAnnotation(f).style.display!=="none";return s&&a},h.prototype.$getFoldWidget=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[1]},h.prototype.$getCustomWidget=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[3]},h.prototype.$getAnnotation=function(f){var s=this.lines.get(f),a=s.element;return a.childNodes[2]},h.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var s=0;f-s>0||f+s<this.lines.getLength()-1;){if(s++,f-s>=0&&this.$isCustomWidgetVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+s))return f+s;if(f-s>=0&&this.$isFoldWidgetVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+s))return f+s}return null},h.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var s=0;f-s>0||f+s<this.lines.getLength()-1;){if(s++,f-s>=0&&this.$isAnnotationVisible(f-s))return f-s;if(f+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+s))return f+s}return null},h.prototype.$focusFoldWidget=function(f){if(f!=null){var s=this.$getFoldWidget(f);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},h.prototype.$focusCustomWidget=function(f){if(f!=null){var s=this.$getCustomWidget(f);s&&(s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus())}},h.prototype.$focusAnnotation=function(f){if(f!=null){var s=this.$getAnnotation(f);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},h.prototype.$blurFoldWidget=function(f){var s=this.$getFoldWidget(f);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},h.prototype.$blurCustomWidget=function(f){var s=this.$getCustomWidget(f);s&&(s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur())},h.prototype.$blurAnnotation=function(f){var s=this.$getAnnotation(f);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$findClosestNumber=function(f,s,a){return f===null?s:s===null||Math.abs(a-f)<=Math.abs(a-s)?f:s},h.prototype.$switchLane=function(f){switch(f){case"annotation":if(this.activeLane==="annotation")break;var s=this.$findNearestAnnotation(this.activeRowIndex);if(s==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(f){var s=this.lines.get(f);return s?s.row:null},h.prototype.$rowToRowIndex=function(f){for(var s=0;s<this.lines.getLength();s++){var a=this.lines.get(s);if(a.row==f)return s}return null},h}();r.GutterKeyboardHandler=g;var b=function(){function h(f,s){this.gutterKeyboardHandler=s,this.domEvent=f}return h.prototype.getKey=function(){return p.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h}();r.GutterKeyboardEvent=b}),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($){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&$[A],B=0;if(N)return N.call($);if($&&typeof $.length=="number")return{next:function(){return $&&B>=$.length&&($=void 0),{value:$&&$[B++],done:!$}}};throw new TypeError(A?"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"),s=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,c=t("./keyboard/keybinding").KeyBinding,i=t("./edit_session").EditSession,l=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,R=t("./config").nls,D=t("./clipboard"),L=t("./lib/keys"),I=t("./lib/event"),H=t("./tooltip").HoverTooltip,P=function(){function $(A,N,B){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(f.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new c(this),this.$search=new l().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 i("")),_.resetOptions(this),B&&this.setOptions(B),_._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(A){this.session.startOperation(A)},$.prototype.endOperation=function(A){this.session.endOperation(A)},$.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},$.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.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}},$.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&A.command.name==N.command.name;if(A.command.name=="insertstring"){var K=A.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(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;_.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),N&&N()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(A){if(this.session!=A){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=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.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=A.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(A)),this._signal("changeSession",{session:A,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(A){this.renderer.onResize(A)},$.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(A,N){this.renderer.setStyle(A,N)},$.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(A){this.setOption("fontSize",A)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var N=A.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(se){N.removeMarker(se)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Z=N.getMatchingBracketRanges(B,K);if(!Z){var J=new k(N,B.row,B.column),he=J.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(A.session)),!Z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(Z)?Z.length==1&&(le="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(se){return N.addMarker(se,le,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},$.prototype.onBlur=function(A){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()},$.prototype.onDocumentChange=function(A){var N=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,N),this._signal("change",A),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var A=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)),A.$highlightLineMarker&&!N)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&N){var B=new m(N.row,N.column,N.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else N&&(A.$highlightLineMarker.start.row=N.row,A.$highlightLineMarker.end.row=N.row,A.$highlightLineMarker.start.column=N.column,A._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(A){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")},$.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,K=A.getLine(N.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var J=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(J.test(he))return J}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var A=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!A&&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||(A+=this.session.getLine(Z.start.row)+N)}}var J={text:A};return this._signal("copy",J),D.lineMode=B?J.text:!1,J.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},$.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===D.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(le){U.insert({row:le.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,J=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||J)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])}}},$.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},$.prototype.insert=function(A,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,A);Z&&(A!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Z.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
|
211
|
+
`)==-1){var J=m.fromPoints(K,K);J.end.column+=A.length,this.session.remove(J)}}else{var J=this.getSelectionRange();K=this.session.remove(J),this.clearSelection()}if(A==`
|
|
212
|
+
`||A==`\r
|
|
213
|
+
`){var se=B.getLine(K.row);if(K.column>se.search(/\S|$/)){var he=se.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,le=B.getState(K.row),se=B.getLine(K.row),de=U.checkOutdent(le,se,A);if(B.insert(K,A),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(A)){var me=U.getNextLineIndent(le,se.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},me)}de&&U.autoOutdent(le,B,K.row)}},$.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new m(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",J=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,le=B[he].end.row,se=ne;se<=le;se++){se>0&&(U=A.getState(se-1),K=A.getLine(se-1),Z=N.getNextLineIndent(U,K,J));var de=A.getLine(se),me=N.$getIndent(de);if(Z!==me){if(me.length>0){var _e=new m(se,0,se,me.length);A.remove(_e)}Z.length>0&&A.insert({row:se,column:0},Z)}N.autoOutdent(U,A,se)}},$.prototype.onTextInput=function(A,N){if(!N)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},$.prototype.applyComposition=function(A,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),!A&&!B.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},$.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},$.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(A){this.selection.isEmpty()&&(A=="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 J=B.getLine(N.end.row);/^\s+$/.test(J)&&(N.end.column=J.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
|
215
|
+
`),this.moveCursorToPosition(A)},$.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),N=A.column;if(N!==0){var B=this.session.getLine(A.row),U,K;N<B.length?(U=B.charAt(N)+B.charAt(N-1),K=new m(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new m(A.row,N-2,A.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},$.prototype.toLowerCase=function(){var A=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 A=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 A=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=A.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var K=A.getLine(N.start.row),Z=N.start,J=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=J-he%J,le=h.stringRepeat(" ",ne);else{for(var ne=he%J;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),le=" "}return this.insert(le)},$.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},$.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},$.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),N=this.session,B=[],U=A.first;U<=A.last;U++)B.push(N.getLine(U));B.sort(function(J,he){return J.toLowerCase()<he.toLowerCase()?-1:J.toLowerCase()>he.toLowerCase()?1:0});for(var K=new m(0,0,0,0),U=A.first;U<=A.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-A.first])}},$.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,N.first,N.last)},$.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),N=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,A)},$.prototype.getNumberAt=function(A,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);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},$.prototype.modifyNumber=function(A){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 J=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-J,ne=parseFloat(Z.value);ne*=Math.pow(10,he),J!==Z.end&&B<J?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var le=ne.toFixed(he),se=new m(N,Z.start,N,Z.end);this.session.replace(se,le),this.moveCursorTo(N,Math.max(Z.start+1,B+le.length-Z.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var A=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 J=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Xe,ht){he=J+Xe.length,Z>=J&&Z<=he&&(B=Xe,ne.selection.clearSelection(),ne.moveCursorTo(A,J+U),ne.selection.selectTo(A,he+U)),J=he});for(var le=this.$toggleWordPairs,se,de=0;de<le.length;de++)for(var me=le[de],_e=0;_e<=1;_e++){var Te=+!_e,Me=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(me[_e])+")\\s?$","i"));if(Me){var Je=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Me[1])+")($|\\s)","g"));Je&&(se=B.replace(new RegExp(h.escapeRegExp(me[_e]),"i"),function(Xe){var ht=me[Te];return Xe.toUpperCase()==Xe?ht=ht.toUpperCase():Xe.charAt(0).toUpperCase()==Xe.charAt(0)&&(ht=ht.substr(0,0)+me[Te].charAt(0).toUpperCase()+ht.substr(1)),ht}),this.insert(se),se="")}}},$.prototype.findLinkAt=function(A,N){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),J=N;J<0&&(J=0);var he=0,ne=0,le;try{for(var se=p(Z),de=se.next();!de.done;de=se.next()){var me=de.value;if(ne=he+me.length,J>=he&&J<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){le=me.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(_e){B={error:_e}}finally{try{de&&!de.done&&(U=se.return)&&U.call(se)}finally{if(B)throw B.error}}return le},$.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},$.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var K=B.start.row;N.duplicateLines(K,K)}else{var Z=U?B.start:B.end,J=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=J,A.setSelectionRange(B,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(A,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:A),N&&A==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var J=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,le=J.length,se=0;se<le;se++){var de=se;J[se].moveBy(he,0),B=this.$getSelectedRows(J[se]);for(var me=B.first,_e=B.last;++se<le;){ne&&J[se].moveBy(ne,0);var Te=this.$getSelectedRows(J[se]);if(N&&Te.first!=_e||!N&&Te.first>_e+1)break;_e=Te.last}for(se--,he=this.session.$moveLines(me,_e,N?0:A),N&&A==-1&&(de=se+1);de<=se;)J[de].moveBy(he,0),de++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},$.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},$.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,K=A*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)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},$.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},$.prototype.centerSelection=function(){var A=this.getSelectionRange(),N={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(N,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},$.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},$.prototype.jumpToMatching=function(A,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 J=K||U.stepForward();if(J){var he,ne=!1,le={},se=B.column-J.start,de,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(J.value.match(/[{}()\[\]]/g)){for(;se<J.value.length&&!ne;se++)if(me[J.value[se]])switch(de=me[J.value[se]]+"."+J.type.replace("rparen","lparen"),isNaN(le[de])&&(le[de]=0),J.value[se]){case"(":case"[":case"{":le[de]++;break;case")":case"]":case"}":le[de]--,le[de]===-1&&(he="bracket",ne=!0);break}}else J.type.indexOf("tag-name")!==-1&&(isNaN(le[J.value])&&(le[J.value]=0),K.value==="<"&&Z>1?le[J.value]++:K.value==="</"&&le[J.value]--,le[J.value]===-1&&(he="tag",ne=!0));ne||(K=J,Z++,J=U.stepForward(),se=0)}while(J&&!ne);if(he){var _e,Te;if(he==="bracket")_e=this.session.getBracketRange(B),_e||(_e=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-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(!J||J.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 Me=this.session.getMatchingTags(B);Me&&(Me.openTag.contains(B.row,B.column)?(_e=Me.closeTag,Te=_e.start):(_e=Me.openTag,Me.closeTag.start.row===B.row&&Me.closeTag.start.column===B.column?Te=_e.end:Te=_e.start))}Te=Te||_e.start}Te=_e&&_e.cursor||Te,Te&&(A?_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))}}},$.prototype.gotoLine=function(A,N,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,N||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},$.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},$.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},$.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},$.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(A,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,A)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},$.prototype.replaceAll=function(A,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],A)&&U++;return this.selection.setSelectionRange(K),U},$.prototype.$tryReplace=function(A,N){var B=this.session.getTextRange(A);return N=this.$search.replace(B,N),N!==null?(A.end=this.session.replace(A,N),A):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&g.mixin(N,A);var U=this.selection.getRange();N.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),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)},$.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},$.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},$.prototype.revealRange=function(A,N){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),N!==!1&&this.renderer.animateScrolling(B)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(A){if(A){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}),J=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,le=ne.$cursorLayer.$pixelPos,se=ne.layerConfig,de=le.top-se.offset;le.top>=0&&de+N.top<0?U=!0:le.top<se.height&&le.top+N.top+se.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=de+"px",K.style.left=le.left+"px",K.style.height=se.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",J))}}},$.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",b.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},$.prototype.prompt=function(A,N,B){var U=this;_.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,N,B)})},$}();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($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var A=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),U=B.key.length==1),!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new H);var K=b.createElement("div");K.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),K)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();$?(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($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){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($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?O.attach(this):O.detach(this)}},placeholder:{set:function($){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&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(!A&&!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!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var A={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===L.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;$?(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",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("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(A),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",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("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(A),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($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},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",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($.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function($,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function($,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};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,s){var a=f.firstRowScreen*f.lineHeight,u=Math.floor(a/this.canvasHeight),c=s.documentToScreenRow(h,0)*f.lineHeight;return c-u*this.canvasHeight},b.prototype.computeLineHeight=function(h,f,s){return f.lineHeight*s.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),s=0;s<h.length;s++)f.appendChild(h[s].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),s=0;s<h.length;s++)f.appendChild(h[s].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,s,a){var u=this.cellCache.pop();if(!u){var c=p.createElement("div");a&&a(c),this.element.appendChild(c),u={element:c,text:"",row:h}}return u.row=h,u},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,s=t("../config").nls,a=function(){function c(i){this.$showCursorMarker=null,this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.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 c.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(i,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,l)},c.prototype.removeGutterDecoration=function(i,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,l)},c.prototype.setAnnotations=function(i){this.$annotations=[];for(var l=0;l<i.length;l++){var m=i[l],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")}},c.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var l=i.start.row,m=i.end.row-l;if(m!==0)if(i.action=="remove")this.$annotations.splice(l,m+1,null);else{var w=new Array(m+1);w.unshift(l,1),this.$annotations.splice.apply(this.$annotations,w)}}},c.prototype.update=function(i){this.config=i;var l=this.session,m=i.firstRow,w=Math.min(i.lastRow+i.gutterOffset,l.getLength()-1);this.oldLastRow=w,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=l.getNextFoldLine(m),E=x?x.start.row:1/0,_=null,k=-1,C=m;;){if(C>E&&(C=x.end.row+1,x=l.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,i,this.session,u),this.$lines.push(_)),this.$renderCell(_,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},c.prototype.$updateGutterWidth=function(i){var l=this.session,m=l.gutterRenderer||this.$renderer,w=l.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(x=l.getLength()+w-1);var E=m?m.getWidth(l,x,i):x.toString().length*i.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))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},c.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<l.length;m++){var w=l[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==l[m-1].row)w=l[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},c.prototype.$updateCursorMarker=function(){if(this.session){var i=this.session;this.$highlightElement||(this.$highlightElement=p.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var l=i.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,E=Math.floor(x/w.canvasHeight),_=i.documentToScreenRow(l)*m.lineHeight,k=_-E*w.canvasHeight;p.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),p.setStyle(this.$highlightElement.style,"top",k+"px")}},c.prototype.scrollLines=function(i){var l=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(l,i))return this.update(i);this.$lines.moveContainer(i);var m=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!l||w<i.firstRow)return this.update(i);if(m<l.firstRow)return this.update(i);if(l.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,i.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();i.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,l.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(i,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},c.prototype.$renderLines=function(i,l,m){for(var w=[],x=l,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,i,this.session,u);this.$renderCell(k,i,E,x),w.push(k),x++}return w},c.prototype.$renderCell=function(i,l,m,w){var x=i.element,E=this.session,_=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],R=x.childNodes[3],D=C.firstChild,L=E.$firstLineNumber,I=E.$breakpoints,H=E.$decorations,P=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,A=l.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+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=$&&this.$cursorRow<=m.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),I[w]&&(N+=I[w]),H[w]&&(N+=H[w]),this.$annotations[w]&&w!==$&&(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,J=K=="start"&&w==$&&w<m.end.row;if(J){Z+=" ace_closed";for(var he="",ne=!1,le=w+1;le<=m.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[le].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",A),p.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var se=E.getFoldWidgetRange(w);se?k.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[se.start.row+1,se.end.row+1])):m?k.setAttribute("aria-label",s("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",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),J?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",s("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 de=this.session.$gutterCustomWidgets[w];if(de?this.$addCustomWidget(w,de,i):R&&this.$removeCustomWidget(w,i),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=B,D.className+=he,p.setStyle(D.style,"height",A),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",A);var me;switch(he){case" ace_error_fold":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",D.className=B,this.$useSvgGutterIcons?D.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),p.setStyle(D.style,"height",A),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",A);var me;switch(this.$annotations[w].className){case" ace_error":me=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":me=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":me=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":me=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":me=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),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(i.element.style,"height",this.$lines.computeLineHeight(w,l,E)+"px"),p.setStyle(i.element.style,"top",this.$lines.computeLineTop(w,l,E)+"px"),i.text=U,C.style.display==="none"&&k.style.display==="none"&&!de?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},c.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i,!i&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},c.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(i){i?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(i,l){var m=l||this.$getGutterCell(i);if(m&&m.element){var w=m.element.childNodes[1];w&&p.setStyle(w.style,"display","none")}},c.prototype.$showFoldWidget=function(i,l){var m=l||this.$getGutterCell(i);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")}},c.prototype.$getGutterCell=function(i){var l=this.$lines.cells,m=0,w=l.length-1;if(!(i<l[0].row||i>l[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),E=l[x];if(E.row>i)w=x-1;else if(E.row<i)m=x+1;else return E}return E}},c.prototype.$addCustomWidget=function(i,l,m){var w=l.className,x=l.label,E=l.title,_=l.callbacks;this.session.$gutterCustomWidgets[i]={className:w,label:x,title:E,callbacks:_},this.$hideFoldWidget(i,m);var k=m||this.$getGutterCell(i);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(R){_.onClick(R,i),R.stopPropagation()}),k.element.appendChild(C)}},c.prototype.$removeCustomWidget=function(i,l){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,l);var m=l||this.$getGutterCell(i);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=p.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},c.prototype.getRegion=function(i){var l=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(i.x<l.left+m.left)return"markers";if(this.$showFoldWidgets&&i.x>m.right-l.right)return"foldWidgets"},c}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,g.implement(a.prototype,h);function u(c){var i=document.createTextNode("");c.appendChild(i);var l=p.createElement("span");c.appendChild(l);var m=p.createElement("span");c.appendChild(m);var w=p.createElement("span");return m.appendChild(w),c}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(s){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return f.prototype.setPadding=function(s){this.$padding=s},f.prototype.setSession=function(s){this.session=s},f.prototype.setMarkers=function(s){this.markers=s},f.prototype.elt=function(s,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=s},f.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var u in this.markers){var c=this.markers[u];if(!c.range){c.update(a,this,this.session,s);continue}var i=c.range.clipRows(s.firstRow,s.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),c.renderer){var l=this.$getTop(i.start.row,s),m=this.$padding+i.start.column*s.characterWidth;c.renderer(a,i,m,l,s)}else c.type=="fullLine"?this.drawFullLineMarker(a,i,c.clazz,s):c.type=="screenLine"?this.drawScreenLineMarker(a,i,c.clazz,s):i.isMultiLine()?c.type=="text"?this.drawTextMarker(a,i,c.clazz,s):this.drawMultiLineMarker(a,i,c.clazz,s):this.drawSingleLineMarker(a,i,c.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},f.prototype.drawTextMarker=function(s,a,u,c,i){for(var l=this.session,m=a.start.row,w=a.end.row,x=m,E=0,_=0,k=l.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:l.getRowWrapIndent(x),C.end.column=k,E=_,_=k,k=x+1<w?l.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(s,C,u+(x==m?" ace_start":"")+" ace_br"+h(x==m||x==m+1&&a.start.column,E<_,_>k,x==w),c,x==w?0:1,i)},f.prototype.drawMultiLineMarker=function(s,a,u,c,i){var l=this.$padding,m=c.lineHeight,w=this.$getTop(a.start.row,c),x=l+a.start.column*c.characterWidth;if(i=i||"",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(s,E,u+" ace_br1 ace_start",c,null,i)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+l+"px;top:"+w+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(s,E,u+" ace_br12",c,null,i)}else{w=this.$getTop(a.end.row,c);var _=a.end.column*c.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+_+"px;top:"+w+"px;left:"+l+"px;"+(i||""))}if(m=(a.end.row-a.start.row-1)*c.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,c);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+m+"px;right:"+l+"px;top:"+w+"px;left:"+l+"px;"+(i||""))}},f.prototype.drawSingleLineMarker=function(s,a,u,c,i,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,c,i,l);var m=c.lineHeight,w=(a.end.column+(i||0)-a.start.column)*c.characterWidth,x=this.$getTop(a.start.row,c),E=this.$padding+a.start.column*c.characterWidth;this.elt(u,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+E+"px;"+(l||""))},f.prototype.drawBidiSingleLineMarker=function(s,a,u,c,i,l){var m=c.lineHeight,w=this.$getTop(a.start.row,c),x=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function(_){this.elt(u,"height:"+m+"px;width:"+(_.width+(i||0))+"px;top:"+w+"px;left:"+(x+_.left)+"px;"+(l||""))},this)},f.prototype.drawFullLineMarker=function(s,a,u,c,i){var l=this.$getTop(a.start.row,c),m=c.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,c)-l),this.elt(u,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(i||""))},f.prototype.drawScreenLineMarker=function(s,a,u,c,i){var l=this.$getTop(a.start.row,c),m=c.lineHeight;this.elt(u,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(i||""))},f}();b.prototype.$padding=0;function h(f,s,a,u){return(f?1:0)|(s?2:0)|(a?4:0)|(u?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,s=t("../config").nls,a=t("./text_util").isTextToken,u=function(){function c(i){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return c.prototype.$updateEolChar=function(){var i=this.session.doc,l=i.getNewLineCharacter()==`
|
|
216
|
+
`&&i.getNewLineMode()!="windows",m=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},c.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},c.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},c.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var l=this.$tabStrings=[0],m=1;m<i+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),l.push(w)}else l.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}},c.prototype.updateLines=function(i,l,m){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var w=Math.max(l,i.firstRow),x=Math.min(m,i.lastRow),E=this.element.childNodes,_=0,k=i.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 R=!1,k=w,C=this.session.getNextFoldLine(k),D=C?C.start.row:1/0;k>D&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),D=C?C.start.row:1/0),!(k>x);){var L=E[_++];if(L){this.dom.removeChildren(L),this.$renderLine(L,k,k==D?C:!1),R&&(L.style.top=this.$lines.computeLineTop(k,i,this.session)+"px");var I=i.lineHeight*this.session.getRowLength(k)+"px";L.style.height!=I&&(R=!0,L.style.height=I)}k++}if(R)for(;_<this.$lines.cells.length;){var H=this.$lines.cells[_++];H.element.style.top=this.$lines.computeLineTop(H.row,i,this.session)+"px"}},c.prototype.scrollLines=function(i){var l=this.config;if(this.config=i,this.$lines.pageChanged(l,i))return this.update(i);this.$lines.moveContainer(i);var m=i.lastRow,w=l?l.lastRow:-1;if(!l||w<i.firstRow)return this.update(i);if(m<l.firstRow)return this.update(i);if(!l||l.lastRow<i.firstRow)return this.update(i);if(i.lastRow<l.firstRow)return this.update(i);if(l.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(l.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,l.lastRow);x>0;x--)this.$lines.pop();i.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,l.firstRow-1)),i.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(i,l.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(i,l,m){for(var w=[],x=l,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,i,this.session),C=k.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,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},c.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var l=i.firstRow,m=i.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(i,l,m))},c.prototype.$renderToken=function(i,l,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 R=k[1],D=k[2],L=k[3],I=k[4],H=k[5];if(!(!x.showSpaces&&D)){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)),R){var O=x.session.getScreenTabSize(l+k.index),$=x.$tabStrings[O].cloneNode(!0);$.charCount=1,_.appendChild($),l+=O-1}else if(D)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=b.stringRepeat(x.SPACE_CHAR,D.length),_.appendChild(A)}else _.appendChild(this.dom.createTextNode(D,this.element));else if(L){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=b.stringRepeat(x.SPACE_CHAR,L.length),_.appendChild(A)}else if(I){l+=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){l+=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))i.appendChild(_);else{var N="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",s("inline-fold.closed.title","Unfold code"))),A.className=N,A.appendChild(_),i.appendChild(A)}return l+w.length},c.prototype.renderIndentGuide=function(i,l,m){var w=l.search(this.$indentGuideRe);if(w<=0||w>=m)return l;if(l[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,E=0;E<x;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}else if(l[0]==" "){for(var E=0;E<w;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}return this.$highlightIndentGuide(),l},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var l=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:l.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,_=0;_<E.length;_++)if(l.row!==E[_].start.row){this.$highlightIndentGuideMarker.end=E[_].start.row+1,l.row>E[_].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[l.row]!==""&&l.column===i[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var _=l.row+1;_<i.length;_++){var k=i[_],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=_,C<=m))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<i.length;l++)i[l].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(i,l){var m=this.session.doc.getLine(i.row);if(m!==""){var w=i.element;if(i.element.classList&&i.element.classList.contains("ace_line_group"))if(i.element.childNodes.length>0)w=i.element.childNodes[0];else return;var x=w.childNodes;if(x){var E=x[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<i.length;m++){var w=i[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}else for(var m=i.length-1;m>=0;m--){var w=i[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}}},c.prototype.$createLineElement=function(i){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},c.prototype.$renderWrappedLine=function(i,l,m){var w=0,x=0,E=m[0],_=0,k=this.$createLineElement();i.appendChild(k);for(var C=0;C<l.length;C++){var R=l[C],D=R.value;if(C==0&&this.displayIndentGuides){if(w=D.length,D=this.renderIndentGuide(k,D,E),!D)continue;w-=D.length}if(w+D.length<E)_=this.$renderToken(k,_,R,D),w+=D.length;else{for(;w+D.length>=E;){_=this.$renderToken(k,_,R,D.substring(0,E-w)),D=D.substring(E-w),w=E,k=this.$createLineElement(),i.appendChild(k);var L=this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element);L.charCount=0,k.appendChild(L),x++,_=0,E=m[x]||Number.MAX_VALUE}D.length!=0&&(w+=D.length,_=this.$renderToken(k,_,R,D))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,_,null,"",!0)},c.prototype.$renderSimpleLine=function(i,l){for(var m=0,w=0;w<l.length;w++){var x=l[w],E=x.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(i,E),!E))){if(m+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,m,x,E);m=this.$renderToken(i,m,x,E)}}},c.prototype.$renderOverflowMessage=function(i,l,m,w,x){m&&this.$renderToken(i,l,m,w.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",i.appendChild(E)},c.prototype.$renderLine=function(i,l,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(l)),m)var w=this.$getFoldLineTokens(l,m);else var w=this.session.getTokens(l);var x=i;if(w.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(i,w,E);var x=i.lastChild}else{var x=i;this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x));if(this.showEOL&&x){m&&(l=m.end.row);var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_eol",_.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(_)}},c.prototype.$getFoldLineTokens=function(i,l){var m=this.session,w=[];function x(_,k,C){for(var R=0,D=0;D+_[R].value.length<k;)if(D+=_[R].value.length,R++,R==_.length)return;if(D!=k){var L=_[R].value.substring(k-D);L.length>C-k&&(L=L.substring(0,C-k)),w.push({type:_[R].type,value:L}),D=k+L.length,R+=1}for(;D<C&&R<_.length;){var L=_[R].value;L.length+D>C?w.push({type:_[R].type,value:L.substring(0,C-D)}):w.push(_[R]),D+=L.length,R+=1}}var E=m.getTokens(i);return l.walk(function(_,k,C,R,D){_!=null?w.push({type:"fold",value:_}):(D&&(E=m.getTokens(k)),E.length&&x(E,R,C))},l.end.row,this.session.getLine(l.end.row).length),w},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,p.implement(u.prototype,f),r.Text=u}),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,s=f.length;s--;)p.setStyle(f[s].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 s=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},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,s=0,a=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var s=0,u=f.length;s<u;s++){var c=this.getPixelPosition(f[s].cursor,!0);if(!((c.top>h.height+h.offset||c.top<0)&&s>1)){var i=this.cursors[a++]||this.addCursor(),l=i.style;this.drawCursor?this.drawCursor(i,c,h,f[s],this.session):this.isCursorInView(c,h)?(p.setStyle(l,"display","block"),p.translate(i,c.left,c.top),p.setStyle(l,"width",Math.round(h.characterWidth)+"px"),p.setStyle(l,"height",h.lineHeight+"px")):p.setStyle(l,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=c,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 i=function(l,m){return i=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])},i(l,m)};return function(l,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(l,m);function w(){this.constructor=l}l.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,s=32768,a=function(){function i(l,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),l.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 i.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},i}();g.implement(a.prototype,f);var u=function(i){p(l,i);function l(m,w){var x=i.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 l.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},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(m){this.element.style.height=m+"px"},l.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>s?(this.coeff=s/m,m=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},l.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},l}(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var c=function(i){p(l,i);function l(m,w){var x=i.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 l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(m){this.element.style.width=m+"px"},l.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},l}(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=c,r.VScrollBar=u,r.HScrollBar=c}),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 c=function(i,l){return c=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])},c(i,l)};return function(i,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");c(i,l);function m(){this.constructor=i}i.prototype=l===null?Object.create(l):(m.prototype=l.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 s=function(){function c(i,l){this.element=b.createElement("div"),this.element.className="ace_sb"+l,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},c}();g.implement(s.prototype,f);var a=function(c){p(i,c);function i(l,m){var w=c.call(this,l,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=l,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return i.prototype.onMouseDown=function(l,m){if(l==="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(D)},k=m.clientY,C=this.thumbTop,R=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 D=setInterval(R,20);return h.preventDefault(m)}var L=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),h.preventDefault(m)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(l){var m=l*(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},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(l,m){this.pageHeight===l&&!m||(this.pageHeight=l,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})))},i.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=function(c){p(i,c);function i(l,m){var w=c.call(this,l,"-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 i.prototype.onMouseDown=function(l,m){if(l==="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(D)},k=m.clientX,C=this.thumbLeft,R=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 D=setInterval(R,20);return h.preventDefault(m)}var L=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),h.preventDefault(m)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(l){var m=l*(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},i.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(l,m){this.pageWidth===l&&!m||(this.pageWidth=l,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})))},i.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i}(s);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),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 s=this;this._flush=function(a){s.pending=!1;var u=s.changes;if(u&&(p.blockIdle(100),s.changes=0,s.onRender(u)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$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"),s=t("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",c=200,i=function(){function l(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},u?this.$addObserver():this.checkForSizeChanges()}return l.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"},l.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})}},l.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.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)},l.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.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},l.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},l.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},l.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(c,0),m(0,c),m(c,c)],this.el)},l.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function E(Z,J,he){var ne=Z[1]*J[0]-Z[0]*J[1];return[(-J[1]*he[0]+J[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function _(Z,J){return[Z[0]-J[0],Z[1]-J[1]]}function k(Z,J){return[Z[0]+J[0],Z[1]+J[1]]}function C(Z,J){return[Z*J[0],Z*J[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var J=Z.getBoundingClientRect();return[J.left,J.top]}var D=R(this.els[0]),L=R(this.els[1]),I=R(this.els[2]),H=R(this.els[3]),P=E(_(H,L),_(H,I),_(k(L,I),k(H,D))),O=C(1+P[0],_(L,D)),$=C(1+P[1],_(I,D));if(w){var A=w,N=P[0]*A[0]/c+P[1]*A[1]/c+1,B=k(C(A[0],O),C(A[1],$));return k(C(1/N/c,B),D)}var U=_(m,D),K=E(_(O,C(P[0],U)),_($,C(P[1],U)),U);return C(c,K)},l}();i.prototype.$characterSize={width:0,height:0},p.implement(i.prototype,s),r.FontMetrics=i}),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
|
+
pointer-events: auto;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.ace_custom-widget {
|
|
772
|
+
background: none;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
776
|
+
display: inline-block;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.ace_fold-widget.ace_end {
|
|
780
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ace_fold-widget.ace_closed {
|
|
784
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.ace_fold-widget:hover {
|
|
788
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
789
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
790
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.ace_fold-widget:active {
|
|
794
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
795
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
796
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Dark version for fold widgets
|
|
800
|
+
*/
|
|
801
|
+
.ace_dark .ace_fold-widget {
|
|
802
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
803
|
+
}
|
|
804
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
806
|
+
}
|
|
807
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
809
|
+
}
|
|
810
|
+
.ace_dark .ace_fold-widget:hover {
|
|
811
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
812
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
813
|
+
}
|
|
814
|
+
.ace_dark .ace_fold-widget:active {
|
|
815
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.ace_inline_button {
|
|
819
|
+
border: 1px solid lightgray;
|
|
820
|
+
display: inline-block;
|
|
821
|
+
margin: -1px 8px;
|
|
822
|
+
padding: 0 5px;
|
|
823
|
+
pointer-events: auto;
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
}
|
|
826
|
+
.ace_inline_button:hover {
|
|
827
|
+
border-color: gray;
|
|
828
|
+
background: rgba(200,200,200,0.2);
|
|
829
|
+
display: inline-block;
|
|
830
|
+
pointer-events: auto;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.ace_fold-widget.ace_invalid {
|
|
834
|
+
background-color: #FFB4B4;
|
|
835
|
+
border-color: #DE5555;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
839
|
+
transition: opacity 0.4s ease 0.05s;
|
|
840
|
+
opacity: 0;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
844
|
+
transition: opacity 0.05s ease 0.05s;
|
|
845
|
+
opacity:1;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.ace_underline {
|
|
849
|
+
text-decoration: underline;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.ace_bold {
|
|
853
|
+
font-weight: bold;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.ace_nobold .ace_bold {
|
|
857
|
+
font-weight: normal;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.ace_italic {
|
|
861
|
+
font-style: italic;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
.ace_error-marker {
|
|
866
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
867
|
+
position: absolute;
|
|
868
|
+
z-index: 9;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.ace_highlight-marker {
|
|
872
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
873
|
+
position: absolute;
|
|
874
|
+
z-index: 8;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.ace_mobile-menu {
|
|
878
|
+
position: absolute;
|
|
879
|
+
line-height: 1.5;
|
|
880
|
+
border-radius: 4px;
|
|
881
|
+
-ms-user-select: none;
|
|
882
|
+
-moz-user-select: none;
|
|
883
|
+
-webkit-user-select: none;
|
|
884
|
+
user-select: none;
|
|
885
|
+
background: white;
|
|
886
|
+
box-shadow: 1px 3px 2px grey;
|
|
887
|
+
border: 1px solid #dcdcdc;
|
|
888
|
+
color: black;
|
|
889
|
+
}
|
|
890
|
+
.ace_dark > .ace_mobile-menu {
|
|
891
|
+
background: #333;
|
|
892
|
+
color: #ccc;
|
|
893
|
+
box-shadow: 1px 3px 2px grey;
|
|
894
|
+
border: 1px solid #444;
|
|
895
|
+
|
|
896
|
+
}
|
|
897
|
+
.ace_mobile-button {
|
|
898
|
+
padding: 2px;
|
|
899
|
+
cursor: pointer;
|
|
900
|
+
overflow: hidden;
|
|
901
|
+
}
|
|
902
|
+
.ace_mobile-button:hover {
|
|
903
|
+
background-color: #eee;
|
|
904
|
+
opacity:1;
|
|
905
|
+
}
|
|
906
|
+
.ace_mobile-button:active {
|
|
907
|
+
background-color: #ddd;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.ace_placeholder {
|
|
911
|
+
position: relative;
|
|
912
|
+
font-family: arial;
|
|
913
|
+
transform: scale(0.9);
|
|
914
|
+
transform-origin: left;
|
|
915
|
+
white-space: pre;
|
|
916
|
+
opacity: 0.7;
|
|
917
|
+
margin: 0 10px;
|
|
918
|
+
z-index: 1;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.ace_ghost_text {
|
|
922
|
+
opacity: 0.5;
|
|
923
|
+
font-style: italic;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.ace_ghost_text_container > div {
|
|
927
|
+
white-space: pre;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ghost_text_line_wrapped::after {
|
|
931
|
+
content: "↩";
|
|
932
|
+
position: absolute;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
936
|
+
margin: 0px 4px
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.ace_screenreader-only {
|
|
940
|
+
position:absolute;
|
|
941
|
+
left:-10000px;
|
|
942
|
+
top:auto;
|
|
943
|
+
width:1px;
|
|
944
|
+
height:1px;
|
|
945
|
+
overflow:hidden;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.ace_hidden_token {
|
|
949
|
+
display: none;
|
|
950
|
+
}`}),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(s,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(s)}return f.prototype.$createCanvas=function(){this.canvas=p.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var u=this.canvas.getContext("2d");function c(O,$){return O.priority<$.priority?-1:O.priority>$.priority?1:0}var i=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),i){var l={info:1,warning:2,error:3};i.forEach(function(O){O.priority=l[O.type]||null}),i=i.sort(c);for(var m=0;m<i.length;m++){var w=i[m].row,x=this.getVerticalOffsetForRow(w),E=x+this.lineHeight,_=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*E),C=Math.round((_+k)/2),R=k-C;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),C-R<0&&(C=R),C+R>this.canvasHeight&&(C=this.canvasHeight-R);var D=C-R,L=C+R,I=L-D;u.fillStyle=a[i[m].type]||null,u.fillRect(0,D,Math.round(this.oneZoneWidth-1),I)}}var H=this.renderer.session.selection.getCursor();if(H){var P=Math.round(this.getVerticalOffsetForRow(H.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,P,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},f.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},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,s=t("./layer/marker").Marker,a=t("./layer/text").Text,u=t("./layer/cursor").Cursor,c=t("./scrollbar").HScrollBar,i=t("./scrollbar").VScrollBar,l=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"),R=t("./layer/text_util").isTextToken;g.importCssString(_,"ace_editor.css",!1);var D=function(){function L(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 s(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function($){P.$scrollAnimation||P.session.setScrollTop($.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){P.$scrollAnimation||P.session.setScrollLeft($.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($){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",$)}),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 L.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")},L.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))},L.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)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(I,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var $=this.container;O||(O=$.clientHeight||$.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",O=$.clientHeight||$.scrollHeight),P||(P=$.clientWidth||$.scrollWidth);var A=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(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(I,H,P,O){O-=this.$extraHeight||0;var $=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(I||A.height!=O)&&(A.height=O,$|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),P&&(I||A.width!=P)){$|=this.CHANGE_SIZE,A.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"),A.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(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&($|=this.CHANGE_FULL)}return A.$dirty=!P||!O,$&&this._signal("resize",N),$},L.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()},L.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)},L.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},L.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},L.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.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()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.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,$=P.top,A=P.left;$-=O.offset;var N=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>O.height-N){g.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!H)$+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else $+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,g.setStyle(I,"height",N+"px"),g.setStyle(I,"width",B+"px"),g.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min($,U))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.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},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.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()},L.prototype.setScrollMargin=function(I,H,P,O){var $=this.scrollMargin;$.top=I|0,$.bottom=H|0,$.right=O|0,$.left=P|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},L.prototype.setMargin=function(I,H,P,O){var $=this.margin;$.top=I|0,$.bottom=H|0,$.right=O|0,$.left=P|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},L.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)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.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 $=P.width+2*this.$padding+"px",A=P.minHeight+"px";g.setStyle(this.content.style,"width",$),g.setStyle(this.content.style,"height",A)}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)},L.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,$=!O&&I>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var I=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),$=O*this.lineHeight,A=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-A-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;$+=Z;var J=this.scrollMargin;this.session.setScrollTop(Math.max(-J.top,Math.min(this.scrollTop,$-H.scrollerHeight+J.bottom))),this.session.setScrollLeft(Math.max(-J.left,Math.min(this.scrollLeft,A+2*this.$padding-H.scrollerWidth+J.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-$+Z<0||this.scrollTop>J.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,se=Math.ceil(K/this.lineHeight)-1,de=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),me=de+se,_e,Te,Me=this.lineHeight;de=I.screenToDocumentRow(de,0);var Je=I.getFoldLine(de);Je&&(de=Je.start.row),_e=I.documentToScreenRow(de,0),Te=I.getRowLength(de)*Me,me=Math.min(I.screenToDocumentRow(me,0),I.getLength()-1),K=H.scrollerHeight+I.getRowLength(me)*Me+Te,le=this.scrollTop-_e*Me,le<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(le/Me)),le=this.scrollTop-_e*Me);var Xe=0;return(this.layerConfig.width!=A||B)&&(Xe=this.CHANGE_H_SCROLL),(B||ne)&&(Xe|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:de,firstRowScreen:_e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:K,maxHeight:$,offset:le,gutterOffset:Me?Math.max(0,Math.ceil((le+H.height-H.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Xe},L.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}}},L.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))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(I,H){this.$gutterLayer.addGutterDecoration(I,H)},L.prototype.removeGutterDecoration=function(I,H){this.$gutterLayer.removeGutterDecoration(I,H)},L.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(I,H,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(H,P)},L.prototype.scrollCursorIntoView=function(I,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),$=O.left,A=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>A?(H&&U+N>A+this.lineHeight&&(A-=H*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(H&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=H*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;$-Z<K?($-=Z,$<this.$padding+Z&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=Z,K+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&$-K<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},L.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,$=P.top-O*(H||0);return this.session.setScrollTop($),$},L.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)$.push(A(P/this.STEPS,I,H-I));return $},L.prototype.scrollToLine=function(I,H,P,O){var $=this.$cursorLayer.getPixelPosition({row:I,column:0}),A=$.top;H&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(N,O)},L.prototype.animateScrolling=function(I,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(I=$[0],I==P))return}var A=O.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.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);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},L.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},L.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(I,H){this.session.setScrollTop(H),this.session.setScrollLeft(I)},L.prototype.scrollBy=function(I,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},L.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},L.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 $=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(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:$}},L.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 $=I+this.scrollLeft-P.left-this.$padding,A=$/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),$)},L.prototype.textToScreenCoordinates=function(I,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,H),$=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,I)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:P.left+$-this.scrollLeft,pageY:P.top+A-this.scrollTop}},L.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},L.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")},L.prototype.setCompositionText=function(I){var H=this.session.selection.cursor;this.addToken(I,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},L.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=""}},L.prototype.setGhostText=function(I,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(I,O);this.addToken($[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var A=g.createElement("div");if($.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;$.slice(1).forEach(function(ne){var le=g.createElement("div"),se=g.createElement("span");se.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),se.appendChild(g.createTextNode(ne.text)),le.appendChild(se),A.appendChild(le),B=le}),N.forEach(function(ne){var le=g.createElement("span");R(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(g.createTextNode(ne.value)),B.appendChild(le)}),this.$ghostTextWidget={el:A,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,J=$.length*this.lineHeight,he=J<Z-U.top;if(he)return;J<Z?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(O.row)}},L.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 $=I.split(/\r?\n/),A=[],N=0;N<$.length;N++){var B=this.session.$getDisplayTokens($[N],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push($[N].length);for(var Z=0;Z<U.length;Z++){var J=$[N].slice(K,U[Z]);A.push({text:J,wrapped:!0}),K=U[Z]}}else A.push({text:$[N],wrapped:!1})}return A},L.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}},L.prototype.addToken=function(I,H,P,O){var $=this.session;$.bgTokenizer.lines[P]=null;var A={type:H,value:I},N=$.getTokens(P);if(O==null||!N.length)N.push(A);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),J=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:J},A,{type:K.type,value:he});break}}this.updateLines(P,P)},L.prototype.hideTokensAfterPosition=function(I,H){for(var P=this.session.getTokens(I),O=0,$=!1,A=[],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&&($=!0)}}return this.updateLines(I,I),A},L.prototype.removeExtraToken=function(I,H){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},L.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],$)}else $(I);function $(A){if(P.$themeId!=I)return H&&H();if(!A||!A.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");A.$id&&(P.$themeId=A.$id),g.importCssString(A.cssText,A.cssClass,P.container),P.theme&&g.removeCssClass(P.container,P.theme.cssClass);var N="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;if(P.$padding&&N!=P.$padding&&P.setPadding(N),P.$gutterLayer){var B=A.$showGutterCursorMarker;B&&!P.$gutterLayer.$showCursorMarker?P.$gutterLayer.$showCursorMarker="theme":!B&&P.$gutterLayer.$showCursorMarker=="theme"&&(P.$gutterLayer.$showCursorMarker=null)}P.$theme=A.cssClass,P.theme=A,g.addCssClass(P.container,A.cssClass),g.setCssClass(P.container,"ace_dark",A.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:A}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(I,H){g.setCssClass(this.container,I,H!==!1)},L.prototype.unsetStyle=function(I){g.removeCssClass(this.container,I)},L.prototype.setCursorStyle=function(I){g.setStyle(this.scroller.style,"cursor",I)},L.prototype.setMouseCursor=function(I){g.setStyle(this.scroller.style,"cursor",I)},L.prototype.attachToShadowRoot=function(){g.importCssString(_,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(I){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(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?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new c(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)}))},L.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)}},L}();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,p.implement(D.prototype,E),h.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&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(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=D}),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(c){var i="importScripts('"+g.qualifyURL(c)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new l;return m.append(i),m.getBlob("application/javascript")}}function s(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var i=f(c),l=window.URL||window.webkitURL,m=l.createObjectURL(i);return new Worker(m)}return new Worker(c)}var a=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,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(c,i,l,m,w){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),h.get("packaged")||!t.toUrl)m=m||h.moduleUrl(i,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var E={};c.forEach(function(_){E[_]=x(t.toUrl(_,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:i,classname:l}),this.$worker},this.onMessage=function(c){var i=c.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var l=this.callbacks[i.id];l&&(l(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return g.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,i){this.$worker.postMessage({command:c,args:i})},this.call=function(c,i,l){if(l){var m=this.callbackId++;this.callbacks[m]=l,i.push(m)}this.send(c,i)},this.emit=function(c,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:i.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(a.prototype);var u=function(c,i,l){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,R){this.postMessage({type:"call",id:R,data:C})},x.emit=function(C,R){this.postMessage({type:"event",name:C,data:R})},h.loadModule(["worker",i],function(C){for(m=new C[l](x);E.length;)k()}),_};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=s}),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(s,a,u,c,i,l){var m=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=i,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var s=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=u.addMarker(new p(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var l=a.createAnchor(i.row,i.column);l.$insertRight=!0,l.detach(),s.others.push(l)}),u.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=s.addMarker(new p(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},f.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var a=s;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,c=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,i=a.start.column-this.pos.column;if(this.updateAnchors(s),c&&(this.length+=u),c&&!this.session.$fromUndo){if(s.action==="insert")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],w={row:m.row,column:m.column+i};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],w={row:m.row,column:m.column+i};this.doc.remove(new p(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,u=function(i,l){a.removeMarker(i.markerId),i.markerId=a.addMarker(new p(i.row,i.column,i.row,i.column+s.length),l,null,!1)};u(this.pos,this.mainClass);for(var c=this.others.length;c--;)u(this.others[c],this.othersClass)}},f.prototype.onCursorChange=function(s){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",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},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 s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)s.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,s){return f.row==s.row&&f.column==s.column}function h(f){var s=f.domEvent,a=s.altKey,u=s.shiftKey,c=s.ctrlKey,i=f.getAccelKey(),l=f.getButton();if(c&&g.isMac&&(l=s.button),f.editor.inMultiSelectMode&&l==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!c&&!a&&!i){l===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(l===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,R=f.y,D=function(J){C=J.clientX,R=J.clientY},L=m.session,I=m.renderer.pixelToScreenCoordinates(C,R),H=I,P;if(m.$mouseHandler.$enableJumpToDef)c&&a||i&&a?P=u?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(i&&!a){if(P="add",!x&&u)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&g.isMac&&s.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&k)return;if(!x){var O=w.toOrientedRange();m.addSelectionMarker(O)}var $=w.rangeList.rangeAtPoint(E);m.inVirtualSelectionMode=!0,u&&($=null,O=w.ranges[0]||O,m.removeSelectionMarker(O)),m.once("mouseup",function(){var J=w.toOrientedRange();$&&J.isEmpty()&&b($.cursor,J.cursor)?w.substractPoint(J.cursor):(u?w.substractPoint(O.cursor):O&&(m.removeSelectionMarker(O),w.addRange(O)),w.addRange(J)),m.inVirtualSelectionMode=!1})}else if(P=="block"){f.stop(),m.inVirtualSelectionMode=!0;var A,N=[],B=function(){var J=m.renderer.pixelToScreenCoordinates(C,R),he=L.screenToDocumentPosition(J.row,J.column,J.offsetX);b(H,J)&&b(he,w.lead)||(H=J,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&&!i?w.toSingleRange():!x&&i&&(A=w.toOrientedRange(),m.addSelectionMarker(A)),u?I=L.documentToScreenPosition(w.lead):w.moveToPosition(E),H={row:-1,column:-1};var U=function(J){B(),clearInterval(Z),m.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),A&&(m.removeSelectionMarker(A),w.toSingleRange(A));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,D,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"),s=t("./lib/lang"),a=t("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=t("./search").Search,c=new u;function i(_,k,C){return c.$options.wrap=!0,c.$options.needle=k,c.$options.backwards=C==-1,c.find(_)}var l=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.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 R=this.rangeList.add(_);return this.$onAddRange(_),R.length&&this.$onRemoveRange(R),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 R=this.ranges.indexOf(_[C]);this.ranges.splice(R,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 R=_[C],D=R.start.row,L=R.end.row;if(D===L)k.push(R.clone());else{for(k.push(new g(D,R.start.column,D,this.session.getLine(D).length));++D<L;)k.push(this.getLineRange(D,!0));k.push(new g(L,0,L,R.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 R=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(R,D);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(_,k,C){var R=[],D=_.column<k.column;if(D)var L=_.column,I=k.column,H=_.offsetX,P=k.offsetX;else var L=k.column,I=_.column,H=k.offsetX,P=_.offsetX;var O=_.row<k.row;if(O)var $=_.row,A=k.row;else var $=k.row,A=_.row;L<0&&(L=0),$<0&&($=0),$==A&&(C=!0);for(var N,B=$;B<=A;B++){var U=g.fromPoints(this.session.screenToDocumentPosition(B,L,H),this.session.screenToDocumentPosition(B,I,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=D?U.start:U.end,R.push(U)}if(O&&R.reverse(),!C){for(var K=R.length-1;R[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var J=K;J>=Z;J--)R[J].isEmpty()&&R.splice(J,1)}return R}}).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 R=_[C];if(R.marker){this.session.removeMarker(R.marker);var D=k.indexOf(R);D!=-1&&k.splice(D,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"?R=C.forEachSelection(k,_.args):k.multiSelectAction=="forEachLine"?R=C.forEachSelection(k,_.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=k.exec(C,_.args||{})):R=k.multiSelectAction(C,_.args||{});else{var R=k.exec(C,_.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(_,k,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,D=C==!0||C&&C.$byLines,L=this.session,I=this.selection,H=I.rangeList,P=(R?I:H).ranges,O;if(!P.length)return _.exec?_.exec(this,k||{}):_(this,k||{});var $=I._eventRegistry;I._eventRegistry={};var A=new b(L);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(D)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;A.fromOrientedRange(P[N]),A.index=N,this.selection=L.selection=A;var B=_.exec?_.exec(this,k||{}):_(this,k||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[N])}A.detach(),this.selection=L.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=$,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=[],R=0;R<k.length;R++)C.push(this.session.getTextRange(k[R]));var D=this.session.getDocument().getNewLineCharacter();_=C.join(D),_.length==(C.length-1)*D.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 R=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.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 R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var D=this.$search.findAll(this.session);if(!D.length)return 0;var L=this.multiSelect;C||L.toSingleRange(D[0]);for(var I=D.length;I--;)L.addRange(D[I],!0);return R&&L.rangeList.rangeAtPoint(R.start)&&L.addRange(R,!0),D.length},this.selectMoreLines=function(_,k){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(D.row+_,D.column);if(C.isEmpty())var H=L;else var I=this.session.documentToScreenPosition(R?C.end:C.start),H=this.session.screenToDocumentPosition(I.row+_,I.column);if(R){var P=g.fromPoints(L,H);P.cursor=P.start}else{var P=g.fromPoints(H,L);P.cursor=P.end}if(P.desiredColumn=D.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,R=C.ranges,D=R.length;D--;){var L=R[D];if(L.isEmpty()){var I=k.getWordRange(L.start.row,L.start.column);L.start.row=I.start.row,L.start.column=I.start.column,L.end.row=I.end.row,L.end.column=I.end.column}}C.mergeOverlappingRanges();for(var H=[],D=R.length;D--;){var L=R[D];H.unshift(k.getTextRange(L))}_<0?H.unshift(H.pop()):H.push(H.shift());for(var D=R.length;D--;){var L=R[D],P=L.clone();k.replace(L,H[D]),L.start.row=P.start.row,L.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(_,k,C){var R=this.session,D=R.multiSelect,L=D.toOrientedRange();if(!(L.isEmpty()&&(L=R.getWordRange(L.start.row,L.start.column),L.cursor=_==-1?L.start:L.end,this.multiSelect.addRange(L),C))){var I=R.getTextRange(L),H=i(R,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(L.cursor)}},this.alignCursors=function(){var _=this.session,k=_.multiSelect,C=k.ranges,R=-1,D=C.filter(function(K){if(K.cursor.row==R)return!0;R=K.cursor.row});if(!C.length||D.length==C.length-1){var L=this.selection.getRange(),I=L.start.row,H=L.end.row,P=I==H;if(P){var O=this.session.getLength(),$;do $=this.session.getLine(H);while(/[=:]/.test($)&&++H<O);do $=this.session.getLine(I);while(/[=:]/.test($)&&--I>0);I<0&&(I=0),H>=O&&(H=O-1)}var A=this.session.removeFullLines(I,H);A=this.$reAlignText(A,P),this.session.insert({row:I,column:0},A.join(`
|
|
951
|
+
`)+`
|
|
952
|
+
`),P||(L.start.column=0,L.end.column=A[A.length-1].length),this.selection.setRange(L)}else{D.forEach(function(K){k.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,J=_.getLine(Z.row),he=J.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 J=K.cursor,he=N-J.column,ne=U[Z]-B;he>ne?_.insert(J,s.stringRepeat(" ",he-ne)):_.remove(new g(J.row,J.column,J.row,J.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=J.row,K.cursor=K.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(_,k){var C=!0,R=!0,D,L,I;return _.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,L=N[2].length,I=N[3].length,N):(D+L+I!=N[1].length+N[2].length+N[3].length&&(R=!1),D!=N[1].length&&(C=!1),D>N[1].length&&(D=N[1].length),L<N[2].length&&(L=N[2].length),I>N[3].length&&(I=N[3].length),N):[A]}).map(k?P:C?R?O:P:$);function H(A){return s.stringRepeat(" ",A)}function P(A){return A[2]?H(D)+A[2]+H(L-A[2].length+I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?H(D+L-A[2].length)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function $(A){return A[2]?H(D)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[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(D){var L=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);_.$blockSelectEnabled&&L?C||(_.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},_),f.addListener(k,"keyup",R,_),f.addListener(k,"blur",R,_);function R(D){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 s=b.getLine(f);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(b,h,f){return null},this.indentationBlock=function(b,h,f){var s=/\S/,a=b.getLine(h),u=a.search(s);if(u!=-1){for(var c=f||a.length,i=b.getLength(),l=h,m=h;++h<i;){var w=b.getLine(h).search(s);if(w!=-1){if(w<=u){var x=b.getTokenAt(h,0);if(!x||x.type!=="string")break}m=h}}if(m>l){var E=b.getLine(m).length;return new p(l,c,m,E)}}},this.openingBracketBlock=function(b,h,f,s,a){var u={row:f,column:s+1},c=b.$findClosingBracket(h,u,a);if(c){var i=b.foldWidgets[c.row];return i==null&&(i=b.getFoldWidget(c.row)),i=="start"&&c.row>u.row&&(c.row--,c.column=b.getLine(c.row).length),p.fromPoints(u,c)}},this.closingBracketBlock=function(b,h,f,s,a){var u={row:f,column:s},c=b.$findOpeningBracket(h,u);if(c)return c.column++,u.column--,p.fromPoints(c,u)}}).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(s,a,u){for(var c=0,i=s.length-1;c<=i;){var l=c+i>>1,m=u(a,s[l]);if(m>0)c=l+1;else if(m<0)i=l-1;else return l}return-(c+1)}function f(s,a,u){var c=s.getAnnotations().sort(g.comparePoints);if(c.length){var i=h(c,{row:a,column:-1},g.comparePoints);i<0&&(i=-i-1),i>=c.length?i=u>0?0:c.length-1:i===0&&u<0&&(i=c.length-1);var l=c[i];if(!(!l||!u)){if(l.row===a){do l=c[i+=u];while(l&&l.row===a);if(!l)return c.slice()}var m=[];a=l.row;do m[u<0?"unshift":"push"](l),l=c[i+=u];while(l&&l.row==a);return m.length&&m}}}r.showErrorMarker=function(s,a){var u=s.session,c=s.getCursorPosition(),i=c.row,l=u.widgetManager.getWidgetsAtRow(i).filter(function(D){return D.type=="errorMarker"})[0];l?l.destroy():i-=a;var m=f(u,i,a),w;if(m){var x=m[0];c.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,c.row=x.row,w=s.renderer.$gutterLayer.$annotations[c.row]}else{if(l)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(c.row),s.selection.moveToPosition(c);var E={row:c.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=s.renderer.$cursorLayer.getPixelPosition(c).left;k.style.left=C+s.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",_.className="error_widget "+w.className,w.displayText.forEach(function(D,L){_.appendChild(p.createTextNode(D)),L<w.displayText.length-1&&_.appendChild(p.createElement("br"))}),_.appendChild(p.createElement("div"));var R=function(D,L,I){if(L===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(E),s.off("changeSelection",E.destroy),s.off("changeSession",E.destroy),s.off("mouseup",E.destroy),s.off("change",E.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",E.destroy),s.on("changeSession",E.destroy),s.on("mouseup",E.destroy),s.on("change",E.destroy),s.session.widgetManager.addLineWidget(E),E.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},p.importCssString(`
|
|
953
|
+
.error_widget_wrapper {
|
|
954
|
+
background: inherit;
|
|
955
|
+
color: inherit;
|
|
956
|
+
border:none
|
|
957
|
+
}
|
|
958
|
+
.error_widget {
|
|
959
|
+
border-top: solid 2px;
|
|
960
|
+
border-bottom: solid 2px;
|
|
961
|
+
margin: 5px 0;
|
|
962
|
+
padding: 10px 40px;
|
|
963
|
+
white-space: pre-wrap;
|
|
964
|
+
}
|
|
965
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
966
|
+
border-color: #ff5a5a
|
|
967
|
+
}
|
|
968
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
969
|
+
border-color: #F1D817
|
|
970
|
+
}
|
|
971
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
972
|
+
border-color: #5a5a5a
|
|
973
|
+
}
|
|
974
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
975
|
+
border-color: #5aaa5a
|
|
976
|
+
}
|
|
977
|
+
.error_widget_arrow {
|
|
978
|
+
position: absolute;
|
|
979
|
+
border: solid 5px;
|
|
980
|
+
border-top-color: transparent!important;
|
|
981
|
+
border-right-color: transparent!important;
|
|
982
|
+
border-left-color: transparent!important;
|
|
983
|
+
top: -5px;
|
|
984
|
+
}
|
|
985
|
+
`,"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,s=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(u,c){if(typeof u=="string"){var i=u;if(u=document.getElementById(i),!u)throw new Error("ace.edit can't find div #"+i)}if(u&&u.env&&u.env.editor instanceof b)return u.env.editor;var l="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;l=m.value,u=p.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(l=u.textContent,u.innerHTML="");var w=r.createEditSession(l),x=new b(new s(u),w,c),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(u,c){var i=new h(u,c);return i.setUndoManager(new f),i},r.Range=g,r.Editor=b,r.EditSession=h,r.UndoManager=f,r.VirtualRenderer=s;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)})}()}(Tf)),Tf.exports}var _s=pr("b",C1()),Ef={exports:{}},If;function k1(){return If||(If=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/},s=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/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=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})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(D,L,I){I.length&&(I=[]);var H=D[D.length-1];return I.unshift(H,L),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,L,I){I.length&&(I=[]);var H=D[D.length-1];return I.unshift(H,L),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,L,I){I.length&&(I=[]);var H=D[D.length-1];return I.unshift(H,L),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,L,I){I.length&&(I=[]);var H=D[D.length-1];return I.unshift(H,L),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,L,I){I.length&&(I=[]);var H=D[D.length-1];return I.unshift(H,L),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{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:/\?(?=.+:)/},u,c,b,h,i,f,s,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(D,L,I){var H=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",P=D.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(D,L,I){return D===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(D,L,I){return D===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,L,I){return this.next="",D=="}"&&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(D,L,I){return I.length&&D===I[0]?(I.unshift(D,L),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(D,L,I){return I.length&&D===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,L,I){return I.length&&D===I[0]?(I.unshift(D,L),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,L,I){return I.length&&D===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,L,I){return I.length&&D===I[0]?(I.unshift(D,L),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,L,I){return I.length&&D===R[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(D,L,I){return I.length&&D===I[0]?(I.unshift(D,L),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(D,L,I){return I.length&&D===R[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(D,L,I){return I.length&&D===I[0]?(I.unshift(D,L),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,L,I){return I.length&&D[0]===R[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),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new p(h,0,h,a-1),c)},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(s,a,u){var c=s.getLine(u),i=this.foldingStartMarker.test(c),l=this.foldingStopMarker.test(c);if(i&&!l){var m=c.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(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||m[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(s.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||s.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!l||i&&l)return"";var m=c.match(this.foldingStopMarker);if(m[3]==="end"){if(s.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||s.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,u){var c=s.doc.getLine(u),i=this.foldingStartMarker.exec(c);if(i)return i[1]||i[3]?this.rubyBlock(s,u,i.index+2):this.openingBracketBlock(s,"{",u,i.index);var i=this.foldingStopMarker.exec(c);if(i)return i[3]==="end"&&s.getTokenAt(u,i.index+1).type==="keyword"?this.rubyBlock(s,u,i.index+1):i[1]==="=end"&&s.getTokenAt(u,i.index+1).type==="comment.multiline"?this.rubyBlock(s,u,i.index+1):this.closingBracketBlock(s,"}",u,i.index+i[0].length)},this.rubyBlock=function(s,a,u,c){var i=new h(s,a,u),l=i.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var m=l.value,w=s.getLine(a);switch(l.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.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*"+l.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?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(i.getCurrentTokenRange()),i.step=E===-1?i.stepBackward:i.stepForward,l.type=="comment.multiline"){for(;l=i.step();)if(l.type==="comment.multiline"){if(E==1){if(k=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=i.step();){var D=!1;if(l.type==="keyword"){var L=E*this.indentKeywords[l.value];switch(w=s.getLine(i.getCurrentTokenRow()),l.value){case"do":for(var I=i.$tokenIndex-1;I>=0;I--){var H=i.$rowTokens[I];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){L=0;break}}break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");(!x.test(w)||m=="case")&&(L=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);x.test(w)||(L=0,D=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(L=0,D=!0)}if(L>0)_.unshift(l.value);else if(L<=0&&D===!1){if(_.shift(),!_.length&&((m=="while"||m=="until"||m=="for")&&l.value!="do"||l.value=="do"&&E==-1&&L!=0||l.value!="do"))break;L===0&&_.unshift(l.value)}}}if(!l)return null;if(c)return R.push(i.getCurrentTokenRange()),R;var a=i.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new b(a,P,C-1,k)}return new b(C,k,a-1,s.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,s=t("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};p.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[]\s*$/),E=c.match(/^\s*(class|def|module)\s.*$/),_=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||_||k)&&(l+=i)}return l},this.checkOutdent=function(u,c,i){return/^\s+(end|else|rescue|ensure)$/.test(c+i)||this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){var l=c.getLine(i);if(/}/.test(l))return this.$outdent.autoOutdent(c,i);var m=this.$getIndent(l),w=c.getLine(i-1),x=this.$getIndent(w),E=c.getTabString();x.length<=m.length&&m.slice(-E.length)==E&&c.remove(new f(i,m.length-E.length,i,m.length))},this.getMatching=function(u,c,i){if(c==null){var l=u.selection.lead;i=l.column,c=l.row}var m=u.getTokenAt(c,i);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,c,i,!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)})}()}(Ef)),Ef.exports}k1();var Rf={exports:{}},Lf;function A1(){return Lf||(Lf=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__",s="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":s,"variable.language":"self|cls","constant.language":f,keyword:h},"identifier"),u="[uU]?",c="[rR]",i="[fF]",l="(?:[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+)",R="(?:\\d+)",D="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",L="(?:(?:"+D+"|"+R+")"+k+")",I="(?:"+L+"|"+D+")",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:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",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,s){var a=h.getLine(s),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],s,u.index):u[2]?this.indentationBlock(h,s,u.index+u[2].length):this.indentationBlock(h,s)}}).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,s=function(){this.HighlightRules=b,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};p.inherits(s,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(l+=i)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
|
|
986
|
+
`&&i!=="\r"&&i!==`
|
|
987
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var m=l.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(u,c,i){i+=1;var l=this.$getIndent(c.getLine(i)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new f(i,l.length-m.length,i,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(t){n&&(n.exports=t)})}()}(Rf)),Rf.exports}A1();var Of={exports:{}},Nf;function S1(){return Nf||(Nf=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),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new p(h,0,h,a-1),c)},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,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(f,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(f,s,a,u){var c=f.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(f,c,a);var i=c.match(this.foldingStartMarker);if(i){var l=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,l);var m=f.getCommentFoldRange(a,l+i[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var l=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,l):f.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),c=s,i=a.length;s+=1;for(var l=s,m=f.getLength();++s<m;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=c)break;if(x.isMultiLine())s=x.end.row;else if(u==w)break}l=s}}return new g(c,i,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),c=f.getLength(),i=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){s=f.getLine(a);var w=l.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,u,x,s.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,s=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(u,c,i){var l=this.$getIndent(c);if(u=="start"){var m=c.match(/^.*[\{\(\[]\s*$/);m&&(l+=i)}return l},this.checkOutdent=function(u,c,i){return this.$outdent.checkOutdent(c,i)},this.autoOutdent=function(u,c,i){this.$outdent.autoOutdent(c,i)},this.createWorker=function(u){var c=new s(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(u.getDocument()),c.on("annotate",function(i){u.setAnnotations(i.data)}),c.on("terminate",function(){u.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(t){n&&(n.exports=t)})}()}(Of)),Of.exports}S1();var Df={exports:{}},Ff;function _1(){return Ff||(Ff=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",s=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",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=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",l=function(){var m=this.createKeywordMapper({"support.function":h,"support.constant":f,"support.type":b,"support.constant.color":s,"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:u},{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:"("+u+")(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:u},{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:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{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(l,g),r.CssHighlightRules=l}),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 u=s.replace("\\d","\\d\\-"),c={onMatch:function(l,m,w){var x=l.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:l.slice(0,x)},{type:"meta.tag.tag-name.xml",value:l.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,m,w){return m==w[0]&&w.shift(),l.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:l}]},nextState:"jsx"},i,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{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"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(u){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=t("../lib/oop"),h=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=t("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(u){var c={"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"},i=this.createKeywordMapper(c,"identifier"),l="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(c).join("|")+"\\b)"+s+")(\\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:"("+s+")(\\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+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\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:"(?:"+l+")\\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:i,regex:s},{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:s},{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:s},{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"}]},(!u||!u.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:"("+s+")(\\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"}),(!u||u.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,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,c){return c.splice(0),this.token}}],this.embedRules(h,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-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,s=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(u,c){var i=s[c];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".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,s=function(u){return"(?:[^"+b.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,l,m,w){var x=i.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return p[E]||(E=""),m.unshift("githubblock",[],[x[1],x[2],E],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(i,l,m,w){var x=m[1],E=m[2][0],_=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);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 R=p[k].getTokenizer().getLineTokens(i,x.slice(0));return m[1]=R.state,R.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(i){return"markup.heading."+i.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{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:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\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},u,{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:c}),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,s,a){var u=f.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,s,a){function u(D){return E=f.getTokens(D)[0],E&&E.type.lastIndexOf(_,0)===0}function c(){var D=E.value[0];return D=="="?6:D=="-"?5:7-E.value.search(/[^#]|$/)}var i=f.getLine(a),l=i.length,m=f.getLength(),w=a,x=a;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(w,l,a,0)}for(;a-- >0&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(a,i.length,w,0)}var E,_="markup.heading";if(u(a)){for(var k=c();++a<m;)if(u(a)){var C=c();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 R=f.getLine(x).length;return new b(w,l,x,R)}}}}}).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),s=f.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=b.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var c=this.$getIndent(b.getLine(u.row));b.replace(new p(h,0,h,a-1),c)},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(s,a){return s&&s.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(s,a,u,c,i){if(i=='"'||i=="'"){var l=i,m=c.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:l+m+l,selection:!1};var w=u.getCursorPosition(),x=c.doc.getLine(w.row),E=x.substring(w.column,w.column+1),_=new h(c,w.row,w.column),k=_.getCurrentToken();if(E==l&&(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:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,c,i){var l=c.doc.getTextRange(i);if(!i.isMultiLine()&&(l=='"'||l=="'")){var m=c.doc.getLine(i.start.row),w=m.substring(i.start.column+1,i.start.column+2);if(w==l)return i.end.column++,i}}),this.add("autoclosing","insertion",function(s,a,u,c,i){if(i==">"){var l=u.getSelectionRange().start,m=new h(c,l.row,l.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(l.column<x)return;if(l.column==x){var E=m.stepForward();if(E&&p(E,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(c.getLine(l.row).slice(l.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 _==l.row&&(C=C.substring(0,l.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,c,i){if(i==`
|
|
988
|
+
`){var l=u.getCursorPosition(),m=c.getLine(l.row),w=new h(c,l.row,l.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=c.getTokenAt(l.row,l.column+1),m=c.getLine(_),C=this.$getIndent(m),R=C+c.getTabString();return k&&k.value==="</"?{text:`
|
|
989
|
+
`+R+`
|
|
990
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
|
991
|
+
`+R}}}}})};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 s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,u,c,i,l){if(l==">"){var m=c.getSelectionRange().start,w=new g(i,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,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var g=t("../../lib/oop"),b=t("../../range").Range,h=t("./fold_mode").FoldMode,f=r.FoldMode=function(a,u){h.call(this),this.voidElements=a||{},this.optionalEndTags=g.mixin({},this.voidElements),u&&g.mixin(this.optionalEndTags,u)};g.inherits(f,h);var s=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,u,c){var i=this._getFirstTagInLine(a,c);return i?i.closing||!i.tagName&&i.selfClosing?u==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(a,c,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(a,c)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var c=a.getTokens(u),i=new s,l=0;l<c.length;l++){var m=c[l];if(p(m,"tag-open")){if(i.end.column=i.start.column+m.value.length,i.closing=p(m,"end-tag-open"),m=c[++l],!m)return null;if(i.tagName=m.value,m.value===""){if(m=c[++l],!m)return null;i.tagName=m.value}for(i.end.column+=m.value.length,l++;l<c.length;l++)if(m=c[l],i.end.column+=m.value.length,p(m,"tag-close")){i.selfClosing=m.value=="/>";break}return i}if(p(m,"tag-close"))return i.selfClosing=m.value=="/>",i;i.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,u,c,i){for(var l=a.getTokens(u),m=0,w=0;w<l.length;w++){var x=l[w];if(m+=x.value.length,!(m<i-1)&&p(x,"end-tag-open")&&(x=l[w+1],p(x,"tag-name")&&x.value===""&&(x=l[w+2]),x&&x.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,u,c){var i=this._getFirstTagInLine(a,c);if(!i)return this.getCommentFoldWidget(a,c)&&a.getCommentFoldRange(c,a.getLine(c).length);var l=a.getMatchingTags({row:c,column:0});if(l)return new b(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.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,s,a){var u=f.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(f,s,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(f,s,a,u){var c=f.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(f,c,a);var i=c.match(this.foldingStartMarker);if(i){var l=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,l);var m=f.getCommentFoldRange(a,l+i[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=c.match(this.foldingStopMarker);if(i){var l=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,l):f.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),u=a.search(/\S/),c=s,i=a.length;s+=1;for(var l=s,m=f.getLength();++s<m;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=c)break;if(x.isMultiLine())s=x.end.row;else if(u==w)break}l=s}}return new g(c,i,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,s,a){for(var u=s.search(/\s*$/),c=f.getLength(),i=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){s=f.getLine(a);var w=l.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,u,x,s.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,s,a){var u=this.getFoldWidgetBase(f,s,a);return u||this.xmlFoldMode.getFoldWidget(f,s,a)},this.getFoldWidgetRange=function(f,s,a,u){var c=this.getFoldWidgetRangeBase(f,s,a,u);return c||this.xmlFoldMode.getFoldWidgetRange(f,s,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,s=t("./behaviour/javascript").JavaScriptBehaviour,a=t("./folding/javascript").FoldMode,u=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};p.inherits(u,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,i,l){var m=this.$getIndent(i),w=this.getTokenizer().getLineTokens(i,c),x=w.tokens,E=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(c=="start"||c=="no_regex"){var _=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);_&&(m+=l)}else if(c=="doc-start"&&(E=="start"||E=="no_regex"))return"";return m},this.checkOutdent=function(c,i,l){return this.$outdent.checkOutdent(i,l)},this.autoOutdent=function(c,i,l){this.$outdent.autoOutdent(i,l)},this.createWorker=function(c){var i=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(c.getDocument()),i.on("annotate",function(l){c.setAnnotations(l.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),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(s){return"-"+s.toLowerCase()});p.hasOwnProperty(f)||(p[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,h,f,s){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(f.row).substr(0,f.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,h,f,s):this.getPropertyCompletions(b,h,f,s,u)}return[]},this.getPropertyCompletions=function(b,h,f,s,a){a=a||!1;var u=Object.keys(p);return u.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,h,f,s){var a=h.getLine(f.row).substr(0,f.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var c=[];return u in p&&typeof p[u]=="object"&&(c=Object.keys(p[u])),c.map(function(i){return{caption:i,snippet:i,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,s,a,u,c){if(c===":"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=new b(u,i.row,i.column),m=l.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=l.stepBackward()),m&&m.type==="support.type"){var w=u.doc.getLine(i.row),x=w.substring(i.column,i.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(i.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,s,a,u,c){var i=u.doc.getTextRange(c);if(!c.isMultiLine()&&i===":"){var l=a.getCursorPosition(),m=new b(u,l.row,l.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(c.start.row),E=x.substring(c.end.column,c.end.column+1);if(E===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(f,s,a,u,c){if(c===";"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=u.doc.getLine(i.row),m=l.substring(i.column,i.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,s,a,u,c){if(c==="!"&&a.selection.isEmpty()){var i=a.getCursorPosition(),l=u.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(l.substring(i.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,s=t("./css_completions").CssCompletions,a=t("./behaviour/css").CssBehaviour,u=t("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};p.inherits(c,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,l,m){var w=this.$getIndent(l),x=this.getTokenizer().getLineTokens(l,i).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var E=l.match(/^.*\{\s*$/);return E&&(w+=m),w},this.checkOutdent=function(i,l,m){return this.$outdent.checkOutdent(l,m)},this.autoOutdent=function(i,l,m){this.$outdent.autoOutdent(l,m)},this.getCompletions=function(i,l,m,w){return this.$completer.getCompletions(i,l,m,w)},this.createWorker=function(i){var l=new f(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(i.getDocument()),l.on("annotate",function(m){i.setAnnotations(m.data)}),l.on("terminate",function(){i.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),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,s,a){var u=this.$getMode(h);return u?u.getFoldWidget(f,s,a):""},this.getFoldWidget=function(h,f,s){return this.$tryMode(h.getState(s-1),h,f,s)||this.$tryMode(h.getState(s),h,f,s)||this.defaultMode.getFoldWidget(h,f,s)},this.getFoldWidgetRange=function(h,f,s){var a=this.$getMode(h.getState(s-1));return(!a||!a.getFoldWidget(h,f,s))&&(a=this.$getMode(h.getState(s))),(!a||!a.getFoldWidget(h,f,s))&&(a=this.defaultMode),a.getFoldWidgetRange(h,f,s)}}).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(s,a){g.call(this,new b(s,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(l,m){return l.type.lastIndexOf(m+".xml")>-1}function g(l,m){for(var w=new h(l,m.row,m.column),x=w.getCurrentToken();x&&!p(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(l,m){for(var w=new h(l,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"],s=["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(s),u={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:{}},c=Object.keys(u),i=function(){};(function(){this.getCompletions=function(l,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(l,m,w,x);if(p(E,"tag-whitespace")||p(E,"attribute-name"))return this.getAttributeCompletions(l,m,w,x);if(p(E,"attribute-value"))return this.getAttributeValueCompletions(l,m,w,x);var _=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(_)?this.getHTMLEntityCompletions(l,m,w,x):[]},this.getTagCompletions=function(l,m,w,x){return c.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,m,w,x){var E=g(m,w);if(!E)return[];var _=a;return E in u&&(_=_.concat(Object.keys(u[E]))),_.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,m,w,x){var E=g(m,w),_=b(m,w);if(!E)return[];var k=[];return E in u&&_ in u[E]&&typeof u[E][_]=="object"&&(k=Object.keys(u[E][_])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,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(i.prototype),r.HtmlCompletions=i}),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,s=t("./html_highlight_rules").HtmlHighlightRules,a=t("./behaviour/xml").XmlBehaviour,u=t("./folding/html").FoldMode,c=t("./html_completions").HtmlCompletions,i=t("../worker/worker_client").WorkerClient,l=["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=s,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":h,"css-":f}),this.foldingRules=new u(this.voidElements,g.arrayToMap(m))};p.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(l),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 i(["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 s=this.createKeywordMapper({keyword:b,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",c="(?:\\d+)",i="(?:(?:"+c+"?"+u+")|(?:"+c+"\\.))",l="(?:(?:"+i+"|"+c+"))",m="(?:"+l+"|"+i+")",w="(?:&"+c+")",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,R,D){var L=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return D.push(L,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,R,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[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:s,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,s=function(){this.HighlightRules=b,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};p.inherits(s,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,i){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(u=="start"){var x=c.match(/^.*[\{\(\[:]\s*$/);x&&(l+=i)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,i){if(i!==`\r
|
|
992
|
+
`&&i!=="\r"&&i!==`
|
|
993
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var m=l.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(u,c,i){i+=1;var l=this.$getIndent(c.getLine(i)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new h(i,l.length-m.length,i,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),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,s=t("./folding/xml").FoldMode,a=t("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new f,this.foldingRules=new s};p.inherits(u,b),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var i=new a(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(c.getDocument()),i.on("error",function(l){c.setAnnotations(l.data)}),i.on("terminate",function(){c.clearAnnotations()}),i},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),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,s=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(s,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,c){if(a=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!i)return"";var l=i[2];return l||(l=parseInt(i[3],10)+1+"."),i[1]+l+i[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(t){n&&(n.exports=t)})}()}(Df)),Df.exports}_1();var Pf={exports:{}},Wf;function $1(){return Wf||(Wf=1,function(n,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,d){d.exports=`.ace-twilight .ace_gutter {
|
|
994
|
+
background: #232323;
|
|
995
|
+
color: #E2E2E2
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.ace-twilight .ace_print-margin {
|
|
999
|
+
width: 1px;
|
|
1000
|
+
background: #232323
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.ace-twilight {
|
|
1004
|
+
background-color: #141414;
|
|
1005
|
+
color: #F8F8F8
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.ace-twilight .ace_cursor {
|
|
1009
|
+
color: #A7A7A7
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
|
1013
|
+
background: rgba(221, 240, 255, 0.20)
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
|
1017
|
+
box-shadow: 0 0 3px 0px #141414;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
|
1021
|
+
background: rgb(102, 82, 0)
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
|
1025
|
+
margin: -1px 0 0 -1px;
|
|
1026
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
|
1030
|
+
background: rgba(255, 255, 255, 0.031)
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.ace-twilight .ace_gutter-active-line {
|
|
1034
|
+
background-color: rgba(255, 255, 255, 0.031)
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
|
1038
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.ace-twilight .ace_invisible {
|
|
1042
|
+
color: rgba(255, 255, 255, 0.25)
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.ace-twilight .ace_keyword,
|
|
1046
|
+
.ace-twilight .ace_meta {
|
|
1047
|
+
color: #CDA869
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.ace-twilight .ace_constant,
|
|
1051
|
+
.ace-twilight .ace_constant.ace_character,
|
|
1052
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
|
1053
|
+
.ace-twilight .ace_constant.ace_other,
|
|
1054
|
+
.ace-twilight .ace_heading,
|
|
1055
|
+
.ace-twilight .ace_markup.ace_heading,
|
|
1056
|
+
.ace-twilight .ace_support.ace_constant {
|
|
1057
|
+
color: #CF6A4C
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
|
1061
|
+
color: #F8F8F8;
|
|
1062
|
+
background-color: rgba(86, 45, 86, 0.75)
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
|
1066
|
+
text-decoration: underline;
|
|
1067
|
+
font-style: italic;
|
|
1068
|
+
color: #D2A8A1
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.ace-twilight .ace_support {
|
|
1072
|
+
color: #9B859D
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.ace-twilight .ace_fold {
|
|
1076
|
+
background-color: #AC885B;
|
|
1077
|
+
border-color: #F8F8F8
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.ace-twilight .ace_support.ace_function {
|
|
1081
|
+
color: #DAD085
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.ace-twilight .ace_list,
|
|
1085
|
+
.ace-twilight .ace_markup.ace_list,
|
|
1086
|
+
.ace-twilight .ace_storage {
|
|
1087
|
+
color: #F9EE98
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
|
1091
|
+
.ace-twilight .ace_meta.ace_tag {
|
|
1092
|
+
color: #AC885B
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.ace-twilight .ace_string {
|
|
1096
|
+
color: #8F9D6A
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.ace-twilight .ace_string.ace_regexp {
|
|
1100
|
+
color: #E9C062
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.ace-twilight .ace_comment {
|
|
1104
|
+
font-style: italic;
|
|
1105
|
+
color: #5F5A60
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.ace-twilight .ace_variable {
|
|
1109
|
+
color: #7587A6
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.ace-twilight .ace_xml-pe {
|
|
1113
|
+
color: #494949
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.ace-twilight .ace_indent-guide {
|
|
1117
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.ace-twilight .ace_indent-guide-active {
|
|
1121
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1122
|
+
}
|
|
1123
|
+
`}),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)})}()}(Pf)),Pf.exports}$1();var Bf={exports:{}},Hf;function T1(){return Hf||(Hf=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 R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var g=t("./lib/dom"),b=t("./lib/oop"),h=t("./lib/event_emitter").EventEmitter,f=t("./lib/lang"),s=t("./range").Range,a=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,c=t("./tokenizer").Tokenizer,i=t("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,D){var L=C.session.getTextRange();return D?L.replace(/\n\r?([ \t]*\S)/g,`
|
|
1124
|
+
`+D+"$1"):L},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 i.getText&&i.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 R=C.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(C){var R=C.session.$mode||{};return R.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"})};l.SELECTED_TEXT=l.SELECTION;var m=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function D(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var L={regex:"/("+D("/")+"+)/",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 c({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:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,H,P){var O=R(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(I,H,P){var O=I.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return P[0].choices=O,[O[0]]},next:"start"},L,{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=`
|
|
1125
|
+
`: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"},L,{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(R,D){return this.getTokenizer().getLineTokens(R,D).tokens.map(function(L){return L.value||L})},C.prototype.getVariableValue=function(R,D,L){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var I=this.variables[D];return typeof I=="function"&&(I=this.variables[D](R,D,L)),I??""},C.prototype.tmStrFormat=function(R,D,L){if(!D.fmt)return R;var I=D.flag||"",H=D.guard;H=new RegExp(H,I.replace(/[^gim]/g,""));var P=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,$=R.replace(H,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,L),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.__=A,N.join("")});return $},C.prototype.tmFormatFunction=function(R,D,L){return D.formatFunction=="upcase"?R.toUpperCase():D.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,D){function L(B){var U=R.indexOf(B,O+1);U!=-1&&(O=U)}for(var I=[],H="",P=!0,O=0;O<R.length;O++){var $=R[O];if(typeof $=="string"){I.push($),$==`
|
|
1126
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec($)[0],P=/\S/.test($));continue}if($){if(P=!1,$.fmtString){var A=R.indexOf($,O+1);A==-1&&(A=R.length),$.fmt=R.slice(O+1,A),O=A}if($.text){var N=this.getVariableValue(D,$.text,H)+"";$.fmtString&&(N=this.tmStrFormat(N,$,D)),$.formatFunction&&(N=this.tmFormatFunction(N,$,D)),N&&!$.ifEnd?(I.push(N),L($)):!N&&$.ifEnd&&L($.ifEnd)}else $.elseEnd?L($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&I.push($)}}return I},C.prototype.getDisplayTextForSnippet=function(R,D){var L=w.call(this,R,D);return L.text},C.prototype.insertSnippetForSelection=function(R,D,L){L===void 0&&(L={});var I=w.call(this,R,D,L),H=R.getSelectionRange(),P=R.session.replace(H,I.text),O=new x(R),$=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(I.tabstops,H.start,P,$)},C.prototype.insertSnippet=function(R,D,L){L===void 0&&(L={});var I=this;if(R.inVirtualSelectionMode)return I.insertSnippetForSelection(R,D,L);R.forEachSelection(function(){I.insertSnippetForSelection(R,D,L)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var D=R.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!R.session.$mode.inlinePhp&&(D="html");var L=R.getCursorPosition(),I=R.session.getState(L.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?D="javascript":I.substring(0,4)=="css-"?D="css":I.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(R){var D=this.$getScope(R),L=[D],I=this.snippetMap;return I[D]&&I[D].includeScopes&&L.push.apply(L,I[D].includeScopes),L.push("_"),L},C.prototype.expandWithTab=function(R,D){var L=this,I=R.forEachSelection(function(){return L.expandSnippetForSelection(R,D)},null,{keepOrder:!0});return I&&R.tabstopManager&&R.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(R,D){var L=R.getCursorPosition(),I=R.session.getLine(L.row),H=I.substring(0,L.column),P=I.substr(L.column),O=this.snippetMap,$;return this.getActiveScopes(R).some(function(A){var N=O[A];return N&&($=this.findMatchingSnippet(N,H,P)),!!$},this),$?(D&&D.dryRun||(R.session.doc.removeInLine(L.row,L.column-$.replaceBefore.length,L.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(R,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,D,L){for(var I=R.length;I--;){var H=R[I];if(!(H.startRe&&!H.startRe.test(D))&&!(H.endRe&&!H.endRe.test(L))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(D):[""],H.matchAfter=H.endRe?H.endRe.exec(L):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(D)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(L)[0]:"",H}},C.prototype.register=function(R,D){function L(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function I(A,N,B){return A=L(A),N=L(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function H(A){A.scope||(A.scope=D||"_"),D=A.scope,P[D]||(P[D]=[],O[D]={});var N=O[D];if(A.name){var B=N[A.name];B&&$.unregister(B),N[A.name]=A}P[D].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
|
1127
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=f.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=I(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=I(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,$=this;R||(R=[]),Array.isArray(R)?R.forEach(H):Object.keys(R).forEach(function(A){H(R[A])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(R,D){function L(P){var O=H[P.scope||D];if(O&&O[P.name]){delete O[P.name];var $=I[P.scope||D],A=$&&$.indexOf(P);A>=0&&$.splice(A,1)}}var I=this.snippetMap,H=this.snippetNameMap;R.content?L(R):Array.isArray(R)&&R.forEach(L)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var D=[],L={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=I.exec(R);){if(H[1])try{L=JSON.parse(H[1]),D.push(L)}catch{}if(H[4])L.content=H[4].replace(/^\t/gm,""),D.push(L),L={};else{var P=H[2],O=H[3];if(P=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;L.guard=$.exec(O)[1],L.trigger=$.exec(O)[1],L.endTrigger=$.exec(O)[1],L.endGuard=$.exec(O)[1]}else P=="snippet"?(L.tabTrigger=O.match(/^\S*/)[0],L.name||(L.name=O)):P&&(L[P]=O)}}return D},C.prototype.getSnippetByName=function(R,D){var L=this.snippetNameMap,I;return this.getActiveScopes(D).some(function(H){var P=L[H];return P&&(I=P[R]),!!I},this),I},C}();b.implement(m.prototype,h);var w=function(C,R,D){function L(de){for(var me=[],_e=0;_e<de.length;_e++){var Te=de[_e];if(typeof Te=="object"){if(N[Te.tabstopId])continue;var Me=de.lastIndexOf(Te,_e-1);Te=me[Me]||{tabstopId:Te.tabstopId}}me[_e]=Te}return me}D===void 0&&(D={});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)),R=R.replace(/\r/g,"");var $=this.tokenizeTmSnippet(R);$=this.resolveVariables($,C),$=$.map(function(de){return de==`
|
|
1128
|
+
`&&!D.excludeExtraIndent?de+O:typeof de=="string"?de.replace(/\t/g,P):de});var A=[];$.forEach(function(de,me){if(typeof de=="object"){var _e=de.tabstopId,Te=A[_e];if(Te||(Te=A[_e]=[],Te.index=_e,Te.value="",Te.parents={}),Te.indexOf(de)===-1){de.choices&&!Te.choices&&(Te.choices=de.choices),Te.push(de);var Me=$.indexOf(de,me+1);if(Me!==-1){var Je=$.slice(me+1,Me),Xe=Je.some(function(ht){return typeof ht=="object"});Xe&&!Te.value?Te.value=Je:Je.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Je.join(""))}}}}),A.forEach(function(de){de.length=0});for(var N={},B=0;B<$.length;B++){var U=$[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],J=$.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(de){Z.parents[de]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=L(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),$.splice.apply($,[B+1,Math.max(0,J-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,le=0,se="";return $.forEach(function(de){if(typeof de=="string"){var me=de.split(`
|
|
1129
|
+
`);me.length>1?(le=me[me.length-1].length,ne+=me.length-1):le+=de.length,se+=de}else de&&(de.start?de.end={row:ne,column:le}:de.start={row:ne,column:le})}),{text:se,tabstops:A,tokens:$}},x=function(){function C(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.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(R)}return C.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.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(R){for(var D=R.action[0]=="r",L=this.selectedTabstop||{},I=L.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],$=O==L||I[O.index];if(O.rangeList.$bias=$?0:1,R.action=="remove"&&O!==L){var A=O.parents&&O.parents[L.index],N=O.rangeList.pointIndex(R.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(R.end,A);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(R)}var Z=this.session;!this.$inChange&&D&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var D=this.session,L=D.getTextRange(R.firstNonLinked),I=0;I<R.length;I++){var H=R[I];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(L,P,this.editor);D.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,D=this.editor.selection.anchor,L=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var H=this.ranges[I].contains(R.row,R.column),P=L||this.ranges[I].contains(D.row,D.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var D=this.tabstops.length,L=this.index+(R||1);L=Math.min(Math.max(L,1),D),L==D&&(L=0),this.selectTabstop(L),this.updateTabstopMarkers(),L===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=R,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var L=D.firstNonLinked||D;if(D.choices&&(L.cursor=L.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(L);else{var I=this.editor.multiSelect;I.toSingleRange(L);for(var H=0;H<D.length;H++)D.hasLinkedRanges&&D[H].linked||I.addRange(D[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(R,D,L){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var H=s.fromPoints(L,L);_(H.start,D),_(H.end,D),R[0]=[H],R[0].index=0}var P=this.index,O=[P+1,0],$=this.ranges,A=this.snippetId=(this.snippetId||0)+1;R.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var K=0;K<N.length;K++){var Z=N[K],J=s.fromPoints(Z.start,Z.end||Z.start);E(J.start,D),E(J.end,D),J.original=Z,J.tabstop=U,$.push(J),U!=N?U.unshift(J):U[K]=J,Z.fmtString||U.firstNonLinked&&I?(J.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=J)}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(R){var D=this.session;R.forEach(function(L){L.markerId||(L.markerId=D.addMarker(L,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var D=this.session;R.forEach(function(L){D.removeMarker(L.markerId),L.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(D){D.snippetId===R?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(R){var D=R.tabstop.indexOf(R);D!=-1&&R.tabstop.splice(D,1),D=this.ranges.indexOf(R),D!=-1&&this.ranges.splice(D,1),D=R.tabstop.rangeList.ranges.indexOf(R),D!=-1&&R.tabstop.splice(D,1),this.session.removeMarker(R.markerId),R.tabstop.length||(D=this.tabstops.indexOf(R.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C}();x.prototype.keyboardHandler=new u,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,R){C.row==0&&(C.column+=R.column),C.row+=R.row},_=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};g.importCssString(`
|
|
1130
|
+
.ace_snippet-marker {
|
|
1131
|
+
-moz-box-sizing: border-box;
|
|
1132
|
+
box-sizing: border-box;
|
|
1133
|
+
background: rgba(194, 193, 208, 0.09);
|
|
1134
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1135
|
+
position: absolute;
|
|
1136
|
+
}`,"snippets.css",!1),r.snippetManager=new m;var k=t("./editor").Editor;(function(){this.insertSnippet=function(C,R){return r.snippetManager.insertSnippet(this,C,R)},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"),s=t("../lib/dom"),a=t("../config").nls,u=t("./../lib/useragent"),c=function(E){return"suggest-aria-id:".concat(E)},i=u.isSafari?"menu":"listbox",l=u.isSafari?"menuitem":"option",m=u.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=s.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",i),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 R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,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($){var A=$.getDocumentPosition();C.selection.moveToPosition(A),I.start.row=I.end.row=A.row,$.stop()});var D,L=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($){$?L.id&&(C.session.removeMarker(L.id),L.id=null):L.id=C.session.addMarker(L,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function($){if(!D){D=$;return}if(!(D.x==$.x&&D.y==$.y)){D=$,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=D.getDocumentPosition().row;L.start.row!=A&&(L.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(D&&L.start.row!=-1){D.$pos=null;var $=D.getDocumentPosition().row;L.id||C.setRow($),P($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,A=$.config.firstRow,N=$.config.lastRow;A<=N;A++){var B=$.element.childNodes[A-$.config.firstRow];B.setAttribute("role",l),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",A+1);var U=C.getData(A);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(J){J.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[$-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=c($);s.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(m,"true")}});var H=function(){P(-1)},P=function($,A){$!==L.start.row&&(L.start.row=L.end.row=$,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return L.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($){var A=C.data[$];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function($){function A(de,me){de&&B.push({type:(N.className||"")+(me||""),value:de})}var N=C.data[$],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(),J=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var le=Z.slice(he,ne);he=ne;var se=K.indexOf(le,J);if(se==-1)continue;A(U.slice(J,se),""),J=se+le.length,A(U.slice(se,J),"completion-highlight")}return A(U.slice(J,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=R,O.start=R,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=A||"",C.setValue(f.stringRepeat(`
|
|
1137
|
+
`,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return I.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),I.start.row!=$&&(C.selection.clearSelection(),I.start.row=I.end.row=$||0,C.session._emit("changeBackMarker"),C.moveCursorTo($||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===$.top&&C.anchorPos.left===$.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,J=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,le={top:0,bottom:0},se=Z-$.top-3*this.$borderSize-A,de=$.top-3*this.$borderSize;N||(de<=se||se>=ne?N="bottom":N="top"),N==="top"?(le.bottom=$.top-this.$borderSize,le.top=le.bottom-ne):N==="bottom"&&(le.top=$.top+A+this.$borderSize,le.bottom=le.top+ne);var me=le.top>=0&&le.bottom<=Z;if(!B&&!me)return!1;me?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=de:he.$maxPixelHeight=se,N==="top"?(U.style.top="",U.style.bottom=Z+K-le.bottom+"px",C.isTopdown=!1):(U.style.top=le.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var _e=$.left;return _e+U.offsetWidth>J&&(_e=J-U.offsetWidth),U.style.left=_e+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=$,C.anchor=N,s.$fixPositionBug(U),!0},C.show=function($,A,N){this.tryShow($,A,N?"bottom":void 0,!0)},C.goTo=function($){var A=this.getRow(),N=this.session.getLength()-1;switch($){case"up":A=A<=0?N:A-1;break;case"down":A=A>=N?-1:A+1;break;case"start":A=0;break;case"end":A=N}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E}();s.importCssString(`
|
|
1138
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1139
|
+
background-color: #CAD6FA;
|
|
1140
|
+
z-index: 1;
|
|
1141
|
+
}
|
|
1142
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1143
|
+
background-color: #3a674e;
|
|
1144
|
+
}
|
|
1145
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1146
|
+
border: 1px solid #abbffe;
|
|
1147
|
+
margin-top: -1px;
|
|
1148
|
+
background: rgba(233,233,253,0.4);
|
|
1149
|
+
position: absolute;
|
|
1150
|
+
z-index: 2;
|
|
1151
|
+
}
|
|
1152
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1153
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
1154
|
+
background: rgba(58, 103, 78, 0.62);
|
|
1155
|
+
}
|
|
1156
|
+
.ace_completion-meta {
|
|
1157
|
+
opacity: 0.5;
|
|
1158
|
+
margin-left: 0.9em;
|
|
1159
|
+
}
|
|
1160
|
+
.ace_completion-message {
|
|
1161
|
+
margin-left: 0.9em;
|
|
1162
|
+
color: blue;
|
|
1163
|
+
}
|
|
1164
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1165
|
+
color: #2d69c7;
|
|
1166
|
+
}
|
|
1167
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1168
|
+
color: #93ca12;
|
|
1169
|
+
}
|
|
1170
|
+
.ace_editor.ace_autocomplete {
|
|
1171
|
+
width: 300px;
|
|
1172
|
+
z-index: 200000;
|
|
1173
|
+
border: 1px lightgray solid;
|
|
1174
|
+
position: fixed;
|
|
1175
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
1176
|
+
line-height: 1.4;
|
|
1177
|
+
background: #fefefe;
|
|
1178
|
+
color: #111;
|
|
1179
|
+
}
|
|
1180
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
|
1181
|
+
border: 1px #484747 solid;
|
|
1182
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
1183
|
+
line-height: 1.4;
|
|
1184
|
+
background: #25282c;
|
|
1185
|
+
color: #c1c1c1;
|
|
1186
|
+
}
|
|
1187
|
+
.ace_autocomplete .ace_text-layer {
|
|
1188
|
+
width: calc(100% - 8px);
|
|
1189
|
+
}
|
|
1190
|
+
.ace_autocomplete .ace_line {
|
|
1191
|
+
display: flex;
|
|
1192
|
+
align-items: center;
|
|
1193
|
+
}
|
|
1194
|
+
.ace_autocomplete .ace_line > * {
|
|
1195
|
+
min-width: 0;
|
|
1196
|
+
flex: 0 0 auto;
|
|
1197
|
+
}
|
|
1198
|
+
.ace_autocomplete .ace_line .ace_ {
|
|
1199
|
+
flex: 0 1 auto;
|
|
1200
|
+
overflow: hidden;
|
|
1201
|
+
text-overflow: ellipsis;
|
|
1202
|
+
}
|
|
1203
|
+
.ace_autocomplete .ace_completion-spacer {
|
|
1204
|
+
flex: 1;
|
|
1205
|
+
}
|
|
1206
|
+
.ace_autocomplete.ace_loading:after {
|
|
1207
|
+
content: "";
|
|
1208
|
+
position: absolute;
|
|
1209
|
+
top: 0px;
|
|
1210
|
+
height: 2px;
|
|
1211
|
+
width: 8%;
|
|
1212
|
+
background: blue;
|
|
1213
|
+
z-index: 100;
|
|
1214
|
+
animation: ace_progress 3s infinite linear;
|
|
1215
|
+
animation-delay: 300ms;
|
|
1216
|
+
transform: translateX(-100%) scaleX(1);
|
|
1217
|
+
}
|
|
1218
|
+
@keyframes ace_progress {
|
|
1219
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
|
1220
|
+
50% { transform: translateX(625%) scaleX(2) }
|
|
1221
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
|
1222
|
+
}
|
|
1223
|
+
@media (prefers-reduced-motion) {
|
|
1224
|
+
.ace_autocomplete.ace_loading:after {
|
|
1225
|
+
transform: translateX(625%) scaleX(2);
|
|
1226
|
+
animation: none;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=c}),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(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[f-s.config.firstRow];if(a){for(var u="doc-tooltip ",c=0;c<this._lines.length;c++)u+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",u)}}).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 s=document.createTextNode(this._lines[h]);f.appendChild(s),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,s,a){if(a=a||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(f));var u=s.snippet?p.getDisplayTextForSnippet(f,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?f.removeGhostText():f.setGhostText(u),!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,s=g.length;s===0&&h();for(var a=0;a<s;a++)b(g[a],function(u,c){f++,f===s&&h(u,c)})};var p=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,b,h){h=h||p;for(var f=[],s=b-1;s>=0&&h.test(g[s]);s--)f.push(g[s]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,b,h){h=h||p;for(var f=[],s=b;s<g.length&&h.test(g[s]);s++)f.push(g[s]);return f},r.getCompletionPrefix=function(g){var b=g.getCursorPosition(),h=g.session.getLine(b.row),f;return g.completers.forEach((function(s){s.identifierRegexps&&s.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"),s=t("./lib/lang"),a=t("./lib/dom"),u=t("./snippets").snippetManager,c=t("./config"),i=t("./lib/event"),l=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=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.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:c.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)),i.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,R=this.base.column,D=this.editor.getCursorPosition().column,L=this.editor.session.getLine(C).slice(R,D);this.inlineRenderer.show(this.editor,k,L)?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 R=this.popup.getData(C);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},_.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,R=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var L=k.container.getBoundingClientRect();D.top+=L.top-C.layerConfig.offset,D.left+=L.left-k.renderer.scrollLeft,D.left+=C.gutterWidth;var I={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var H=k.container.getBoundingClientRect().bottom-R,P=H<I.top?{top:H,left:I.left}:I;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(D,R,"top")||this.popup.show(D,R)},_.prototype.openPopup=function(k,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),L=this.popup.data[D];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(L)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===D&&L!==this.completions.filtered[I]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(I===D&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(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,R=this.editor.textInput.getElement(),D=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),L=this.popup&&this.popup.container;C!=R&&C.parentNode!=L&&!D&&C!=this.tooltipNode&&k.relatedTarget!=R&&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 R=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,C);return this.completions==R&&this.detach(),D},_.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 D=this.editor.getCursorPosition(),L=this.editor.session.getTextRange({start:this.base,end:D});if(L==this.completions.filterText)return;if(this.completions.setFilter(L),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==L&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,L,k);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),D=this.editor.getCursorPosition(),L=f.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(D.row,D.column-L.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:L,pos:D}).provideCompletions(this.editor,I,(function(H,P,O){var $=P.filtered,A=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!$.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,A,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==A&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!O&&this.showLoadingState?new E(_.completionsForLoading.concat($),P.filterText):P,this.openPopup(this.editor,A,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,R=C&&(C[k.getHoveredRow()]||C[k.getRow()]),D=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var L=this.editor.completers.length,I=0;I<L;I++){var H=this.editor.completers[I];if(H.getDocTooltip&&R.completerId===H.id){D=H.getDocTooltip(R);break}}if(!D&&typeof R!="string"&&(D=R),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},_.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",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,L=D.container.getBoundingClientRect(),I=400,H=300,P=D.renderer.scrollBar.width||10,O=L.left,$=window.innerWidth-L.right-P,A=D.isTopdown?L.top:window.innerHeight-P-L.bottom,N=[Math.min($/I,1),Math.min(O/I,1),Math.min(A/H*.9)],B=Math.max.apply(Math,N),U=R.style;U.display="block",B==N[0]?(U.left=L.right+1+"px",U.right="",U.maxWidth=I*B+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,H)+"px"):B==N[1]?(U.right=window.innerWidth-L.left+"px",U.left="",U.maxWidth=I*B+"px",U.top=L.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.top,H)+"px"):B==N[2]&&(U.left=window.innerWidth-L.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",D.isTopdown?(U.top=L.bottom+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-L.bottom,H)+"px"):(U.top=D.container.offsetTop-R.offsetHeight+"px",U.left=L.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(D.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),c.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,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],R)},_.prototype.insertMatch=function(k,C,R){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 D=this.completions.filterText.length,L=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,L+=C.range.end.column-this.initialPosition.pos.column),D||L){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var H=0,P;P=I[H];H++)P.start.column-=D,P.end.column+=L,k.session.remove(P)}C.snippet?u.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 R=C.value||C;k.execCommand("insertstring",R)},_.prototype.gatherCompletions=function(k,C){var R=k.getSession(),D=k.getCursorPosition(),L=f.getCompletionPrefix(k),I=[];this.completers=k.completers;var H=k.completers.length;return k.completers.forEach(function(P,O){P.getCompletions(k,R,D,L,function($,A){P.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!$&&A&&(I=I.concat(A)),C(null,{prefix:f.getCompletionPrefix(k),matches:I,finished:--H===0})})}),!0},_.prototype.provideCompletions=function(k,C,R){var D=(function(P){var O=P.prefix,$=P.matches;this.completions=new E($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),L=!0,I=null;if(this.gatherCompletions(k,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var $=O.prefix;if($.indexOf(O.prefix)===0){if(L){I=O;return}D(O)}}}).bind(this)),L=!1,I){var H=I;I=null,D(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(D,L){return L.exactMatch-D.exactMatch||L.$score-D.$score||(D.caption||D.value).localeCompare(L.caption||L.value)});var R=null;C=C.filter(function(D){var L=D.snippet||D.caption||D.value;return L===R?!1:(R=L,!0)}),this.filtered=C},_.prototype.filterCompletions=function(k,C){var R=[],D=C.toUpperCase(),L=C.toLowerCase();e:for(var I=0,H;H=k[I];I++){if(H.skipFilter){H.$score=H.score,R.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,$=0,A=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(L);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(L[K],O+1),J=P.indexOf(D[K],O+1);if(N=Z>=0&&(J<0||Z<J)?Z:J,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,$|=1<<K),O=N}}H.matchMask=$,H.exactMatch=A?0:1,H.$score=(H.score||0)-A,R.push(H)}}return R},_}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(t,r,d){var p=function(){function g(b,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=b,b.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(b){return this.markers.find(function(h){return h.range.contains(b.row,b.column)})},g.prototype.markersComparator=function(b,h){return b.range.start.row-h.range.start.row},g.prototype.setMarkers=function(b){this.markers=b.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(b,h,f,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,u=s.lastRow,c,i=0,l=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===l?i++:(l=w.range.start.row,i=0),!(i>200))){var x=w.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var E=x.toScreenRange(f);if(E.isEmpty()){c=f.getNextFoldLine(x.end.row,c),c&&c.end.row>x.end.row&&(a=c.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(b,E,w.className,s):E.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(b,E,w.className,s):h.drawTextMarker(b,E,w.className,s):h.drawSingleLineMarker(b,E,w.className+" ace_br15",s)}}}},g}();p.prototype.MAX_MARKERS=1e4,r.MarkerGroup=p}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,d){function p(f,s){var a=f.getTextRange(b.fromPoints({row:0,column:0},s));return a.split(h).length-1}function g(f,s){var a=p(f,s),u=f.getValue().split(h),c=Object.create(null),i=u[a];return u.forEach(function(l,m){if(!(!l||l===i)){var w=Math.abs(a-m),x=u.length-w;c[l]?c[l]=Math.max(x,c[l]):c[l]=x}}),c}var b=t("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(f,s,a,u,c){var i=g(s,a),l=Object.keys(i);c(null,l.map(function(m){return{caption:m,value:m,score:i[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/marker_group","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"),s=t("../marker_group").MarkerGroup,a=t("../autocomplete/text_completer"),u={getCompletions:function(L,I,H,P,O){if(I.$mode.completer)return I.$mode.completer.getCompletions(L,I,H,P,O);var $=L.session.getState(H.row),A=I.$mode.getCompletions($,I,H,P);A=A.map(function(N){return N.completerId=u.id,N}),O(null,A)},id:"keywordCompleter"},c=function(L){var I={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(H,P,O,$){return I[P]=$||""}).replace(/\$(\d+?)/g,function(H,P){return I[P]})},i={getCompletions:function(L,I,H,P,O){var $=[],A=I.getTokenAt(H.row,H.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=p.getActiveScopes(L);var N=p.snippetMap,B=[];$.forEach(function(U){for(var K=N[U]||[],Z=K.length;Z--;){var J=K[Z],he=J.name||J.tabTrigger;he&&B.push({caption:he,snippet:J.content,meta:J.tabTrigger&&!J.name?J.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),O(null,B)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(c(L.snippet))].join(""))},id:"snippetCompleter"},l=[i,a,u];r.setCompleters=function(L){l.length=0,L&&l.push.apply(l,L)},r.addCompleter=function(L){l.push(L)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=i;var m={name:"expandSnippet",exec:function(L){return p.expandWithTab(L)},bindKey:"Tab"},w=function(L,I){x(I.session.$mode)},x=function(L){typeof L=="string"&&(L=b.$modes[L]),L&&(p.files||(p.files={}),E(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(x))},E=function(L,I){!I||!L||p.files[L]||(p.files[L]={},b.loadModule(I,function(H){H&&(p.files[L]=H,!H.snippets&&H.snippetText&&(H.snippets=p.parseSnippetFile(H.snippetText)),p.register(H.snippets||[],H.scope),H.includeScopes&&(p.snippetMap[H.scope].includeScopes=H.includeScopes,H.includeScopes.forEach(function(P){x("ace/mode/"+P)})))}))},_=function(L){var I=L.editor,H=I.completer&&I.completer.activated;if(L.command.name==="backspace")H&&!f.getCompletionPrefix(I)&&I.completer.detach();else if(L.command.name==="insertstring"&&!H){k=L;var P=L.editor.$liveAutocompletionDelay;P?C.delay(P):R(L)}},k,C=h.delayedCall(function(){R(k)},0),R=function(L){var I=L.editor,H=f.getCompletionPrefix(I),P=L.args,O=f.triggerAutocomplete(I,P);if(H&&H.length>=I.$liveAutocompletionThreshold||O){var $=g.for(I);$.autoShown=!0,$.showPopup(I)}},D=t("../editor").Editor;t("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(g.for(this),this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:l),this.commands.on("afterExec",_)):this.commands.off("afterExec",_)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=s}),function(){ace.require(["ace/ext/language_tools"],function(t){n&&(n.exports=t)})}()}(Bf)),Bf.exports}T1();var zf={exports:{}},jf;function M1(){return jf||(jf=1,function(n,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,d){d.exports=`
|
|
1230
|
+
|
|
1231
|
+
/* ------------------------------------------------------------------------------------------
|
|
1232
|
+
* Editor Search Form
|
|
1233
|
+
* --------------------------------------------------------------------------------------- */
|
|
1234
|
+
.ace_search {
|
|
1235
|
+
background-color: #ddd;
|
|
1236
|
+
color: #666;
|
|
1237
|
+
border: 1px solid #cbcbcb;
|
|
1238
|
+
border-top: 0 none;
|
|
1239
|
+
overflow: hidden;
|
|
1240
|
+
margin: 0;
|
|
1241
|
+
padding: 4px 6px 0 4px;
|
|
1242
|
+
position: absolute;
|
|
1243
|
+
top: 0;
|
|
1244
|
+
z-index: 99;
|
|
1245
|
+
white-space: normal;
|
|
1246
|
+
}
|
|
1247
|
+
.ace_search.left {
|
|
1248
|
+
border-left: 0 none;
|
|
1249
|
+
border-radius: 0px 0px 5px 0px;
|
|
1250
|
+
left: 0;
|
|
1251
|
+
}
|
|
1252
|
+
.ace_search.right {
|
|
1253
|
+
border-radius: 0px 0px 0px 5px;
|
|
1254
|
+
border-right: 0 none;
|
|
1255
|
+
right: 0;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.ace_search_form, .ace_replace_form {
|
|
1259
|
+
margin: 0 20px 4px 0;
|
|
1260
|
+
overflow: hidden;
|
|
1261
|
+
line-height: 1.9;
|
|
1262
|
+
}
|
|
1263
|
+
.ace_replace_form {
|
|
1264
|
+
margin-right: 0;
|
|
1265
|
+
}
|
|
1266
|
+
.ace_search_form.ace_nomatch {
|
|
1267
|
+
outline: 1px solid red;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.ace_search_field {
|
|
1271
|
+
border-radius: 3px 0 0 3px;
|
|
1272
|
+
background-color: white;
|
|
1273
|
+
color: black;
|
|
1274
|
+
border: 1px solid #cbcbcb;
|
|
1275
|
+
border-right: 0 none;
|
|
1276
|
+
outline: 0;
|
|
1277
|
+
padding: 0;
|
|
1278
|
+
font-size: inherit;
|
|
1279
|
+
margin: 0;
|
|
1280
|
+
line-height: inherit;
|
|
1281
|
+
padding: 0 6px;
|
|
1282
|
+
min-width: 17em;
|
|
1283
|
+
vertical-align: top;
|
|
1284
|
+
min-height: 1.8em;
|
|
1285
|
+
box-sizing: content-box;
|
|
1286
|
+
}
|
|
1287
|
+
.ace_searchbtn {
|
|
1288
|
+
border: 1px solid #cbcbcb;
|
|
1289
|
+
line-height: inherit;
|
|
1290
|
+
display: inline-block;
|
|
1291
|
+
padding: 0 6px;
|
|
1292
|
+
background: #fff;
|
|
1293
|
+
border-right: 0 none;
|
|
1294
|
+
border-left: 1px solid #dcdcdc;
|
|
1295
|
+
cursor: pointer;
|
|
1296
|
+
margin: 0;
|
|
1297
|
+
position: relative;
|
|
1298
|
+
color: #666;
|
|
1299
|
+
}
|
|
1300
|
+
.ace_searchbtn:last-child {
|
|
1301
|
+
border-radius: 0 3px 3px 0;
|
|
1302
|
+
border-right: 1px solid #cbcbcb;
|
|
1303
|
+
}
|
|
1304
|
+
.ace_searchbtn:disabled {
|
|
1305
|
+
background: none;
|
|
1306
|
+
cursor: default;
|
|
1307
|
+
}
|
|
1308
|
+
.ace_searchbtn:hover {
|
|
1309
|
+
background-color: #eef1f6;
|
|
1310
|
+
}
|
|
1311
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
1312
|
+
padding: 0px 0.7em
|
|
1313
|
+
}
|
|
1314
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
1315
|
+
content: "";
|
|
1316
|
+
border: solid 2px #888;
|
|
1317
|
+
width: 0.5em;
|
|
1318
|
+
height: 0.5em;
|
|
1319
|
+
border-width: 2px 0 0 2px;
|
|
1320
|
+
display:inline-block;
|
|
1321
|
+
transform: rotate(-45deg);
|
|
1322
|
+
}
|
|
1323
|
+
.ace_searchbtn.next:after {
|
|
1324
|
+
border-width: 0 2px 2px 0 ;
|
|
1325
|
+
}
|
|
1326
|
+
.ace_searchbtn_close {
|
|
1327
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
1328
|
+
border-radius: 50%;
|
|
1329
|
+
border: 0 none;
|
|
1330
|
+
color: #656565;
|
|
1331
|
+
cursor: pointer;
|
|
1332
|
+
font: 16px/16px Arial;
|
|
1333
|
+
padding: 0;
|
|
1334
|
+
height: 14px;
|
|
1335
|
+
width: 14px;
|
|
1336
|
+
top: 9px;
|
|
1337
|
+
right: 7px;
|
|
1338
|
+
position: absolute;
|
|
1339
|
+
}
|
|
1340
|
+
.ace_searchbtn_close:hover {
|
|
1341
|
+
background-color: #656565;
|
|
1342
|
+
background-position: 50% 100%;
|
|
1343
|
+
color: white;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.ace_button {
|
|
1347
|
+
margin-left: 2px;
|
|
1348
|
+
cursor: pointer;
|
|
1349
|
+
-webkit-user-select: none;
|
|
1350
|
+
-moz-user-select: none;
|
|
1351
|
+
-o-user-select: none;
|
|
1352
|
+
-ms-user-select: none;
|
|
1353
|
+
user-select: none;
|
|
1354
|
+
overflow: hidden;
|
|
1355
|
+
opacity: 0.7;
|
|
1356
|
+
border: 1px solid rgba(100,100,100,0.23);
|
|
1357
|
+
padding: 1px;
|
|
1358
|
+
box-sizing: border-box!important;
|
|
1359
|
+
color: black;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.ace_button:hover {
|
|
1363
|
+
background-color: #eee;
|
|
1364
|
+
opacity:1;
|
|
1365
|
+
}
|
|
1366
|
+
.ace_button:active {
|
|
1367
|
+
background-color: #ddd;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.ace_button.checked {
|
|
1371
|
+
border-color: #3399ff;
|
|
1372
|
+
opacity:1;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.ace_search_options{
|
|
1376
|
+
margin-bottom: 3px;
|
|
1377
|
+
text-align: right;
|
|
1378
|
+
-webkit-user-select: none;
|
|
1379
|
+
-moz-user-select: none;
|
|
1380
|
+
-o-user-select: none;
|
|
1381
|
+
-ms-user-select: none;
|
|
1382
|
+
user-select: none;
|
|
1383
|
+
clear: both;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.ace_search_counter {
|
|
1387
|
+
float: left;
|
|
1388
|
+
font-family: arial;
|
|
1389
|
+
padding: 0 8px;
|
|
1390
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","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,s=t("../lib/keys"),a=t("../config").nls,u=999;p.importCssString(h,"ace_searchbox",!1);var c=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=s.keyCodeToString(k),R=x.$searchBarKb.findKeyCommand(_,C);R&&R.exec&&(R.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){if(this.editor.session){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,`
|
|
1391
|
+
`),w.session.doc.$autoNewLine=`
|
|
1392
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,L;(L=x.exec(C))&&(_++,D=L.index,D<=R&&k++,!(_>u||!L[0]&&(x.lastIndex=D+=g.skipEmptyMatch(C,D,E),D>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,_>u?u+"+":_])},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!=null&&(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}(),i=new f;i.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()}}),i.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 l=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);c.prototype.$searchBarKb=i,c.prototype.$closeSearchBarKb=l,r.SearchBox=c,r.Search=function(m,w){var x=m.searchBox||new c(m),E=m.session.selection.getRange(),_=E.isMultiLine()?"":m.session.getTextRange(E);x.show(_,w)}}),function(){ace.require(["ace/ext/searchbox"],function(t){n&&(n.exports=t)})}()}(zf)),zf.exports}M1();var E1=Object.defineProperty,I1=(n,e,t)=>e in n?E1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pl=(n,e,t)=>I1(n,typeof e!="symbol"?e+"":e,t);function Uf(n,e){return function(){return n.apply(e,arguments)}}const{toString:R1}=Object.prototype,{getPrototypeOf:Ou}=Object,{iterator:Wl,toStringTag:Vf}=Symbol,Bl=(n=>e=>{const t=R1.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),no=n=>(n=n.toLowerCase(),e=>Bl(e)===n),Hl=n=>e=>typeof e===n,{isArray:la}=Array,ca=Hl("undefined");function za(n){return n!==null&&!ca(n)&&n.constructor!==null&&!ca(n.constructor)&&ui(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const qf=no("ArrayBuffer");function L1(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&qf(n.buffer),e}const O1=Hl("string"),ui=Hl("function"),Kf=Hl("number"),ja=n=>n!==null&&typeof n=="object",N1=n=>n===!0||n===!1,zl=n=>{if(Bl(n)!=="object")return!1;const e=Ou(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Vf in n)&&!(Wl in n)},D1=n=>{if(!ja(n)||za(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},F1=no("Date"),P1=no("File"),W1=no("Blob"),B1=no("FileList"),H1=n=>ja(n)&&ui(n.pipe),z1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||ui(n.append)&&((e=Bl(n))==="formdata"||e==="object"&&ui(n.toString)&&n.toString()==="[object FormData]"))},j1=no("URLSearchParams"),[U1,V1,q1,K1]=["ReadableStream","Request","Response","Headers"].map(no),G1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ua(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),la(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{if(za(n))return;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 Gf(n,e){if(za(n))return null;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 $s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yf=n=>!ca(n)&&n!==$s;function Nu(){const{caseless:n,skipUndefined:e}=Yf(this)&&this||{},t={},r=(d,p)=>{const g=n&&Gf(t,p)||p;zl(t[g])&&zl(d)?t[g]=Nu(t[g],d):zl(d)?t[g]=Nu({},d):la(d)?t[g]=d.slice():(!e||!ca(d))&&(t[g]=d)};for(let d=0,p=arguments.length;d<p;d++)arguments[d]&&Ua(arguments[d],r);return t}const Y1=(n,e,t,{allOwnKeys:r}={})=>(Ua(e,(d,p)=>{t&&ui(d)?n[p]=Uf(d,t):n[p]=d},{allOwnKeys:r}),n),X1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Q1=(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)},Z1=(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&&Ou(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},J1=(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},eC=n=>{if(!n)return null;if(la(n))return n;let e=n.length;if(!Kf(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},tC=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Ou(Uint8Array)),nC=(n,e)=>{const t=(n&&n[Wl]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},rC=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},iC=no("HTMLFormElement"),oC=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Xf=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),sC=no("RegExp"),Qf=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Ua(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},aC=n=>{Qf(n,(e,t)=>{if(ui(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(ui(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+"'")})}})},lC=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return la(n)?r(n):r(String(n).split(e)),t},cC=()=>{},uC=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function hC(n){return!!(n&&ui(n.append)&&n[Vf]==="FormData"&&n[Wl])}const dC=n=>{const e=new Array(10),t=(r,d)=>{if(ja(r)){if(e.indexOf(r)>=0)return;if(za(r))return r;if(!("toJSON"in r)){e[d]=r;const p=la(r)?[]:{};return Ua(r,(g,b)=>{const h=t(g,d+1);!ca(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},pC=no("AsyncFunction"),fC=n=>n&&(ja(n)||ui(n))&&ui(n.then)&&ui(n.catch),Zf=((n,e)=>n?setImmediate:e?((t,r)=>($s.addEventListener("message",({source:d,data:p})=>{d===$s&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),$s.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ui($s.postMessage)),gC=typeof queueMicrotask<"u"?queueMicrotask.bind($s):typeof process<"u"&&process.nextTick||Zf,mC=n=>n!=null&&ui(n[Wl]),Ae={isArray:la,isArrayBuffer:qf,isBuffer:za,isFormData:z1,isArrayBufferView:L1,isString:O1,isNumber:Kf,isBoolean:N1,isObject:ja,isPlainObject:zl,isEmptyObject:D1,isReadableStream:U1,isRequest:V1,isResponse:q1,isHeaders:K1,isUndefined:ca,isDate:F1,isFile:P1,isBlob:W1,isRegExp:sC,isFunction:ui,isStream:H1,isURLSearchParams:j1,isTypedArray:tC,isFileList:B1,forEach:Ua,merge:Nu,extend:Y1,trim:G1,stripBOM:X1,inherits:Q1,toFlatObject:Z1,kindOf:Bl,kindOfTest:no,endsWith:J1,toArray:eC,forEachEntry:nC,matchAll:rC,isHTMLForm:iC,hasOwnProperty:Xf,hasOwnProp:Xf,reduceDescriptors:Qf,freezeMethods:aC,toObjectSet:lC,toCamelCase:oC,noop:cC,toFiniteNumber:uC,findKey:Gf,global:$s,isContextDefined:Yf,isSpecCompliantForm:hC,toJSONObject:dC,isAsyncFn:pC,isThenable:fC,setImmediate:Zf,asap:gC,isIterable:mC};function _t(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(_t,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 Jf=_t.prototype,eg={};["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=>{eg[n]={value:n}}),Object.defineProperties(_t,eg),Object.defineProperty(Jf,"isAxiosError",{value:!0}),_t.from=(n,e,t,r,d,p)=>{const g=Object.create(Jf);Ae.toFlatObject(n,g,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=e==null&&n?n.code:e;return _t.call(g,b,h,t,r,d),n&&g.cause==null&&Object.defineProperty(g,"cause",{value:n,configurable:!0}),g.name=n&&n.name||"Error",p&&Object.assign(g,p),g};const vC=null;function Du(n){return Ae.isPlainObject(n)||Ae.isArray(n)}function tg(n){return Ae.endsWith(n,"[]")?n.slice(0,-2):n}function ng(n,e,t){return n?n.concat(e).map(function(r,d){return r=tg(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function yC(n){return Ae.isArray(n)&&!n.some(Du)}const bC=Ae.toFlatObject(Ae,{},null,function(n){return/^is[A-Z]/.test(n)});function jl(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(c,i){return!Ae.isUndefined(i[c])});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(c){if(c===null)return"";if(Ae.isDate(c))return c.toISOString();if(Ae.isBoolean(c))return c.toString();if(!b&&Ae.isBlob(c))throw new _t("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(c)||Ae.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function f(c,i,l){let m=c;if(c&&!l&&typeof c=="object"){if(Ae.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Ae.isArray(c)&&yC(c)||(Ae.isFileList(c)||Ae.endsWith(i,"[]"))&&(m=Ae.toArray(c)))return i=tg(i),m.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(g===!0?ng([i],x,p):g===null?i:i+"[]",h(w))}),!1}return Du(c)?!0:(e.append(ng(l,i,p),h(c)),!1)}const s=[],a=Object.assign(bC,{defaultVisitor:f,convertValue:h,isVisitable:Du});function u(c,i){if(!Ae.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(c),Ae.forEach(c,function(l,m){(!(Ae.isUndefined(l)||l===null)&&d.call(e,l,Ae.isString(m)?m.trim():m,i,a))===!0&&u(l,i?i.concat(m):[m])}),s.pop()}}if(!Ae.isObject(n))throw new TypeError("data must be an object");return u(n),e}function rg(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Fu(n,e){this._pairs=[],n&&jl(n,this,e)}const ig=Fu.prototype;ig.append=function(n,e){this._pairs.push([n,e])},ig.toString=function(n){const e=n?function(t){return n.call(this,t,rg)}:rg;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function wC(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function og(n,e,t){if(!e)return n;const r=t&&t.encode||wC;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 Fu(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}class sg{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 ag={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xC=typeof URLSearchParams<"u"?URLSearchParams:Fu,CC=typeof FormData<"u"?FormData:null,kC=typeof Blob<"u"?Blob:null,AC={isBrowser:!0,classes:{URLSearchParams:xC,FormData:CC,Blob:kC},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Wu=typeof navigator=="object"&&navigator||void 0,SC=Pu&&(!Wu||["ReactNative","NativeScript","NS"].indexOf(Wu.product)<0),_C=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$C=Pu&&window.location.href||"http://localhost",TC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:SC,hasStandardBrowserWebWorkerEnv:_C,navigator:Wu,origin:$C},Symbol.toStringTag,{value:"Module"})),Pr={...TC,...AC};function MC(n,e){return jl(n,new Pr.classes.URLSearchParams,{visitor:function(t,r,d,p){return Pr.isNode&&Ae.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function EC(n){return Ae.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function IC(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 lg(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]=IC(d[g])),!b)}if(Ae.isFormData(n)&&Ae.isFunction(n.entries)){const t={};return Ae.forEachEntry(n,(r,d)=>{e(EC(r),d,t,0)}),t}return null}function RC(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 Va={transitional:ag,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(lg(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 MC(n,this.formSerializer).toString();if((p=Ae.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return jl(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),RC(n)):n}],transformResponse:[function(n){const e=this.transitional||Va.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,this.parseReviver)}catch(p){if(d)throw p.name==="SyntaxError"?_t.from(p,_t.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:Pr.classes.FormData,Blob:Pr.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=>{Va.headers[n]={}});const LC=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"]),OC=n=>{const e={};let t,r,d;return n&&n.split(`
|
|
1393
|
+
`).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&LC[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},cg=Symbol("internals");function qa(n){return n&&String(n).trim().toLowerCase()}function Ul(n){return n===!1||n==null?n:Ae.isArray(n)?n.map(Ul):String(n)}function NC(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 DC=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Bu(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 FC(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function PC(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 hi=class{constructor(n){n&&this.set(n)}set(n,e,t){const r=this;function d(g,b,h){const f=qa(b);if(!f)throw new Error("header name must be a non-empty string");const s=Ae.findKey(r,f);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||b]=Ul(g))}const p=(g,b)=>Ae.forEach(g,(h,f)=>d(h,f,b));if(Ae.isPlainObject(n)||n instanceof this.constructor)p(n,e);else if(Ae.isString(n)&&(n=n.trim())&&!DC(n))p(OC(n),e);else if(Ae.isObject(n)&&Ae.isIterable(n)){let g={},b,h;for(const f of n){if(!Ae.isArray(f))throw TypeError("Object iterator must return a key-value pair");g[h=f[0]]=(b=g[h])?Ae.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=qa(n),n){const t=Ae.findKey(this,n);if(t){const r=this[t];if(!e)return r;if(e===!0)return NC(r);if(Ae.isFunction(e))return e.call(this,r,t);if(Ae.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=qa(n),n){const t=Ae.findKey(this,n);return!!(t&&this[t]!==void 0&&(!e||Bu(this,this[t],t,e)))}return!1}delete(n,e){const t=this;let r=!1;function d(p){if(p=qa(p),p){const g=Ae.findKey(t,p);g&&(!e||Bu(t,t[g],g,e))&&(delete t[g],r=!0)}}return Ae.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||Bu(this,this[d],d,n,!0))&&(delete this[d],r=!0)}return r}normalize(n){const e=this,t={};return Ae.forEach(this,(r,d)=>{const p=Ae.findKey(t,d);if(p){e[p]=Ul(r),delete e[d];return}const g=n?FC(d):String(d).trim();g!==d&&delete e[d],e[g]=Ul(r),t[g]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return Ae.forEach(this,(t,r)=>{t!=null&&t!==!1&&(e[r]=n&&Ae.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(`
|
|
1394
|
+
`)}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[cg]=this[cg]={accessors:{}}).accessors,t=this.prototype;function r(d){const p=qa(d);e[p]||(PC(t,d),e[p]=!0)}return Ae.isArray(n)?n.forEach(r):r(n),this}};hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(hi.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Ae.freezeMethods(hi);function Hu(n,e){const t=this||Va,r=e||t,d=hi.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 ug(n){return!!(n&&n.__CANCEL__)}function ua(n,e,t){_t.call(this,n??"canceled",_t.ERR_CANCELED,e,t),this.name="CanceledError"}Ae.inherits(ua,_t,{__CANCEL__:!0});function hg(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new _t("Request failed with status code "+t.status,[_t.ERR_BAD_REQUEST,_t.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function WC(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function BC(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 s=p,a=0;for(;s!==d;)a+=t[s++],s=s%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const u=f&&h-f;return u?Math.round(a*1e3/u):void 0}}function HC(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(...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 Vl=(n,e,t=3)=>{let r=0;const d=BC(50,250);return HC(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),s=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&&s?(b-g)/f:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(a)},t)},dg=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},pg=n=>(...e)=>Ae.asap(()=>n(...e)),zC=Pr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Pr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Pr.origin),Pr.navigator&&/(msie|trident)/i.test(Pr.navigator.userAgent)):()=>!0,jC=Pr.hasStandardBrowserEnv?{write(n,e,t,r,d,p,g){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];Ae.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),Ae.isString(r)&&b.push(`path=${r}`),Ae.isString(d)&&b.push(`domain=${d}`),p===!0&&b.push("secure"),Ae.isString(g)&&b.push(`SameSite=${g}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function UC(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function VC(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function fg(n,e,t){let r=!UC(e);return n&&(r||t==!1)?VC(n,e):e}const gg=n=>n instanceof hi?{...n}:n;function Ts(n,e){e=e||{};const t={};function r(f,s,a,u){return Ae.isPlainObject(f)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:u},f,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function d(f,s,a,u){if(Ae.isUndefined(s)){if(!Ae.isUndefined(f))return r(void 0,f,a,u)}else return r(f,s,a,u)}function p(f,s){if(!Ae.isUndefined(s))return r(void 0,s)}function g(f,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(f))return r(void 0,f)}else return r(void 0,s)}function b(f,s,a){if(a in e)return r(f,s);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,s,a)=>d(gg(f),gg(s),a,!0)};return Ae.forEach(Object.keys({...n,...e}),function(f){const s=h[f]||d,a=s(n[f],e[f],f);Ae.isUndefined(a)&&s!==b||(t[f]=a)}),t}const mg=n=>{const e=Ts({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;if(e.headers=g=hi.from(g),e.url=og(fg(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&g.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Ae.isFormData(t)){if(Pr.hasStandardBrowserEnv||Pr.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(Ae.isFunction(t.getHeaders)){const h=t.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&g.set(s,a)})}}if(Pr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&zC(e.url))){const h=d&&p&&jC.read(p);h&&g.set(d,h)}return e},qC=typeof XMLHttpRequest<"u",KC=qC&&function(n){return new Promise(function(e,t){const r=mg(n);let d=r.data;const p=hi.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const x=hi.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:n,request:l};hg(function(_){e(_),i()},function(_){t(_),i()},E),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(t(new _t("Request aborted",_t.ECONNABORTED,n,l)),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",_=new _t(E,_t.ERR_NETWORK,n,l);_.event=x||null,t(_),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||ag;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new _t(x,E.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,n,l)),l=null},d===void 0&&p.setContentType(null),"setRequestHeader"in l&&Ae.forEach(p.toJSON(),function(x,E){l.setRequestHeader(E,x)}),Ae.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),g&&g!=="json"&&(l.responseType=r.responseType),h&&([a,c]=Vl(h,!0),l.addEventListener("progress",a)),b&&l.upload&&([s,u]=Vl(b),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{l&&(t(!x||x.type?new ua(null,n,l):x),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=WC(r.url);if(w&&Pr.protocols.indexOf(w)===-1){t(new _t("Unsupported protocol "+w+":",_t.ERR_BAD_REQUEST,n));return}l.send(d||null)})},GC=(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 s=f instanceof Error?f:this.reason;r.abort(s instanceof _t?s:new ua(s instanceof Error?s.message:s))}};let g=e&&setTimeout(()=>{g=null,p(new _t(`timeout ${e} of ms exceeded`,_t.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}},YC=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},XC=async function*(n,e){for await(const t of QC(n))yield*YC(t,e)},QC=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()}},vg=(n,e,t,r)=>{const d=XC(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:s}=await d.next();if(f){b(),h.close();return}let a=s.byteLength;if(t){let u=p+=a;t(u)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},yg=64*1024,{isFunction:ql}=Ae,ZC=(({Request:n,Response:e})=>({Request:n,Response:e}))(Ae.global),{ReadableStream:bg,TextEncoder:wg}=Ae.global,xg=(n,...e)=>{try{return!!n(...e)}catch{return!1}},JC=n=>{n=Ae.merge.call({skipUndefined:!0},ZC,n);const{fetch:e,Request:t,Response:r}=n,d=e?ql(e):typeof fetch=="function",p=ql(t),g=ql(r);if(!d)return!1;const b=d&&ql(bg),h=d&&(typeof wg=="function"?(i=>l=>i.encode(l))(new wg):async i=>new Uint8Array(await new t(i).arrayBuffer())),f=p&&b&&xg(()=>{let i=!1;const l=new t(Pr.origin,{body:new bg,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!l}),s=g&&b&&xg(()=>Ae.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(l,m)=>{let w=l&&l[i];if(w)return w.call(l);throw new _t(`Response type '${i}' is not supported`,_t.ERR_NOT_SUPPORT,m)})});const u=async i=>{if(i==null)return 0;if(Ae.isBlob(i))return i.size;if(Ae.isSpecCompliantForm(i))return(await new t(Pr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(i)||Ae.isArrayBuffer(i))return i.byteLength;if(Ae.isURLSearchParams(i)&&(i=i+""),Ae.isString(i))return(await h(i)).byteLength},c=async(i,l)=>Ae.toFiniteNumber(i.getContentLength())??u(l);return async i=>{let{url:l,method:m,data:w,signal:x,cancelToken:E,timeout:_,onDownloadProgress:k,onUploadProgress:C,responseType:R,headers:D,withCredentials:L="same-origin",fetchOptions:I}=mg(i),H=e||fetch;R=R?(R+"").toLowerCase():"text";let P=GC([x,E&&E.toAbortSignal()],_),O=null;const $=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let A;try{if(C&&f&&m!=="get"&&m!=="head"&&(A=await c(D,w))!==0){let J=new t(l,{method:"POST",body:w,duplex:"half"}),he;if(Ae.isFormData(w)&&(he=J.headers.get("content-type"))&&D.setContentType(he),J.body){const[ne,le]=dg(A,Vl(pg(C)));w=vg(J.body,yg,ne,le)}}Ae.isString(L)||(L=L?"include":"omit");const N=p&&"credentials"in t.prototype,B={...I,signal:P,method:m.toUpperCase(),headers:D.normalize().toJSON(),body:w,duplex:"half",credentials:N?L:void 0};O=p&&new t(l,B);let U=await(p?H(O,I):H(l,B));const K=s&&(R==="stream"||R==="response");if(s&&(k||K&&$)){const J={};["status","statusText","headers"].forEach(se=>{J[se]=U[se]});const he=Ae.toFiniteNumber(U.headers.get("content-length")),[ne,le]=k&&dg(he,Vl(pg(k),!0))||[];U=new r(vg(U.body,yg,ne,()=>{le&&le(),$&&$()}),J)}R=R||"text";let Z=await a[Ae.findKey(a,R)||"text"](U,i);return!K&&$&&$(),await new Promise((J,he)=>{hg(J,he,{data:Z,headers:hi.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:O})})}catch(N){throw $&&$(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new _t("Network Error",_t.ERR_NETWORK,i,O),{cause:N.cause||N}):_t.from(N,N&&N.code,i,O)}}},ek=new Map,Cg=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:d}=e,p=[r,d,t];let g=p.length,b=g,h,f,s=ek;for(;b--;)h=p[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:JC(e)),s=f;return f};Cg();const zu={http:vC,xhr:KC,fetch:{get:Cg}};Ae.forEach(zu,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const kg=n=>`- ${n}`,tk=n=>Ae.isFunction(n)||n===null||n===!1;function nk(n,e){n=Ae.isArray(n)?n:[n];const{length:t}=n;let r,d;const p={};for(let g=0;g<t;g++){r=n[g];let b;if(d=r,!tk(r)&&(d=zu[(b=String(r)).toLowerCase()],d===void 0))throw new _t(`Unknown adapter '${b}'`);if(d&&(Ae.isFunction(d)||(d=d.get(e))))break;p[b||"#"+g]=d}if(!d){const g=Object.entries(p).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=t?g.length>1?`since :
|
|
1395
|
+
`+g.map(kg).join(`
|
|
1396
|
+
`):" "+kg(g[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return d}const Ag={getAdapter:nk,adapters:zu};function ju(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ua(null,n)}function Sg(n){return ju(n),n.headers=hi.from(n.headers),n.data=Hu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ag.getAdapter(n.adapter||Va.adapter,n)(n).then(function(e){return ju(n),e.data=Hu.call(n,n.transformResponse,e),e.headers=hi.from(e.headers),e},function(e){return ug(e)||(ju(n),e&&e.response&&(e.response.data=Hu.call(n,n.transformResponse,e.response),e.response.headers=hi.from(e.response.headers))),Promise.reject(e)})}const _g="1.13.1",Kl={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Kl[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const $g={};Kl.transitional=function(n,e,t){function r(d,p){return"[Axios v"+_g+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new _t(r(p," has been removed"+(e?" in "+e:"")),_t.ERR_DEPRECATED);return e&&!$g[p]&&($g[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}},Kl.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function rk(n,e,t){if(typeof n!="object")throw new _t("options must be an object",_t.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 _t("option "+p+" must be "+h,_t.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _t("Unknown option "+p,_t.ERR_BAD_OPTION)}}const Gl={assertOptions:rk,validators:Kl},yo=Gl.validators;let Ms=class{constructor(n){this.defaults=n||{},this.interceptors={request:new sg,response:new sg}}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+=`
|
|
1397
|
+
`+d):t.stack=d}catch{}}throw t}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=Ts(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:d}=e;t!==void 0&&Gl.assertOptions(t,{silentJSONParsing:yo.transitional(yo.boolean),forcedJSONParsing:yo.transitional(yo.boolean),clarifyTimeoutError:yo.transitional(yo.boolean)},!1),r!=null&&(Ae.isFunction(r)?e.paramsSerializer={serialize:r}:Gl.assertOptions(r,{encode:yo.function,serialize:yo.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Gl.assertOptions(e,{baseUrl:yo.spelling("baseURL"),withXsrfToken:yo.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=d&&Ae.merge(d.common,d[e.method]);d&&Ae.forEach(["delete","get","head","post","put","patch","common"],c=>{delete d[c]}),e.headers=hi.concat(p,d);const g=[];let b=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(b=b&&c.synchronous,g.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let f,s=0,a;if(!b){const c=[Sg.bind(this),void 0];for(c.unshift(...g),c.push(...h),a=c.length,f=Promise.resolve(e);s<a;)f=f.then(c[s++],c[s++]);return f}a=g.length;let u=e;for(;s<a;){const c=g[s++],i=g[s++];try{u=c(u)}catch(l){i.call(this,l);break}}try{f=Sg.call(this,u)}catch(c){return Promise.reject(c)}for(s=0,a=h.length;s<a;)f=f.then(h[s++],h[s++]);return f}getUri(n){n=Ts(this.defaults,n);const e=fg(n.baseURL,n.url,n.allowAbsoluteUrls);return og(e,n.params,n.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){Ms.prototype[n]=function(e,t){return this.request(Ts(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(Ts(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Ms.prototype[n]=e(),Ms.prototype[n+"Form"]=e(!0)});let ik=class ox{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 ua(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 ox(function(t){e=t}),cancel:e}}};function ok(n){return function(e){return n.apply(null,e)}}function sk(n){return Ae.isObject(n)&&n.isAxiosError===!0}const Uu={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Uu).forEach(([n,e])=>{Uu[e]=n});function Tg(n){const e=new Ms(n),t=Uf(Ms.prototype.request,e);return Ae.extend(t,Ms.prototype,e,{allOwnKeys:!0}),Ae.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Tg(Ts(n,r))},t}const er=Tg(Va);er.Axios=Ms,er.CanceledError=ua,er.CancelToken=ik,er.isCancel=ug,er.VERSION=_g,er.toFormData=jl,er.AxiosError=_t,er.Cancel=er.CanceledError,er.all=function(n){return Promise.all(n)},er.spread=ok,er.isAxiosError=sk,er.mergeConfig=Ts,er.AxiosHeaders=hi,er.formToJSON=n=>lg(Ae.isHTMLForm(n)?new FormData(n):n),er.getAdapter=Ag.getAdapter,er.HttpStatusCode=Uu,er.default=er;const{Axios:qF,AxiosError:KF,CanceledError:GF,isCancel:YF,CancelToken:XF,VERSION:QF,all:ZF,Cancel:JF,isAxiosError:eP,spread:tP,toFormData:nP,AxiosHeaders:rP,HttpStatusCode:iP,formToJSON:oP,getAdapter:sP,mergeConfig:aP}=er,Vu=er.create({baseURL:location.origin,timeout:6e4,params:{}});Vu.interceptors.response.use(n=>n,n=>{var e,t,r,d,p,g,b,h,f,s,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(i){i&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(e=n.response)!=null&&e.statusText&&(u+=`${n.response.statusText} `),(r=(t=n.response)==null?void 0:t.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(p=(d=n.response)==null?void 0:d.data)!=null&&p.message?u+=`${n.response.data.message}`:(b=(g=n.response)==null?void 0:g.data)!=null&&b.exception?u+=`${n.response.data.exception}`:(s=(f=(h=n.response)==null?void 0:h.data)==null?void 0:f.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),n}else throw n});const Yl=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),Vu({method:n,url:e,data:t,params:r,headers:d,onUploadProgress:b})},qu={Accept:"application/json"},Mg={...qu,"Content-Type":"application/json"},ak=pr("F",{get:function(n,{params:e,headers:t=qu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Yl("get",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})},put:function(n,{data:e,params:t,headers:r=Mg,noScope:d,noAuth:p,onUploadProgress:g}={}){return Yl("put",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},post:function(n,{data:e,params:t,headers:r=Mg,noScope:d,noAuth:p,onUploadProgress:g}={}){return Yl("post",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},delete:function(n,{params:e,headers:t=qu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Yl("delete",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})}});let Xl=()=>({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 Ka extends Error{constructor(e,t){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=t,this.name="ReasonError"}}class Ku extends Ka{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class lk extends Ka{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class ro extends Ka{constructor(e,t){t?super(e,t):super("Disconnected",e),this.name="DisconnectedError"}}class ck extends ro{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Eg(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 uk{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 Es=Symbol("state");class Ig{constructor(e={}){this.emitter=Xl(),this.params=Object.freeze(e),this.presence=new uk(this),this.initialConnect=!0,this[Es]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Eg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Es]}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[Es]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Es]="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[Es]="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[Es]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[Es]="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 Ka("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class hk{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 dk{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 pk{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new dk),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 hk(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 fk{constructor(e={}){this.subscriptions=new pk(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 Rg={debug:0,info:1,warn:2,error:3};class Lg{constructor(e){this.level=e||"warn"}log(e,t,r){Rg[e]<Rg[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 Ga extends Lg{writeLogEntry(){}}class gk{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let mk=0;class Og{constructor(e={}){let{logger:t}=e;this.logger=t||new Ga,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=Eg(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=++mk;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 lk(`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 ro(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 Ku)):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 Ng=()=>Date.now()/1e3|0;class vk extends Og{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=Ng()),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=Ng()),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 yk extends Ka{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Gu extends Ig{constructor(e,t){super(t),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Pl(Gu,"identifier","__ghost__");const bk="$pubsub";class Yu extends Ig{async perform(e,t){if(e.startsWith("$"))return super.perform(e,t);throw Error("not implemented")}}Pl(Yu,"identifier",bk);const Is=Symbol("state");let wk=class{constructor({transport:n,protocol:e,encoder:t,logger:r,lazy:d,hubOptions:p,performFailures:g,transportConfigurator:b}){this.emitter=Xl(),this.transport=n,this.encoder=t,this.logger=r||new Ga,this.protocol=e,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new fk(p||{}),this[Is]="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[Is]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[Is]="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[Is]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new ro("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[Is]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new ro("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 ro(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[Is]="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 ro?n:new ro(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[Is]="closed";let t=e||new ro("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 Yu({stream_name:n});return this.subscribe(e)}streamFromSigned(n){let e=new Yu({signed_stream_name:n});return this.subscribe(e)}subscribeTo(n,e){let t,r;return typeof n=="string"&&(r=n,n=Gu),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 Ku&&this.logger.warn("rejected",p),g instanceof ro){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 ro?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 yk;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 xk={maxMissingPings:2,maxReconnectAttempts:1/0},ha=()=>Date.now(),Dg=(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 Fg=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},xk,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 Ga,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ha()}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=ha(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ha(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ha(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ha()})),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=ha()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ck))}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 Ck{constructor(e,t={}){this.transports=e,this.transport=null,this.emitter=Xl(),this.unbind=[],this.logger=t.logger||new Ga}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 kk{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=Xl();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 Pg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ak(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({},Pg,e);let{protocol:t,websocketImplementation:r,websocketFormat:d,websocketOptions:p,websocketAuthStrategy:g,fallbacks:b,logLevel:h,logger:f,transport:s,encoder:a,lazy:u,monitor:c,pingInterval:i,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:_,protocolOptions:k,concurrentSubscribes:C,performFailures:R,transportConfigurator:D,auth:L}=e;if(f=f||new Ga(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 Og({logger:f,...k});else if(P==="actioncable-v1-ext")t=new vk({logger:f,historyTimestamp:_,...k});else throw Error(`Protocol is not supported yet: ${t}`);if(O==="json")a=a||new gk,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");s=s||new kk(n,{websocketImplementation:r,websocketOptions:p,subprotocol:x,authStrategy:g,format:d}),b&&(s=new Ck([s,...b],{logger:f})),L&&L.token&&s.setToken(L.token,L.param||"jid"),l=l||Dg(i),c!==!1&&(c=c||new Fg({pingInterval:i,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,logger:f}));let I={concurrentSubscribes:C},H=new wk({protocol:t,transport:s,encoder:a,logger:f,lazy:u,hubOptions:I,performFailures:R,transportConfigurator:D});return c&&(c.watch(H),H.monitor=c),E&&Sk(H,async()=>{try{await E(s)}catch(P){return f.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function Sk(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 _k{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 $k extends Gu{constructor(e,t,r){super(e,t),this.subscription=new _k(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 Ku?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Tk{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 $k(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 Mk{constructor(e){this.cable=e,this.subscriptions=new Tk(e)}}class Ek extends Lg{writeLogEntry(e,t,r){r?console[e](t,r):console[e](t)}}class Ik extends Fg{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 ro("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 Rk=["cable","action-cable"],Lk="/cable",Ql=(n,e)=>{for(let t of Rk){let r=n.head.querySelector(`meta[name='${t}-${e}']`);if(r)return r.getAttribute("content")}},Wg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,Ok=()=>{if(typeof document<"u"&&document.head){let n=Ql(document,"url");if(n)return Wg(n)}return Wg(Lk)},Nk=()=>{if(typeof document<"u"&&document.head){let n=Ql(document,"history-timestamp");if(n)return n|0}},Dk=()=>{if(typeof document<"u"&&document.head)return Ql(document,"token")},Fk=()=>{if(typeof document<"u"&&document.head)return Ql(document,"token-param")};function Pk(n,e){typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),n=n||Ok(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Nk());let t=Dk();if(t){let f=Fk();e.auth=Object.assign({token:t,param:f},e.auth||{})}e=Object.assign({},Pg,e);let{logLevel:r,logger:d,pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h}=e;return d=e.logger=e.logger||new Ek(r),g=e.reconnectStrategy=e.reconnectStrategy||Dg(p),e.monitor!==!1&&(e.monitor=e.monitor||new Ik({pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h,logger:d})),Ak(n,e)}function Wk(n,e){let t=Pk(n,e);return new Mk(t)}class Bk{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(t)+"&authorization="+encodeURIComponent(localStorage.openc3Token);g=new URL(g,document.baseURI).href,this._cable=Wk(g)}return this._cable.subscriptions.create({channel:e,...d},r)})}recordPing(){}}pr("P",Bk);class Hk{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}}pr("k",Hk);function Ya(n){return zk.test(n)}const zk=/^-?[0-9]+$/;function Bg(n){return jk.test(n)}const jk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Hg(n,e){if(Ya(n))return Number.isSafeInteger(Number.parseInt(n,10));const t=Number.parseFloat(n),r=String(t);if(n===r)return!0;const d=zg(n),p=zg(r);return!!(d===p||(e==null?void 0:e.approx)===!0&&!Ya(n)&&p.length>=14&&d.startsWith(p.substring(0,14)))}let Xa=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function Uk(n){if(Hg(n,{approx:!1}))return;if(Ya(n))return Xa.truncate_integer;const e=Number.parseFloat(n);return Number.isFinite(e)?e===0?Xa.underflow:Xa.truncate_float:Xa.overflow}function zg(n){const{start:e,end:t}=Vk(n),r=n.substring(e,t),d=r.indexOf(".");return d===-1?r:r.substring(0,d)+r.substring(d+1)}function Vk(n){let e=0;for(n[0]==="-"&&e++;n[e]==="0"||n[e]===".";)e++;let t=n.lastIndexOf("e");for(t===-1&&(t=n.lastIndexOf("E")),t===-1&&(t=n.length);(n[t-1]==="0"||n[t-1]===".")&&t>e;)t--;return{start:e,end:t}}class qk{constructor(e){if(Pl(this,"isLosslessNumber",!0),!Bg(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Uk(this.value);if(e===void 0||e===Xa.truncate_float)return Number.parseFloat(this.value);if(Ya(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 Kk(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function Gk(n){return new qk(n)}function Yk(n,e){return Xu({"":n},"",n,e)}function Xu(n,e,t,r){return Array.isArray(t)?r.call(n,e,Qk(t,r)):t&&typeof t=="object"&&!Kk(t)?r.call(n,e,Xk(t,r)):r.call(n,e,t)}function Xk(n,e){for(const t of Object.keys(n)){const r=Xu(n,t,n[t],e);r!==void 0?n[t]=r:delete n[t]}return n}function Qk(n,e){for(let t=0;t<n.length;t++)n[t]=Xu(n,String(t),n[t],e);return n}function Zk(n,e,t){const r=typeof t=="function"?{parseNumber:t}:t,d=(r==null?void 0:r.parseNumber)??Gk,p=(r==null?void 0:r.onDuplicateKey)??R;let g=0;const b=s();return w(b),E(),e?Yk(b,e):b;function h(){if(n.charCodeAt(g)===iA){g++,u();const B={};let U=!0;for(;g<n.length&&n.charCodeAt(g)!==Ug;){U?U=!1:(l(),u());const K=g,Z=c();if(Z===void 0){C();return}u(),m();const J=s();if(J===void 0){P();return}if(Object.prototype.hasOwnProperty.call(B,Z)&&!Qu(J,B[Z])){const he=p({key:Z,position:K+1,oldValue:B[Z],newValue:J});he!==void 0&&(B[Z]=he)}else B[Z]=J}return n.charCodeAt(g)!==Ug&&D(),g++,B}}function f(){if(n.charCodeAt(g)===oA){g++,u();const B=[];let U=!0;for(;g<n.length&&n.charCodeAt(g)!==Vg;){U?U=!1:l();const K=s();x(K),B.push(K)}return n.charCodeAt(g)!==Vg&&L(),g++,B}}function s(){u();const B=c()??i()??h()??f()??a("true",!0)??a("false",!1)??a("null",null);return u(),B}function a(B,U){if(n.slice(g,g+B.length)===B)return g+=B.length,U}function u(){for(;Jk(n.charCodeAt(g));)g++}function c(){if(n.charCodeAt(g)===Zu){g++;let B="";for(;g<n.length&&n.charCodeAt(g)!==Zu;){if(n.charCodeAt(g)===rA){const U=n[g+1],K=nA[U];K!==void 0?(B+=K,g++):U==="u"?Zl(n.charCodeAt(g+2))&&Zl(n.charCodeAt(g+3))&&Zl(n.charCodeAt(g+4))&&Zl(n.charCodeAt(g+5))?(B+=String.fromCharCode(Number.parseInt(n.slice(g+2,g+6),16)),g+=5):O(g):H(g)}else tA(n.charCodeAt(g))?B+=n[g]:I(n[g]);g++}return k(),g++,B}}function i(){const B=g;if(n.charCodeAt(g)===qg&&(g++,_(B)),n.charCodeAt(g)===Ju)g++;else if(eA(n.charCodeAt(g)))for(g++;Jl(n.charCodeAt(g));)g++;if(n.charCodeAt(g)===pA)for(g++,_(B);Jl(n.charCodeAt(g));)g++;if(n.charCodeAt(g)===yA||n.charCodeAt(g)===vA)for(g++,(n.charCodeAt(g)===qg||n.charCodeAt(g)===uA)&&g++,_(B);Jl(n.charCodeAt(g));)g++;if(g>B)return d(n.slice(B,g))}function l(){if(n.charCodeAt(g)!==dA)throw new SyntaxError(`Comma ',' expected after value ${N()}`);g++}function m(){if(n.charCodeAt(g)!==fA)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);g++}function w(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function E(){if(g<n.length)throw new SyntaxError(`Expected end of input ${N()}`)}function _(B){if(!Jl(n.charCodeAt(g))){const U=n.slice(B,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function k(){if(n.charCodeAt(g)!==Zu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function R(B){let{key:U,position:K}=B;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${K}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function L(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function I(B){throw new SyntaxError(`Invalid character '${B}' ${$()}`)}function H(B){const U=n.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function P(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function O(B){const U=n.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${g}`}function A(){return g<n.length?`but got '${n[g]}'`:"but reached end of input"}function N(){return`${A()} ${$()}`}}function Jk(n){return n===sA||n===aA||n===lA||n===cA}function Zl(n){return n>=Ju&&n<=eh||n>=gA&&n<=bA||n>=mA&&n<=wA}function Jl(n){return n>=Ju&&n<=eh}function eA(n){return n>=hA&&n<=eh}function tA(n){return n>=32&&n<=1114111}function Qu(n,e){return n===e?!0:Array.isArray(n)&&Array.isArray(e)?n.length===e.length&&n.every((t,r)=>Qu(t,e[r])):jg(n)&&jg(e)?[...new Set([...Object.keys(n),...Object.keys(e)])].every(t=>Qu(n[t],e[t])):!1}function jg(n){return typeof n=="object"&&n!==null}const nA={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
1398
|
+
`,r:"\r",t:" "},rA=92,iA=123,Ug=125,oA=91,Vg=93,sA=32,aA=10,lA=9,cA=13,Zu=34,uA=43,qg=45,Ju=48,hA=49,eh=57,dA=44,pA=46,fA=58,gA=65,mA=97,vA=69,yA=101,bA=70,wA=102;function Kg(n,e,t,r){return d(n);function d(h,f){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!Bg(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 s="[";for(let a=0;a<h.length;a++){const u=h[a];typeof u<"u"&&typeof u!="function"?s+=d(u):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function g(h,f){if(typeof h.toJSON=="function")return Kg(h.toJSON(),e,t,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,u="{";for(const c of s){const i=h[c];if(b(c,i)){a?a=!1:u+=",";const l=JSON.stringify(c);u+=`${l}:`,u+=d(i)}}return u+="}",u}function b(h,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function xA(n){return Ya(n)&&!Hg(n)?BigInt(n):parseFloat(n)}class CA{constructor(){Pl(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 Vu.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)=>Kg(g)],transformResponse:[g=>Zk(g,void 0,xA)]})).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,r,d,p){return this.exec("map_target_to_interface",[e,t],{cmd_only:r,tlm_only:d,unmap_old:p})}unmap_target_from_interface(e,t,r,d){return this.exec("unmap_target_from_interface",[e,t],{cmd_only:r,tlm_only:d})}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])}interface_target_enable(e,t,r=!1,d=!1){return this.exec("interface_target_enable",[e,t],{cmd_only:r,tlm_only:d})}interface_target_disable(e,t,r=!1,d=!1){return this.exec("interface_target_disable",[e,t],{cmd_only:r,tlm_only:d})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,t,r,d,p){return this.exec("map_target_to_router",[e,t],{cmd_only:r,tlm_only:d,unmap_old:p})}unmap_target_from_router(e,t,r,d){return this.exec("unmap_target_from_router",[e,t],{cmd_only:r,tlm_only:d})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,t,r=!1,d=!1){return this.exec("router_target_enable",[e,t],{cmd_only:r,tlm_only:d})}router_target_disable(e,t,r=!1,d=!1){return this.exec("router_target_disable",[e,t],{cmd_only:r,tlm_only:d})}router_details(e){return this.exec("router_details",[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])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,t=30,r=null,d=null,p=null){let g={stale_time:t};r!==null&&(g.cache_timeout=r),d!==null&&(g.start_time=d.toISOString()),p!==null&&(g.end_time=p.toISOString());const b=await this.exec("get_tlm_values",[e],g,{},1e4);if(b&&b.length>0){let h=b[0].length,f=null;for(let s=0;s<h;s++)f=this.decode_openc3_type(b[0][s]),f!==null&&(b[0][s]=f)}return b}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,g={}){let b=null;for(let h in d)Object.prototype.hasOwnProperty.call(d,h)&&(b=this.encode_openc3_type(d[h]),b!==null&&(d[h]=b));return this.exec(e,[t,r,d],g,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={},p={}){return t===void 0?this.exec("cmd",e,p,d):this._cmd("cmd",e,t,r,d,p)}cmd_no_range_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_range_check",e,p,d):this._cmd("cmd_no_range_check",e,t,r,d,p)}cmd_raw(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw",e,p,d):this._cmd("cmd_raw",e,t,r,d,p)}cmd_raw_no_range_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_range_check",e,p,d):this._cmd("cmd_raw_no_range_check",e,t,r,d,p)}cmd_no_hazardous_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_hazardous_check",e,p,d):this._cmd("cmd_no_hazardous_check",e,t,r,d,p)}cmd_no_checks(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_checks",e,p,d):this._cmd("cmd_no_checks",e,t,r,d,p)}cmd_raw_no_hazardous_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",e,p,d):this._cmd("cmd_raw_no_hazardous_check",e,t,r,d,p)}cmd_raw_no_checks(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_checks",e,p,d):this._cmd("cmd_raw_no_checks",e,t,r,d,p)}build_cmd(e,t,r,d={},p={}){return t===void 0?this.exec("build_cmd",e,p,d):this._cmd("build_cmd",e,t,r,d,p)}build_command(e,t,r,d={},p={}){return t===void 0?this.exec("build_cmd",e,p,d):this._cmd("build_cmd",e,t,r,d,p)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_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,t){return this.exec("get_setting",[e],t)}get_settings(e,t){return this.exec("get_settings",e,t)}set_setting(e,t){return this.exec("set_setting",[e,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}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("")}}}pr("B",CA);var Gg={exports:{}},Yg;function kA(){return Yg||(Yg=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,s){function a(L,I,H){if(!(L.length<I)){var P=L.slice(0,I),O=L.slice(I),$=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(A&&!A[2]&&(N=I-A[1].length,B=I),$&&!$[2]&&(N||(N=I),B=I+$[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if($&&$[2])return N=I+$[2].length,{start:N,end:N+$[3].length}}}for(var u=s.column||f.getOption("printMarginColumn"),c=s.allowMerge!=0,i=Math.min(s.startRow,s.endRow),l=Math.max(s.startRow,s.endRow),m=f.session;i<=l;){var w=m.getLine(i);if(w.length>u){var x=a(w,u,5);if(x){var E=/^\s*/.exec(w)[0];m.replace(new b(i,x.start,i,x.end),`
|
|
1399
|
+
`+E)}l++}else if(c&&/\S/.test(w)&&i!=l){var _=m.getLine(i+1);if(_&&/\S/.test(_)){var k=w.replace(/\s+$/,""),C=_.replace(/^\s+/,""),R=k+" "+C,x=a(R,u,5);if(x&&x.start>k.length||R.length<u){var D=new b(i,k.length,i+1,_.length-C.length);m.replace(D," "),i--,l--}else k.length<w.length&&m.remove(new b(i,k.length,i,w.length))}}i++}}function g(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var s=f.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;p(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.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 F=y.getLine(T.line),W=F.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",cs),R(y),Be.on(y.getInputField(),"paste",s(y))}function f(y){y.setOption("disableInput",!1),y.off("cursorActivity",cs),Be.off(y.getInputField(),"paste",s(y)),y.state.vim=null,Er&&clearTimeout(Er)}function s(y){var T=y.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(y.setCursor(me(y.getCursor(),0,1)),Qn.enterInsertMode(y,{},T))}),T.onPasteFn}function a(y,T){return T>=y.firstLine()&&T<=y.lastLine()}function u(y){return/^[a-z]$/.test(y)}function c(y){return"()[]{}".indexOf(y)!=-1}function i(y){return Ea.test(y)}function l(y){return ln.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,F,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),Vt[y]={type:S,defaultValue:T,callback:W},F)for(var z=0;z<F.length;z++)Vt[F[z]]=Vt[y];T&&_(y,T)}function _(y,T,S,F){var W=Vt[y];F=F||{};var z=F.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 F=Vt[y];S=S||{};var W=S.scope;if(!F)return new Error("Unknown option: "+y);if(F.callback){var z=T&&F.callback(void 0,T);return W!=="global"&&z!==void 0?z:W!=="local"?F.callback():void 0}var z=W!=="global"&&T&&T.state.vim.options[y];return(z||W!=="local"&&F||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Yn()}function R(y){return y.state.vim||(y.state.vim={inputState:new $,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 D(){Ue={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:qi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Vt){var T=Vt[y];T.value=T.defaultValue}}function L(y){function T(Y){typeof Y=="string"?En.value=Y:En=null}if(y[0]=="<"){var S=y.toLowerCase().slice(1,-1),F=S.split("-");if(S=F.pop()||"",S=="lt")y="<";else if(S=="space")y=" ";else if(S=="cr")y=`
|
|
1400
|
+
`;else if(Ki[S]){var W=En.value,z={key:Ki[S],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};En.onKeyDown&&En.onKeyDown(z,En.value,T),En&&En.onKeyUp&&En.onKeyUp(z,En.value,T);return}}if(y==`
|
|
1401
|
+
`){var q=En;En=null,q.onClose&&q.onClose(q.value)}else En.value=(En.value||"")+y}function I(y,T,S){var F=gn;if(S){if(ri.indexOf(S)!=-1)return;ri.push(S),gn=S.noremap!=0}try{for(var W=R(y),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec(T);){var Y=q[0],Q=W.insertMode;if(En){L(Y);continue}var re=wt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var ae=Y.toLowerCase().slice(1,-1),be=ae.split("-");if(ae=be.pop()||"",ae=="lt")Y="<";else if(ae=="space")Y=" ";else if(ae=="cr")Y=`
|
|
1402
|
+
`;else{if(Ki.hasOwnProperty(ae)){Y=Ki[ae],hs(y,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(ri.pop(),gn=ri.length?F:!1,!ri.length&&En){var ke=En;En=null,_r(y,ke)}}}function H(y,T){var S=y.key;if(!ii[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=ur[S]||S;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),Be.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||S.length>1)&&y.shiftKey&&(F+="S-"),T&&!T.expectLiteralNext&&S.length==1){if(or.keymap&&S in or.keymap)(or.remapCtrl!=0||!F)&&(S=or.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 F+=S,F.length>1&&(F="<"+F+">"),F}}function P(y,T){or.string!==y&&(or=O(y)),or.remapCtrl=T}function O(y){function T(F){return F.split(/\\?(.)/).filter(Boolean)}var S={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.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(F);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 $(){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 A(y,T){y.state.vim.inputState=new $,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=Ue.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");S[y]=T,an.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 J(y,T){Ci[y]=T}function he(y,T){for(var S=[],F=0;F<T;F++)S.push(y);return S}function ne(y,T){gs[y]=T}function le(y,T){Qn[y]=T}function se(y,T,S){var F=y.state.vim,W=F.insertMode||F.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 ae=1;S&&S.line==z&&S.ch>Q&&(ae=-1),Q+=ae,Q>Y&&(Q-=2)}return new Ne(z,Q)}function de(y){var T={};for(var S in y)y.hasOwnProperty(S)&&(T[S]=y[S]);return T}function me(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,F){F.operator&&(S="operatorPending");for(var W,z=[],q=[],Y=gn?T.length-Ho:0,Q=Y;Q<T.length;Q++){var re=T[Q];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||F.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>",F=T.slice(-10)=="<register>";if(S||F){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 Me(y){var T=/^.*(<[^>]+>)$/.exec(y),S=T?T[1]:y.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
|
|
1403
|
+
`;break;case"<Space>":S=" ";break;default:S=""}return S}function Je(y,T,S){return function(){for(var F=0;F<S;F++)T(y)}}function Xe(y){return new Ne(y.line,y.ch)}function ht(y,T){return y.ch==T.ch&&y.line==T.line}function st(y,T){return y.line<T.line?!0:y.line==T.line&&y.ch<T.ch}function dt(y,T){return arguments.length>2&&(T=dt.apply(void 0,Array.prototype.slice.call(arguments,1))),st(y,T)?y:T}function Zt(y,T){return arguments.length>2&&(T=Zt.apply(void 0,Array.prototype.slice.call(arguments,1))),st(y,T)?T:y}function $n(y,T,S){var F=st(y,T),W=st(T,S);return F&&W}function Ht(y,T){return y.getLine(T).length}function kr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function fn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Wn(y,T,S){var F=Ht(y,T),W=new Array(S-F+1).join(" ");y.setCursor(new Ne(T,F)),y.replaceRange(W,y.getCursor())}function ir(y,T){var S=[],F=y.listSelections(),W=Xe(y.clipPos(T)),z=!ht(T,W),q=y.getCursor("head"),Y=bt(F,q),Q=ht(F[Y].head,F[Y].anchor),re=F.length-1,ae=re-Y>Y?re:0,be=F[ae].anchor,ke=Math.min(be.line,W.line),ve=Math.max(be.line,W.line),we=be.ch,Oe=W.ch,Le=F[ae].head.ch-we,Ge=Oe-we;Le>0&&Ge<=0?(we++,z||Oe--):Le<0&&Ge>=0?(we--,Q||Oe++):Le<0&&Ge==-1&&(we--,Oe++);for(var ut=ke;ut<=ve;ut++){var et={anchor:new Ne(ut,we),head:new Ne(ut,Oe)};S.push(et)}return y.setSelections(S),T.ch=Oe,be.ch=we,be}function Or(y,T,S){for(var F=[],W=0;W<S;W++){var z=me(T,W,0);F.push({anchor:z,head:z})}y.setSelections(F,0)}function bt(y,T,S){for(var F=0;F<y.length;F++){var W=ht(y[F].anchor,T),z=ht(y[F].head,T);if(W||z)return F}return-1}function qe(y,T){var S=T.lastSelection,F=function(){var z=y.listSelections(),q=z[0],Y=z[z.length-1],Q=st(q.anchor,q.head)?q.anchor:q.head,re=st(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 ae=[],be=z.line;be<q.line;be++){var ke=new Ne(be,z.ch),ve=new Ne(be,q.ch),we={anchor:ke,head:ve};ae.push(we)}y.setSelections(ae)}else{var Oe=S.anchorMark.find(),Le=S.headMark.find(),Ge=Le.line-Oe.line,ut=Le.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ut+q.ch},S.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,Ht(y,q.line))),y.setSelection(z,q)}return[z,q]};return T.visualMode?F():W()}function Nt(y,T){var S=T.sel.anchor,F=T.sel.head;T.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(S)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:y.setBookmark(S),headMark:y.setBookmark(F),anchor:Xe(S),head:Xe(F),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function tn(y,T,S,F){var W=y.state.vim.sel,z=F?T:W.head,q=F?T:W.anchor,Y;return st(S,T)&&(Y=S,S=T,T=Y),st(z,q)?(z=dt(T,z),q=Zt(q,S)):(q=dt(T,q),z=Zt(z,S),z=me(z,0,-1),z.ch==-1&&z.line!=y.firstLine()&&(z=new Ne(z.line-1,Ht(y,z.line-1)))),[q,z]}function Bn(y,T,W){var F=y.state.vim;T=T||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",z=Ar(y,T,W);y.setSelections(z.ranges,z.primary)}function Ar(y,T,S,F){var W=Xe(T.head),z=Xe(T.anchor);if(S=="char"){var q=!F&&!st(T.head,T.anchor)?1:0,Y=st(T.head,T.anchor)?1:0;return W=me(T.head,0,q),z=me(T.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(S=="line"){if(st(T.head,T.anchor))W.ch=0,z.ch=Ht(y,z.line);else{z.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Ht(y,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(S=="block"){var re=Math.min(z.line,W.line),ae=z.ch,be=Math.max(z.line,W.line),ke=W.ch;ae<ke?ke+=1:ae+=1;for(var ve=be-re+1,we=W.line==re?0:ve-1,Oe=[],Le=0;Le<ve;Le++)Oe.push({anchor:new Ne(re+Le,ae),head:new Ne(re+Le,ke)});return{ranges:Oe,primary:we}}}function vr(y){var T=y.getCursor("head");return y.getSelection().length==1&&(T=dt(T,y.getCursor("anchor"))),T}function bn(y,T){var S=y.state.vim;T!==!1&&y.setCursor(se(y,S.sel.head)),Nt(y,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Be.signal(y,"vim-mode-change",{mode:"normal"})}function qn(y,T,S){var F=y.getRange(T,S);if(/\n\s*$/.test(F)){var W=F.split(`
|
|
1404
|
+
`);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=Ht(y,S.line)):S.ch=0}}function Hn(y,T,S){T.ch=0,S.ch=0,S.line++}function Xt(y){if(!y)return 0;var T=y.search(/\S/);return T==-1?y.length:T}function dn(y,T,S){var F=T.inclusive,W=T.innerWord,z=T.bigWord,q=T.noSymbol,Y=T.multiline,Q=S||vr(y),re=y.getLine(Q.line),ae=re,be=Q.line,ke=be,ve=Q.ch,we,Oe=q?zo[0]:Vi[0];if(W&&/\s/.test(re.charAt(ve)))Oe=function(Sn){return/\s/.test(Sn)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!Y)return null;ve--,we=gi(y,Q,!0,z,!0);break}z?Oe=Vi[0]:(Oe=zo[0],Oe(re.charAt(ve))||(Oe=zo[1]))}for(var Le=ve,Ge=ve;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,we)Le=we.to,ke=we.line,ae=y.getLine(ke),!ae&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(F){var ut=Le,et=Q.ch<=Ge&&/\s/.test(re.charAt(Q.ch));if(!et)for(;/\s/.test(ae.charAt(Le))&&Le<ae.length;)Le++;if(ut==Le||et){for(var at=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!et&&(Ge=at)}}return{start:new Ne(be,Ge),end:new Ne(ke,Le)}}function Hr(y,T,S){var F=T;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:F,end:F};var W=Be.findMatchingTag(y,T)||Be.findEnclosingTag(y,T);return!W||!W.open||!W.close?{start:F,end:F}:S?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Jr(y,T,S){ht(T,S)||Ue.jumpList.add(y,T,S)}function ei(y,T){Ue.lastCharacterSearch.increment=y,Ue.lastCharacterSearch.forward=T.forward,Ue.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Ii(y,T,S,F){var W=Xe(y.getCursor()),z=S?1:-1,q=S?y.lineCount():-1,Y=W.ch,Q=W.line,re=y.getLine(Q),ae={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:S,depth:0,curMoveThrough:!1},be=Li[F];if(!be)return W;var ke=Oi[be].init,ve=Oi[be].isComplete;for(ke&&ke(ae);Q!==q&&T;){if(ae.index+=z,ae.nextCh=ae.lineText.charAt(ae.index),!ae.nextCh){if(Q+=z,ae.lineText=y.getLine(Q)||"",z>0)ae.index=0;else{var we=ae.lineText.length;ae.index=we>0?we-1:0}ae.nextCh=ae.lineText.charAt(ae.index)}ve(ae)&&(W.line=Q,W.ch=ae.index,T--)}return ae.nextCh||ae.curMoveThrough?new Ne(Q,ae.index):W}function gi(y,T,S,F,W){var z=T.line,q=T.ch,Y=y.getLine(z),Q=S?1:-1,re=F?Vi:zo;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 ae=Q>0?Y.length:-1,be=ae,ke=ae;q!=ae;){for(var ve=!1,we=0;we<re.length&&!ve;++we)if(re[we](Y.charAt(q))){for(be=q;q!=ae&&re[we](Y.charAt(q));)q+=Q;if(ke=q,ve=be!=ke,be==T.ch&&z==T.line&&ke==be+Q)continue;return{from:Math.min(be,ke+1),to:Math.max(be,ke),line:z}}ve||(q+=Q)}if(z+=Q,!a(y,z))return null;Y=y.getLine(z),q=Q>0?0:Y.length}}function Kn(y,T,S,F,W,z){var q=Xe(T),Y=[];(F&&!W||!F&&W)&&S++;for(var Q=!F||!W,re=0;re<S;re++){var ae=gi(y,T,F,z,Q);if(!ae){var be=Ht(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}Y.push(ae),T=new Ne(ae.line,F?ae.to-1:ae.from)}var ke=Y.length!=S,ve=Y[0],we=Y.pop();return F&&!W?(!ke&&(ve.from!=q.ch||ve.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):F&&W?new Ne(we.line,we.to-1):!F&&W?(!ke&&(ve.to!=q.ch||ve.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function co(y,T,S,F,W){var z=T,q=new Ne(z.line+S.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),q}function mi(y,T,S,F,W){for(var z=W||y.getCursor(),q=z.ch,Y,Q=0;Q<T;Q++){var re=y.getLine(z.line);if(Y=Rn(q,re,F,S),Y==-1)return null;q=Y}return new Ne(y.getCursor().line,Y)}function zs(y,T){var S=y.getCursor().line;return se(y,new Ne(S,T-1))}function ti(y,T,S,F){!x(S,To)&&!nn.test(S)||(T.marks[S]&&T.marks[S].clear(),T.marks[S]=y.setBookmark(F))}function Rn(y,T,S,F,W){var z;return F?(z=T.indexOf(S,y+1),z!=-1):(z=T.lastIndexOf(S,y-1),z!=-1),z}function vi(y,T,S,F,W){function z(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ut,et){return et?z(Ge)!=z(Ge+ut):!z(Ge)&&z(Ge+ut)}function Y(Ge){F=F>0?1:-1;var ut=y.ace.session.getFoldLine(Ge);ut&&Ge+F>ut.start.row&&Ge+F<ut.end.row&&(F=(F>0?ut.end.row:ut.start.row)-Ge)}var Q=T.line,re=y.firstLine(),ae=y.lastLine(),be,ke,ve=Q;if(F){for(;re<=ve&&ve<=ae&&S>0;)Y(ve),q(ve,F)&&S--,ve+=F;return new Ne(ve,0)}var we=y.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(ve=Q;ve<=ae&&S;ve++)q(ve,1,!0)&&(!W||z(ve)!=Le)&&S--;for(ke=new Ne(ve,0),ve>ae&&!Le?Le=!0:W=!1,ve=Q;ve>re&&!((!W||z(ve)==Le||ve==Q)&&q(ve,-1,!0));ve--);return be=new Ne(ve,0),{start:be,end:ke}}function os(y,T,S,F,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,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&m(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(!m(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?m(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=ve,W&&m(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};S>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=q(y,Q.ln,Q.pos,F),S--;return new Ne(Q.ln,Q.pos)}function yi(y,T,S,F){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,ae,be){var Le=Q.getLine(re),ke=Le==="",ve={line:Le,ln:re,pos:ae,dir:be},we={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(W(Q,ve);ve.line!==null;){if(we.ln=ve.ln,we.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(ke&&ve.line!==""&&!m(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};w(ve.line[ve.pos])&&!ke&&(ve.pos===ve.line.length-1||m(ve.line[ve.pos+1]))&&(ke=!0),W(Q,ve)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ge=Le.length-1;Ge>=0;--Ge)if(!m(Le[Ge])){we.pos=Ge;break}return we}function q(Q,re,ae,be){var Oe=Q.getLine(re),ke={line:Oe,ln:re,pos:ae,dir:be},ve={ln:ke.ln,pos:null},we=ke.line==="";for(W(Q,ke);ke.line!==null;){if(ke.line===""&&!we)return ve.pos!==null?ve:{ln:ke.ln,pos:ke.pos};if(!(!w(ke.line[ke.pos])||ve.pos===null||ke.ln===ve.ln&&ke.pos+1===ve.pos))return ve;ke.line!==""&&!m(ke.line[ke.pos])&&(we=!1,ve={ln:ke.ln,pos:ke.pos}),W(Q,ke)}var Oe=Q.getLine(ve.ln);ve.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!m(Oe[Le])){ve.pos=Le;break}return ve}for(var Y={ln:T.line,pos:T.ch};S>0;)F<0?Y=q(y,Y.ln,Y.pos,F):Y=z(y,Y.ln,Y.pos,F),S--;return new Ne(Y.ln,Y.pos)}function Tn(y,T,S,F){var W=T,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],re=y.getLine(W.line).charAt(W.ch),ae=re===Q?1:0;if(z=y.scanForBracket(new Ne(W.line,W.ch+ae),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new Ne(W.line,W.ch+ae),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 be=z;z=q,q=be}return F?q.ch+=1:z.ch+=1,{start:z,end:q}}function yr(y,T,S,F){var W=Xe(T),z=y.getLine(W.line),q=z.split(""),Y,Q,re,ae,be=q.indexOf(S);if(W.ch<be)W.ch=be;else if(be<W.ch&&q[W.ch]==S){var ke=/string/.test(y.getTokenTypeAt(me(T,0,1))),ve=/string/.test(y.getTokenTypeAt(T)),we=ke&&!ve;we||(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,ae=q.length;re<ae&&!Q;re++)q[re]==S&&(Q=re);return!Y||!Q?{start:W,end:W}:(F&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function bi(){}function Mn(y){var T=y.state.vim;return T.searchState_||(T.searchState_=new bi)}function Ln(y){return wi(y,"/")}function Sr(y){return ko(y,"/")}function wi(y,T){var S=ko(y,T)||[];if(!S.length)return[];var F=[];if(S[0]===0){for(var W=0;W<S.length;W++)typeof S[W]=="number"&&F.push(y.substring(S[W]+1,S[W+1]));return F}}function ko(y,T){T||(T="/");for(var S=!1,F=[],W=0;W<y.length;W++){var z=y.charAt(W);!S&&z==T&&F.push(W),S=!S&&z=="\\"}return F}function Ao(y){for(var T="|(){",S="}",F=!1,W=[],z=-1;z<y.length;z++){var q=y.charAt(z)||"",Y=y.charAt(z+1)||"",Q=Y&&T.indexOf(Y)!=-1;F?((q!=="\\"||!Q)&&W.push(q),F=!1):q==="\\"?(F=!0,Y&&S.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function ss(y){for(var T=!1,S=[],F=-1;F<y.length;F++){var W=y.charAt(F)||"",z=y.charAt(F+1)||"";Gi[W+z]?(S.push(Gi[W+z]),F++):T?(S.push(W),T=!1):W==="\\"?(T=!0,i(z)||z==="$"?S.push("$"):z!=="/"&&z!=="\\"&&S.push("\\")):(W==="$"&&S.push("$"),S.push(W),z==="/"&&S.push("\\"))}return S.join("")}function ni(y){for(var T=new Be.StringStream(y),S=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)S.push(T.next());var F=!1;for(var W in Mr)if(T.match(W,!0)){F=!0,S.push(Mr[W]);break}F||S.push(T.next())}return S.join("")}function xi(y,T,S){var F=Ue.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var W=Sr(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=Ao(z)),S&&(T=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,T||q?"im":"m");return Q}function zr(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 F in T)Object.prototype.hasOwnProperty.call(T,F)&&(F[0]==="$"?y.style[F.slice(1)]=T[F]:y.setAttribute(F,T[F]));return y}function Dt(y,T){var S=zr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);y.openNotification?y.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function No(y,T){return zr("div",{$display:"flex"},zr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,zr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&zr("span",{$color:"#888"},T))}function _r(y,T){if(ri.length){T.value||(T.value=""),En=T;return}var S=No(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 F="";typeof T.prefix!="string"&&T.prefix&&(F+=T.prefix.textContent),T.desc&&(F+=" "+T.desc),T.onClose(prompt(F,""))}}function ce(y,T){if(y instanceof RegExp&&T instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],F=0;F<S.length;F++){var W=S[F];if(y[W]!==T[W])return!1}return!0}return!1}function ze(y,T,S,F){if(T){var W=Mn(y),z=xi(T,!!S,!!F);if(z)return Tt(y,z),ce(z,W.getQuery())||W.setQuery(z),z}}function Fe(y){if(y.source.charAt(0)=="^")var T=!0;return{token:function(S){if(T&&!S.sol()){S.skipToEnd();return}var F=S.match(y,!1);if(F)return F[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!y.exec(S.next()+F[0]))?(S.next(),null):(S.match(y),"searching");for(;!S.eol()&&(S.next(),!S.match(y,!1)););},query:y}}function Tt(y,T){clearTimeout(Er);var S=Mn(y);S.highlightTimeout=Er,Er=setTimeout(function(){if(y.state.vim){var F=Mn(y);F.highlightTimeout=null;var W=F.getOverlay();(!W||T!=W.query)&&(W&&y.removeOverlay(W),W=Fe(T),y.addOverlay(W),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(T))),F.setOverlay(W))}},50)}function Qt(y,T,S,F){return F===void 0&&(F=1),y.operation(function(){for(var W=y.getCursor(),z=y.getSearchCursor(S,W),q=0;q<F;q++){var Y=z.find(T);if(q==0&&Y&&ht(z.from(),W)){var Q=T?z.from():z.to();Y=z.find(T),Y&&!Y[0]&&ht(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 Ut(y,T,S,F,W){return F===void 0&&(F=1),y.operation(function(){var z=y.getCursor(),q=y.getSearchCursor(S,z),Y=q.find(!T);!W.visualMode&&Y&&ht(q.from(),z)&&q.find(!T);for(var Q=0;Q<F;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 $r(y){var T=Mn(y);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),y.removeOverlay(Mn(y).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function br(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 Gn(y){var T=y.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function Tr(y,T,S){if(S=="'"||S=="`")return Ue.jumpList.find(y,-1)||new Ne(0,0);if(S==".")return wn(y);var F=T.marks[S];return F&&F.find()}function wn(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var T=y.doc.history.done,S=T.length;S--;)if(T[S].changes)return Xe(T[S].changes[0].to)}function uo(y,T,S,F,W,z,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)ae(),ke();ve()})}function ae(){var et=y.getRange(z.from(),z.to()),at=et.replace(q,Y),Sn=z.to().line;z.replace(at),Ge=z.to().line,W+=Ge-Sn,ut=Ge<Sn}function be(){var et=Le&&Xe(z.to()),at=z.findNext();return at&&!at[0]&&et&&ht(z.from(),et)&&(at=z.findNext()),at}function ke(){for(;be()&&br(z.from(),F,W);)if(!(!S&&z.from().line==Ge&&!ut)){y.scrollIntoView(z.from(),30),y.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function ve(et){if(et&&et(),y.focus(),Le){y.setCursor(Le);var at=y.state.vim;at.exMode=!1,at.lastHPos=at.lastHSPos=Le.ch}Q&&Q()}function we(et,at,Sn){Be.e_stop(et);var pt=H(et);switch(pt){case"y":ae(),ke();break;case"n":ke();break;case"a":var On=Q;Q=void 0,y.operation(re),Q=On;break;case"l":ae();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(Sn)}return Oe&&ve(Sn),!0}y.state.vim.exMode=!0;var Oe=!1,Le,Ge,ut;if(ke(),Oe){Dt(y,"No matches for "+q.source);return}if(!T){re(),Q&&Q();return}_r(y,{prefix:zr("span","replace with ",zr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function jr(y,T){var S=y.state.vim,F=Ue.macroModeState,W=Ue.registerController.getRegister("."),z=F.isPlaying,q=F.lastInsertModeChanges;z||(y.off("change",Do),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Be.off(y.getInputField(),"keydown",qs)),!z&&S.insertModeRepeat>1&&(_a(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"}),F.isRecording&&wr(F)}function as(y){zn.unshift(y)}function js(y,T,S,F,W){var z={keys:y,type:T};z[T]=S,z[T+"Args"]=F;for(var q in W)z[q]=W[q];as(z)}function Us(y,T,S,F){var W=Ue.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&Dr.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,ae;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),ae=re[0],Q=Q.substring(re.index+ae.length),wt.handleKey(y,ae,"macro"),T.insertMode){var be=W.insertModeChanges[q++].changes;Ue.macroModeState.lastInsertModeChanges.changes=be,ds(y,be,1),jr(y)}S.isPlaying=!1}function ls(y,T){if(!y.isPlaying){var S=y.latestRegister,F=Ue.registerController.getRegister(S);F&&F.pushText(T)}}function wr(y){if(!y.isPlaying){var T=y.latestRegister,S=Ue.registerController.getRegister(T);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(y.lastInsertModeChanges)}}function Vs(y,T){if(!y.isPlaying){var S=y.latestRegister,F=Ue.registerController.getRegister(S);F&&F.pushSearchQuery&&F.pushSearchQuery(T)}}function Do(y,T){var S=Ue.macroModeState,F=S.lastInsertModeChanges;if(!S.isPlaying)for(var W=y.state.vim;T;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var z=y.listSelections().length;z>1&&(F.ignoreCount=z);var q=T.text.join(`
|
|
1405
|
+
`);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))F.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&&(F.changes.push([q,re]),q="")}}q&&F.changes.push(q)}}T=T.next}}function cs(y){var T=y.state.vim;if(T.insertMode){var S=Ue.macroModeState;if(S.isPlaying)return;var F=S.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||us(y,T)}function us(y,T,S){var F=y.getCursor("anchor"),W=y.getCursor("head");if(T.visualMode&&!y.somethingSelected()?bn(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=st(W,F)?0:-1,q=st(W,F)?-1:0;W=me(W,0,z),F=me(F,0,q),T.sel={anchor:F,head:W},ti(y,T,"<",dt(W,F)),ti(y,T,">",Zt(W,F))}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 qs(y){var T=Ue.macroModeState,S=T.lastInsertModeChanges,F=Be.keyName?Be.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new So(F,y)))}function _a(y,T,S,F){function W(){Y?Xn.processAction(y,T,T.lastEditActionCommand):Xn.evalInput(y,T)}function z(ae){if(q.lastInsertModeChanges.changes.length>0){ae=T.lastEditActionCommand?ae:1;var be=q.lastInsertModeChanges;ds(y,be.changes,ae)}}var q=Ue.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 F||W(),z(S);T.inputState=Q,T.insertMode&&!F&&jr(y),q.isPlaying=!1}function hs(y,T){Be.lookupKey(T,"vim-insert",function(S){return typeof S=="string"?Be.commands[S](y):S(y),!0})}function ds(y,T,S){var F=y.getCursor("head"),W=Ue.macroModeState.lastInsertModeChanges.visualBlock;W&&(Or(y,F,W+1),S=y.listSelections().length,y.setCursor(F));for(var z=0;z<S;z++){W&&y.setCursor(me(F,z,0));for(var q=0;q<T.length;q++){var Y=T[q];if(Y instanceof So)hs(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=me(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}W&&y.setCursor(me(F,0,1))}function Ks(y,T,S,F){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Ur[T]||T;var W="";if(S.ctrlKey&&(W+="C-"),S.altKey&&(W+="A-"),(W||T.length>1)&&S.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&T.length==1){if(or.keymap&&T in or.keymap)(or.remapCtrl!==!1||!W)&&(T=or.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 ps(y){var T=new y.constructor;return Object.keys(y).forEach(function(S){if(S!="insertEnd"){var F=y[S];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=ps(F)),T[S]=F}}),y.sel&&(T.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),T}function Fo(y,T,S){var F=!1,W=wt.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)F=wt.handleKey(y,T,S);else{var Y=ps(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ae=y.ace.selection;y.state.vim.lastHPos=ae.$desiredColumn==null?ae.lead.column:ae.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var be=y.getCursor("head"),ke=y.getCursor("anchor"),ve=st(be,ke)?0:-1,we=st(be,ke)?-1:0;be=me(be,0,ve),ke=me(ke,0,we),y.state.vim.sel.head=be,y.state.vim.sel.anchor=ke,F=Ni(y,T,S),ae.$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=ps(Y)),re++}),y.curOp.cursorActivity&&!F&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return F&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&us(y,W,!0),F}function Ui(y,T){T.off("beforeEndOperation",Ui);var S=T.state.cm.vimCmd;S&&T.execCommand(S.exec?S:S.name,S.args),T.curOp=T.prevOp}var xr=t("../range").Range,_o=t("../lib/event_emitter").EventEmitter,ho=t("../lib/dom"),$a=t("../lib/oop"),yl=t("../lib/keys"),Po=t("../lib/event"),po=t("../search").Search,Wo=t("../lib/useragent"),fs=t("../search_highlight").SearchHighlight,Bo=t("../commands/multi_select_commands"),Ta=t("../mode/text").Mode.prototype.tokenRe,$o=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(`
|
|
1406
|
+
`)},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=Po.stopEvent,Be.keyName=function(y){var T=yl[y.keyCode]||y.key||"";return T.length==1&&(T=T.toUpperCase()),T=Po.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,F){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&&F(W))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return y(T,S.fallthrough,F);for(var z=0;z<S.fallthrough.length;z++){var q=y(T,S.fallthrough[z],F);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=Po.addListener,Be.off=Po.removeListener,Be.isWordChar=function(y){return y<""?/^\w$/.test(y):(Ta.lastIndex=0,Ta.test(y))},(function(){$a.implement(Be.prototype,_o),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 F={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=F:W.lastChange=W.change=F,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(Bo.keyboardHandler)},this.operation=function(S,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return S();if((F||!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=F;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)),(F||!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,F,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,F)}},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,F){typeof S=="object"&&(F=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:F}),this.ace.selection.moveTo(S,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var F=this.ace.selection,W=S=="anchor"?F.isEmpty()?F.lead:F.anchor:S=="head"||!S?F.lead:F.getRange()[S];return g(W)},this.listSelections=function(S){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.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,F){var W=this.ace.multiSelect,z=S.map(function(re){var ae=p(re.anchor),be=p(re.head),ke=xr.comparePoints(ae,be)<0?new xr.fromPoints(ae,be):new xr.fromPoints(be,ae);return ke.cursor=xr.comparePoints(ke.start,be)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}F?z[F]&&z.push(z.splice(F,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,F,W){var z=this.ace.selection;z.moveTo(S.line,S.ch),z.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var F=this.ace.session.$clipPositionToDocument(S.line,S.ch);return g(F)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var F=S.action=="insert",W=S.start,z=S.end,q=(z.row-W.row)*(F?1:-1),Y=(z.column-W.column)*(F?1:-1);F&&(z=W);for(var Q in this.marks){var re=this.marks[Q],ae=xr.comparePoints(re,W);if(!(ae<0)){if(ae===0&&F)if(!re.$insertRight)ae=1;else{if(re.bias!=1){re.bias=-1;continue}ae=1}var be=F?ae:xr.comparePoints(re,z);if(be>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!F&&be<=0&&(re.row=W.row,re.column=W.column,be===0&&(re.bias=1))}}};var y=function(S,F,W,z){this.cm=S,this.id=F,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,F){var W=new y(this,this.$uid++,S.line,S.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(S,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,S)}},this.findPosV=function(S,F,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;F*=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+=F,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,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:W.column,top:W.row}}if(F=="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,F){var W=this.ace.renderer;if(F=="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(F=="div")throw"not implemented"},this.getSearchCursor=function(S,F,W){var z=!1,q=!1;S instanceof RegExp&&!S.global&&(z=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
|
|
1407
|
+
`,q=!1);var Y=new po;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,ae=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){Y.setOptions({needle:S,caseSensitive:z,wrap:!1,backwards:be,regExp:q,start:ae||Q});var ke=Y.find(re.ace.session);return ae=ke,ae&&[!ae.isEmpty()]},from:function(){return ae&&g(ae.start)},to:function(){return ae&&g(ae.end)},replace:function(be){ae&&(ae.end=re.ace.session.doc.replace(ae,be))}}},this.scrollTo=function(S,F){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,F){if(S){var W=this.ace.renderer,z={top:0,bottom:F};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,F){return this.ace.session.getTextRange(new xr(S.line,S.ch,F.line,F.ch))},this.replaceRange=function(S,F,W){W||(W=F);var z=new xr(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,S)},this.replaceSelection=this.replaceSelections=function(S){var F=Array.isArray(S)&&S,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?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],F?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,F){switch(this.state[S]=F,S){case"indentWithTabs":S=T[S],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:S=T[S]}S&&this.ace.setOption(S,F)},this.getOption=function(S){var F,W=T[S];switch(W&&(F=this.ace.getOption(W)),S){case"indentWithTabs":return S=T[S],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F: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 F=new fs(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(q){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var z=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=F,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,F=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var F=this.ace.session.getTokenAt(S.line,S.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(S){var F=this.ace.session.findMatchingBracket(p(S));return{to:F&&g(F)}},this.findMatchingTag=function(S){var F=this.ace.session.getMatchingTags(p(S));if(F)return{open:{from:g(F.openTag.start),to:g(F.openTag.end)},close:{from:g(F.closeTag.start),to:g(F.closeTag.end)}}},this.indentLine=function(S,F){F===!0?this.ace.session.indentRows(S,S," "):F===!1&&this.ace.session.outdentRows(new xr(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,F,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==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 F=this.$lineHandleChanges;if(!F)return null;for(var W=S.row,z=0;z<F.length;z++){var q=F[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 F=this.string.slice(this.pos).match(y);return F&&F.index>0?null:(F&&T!==!1&&(this.pos+=F[0].length),F)}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},ho.importCssString(`.normal-mode .ace_cursor{
|
|
1408
|
+
border: none;
|
|
1409
|
+
background-color: rgba(255,0,0,0.5);
|
|
1410
|
+
}
|
|
1411
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
|
1412
|
+
background-color: transparent;
|
|
1413
|
+
border: 1px solid red;
|
|
1414
|
+
opacity: 0.7
|
|
1415
|
+
}
|
|
1416
|
+
.ace_dialog {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
left: 0; right: 0;
|
|
1419
|
+
background: inherit;
|
|
1420
|
+
z-index: 15;
|
|
1421
|
+
padding: .1em .8em;
|
|
1422
|
+
overflow: hidden;
|
|
1423
|
+
color: inherit;
|
|
1424
|
+
}
|
|
1425
|
+
.ace_dialog-top {
|
|
1426
|
+
border-bottom: 1px solid #444;
|
|
1427
|
+
top: 0;
|
|
1428
|
+
}
|
|
1429
|
+
.ace_dialog-bottom {
|
|
1430
|
+
border-top: 1px solid #444;
|
|
1431
|
+
bottom: 0;
|
|
1432
|
+
}
|
|
1433
|
+
.ace_dialog input {
|
|
1434
|
+
border: none;
|
|
1435
|
+
outline: none;
|
|
1436
|
+
background: transparent;
|
|
1437
|
+
width: 20em;
|
|
1438
|
+
color: inherit;
|
|
1439
|
+
font-family: monospace;
|
|
1440
|
+
}`,"vimMode",!1),function(){function y(S,F,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 F=="string"?q.innerHTML=F:q.appendChild(F),q}function T(S,F){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=F}Be.defineExtension("openDialog",function(S,F,W){function z(be){if(typeof be=="string")re.value=be;else{if(Y||be&&be.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 ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.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],ae;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Be.on(re,"input",function(be){W.onInput(be,re.value,z)}),W.onKeyUp&&Be.on(re,"keyup",function(be){W.onKeyUp(be,re.value,z)}),Be.on(re,"keydown",function(be){W&&W.onKeyDown&&W.onKeyDown(be,re.value,z)||(be.keyCode==13&&F(re.value),(be.keyCode==27||W.closeOnEnter!==!1&&be.keyCode==13)&&(Be.e_stop(be),z()))}),W.closeOnBlur!==!1&&Be.on(re,"blur",z),re.focus()):(ae=q.getElementsByTagName("button")[0])&&(Be.on(ae,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Be.on(ae,"blur",z),ae.focus()),z}}),Be.defineExtension("openNotification",function(S,F){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){T(this,W);var z=y(this,S,F&&F.bottom),q=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Be.on(z,"click",function(re){Be.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Be.Pos,zn=[{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"}],Ho=zn.length,Ri=[{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"}],or=O(""),Ea=/[\d]/,zo=[Be.isWordChar,function(y){return y&&!Be.isWordChar(y)&&!/\s/.test(y)}],Vi=[function(y){return/\S/.test(y)}],To=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Vt={};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 F=Math.round(y);F>1&&T.setOption("textwidth",F)}});var qi=function(){function y(Q,re,ae){function be(Oe){var Le=++W%F,Ge=Y[Le];Ge&&Ge.clear(),Y[Le]=Q.setBookmark(Oe)}var ke=W%F,ve=Y[ke];if(ve){var we=ve.find();we&&!ht(we,re)&&be(re)}else be(re);be(ae),z=W,q=W-F+1,q<0&&(q=0)}function T(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var ae=Y[(F+W)%F];if(ae&&!ae.find()){var be=re>0?1:-1,ke,ve=Q.getCursor();do if(W+=be,ae=Y[(F+W)%F],ae&&(ke=ae.find())&&!ht(ve,ke))break;while(W<z&&W>q)}return ae}function S(Q,re){var ae=W,be=T(Q,re);return W=ae,be&&be.find()}var F=100,W=-1,z=0,q=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:S,move:T}},Yn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=Ue.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,T){var S=Ue.registerController.getRegister(T);if(S){if(S.clear(),this.latestRegister=T,y.openDialog){var F=zr("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var Ue,An,wt={enterVimMode:h,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return Ue.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return Ue},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:So,map:function(y,T,S){Dr.map(y,T,S)},unmap:function(y,T){return Dr.unmap(y,T)},noremap:function(y,T,S){Dr.map(y,T,S,!0)},mapclear:function(y){var T=zn.length,S=Ho,F=zn.slice(0,T-S);if(zn=zn.slice(T-S),y)for(var W=F.length-1;W>=0;W--){var z=F[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');Gs[y]=S,Dr.commandMap_[T]={name:y,shortName:T,type:"api"}},handleKey:function(y,T,S){var F=this.findKey(y,T,S);if(typeof F=="function")return F()},multiSelectHandleKey:Fo,findKey:function(y,T,S){function F(){var re=Ue.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),A(y),!0;S!="mapping"&&ls(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)bn(y);else{if(!Y.insertMode)return;jr(y)}return A(y),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),ae=T.length==1,be=Xn.matchCommand(re,zn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(be.type=="none")return A(y),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(Y.expectLiteralNext=!0),An&&window.clearTimeout(An),An=ae&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(y)},k("insertModeEscKeysTimeout")),ae){var ve=y.listSelections();(!ke||ke.removed.length!=ve.length)&&(ke=Y.inputState.changeQueue=new N),ke.inserted+=T;for(var we=0;we<ve.length;we++){var Oe=dt(ve[we].anchor,ve[we].head),Le=Zt(ve[we].anchor,ve[we].head),Ge=y.getRange(Oe,y.state.overwrite?me(Le,0,1):Le);ke.removed[we]=(ke.removed[we]||"")+Ge}}return!ae}if(Y.expectLiteralNext=!1,An&&window.clearTimeout(An),be.command&&ke){for(var ve=y.listSelections(),we=0;we<ve.length;we++){var ut=ve[we].head;y.replaceRange(ke.removed[we]||"",me(ut,0,-ke.inserted.length),ut,"+input")}Ue.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||A(y),be.command}function q(){if(F()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ae=/^(\d*)(.*)$/.exec(re);if(!ae)return A(y),!1;var be=Y.visualMode?"visual":"normal",ke=ae[2]||ae[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var ve=Xn.matchCommand(ke,zn,Y.inputState,be);return ve.type=="none"?(A(y),!1):ve.type=="partial"?(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ve.type=="clear"?(A(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ae=/^(\d*)(.*)$/.exec(re),ae[1]&&ae[1]!="0"&&Y.inputState.pushRepeatDigit(ae[1]),ve.command)}var Y=R(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):Xn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,R(y),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,T){Dr.processCommand(y,T)},defineMotion:J,defineAction:le,defineOperator:ne,mapCommand:js,_mapCommand:as,defineRegister:U,exitVisualMode:bn,exitInsertMode:jr},ri=[],gn=!1,En,ur={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ii={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Ki={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(ur)).forEach(function(y){Ki[(ur[y]||"").toLowerCase()]=Ki[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,T){if(y===void 0)return or.string;P(y)}),$.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},$.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(`
|
|
1441
|
+
`),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Yn(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,F,W){if(y!=="_"){F&&S.charAt(S.length-1)!==`
|
|
1442
|
+
`&&(S+=`
|
|
1443
|
+
`);var z=this.isValidRegister(y)?this.getRegister(y):null;if(!z){switch(T){case"yank":this.registers[0]=new B(S,F,W);break;case"delete":case"change":S.indexOf(`
|
|
1444
|
+
`)==-1?this.registers["-"]=new B(S,F):(this.shiftNumericRegisters_(),this.registers[1]=new B(S,F))}this.unnamedRegister.setText(S,F,W);return}var q=l(y);q?z.pushText(S,F):z.setText(S,F,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(z.toString(),F)}},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,an)||nn.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,F=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+F;T?W>=0:W<S.length;W+=F)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 Xn={matchCommand:function(y,T,S,F){var W=_e(y,T,F,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=Me(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=de(S.motionArgs),this.evalInput(y,T)},processOperator:function(y,T,S){var F=T.inputState;if(F.operator){if(F.operator==S.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,T);return}A(y)}F.operator=S.operator,F.operatorArgs=de(S.operatorArgs),S.keys.length>1&&(F.operatorShortcut=S.keys),S.exitVisualBlock&&(T.visualBlock=!1,Bn(y)),T.visualMode&&this.evalInput(y,T)},processOperatorMotion:function(y,T,S){var F=T.visualMode,W=de(S.operatorMotionArgs);W&&F&&W.visualLine&&(T.visualLine=!0),this.processOperator(y,T,S),F||this.processMotion(y,T,S)},processAction:function(y,T,S){var F=T.inputState,W=F.getRepeat(),z=!!W,q=de(S.actionArgs)||{};F.selectedCharacter&&(q.selectedCharacter=F.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=F.registerName,A(y),T.lastMotion=null,S.isEdit&&this.recordLastEdit(T,F,S),Qn[S.action](y,q,T)},processSearch:function(y,T,S){function F(Le,Ge,ut){Ue.searchHistoryController.pushInput(Le),Ue.searchHistoryController.reset();try{ze(y,Le,Ge,ut)}catch{Dt(y,"Invalid regex: "+Le),A(y);return}Xn.processMotion(y,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function W(Le){F(Le,!0,!0);var Ge=Ue.macroModeState;Ge.isRecording&&Vs(Ge,Le)}function z(Le,Ge,ut){var et=H(Le),at,Sn;et=="<Up>"||et=="<Down>"?(at=et=="<Up>",Sn=Le.target?Le.target.selectionEnd:0,Ge=Ue.searchHistoryController.nextMatch(Ge,at)||"",ut(Ge),Sn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(Sn,Le.target.value.length))):et&&et!="<Left>"&&et!="<Right>"&&Ue.searchHistoryController.reset();var pt;try{pt=ze(y,Ge,!0,!0)}catch{}pt?y.scrollIntoView(Qt(y,!Y,pt),30):($r(y),y.scrollTo(be.left,be.top))}function q(Le,Ge,ut){var et=H(Le);et=="<Esc>"||et=="<C-c>"||et=="<C-[>"||et=="<BS>"&&Ge==""?(Ue.searchHistoryController.pushInput(Ge),Ue.searchHistoryController.reset(),ze(y,ae),$r(y),y.scrollTo(be.left,be.top),Be.e_stop(Le),A(y),ut(),y.focus()):et=="<Up>"||et=="<Down>"?Be.e_stop(Le):et=="<C-u>"&&(Be.e_stop(Le),ut(""))}if(y.getSearchCursor){var Y=S.searchArgs.forward,Q=S.searchArgs.wholeWordOnly;Mn(y).setReversed(!Y);var re=Y?"/":"?",ae=Mn(y).getQuery(),be=y.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var ke=Ue.macroModeState;if(ke.isPlaying){var Oe=ke.replaySearchQueries.shift();F(Oe,!0,!1)}else _r(y,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var ve=dn(y,{noSymbol:!0}),we=!0;if(ve||(ve=dn(y,{noSymbol:!1}),we=!1),!ve){Dt(y,"No word under cursor"),A(y);return}var Oe=y.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=fn(Oe),Ue.jumpList.cachedCursor=y.getCursor(),y.setCursor(ve.start),F(Oe,!0,!1)}}},processEx:function(y,T,S){function F(z){Ue.exCommandHistoryController.pushInput(z),Ue.exCommandHistoryController.reset(),Dr.processCommand(y,z),y.state.vim&&A(y)}function W(z,q,Y){var Q=H(z),re,ae;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Ue.exCommandHistoryController.pushInput(q),Ue.exCommandHistoryController.reset(),Be.e_stop(z),A(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(z),re=Q=="<Up>",ae=z.target?z.target.selectionEnd:0,q=Ue.exCommandHistoryController.nextMatch(q,re)||"",Y(q),ae&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(ae,z.target.value.length))):Q=="<C-u>"?(Be.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Ue.exCommandHistoryController.reset()}S.type=="keyToEx"?Dr.processCommand(y,S.exArgs.input):T.visualMode?_r(y,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):_r(y,{onClose:F,prefix:":",onKeyDown:W})},evalInput:function(y,T){var S=T.inputState,F=S.motion,W=S.motionArgs||{},z=S.operator,q=S.operatorArgs||{},Y=S.registerName,Q=T.sel,re=Xe(T.visualMode?se(y,Q.head):y.getCursor("head")),ae=Xe(T.visualMode?se(y,Q.anchor):y.getCursor("anchor")),be=Xe(re),ke=Xe(ae),ve,we,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,A(y),F){var Le=Ci[F](y,re,W,T,S);if(T.lastMotion=Ci[F],!Le)return;if(W.toJumplist){!z&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=Ue.jumpList,ut=Ge.cachedCursor;ut?(Jr(y,ut,Le),delete Ge.cachedCursor):Jr(y,re,Le)}Le instanceof Array?(we=Le[0],ve=Le[1]):ve=Le,ve||(ve=Xe(re)),T.visualMode?((!T.visualBlock||ve.ch!==1/0)&&(ve=se(y,ve,be)),we&&(we=se(y,we)),we=we||ke,Q.anchor=we,Q.head=ve,Bn(y),ti(y,T,"<",st(we,ve)?we:ve),ti(y,T,">",st(we,ve)?ve:we)):z||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ve=se(y,ve,be),y.setCursor(ve.line,ve.ch))}if(z){if(q.lastSel){we=ke;var et=q.lastSel,at=Math.abs(et.head.line-et.anchor.line),Sn=Math.abs(et.head.ch-et.anchor.ch);et.visualLine?ve=new Ne(ke.line+at,ke.ch):et.visualBlock?ve=new Ne(ke.line+at,ke.ch+Sn):et.head.line==et.anchor.line?ve=new Ne(ke.line,ke.ch+Sn):ve=new Ne(ke.line+at,ke.ch),T.visualMode=!0,T.visualLine=et.visualLine,T.visualBlock=et.visualBlock,Q=T.sel={anchor:we,head:ve},Bn(y)}else T.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var pt,On,kt,Mt,hr;if(T.visualMode){pt=dt(Q.head,Q.anchor),On=Zt(Q.head,Q.anchor),kt=T.visualLine||q.linewise,Mt=T.visualBlock?"block":kt?"line":"char";var Ir=b(y,pt,On);if(hr=Ar(y,{anchor:Ir.start,head:Ir.end},Mt),kt){var Nn=hr.ranges;if(Mt=="block")for(var V=0;V<Nn.length;V++)Nn[V].head.ch=Ht(y,Nn[V].head.line);else Mt=="line"&&(Nn[0].head=new Ne(Nn[0].head.line+1,0))}}else{if(pt=Xe(we||ke),On=Xe(ve||be),st(On,pt)){var X=pt;pt=On,On=X}kt=W.linewise||q.linewise,kt?Hn(y,pt,On):W.forward&&qn(y,pt,On),Mt="char";var ie=!W.inclusive||kt,Ir=b(y,pt,On);hr=Ar(y,{anchor:Ir.start,head:Ir.end},Mt,ie)}y.setSelections(hr.ranges,hr.primary),T.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=kt;var oe=gs[z](y,q,hr.ranges,ke,ve);T.visualMode&&bn(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,T,S){var F=Ue.macroModeState;F.isPlaying||(y.lastEditInputState=T,y.lastEditActionCommand=S,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Ci={moveToTopLine:function(y,T,S){var F=Gn(y).top+S.repeat-1;return new Ne(F,Xt(y.getLine(F)))},moveToMiddleLine:function(y){var T=Gn(y),S=Math.floor((T.top+T.bottom)*.5);return new Ne(S,Xt(y.getLine(S)))},moveToBottomLine:function(y,T,S){var F=Gn(y).bottom-S.repeat+1;return new Ne(F,Xt(y.getLine(F)))},expandToLine:function(y,T,S){var F=T;return new Ne(F.line+S.repeat-1,1/0)},findNext:function(y,T,S){var F=Mn(y),W=F.getQuery();if(W){var z=!S.forward;return z=F.isReversed()?!z:z,Tt(y,W),Qt(y,z,W,S.repeat)}},findAndSelectNextInclusive:function(y,T,S,F,W){var z=Mn(y),q=z.getQuery();if(q){var Y=!S.forward;Y=z.isReversed()?!Y:Y;var Q=Ut(y,Y,q,S.repeat,F);if(Q){if(W.operator)return Q;var re=Q[0],ae=new Ne(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var be=F.sel.anchor;if(be)return z.isReversed()?S.forward?[be,re]:[be,ae]:S.forward?[be,ae]:[be,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ae,re]:[re,ae]}}},goToMark:function(y,T,S,F){var W=Tr(y,F,S.selectedCharacter);return W?S.linewise?{line:W.line,ch:Xt(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,T,S,F){if(F.visualBlock&&S.sameLine){var W=F.sel;return[se(y,new Ne(W.anchor.line,W.head.ch)),se(y,new Ne(W.head.line,W.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(y,T,S,F){for(var W=T,z=0;z<S.repeat;z++){var q=W;for(var Y in F.marks)if(u(Y)){var Q=F.marks[Y].find(),re=S.forward?st(Q,q):st(q,Q);if(!re&&!(S.linewise&&Q.line==q.line)){var ae=ht(q,W),be=S.forward?$n(q,Q,W):$n(W,Q,q);(ae||be)&&(W=Q)}}}return S.linewise&&(W=new Ne(W.line,Xt(y.getLine(W.line)))),W},moveByCharacters:function(y,T,S){var F=T,W=S.repeat,z=S.forward?F.ch+W:F.ch-W;return new Ne(F.line,z)},moveByLines:function(y,T,S,F){var W=T,z=W.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=F.lastHPos;break;default:F.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,F);if(Y>re&&W.line==re)return co(y,T,S,F,!0);var ae=y.ace.session.getFoldLine(Y);return ae&&(S.forward?Y>ae.start.row&&(Y=ae.end.row+1):Y=ae.start.row),S.toFirstChar&&(z=Xt(y.getLine(Y)),F.lastHPos=z),F.lastHSPos=y.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(y,T,S,F){var W=T;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=y.charCoords(W,"div").left}var z=S.repeat,Q=y.findPosV(W,S.forward?z:-z,"line",F.lastHSPos);if(Q.hitSide)if(S.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:F.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new Ne(y.firstLine(),0),"div");re.left=F.lastHSPos,Q=y.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(y,T,S){var F=T,W=S.repeat;return y.findPosV(F,S.forward?W:-W,"page")},moveByParagraph:function(y,T,S){var F=S.forward?1:-1;return vi(y,T,S.repeat,F)},moveBySentence:function(y,T,S){var F=S.forward?1:-1;return yi(y,T,S.repeat,F)},moveByScroll:function(y,T,S,F){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=Ci.moveByDisplayLines(y,T,S,F),!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 Kn(y,T,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(y,T,S){var F=S.repeat,W=mi(y,F,S.forward,S.selectedCharacter,T),z=S.forward?-1:1;return ei(z,S),W?(W.ch+=z,W):null},moveToCharacter:function(y,T,S){var F=S.repeat;return ei(0,S),mi(y,F,S.forward,S.selectedCharacter,T)||T},moveToSymbol:function(y,T,S){var F=S.repeat;return Ii(y,F,S.forward,S.selectedCharacter)||T},moveToColumn:function(y,T,S,F){var W=S.repeat;return F.lastHPos=W-1,F.lastHSPos=y.charCoords(T,"div").left,zs(y,W)},moveToEol:function(y,T,S,F){return co(y,T,S,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,T){var S=T;return new Ne(S.line,Xt(y.getLine(S.line)))},moveToMatchedSymbol:function(y,T){for(var S=T,F=S.line,W=S.ch,z=y.getLine(F),q;W<z.length;W++)if(q=z.charAt(W),q&&c(q)){var Y=y.getTokenTypeAt(new Ne(F,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new Ne(F,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 F=S.forward?y.lastLine():y.firstLine();return S.repeatIsExplicit&&(F=S.repeat-y.getOption("firstLineNumber")),new Ne(F,Xt(y.getLine(F)))},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,F){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=Tn(y,T,q,Y),!Q){var ae=y.getSearchCursor(new RegExp("\\"+q,"g"),T);ae.find()&&(Q=Tn(y,ae.from(),q,Y))}}else if(z[q])re=!0,Q=yr(y,T,q,Y);else if(q==="W"||q==="w")for(var be=S.repeat||1;be-- >0;){var ke=dn(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(q==="p")if(Q=vi(y,T,S.repeat,0,Y),S.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var ve=F.inputState.operatorArgs;ve&&(ve.linewise=!0),Q.end.line--}else if(q==="t")Q=Hr(y,T,Y);else if(q==="s"){var we=y.getLine(T.line);T.ch>0&&w(we[T.ch])&&(T.ch-=1);var Oe=os(y,T,S.repeat,1,Y),Le=os(y,T,S.repeat,-1,Y);m(y.getLine(Le.line)[Le.ch])&&m(y.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?y.state.vim.visualMode?tn(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,T,S){var F=Ue.lastCharacterSearch,W=S.repeat,z=S.forward===F.forward,q=(F.increment?1:0)*(z?-1:1);y.moveH(-q,"char"),S.inclusive=!!z;var Y=mi(y,W,z,F.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),T)}},gs={change:function(y,T,S){var F,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(""),F=q;else{W=y.getSelection();var Q=he("",S.length);y.replaceSelections(Q),F=dt(S[0].head,S[0].anchor)}else{W=y.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(W)){var ae=/\s+$/.exec(W);ae&&re.motionArgs&&re.motionArgs.forward&&(Y=me(Y,0,-ae[0].length),W=W.slice(0,-ae[0].length))}T.linewise&&(q=new Ne(q.line,Xt(y.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),F=q}Ue.registerController.pushText(T.registerName,"change",W,T.linewise,S.length>1),Qn.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,T,S){var F,W,z=y.state.vim;if(z.visualBlock){W=y.getSelection();var q=he("",S.length);y.replaceSelections(q),F=dt(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,Ht(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,T.linewise&&(F=Ci.moveToFirstNonWhiteSpaceCharacter(y,Y))}return Ue.registerController.pushText(T.registerName,"delete",W,T.linewise,z.visualBlock),se(y,F)},indent:function(y,T,S){var F=y.state.vim,W=F.visualMode?T.repeat:1;if(F.visualBlock){for(var z=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=S.length-1;Q>=0;Q--)if(Y=dt(S[Q].anchor,S[Q].head),T.indentRight)y.replaceRange(q.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),ae=0,be=0;be<W;be++){var ke=re[Y.ch+ae];if(ke==" ")ae++;else{if(ke!=" ")break;ae++;for(var ve=1;ve<q.length&&(ke=re[Y.ch+ae],ke===" ");ve++)ae++}}y.replaceRange("",Y,me(Y,0,ae))}return Y}if(y.indentMore)for(var be=0;be<W;be++)T.indentRight?y.indentMore():y.indentLess();else{var we=S[0].anchor.line,Oe=F.visualBlock?S[S.length-1].anchor.line:S[0].head.line;T.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var be=0;be<W;be++)y.indentLine(Q,T.indentRight)}return Ci.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},indentAuto:function(y,T,S){return y.execCommand("indentAuto"),Ci.moveToFirstNonWhiteSpaceCharacter(y,S[0].anchor)},hardWrap:function(y,T,S,F,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?F:new Ne(Y,0)}},changeCase:function(y,T,S,F,W){for(var z=y.getSelections(),q=[],Y=T.toLower,Q=0;Q<z.length;Q++){var re=z[Q],ae="";if(Y===!0)ae=re.toLowerCase();else if(Y===!1)ae=re.toUpperCase();else for(var be=0;be<re.length;be++){var ke=re.charAt(be);ae+=l(ke)?ke.toLowerCase():ke.toUpperCase()}q.push(ae)}return y.replaceSelections(q),T.shouldMoveCursor?W:!y.state.vim.visualMode&&T.linewise&&S[0].anchor.line+1==S[0].head.line?Ci.moveToFirstNonWhiteSpaceCharacter(y,F):T.linewise?F:dt(S[0].anchor,S[0].head)},yank:function(y,T,S,F){var W=y.state.vim,z=y.getSelection(),q=W.visualMode?dt(W.sel.anchor,W.sel.head,S[0].head,S[0].anchor):F;return Ue.registerController.pushText(T.registerName,"yank",z,T.linewise,W.visualBlock),q}},Qn={jumpListWalk:function(y,T,S){if(!S.visualMode){var F=T.repeat,W=T.forward,z=Ue.jumpList,q=z.move(y,W?F:-F),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 F=T.repeat||1,W=y.defaultTextHeight(),z=y.getScrollInfo().top,q=W*F,Y=T.forward?z+q:z-q,Q=Xe(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 ae=Y+y.getScrollInfo().clientHeight;ae<re.bottom?(Q.line-=(re.bottom-ae)/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,F=y.charCoords(new Ne(S,0),"local"),W=y.getScrollInfo().clientHeight,z=F.top;switch(T.position){case"center":z=F.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 F=T.selectedCharacter,W=T.repeat,z=Ue.macroModeState;for(F=="@"?F=z.latestRegister:z.latestRegister=F;W--;)Us(y,S,z,F)},enterMacroRecordMode:function(y,T){var S=Ue.macroModeState,F=T.selectedCharacter;Ue.registerController.isValidRegister(F)&&S.enterMacroRecordMode(y,F)},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 F=T?T.insertAt:null,W=S.sel,z=T.head||y.getCursor("head"),q=y.listSelections().length;if(F=="eol")z=new Ne(z.line,Ht(y,z.line));else if(F=="bol")z=new Ne(z.line,0);else if(F=="charAfter"){var Y=b(y,z,me(z,0,1));z=Y.end}else if(F=="firstNonBlank"){var Y=b(y,z,Ci.moveToFirstNonWhiteSpaceCharacter(y,z));z=Y.end}else if(F=="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(F=="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=me(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(F=="inplace"){if(S.visualMode)return}else F=="lastEdit"&&(z=wn(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"})),Ue.macroModeState.isPlaying||(y.on("change",Do),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(z,{insertLeft:!0}),Be.on(y.getInputField(),"keydown",qs)),S.visualMode&&bn(y),Or(y,z,q)}},toggleVisualMode:function(y,T,S){var F=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":""}),Bn(y)):bn(y);else{S.visualMode=!0,S.visualLine=!!T.linewise,S.visualBlock=!!T.blockwise,z=se(y,new Ne(W.line,W.ch+F-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":""}),Bn(y),ti(y,S,"<",dt(W,z)),ti(y,S,">",Zt(W,z))}},reselectLastSelection:function(y,T,S){var F=S.lastSelection;if(S.visualMode&&Nt(y,S),F){var W=F.anchorMark.find(),z=F.headMark.find();if(!W||!z)return;S.sel={anchor:W,head:z},S.visualMode=!0,S.visualLine=F.visualLine,S.visualBlock=F.visualBlock,Bn(y),ti(y,S,"<",dt(W,z)),ti(y,S,">",Zt(W,z)),Be.signal(y,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(y,T,S){var F,W;if(S.visualMode){if(F=y.getCursor("anchor"),W=y.getCursor("head"),st(W,F)){var z=W;W=F,F=z}W.ch=Ht(y,W.line)-1}else{var q=Math.max(T.repeat,2);F=y.getCursor(),W=se(y,new Ne(F.line+q-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Ht(y,F.line);var re="",ae=0;if(!T.keepSpaces){var be=y.getLine(F.line+1);ae=be.search(/\S/),ae==-1?ae=be.length:re=" "}y.replaceRange(re,new Ne(F.line,Y),new Ne(F.line+1,ae))}var ke=se(y,new Ne(F.line,Y));S.visualMode&&bn(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,T,S){S.insertMode=!0;var F=Xe(y.getCursor());if(F.line===y.firstLine()&&!T.after)y.replaceRange(`
|
|
1445
|
+
`,new Ne(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{F.line=T.after?F.line:F.line-1,F.ch=Ht(y,F.line),y.setCursor(F);var W=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:T.repeat},S)},paste:function(y,T,S){var F=this,W=Ue.registerController.getRegister(T.registerName),z=function(){var q=W.toString();F.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){F.continuePaste(y,T,S,q,W)},function(){z()}):z()},continuePaste:function(y,T,S,F,W){var z=Xe(y.getCursor());if(F){if(T.matchIndent){var q=y.getOption("tabSize"),Y=function(Nn){var V=Nn.split(" ").length-1,X=Nn.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),ae=F.replace(/\n$/,""),be=F!==ae,ke=Y(F.match(/^\s*/)[0]),F=ae.replace(/^\s*/gm,function(Nn){var V=re+(Y(Nn)-ke);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});F+=be?`
|
|
1446
|
+
`:""}if(T.repeat>1)var F=Array(T.repeat+1).join(F);var ve=W.linewise,we=W.blockwise;if(we){F=F.split(`
|
|
1447
|
+
`),ve&&F.pop();for(var Oe=0;Oe<F.length;Oe++)F[Oe]=F[Oe]==""?" ":F[Oe];z.ch+=T.after?1:0,z.ch=Math.min(Ht(y,z.line),z.ch)}else ve?S.visualMode?F=S.visualLine?F.slice(0,-1):`
|
|
1448
|
+
`+F.slice(0,F.length-1)+`
|
|
1449
|
+
`:T.after?(F=`
|
|
1450
|
+
`+F.slice(0,F.length-1),z.ch=Ht(y,z.line)):z.ch=0:z.ch+=T.after?1:0;var Le;if(S.visualMode){S.lastPastedText=F;var Ge,ut=qe(y,S),et=ut[0],at=ut[1],Sn=y.getSelection(),pt=y.listSelections(),On=new Array(pt.length).join("1").split("1");S.lastSelection&&(Ge=S.lastSelection.headMark.find()),Ue.registerController.unnamedRegister.setText(Sn),we?(y.replaceSelections(On),at=new Ne(et.line+F.length-1,et.ch),y.setCursor(et),ir(y,at),y.replaceSelections(F),Le=et):S.visualBlock?(y.replaceSelections(On),y.setCursor(et),y.replaceRange(F,et,et),Le=et):(y.replaceRange(F,et,at),Le=y.posFromIndex(y.indexFromPos(et)+F.length-1)),Ge&&(S.lastSelection.headMark=y.setBookmark(Ge)),ve&&(Le.ch=0)}else if(we){y.setCursor(z);for(var Oe=0;Oe<F.length;Oe++){var kt=z.line+Oe;kt>y.lastLine()&&y.replaceRange(`
|
|
1451
|
+
`,new Ne(kt,0));var Mt=Ht(y,kt);Mt<z.ch&&Wn(y,kt,z.ch)}y.setCursor(z),ir(y,new Ne(z.line+F.length-1,z.ch)),y.replaceSelections(F),Le=z}else if(y.replaceRange(F,z),ve){var kt=T.after?z.line+1:z.line;Le=new Ne(kt,Xt(y.getLine(kt)))}else Le=Xe(z),/\n/.test(F)||(Le.ch+=F.length-(T.after?1:0));S.visualMode&&bn(y,!1),y.setCursor(Le)}},undo:function(y,T){y.operation(function(){Je(y,Be.commands.undo,T.repeat)(),y.setCursor(se(y,y.getCursor("start")))})},redo:function(y,T){Je(y,Be.commands.redo,T.repeat)()},setRegister:function(y,T,S){S.inputState.registerName=T.selectedCharacter},insertRegister:function(y,T,S){var F=T.selectedCharacter,W=Ue.registerController.getRegister(F),z=W&&W.toString();z&&y.replaceSelection(z)},oneNormalCommand:function(y,T,S){jr(y,!0),S.insertModeReturn=!0,Be.on(y,"vim-command-done",function F(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Qn.enterInsertMode(y,{},S)),Be.off(y,"vim-command-done",F))})},setMark:function(y,T,S){var F=T.selectedCharacter;ti(y,S,F,y.getCursor())},replace:function(y,T,S){var F=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,F==`
|
|
1452
|
+
`)S.visualMode||y.replaceRange("",W,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(y);else{var ae=y.getRange(W,q);if(ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/[^\n]/g,F),S.visualBlock){var be=new Array(y.getOption("tabSize")+1).join(" ");ae=y.getSelection(),ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/\t/g,be).replace(/[^\n]/g,F).split(`
|
|
1453
|
+
`),y.replaceSelections(ae)}else y.replaceRange(ae,W,q);S.visualMode?(W=st(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),bn(y,!1)):y.setCursor(me(q,0,-1))}},incrementNumberToken:function(y,T){for(var S=y.getCursor(),F=y.getLine(S.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(F))!==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],ae=z[3]||z[5],be=T.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(z[1]+ae,ke)+be*T.repeat;Q=ve.toString(ke);var we=re?new Array(ae.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(S.line,q),Le=new Ne(S.line,Y);y.replaceRange(Q,Oe,Le),y.setCursor(new Ne(S.line,q+Q.length-1))}},repeatLastEdit:function(y,T,S){var F=S.lastEditInputState;if(F){var W=T.repeat;W&&T.repeatIsExplicit?S.lastEditInputState.repeatOverride=W:W=S.lastEditInputState.repeatOverride||W,_a(y,S,W,!1)}},indent:function(y,T){y.indentLine(y.getCursor().line,T.indentRight)},exitInsertMode:jr},Li={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Oi={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"),bi.prototype={getQuery:function(){return Ue.query},setQuery:function(y){Ue.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return Ue.isReversed},setReversed:function(y){Ue.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Gi={"\\n":`
|
|
1454
|
+
`,"\\r":"\r","\\t":" "},Mr={"\\/":"/","\\\\":"\\","\\n":`
|
|
1455
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},Er=0,Nr=function(){this.buildCommandMap_()};Nr.prototype={processCommand:function(y,T,S){var F=this;y.operation(function(){y.curOp.isVimOp=!0,F._processCommand(y,T,S)})},_processCommand:function(y,T,S){var F=y.state.vim,W=Ue.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(ae){throw Dt(y,ae.toString()),ae}F.visualMode&&bn(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){Dt(y,'Not an editor command ":'+T+'"');return}try{Gs[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(ae){throw Dt(y,ae.toString()),ae}},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 F=Tr(y,y.state.vim,"<");S.selectionLine=F&&F.line,F=Tr(y,y.state.vim,">"),S.selectionLineEnd=F&&F.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 F=T.next(),W=Tr(y,y.state.vim,F);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 F=parseInt(S[2],10);S[1]=="-"?T-=F:T+=F}return T},parseCommandArgs_:function(y,T,S){if(!y.eol()){T.argString=y.match(/.*/)[0];var F=S.argDelimiter||/\s+/,W=kr(T.argString).split(F);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 F=this.commandMap_[S];if(F.name.indexOf(y)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Ri.length;y++){var T=Ri[y],S=T.shortName||T.name;this.commandMap_[S]=T}},map:function(y,T,S,F){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:!!F};S&&(z.context=S),zn.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 F=y,W=0;W<zn.length;W++)if(F==zn[W].keys&&zn[W].context===T)return zn.splice(W,1),!0}};var Gs={colorscheme:function(y,T){if(!T.args||T.args.length<1){Dt(y,y.getOption("theme"));return}y.setOption("theme",T.args[0])},map:function(y,T,S,F){var W=T.args;if(!W||W.length<2){y&&Dt(y,"Invalid mapping: "+T.input);return}Dr.map(W[0],W[1],S,F)},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 F=T.args;(!F||F.length<1||!Dr.unmap(F[0],S))&&y&&Dt(y,"No such mapping: "+T.input)},mapclear:function(y,T){wt.mapclear()},imapclear:function(y,T){wt.mapclear("insert")},nmapclear:function(y,T){wt.mapclear("normal")},vmapclear:function(y,T){wt.mapclear("visual")},omapclear:function(y,T){wt.mapclear("operatorPending")},move:function(y,T){Xn.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,F=T.setCfg||{};if(!S||S.length<1){y&&Dt(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=Vt[z]&&Vt[z].type=="boolean";if(re&&(Q?q=!k(z,y,F):q==null&&(q=!0)),!re&&q===void 0||Y){var ae=k(z,y,F);ae instanceof Error?Dt(y,ae.message):ae===!0||ae===!1?Dt(y," "+(ae?"":"no")+z):Dt(y," "+z+"="+ae)}else{var be=_(z,q,y,F);be instanceof Error&&Dt(y,be.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,F=Ue.registerController.registers,W=`----------Registers----------
|
|
1456
|
+
|
|
1457
|
+
`;if(S){var z;S=S.join("");for(var q=0;q<S.length;q++)if(z=S.charAt(q),!!Ue.registerController.isValidRegister(z)){var Y=F[z]||new B;W+='"'+z+" "+Y.toString()+`
|
|
1458
|
+
`}}else for(var z in F){var Q=F[z].toString();Q.length&&(W+='"'+z+" "+Q+`
|
|
1459
|
+
`)}Dt(y,W)},sort:function(y,T){function S(){if(T.argString){var kt=new Be.StringStream(T.argString);if(kt.eat("!")&&(z=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var Mt=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Mt&&!kt.eol())return"Invalid arguments";if(Mt[1]){q=Mt[1].indexOf("i")!=-1,Y=Mt[1].indexOf("u")!=-1;var hr=Mt[1].indexOf("d")!=-1||Mt[1].indexOf("n")!=-1&&1,Ir=Mt[1].indexOf("x")!=-1&&1,Nn=Mt[1].indexOf("o")!=-1&&1;if(hr+Ir+Nn>1)return"Invalid arguments";Q=hr&&"decimal"||Ir&&"hex"||Nn&&"octal"}Mt[2]&&(re=new RegExp(Mt[2].substr(1,Mt[2].length-2),q?"i":""))}}function F(kt,Mt){if(z){var hr;hr=kt,kt=Mt,Mt=hr}q&&(kt=kt.toLowerCase(),Mt=Mt.toLowerCase());var Ir=Q&&Le.exec(kt),Nn=Q&&Le.exec(Mt);return Ir?(Ir=parseInt((Ir[1]+Ir[2]).toLowerCase(),Ge),Nn=parseInt((Nn[1]+Nn[2]).toLowerCase(),Ge),Ir-Nn):kt<Mt?-1:1}function W(kt,Mt){if(z){var hr;hr=kt,kt=Mt,Mt=hr}return q&&(kt[0]=kt[0].toLowerCase(),Mt[0]=Mt[0].toLowerCase()),kt[0]<Mt[0]?-1:1}var z,q,Y,Q,re,ae=S();if(ae){Dt(y,ae+": "+T.argString);return}var be=T.line||y.firstLine(),ke=T.lineEnd||T.line||y.lastLine();if(be!=ke){var ve=new Ne(be,0),we=new Ne(ke,Ht(y,ke)),Oe=y.getRange(ve,we).split(`
|
|
1460
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ge=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ut=[],et=[];if(Q||re)for(var at=0;at<Oe.length;at++){var Sn=re?Oe[at].match(re):null;Sn&&Sn[0]!=""?ut.push(Sn):!re&&Le.exec(Oe[at])?ut.push(Oe[at]):et.push(Oe[at])}else et=Oe;if(ut.sort(re?W:F),re)for(var at=0;at<ut.length;at++)ut[at]=ut[at].input;else Q||et.sort(F);if(Oe=z?ut.concat(et):et.concat(ut),Y){var pt=Oe,On;Oe=[];for(var at=0;at<pt.length;at++)pt[at]!=On&&Oe.push(pt[at]),On=pt[at]}y.replaceRange(Oe.join(`
|
|
1461
|
+
`),ve,we)}},vglobal:function(y,T){this.global(y,T)},normal:function(y,T){var S=T.argString;if(S&&S[0]=="!"&&(S=S.slice(1),gn=!0),S=S.trimStart(),!S){Dt(y,"Argument is required.");return}var F=T.line;if(typeof F=="number")for(var W=isNaN(T.lineEnd)?F:T.lineEnd,z=F;z<=W;z++)y.setCursor(z,0),I(y,T.argString.trimStart()),y.state.vim.insertMode&&jr(y,!0);else I(y,T.argString.trimStart()),y.state.vim.insertMode&&jr(y,!0)},global:function(y,T){var S=T.argString;if(!S){Dt(y,"Regular Expression missing from global");return}var F=T.commandName[0]==="v";S[0]==="!"&&T.commandName[0]==="g"&&(F=!0,S=S.slice(1));var W=T.line!==void 0?T.line:y.firstLine(),z=T.lineEnd||T.line||y.lastLine(),q=Ln(S),Y=S,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{ze(y,Y,!0,!0)}catch{Dt(y,"Invalid regex: "+Y);return}for(var re=Mn(y).getQuery(),ae=[],be=W;be<=z;be++){var ke=y.getLine(be),ve=re.test(ke);ve!==F&&ae.push(Q?y.getLineHandle(be):ke)}if(!Q){Dt(y,ae.join(`
|
|
1462
|
+
`));return}var we=0,Oe=function(){if(we<ae.length){var Le=ae[we++],Ge=y.getLineNumber(Le);if(Ge==null){Oe();return}var ut=Ge+1+Q;Dr.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,F=S?wi(S,S[0]):[],W,z="",q,Y,Q,re=!1,ae=!1;if(F.length)W=F[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),z=F[1],z!==void 0&&(k("pcre")?z=ni(z.replace(/([^\\])&/g,"$1$$&")):z=ss(z),Ue.lastSubstituteReplacePart=z),q=F[2]?F[2].split(" "):[];else if(S&&S.length){Dt(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&&(ae=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{ze(y,W,!0,!0)}catch{Dt(y,"Invalid regex: "+W);return}if(z=z||Ue.lastSubstituteReplacePart,z===void 0){Dt(y,"No previous substitute regular expression");return}var be=Mn(y),ke=be.getQuery(),ve=T.line!==void 0?T.line:y.getCursor().line,we=T.lineEnd||ve;ve==y.firstLine()&&we==y.lastLine()&&(we=1/0),Q&&(ve=we,we=ve+Q-1);var Oe=se(y,new Ne(ve,0)),Le=y.getSearchCursor(ke,Oe);uo(y,re,ae,ve,we,Le,ke,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){$r(y)},yank:function(y){var T=Xe(y.getCursor()),S=T.line,F=y.getLine(S);Ue.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,T){var S=T.selectionLine,F=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;gs.delete(y,{linewise:!0},[{anchor:new Ne(S,0),head:new Ne(F+1,0)}])},join:function(y,T){var S=T.selectionLine,F=isNaN(T.selectionLineEnd)?S:T.selectionLineEnd;y.setCursor(new Ne(S,0)),Qn.joinLines(y,{repeat:F-S},y.state.vim)},delmarks:function(y,T){if(!T.argString||!kr(T.argString)){Dt(y,"Argument required");return}for(var S=y.state.vim,F=new Be.StringStream(kr(T.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Dt(y,"Invalid argument: "+T.argString.substring(W));return}var z=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Dt(y,"Invalid argument: "+T.argString.substring(W));return}var q=z,Y=F.next();if(!(u(q)&&u(Y)||l(q)&&l(Y))){Dt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Dt(y,"Invalid argument: "+T.argString.substring(W));return}for(var ae=0;ae<=re-Q;ae++){var be=String.fromCharCode(Q+ae);delete S.marks[be]}}else delete S.marks[z]}}},Dr=new Nr;E("insertModeEscKeysTimeout",200,"number"),Be.Vim=wt;var Ur={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"},Ni=wt.handleKey.bind(wt);wt.handleKey=function(y,T,S){return y.operation(function(){return Ni(y,T,S)},!0)},D(),r.CodeMirror=Be;var Di=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,T,S,F,W){var z=this.state.vim||{},q=S.characterWidth,Y=S.lineHeight,Q=T.top,re=T.left;if(!z.insertMode){var ae=F.cursor?xr.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!ae&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),ho.translate(y,re,Q),ho.setStyle(y.style,"width",q+"px"),ho.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var T=y.state.cm,S=Di(T);if(!S.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,T,S,F,W){var z=y.editor,q=z.state.cm,Y=Di(q);if(F!=-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&&!Wo.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){bn(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Mn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(T==-1||T&1||T===0&&S.length>1){var ae=Y.insertMode,be=Ks(T,S,W||{},Y);Y.status==null&&(Y.status="");var ke=Fo(q,be,"user");return Y=Di(q),ke&&Y.status!=null?Y.status+=be:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!ke&&(T!=-1||ae)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function T(){var F=Di(S).insertMode;S.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var S=new Be(y);y.state.cm=S,y.$vimModeHandler=this,h(S),Di(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(Di(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=Di(T);if(S.insertMode)return"INSERT";var F="";return S.visualMode&&(F+="VISUAL",S.visualLine&&(F+=" LINE"),S.visualBlock&&(F+=" BLOCK")),S.status&&(F+=(F?" ":"")+S.status),F}},wt.defineOption({name:"wrap",set:function(y,T){T&&T.ace.setOption("wrap",y)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),zn.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"}}),zn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(y,T,S,F,W){var z=S[0].anchor.line,q=S[0].head.line;return T.linewise&&q--,$o(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 F=Math.round(y);F>1&&T.ace.setOption("printMarginColumn",F)}}),Qn.aceCommand=function(y,T,S){y.vimCmd=T,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ui):Ui(null,y.ace)},Qn.fold=function(y,T,S){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},Ho=zn.length,r.handler.defaultKeymap=zn,r.handler.actions=Qn,r.Vim=wt}),function(){ace.require(["ace/keyboard/vim"],function(t){n&&(n.exports=t)})}()}(Gg)),Gg.exports}kA();var Xg={},Qg;function AA(){return Qg||(Qg=1,function(n){(function(){var e={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(b){return d(g(b),arguments)}function r(b,h){return t.apply(null,[b].concat(h||[]))}function d(b,h){var f=1,s=b.length,a,u="",c,i,l,m,w,x,E,_;for(c=0;c<s;c++)if(typeof b[c]=="string")u+=b[c];else if(typeof b[c]=="object"){if(l=b[c],l.keys)for(a=h[f],i=0;i<l.keys.length;i++){if(a==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[i],l.keys[i-1]));a=a[l.keys[i]]}else l.param_no?a=h[l.param_no]:a=h[f++];if(e.not_type.test(l.type)&&e.not_primitive.test(l.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(l.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(t("[sprintf] expecting number but found %T",a));switch(e.number.test(l.type)&&(E=a>=0),l.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,l.width?parseInt(l.width):0);break;case"e":a=l.precision?parseFloat(a).toExponential(l.precision):parseFloat(a).toExponential();break;case"f":a=l.precision?parseFloat(a).toFixed(l.precision):parseFloat(a);break;case"g":a=l.precision?String(Number(a.toPrecision(l.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=l.precision?a.substring(0,l.precision):a;break;case"t":a=String(!!a),a=l.precision?a.substring(0,l.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=l.precision?a.substring(0,l.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=l.precision?a.substring(0,l.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}e.json.test(l.type)?u+=a:(e.number.test(l.type)&&(!E||l.sign)?(_=E?"+":"-",a=a.toString().replace(e.sign,"")):_="",w=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",x=l.width-(_+a).length,m=l.width&&x>0?w.repeat(x):"",u+=l.align?_+a+m:w==="0"?_+m+a:m+_+a)}return u}var p=Object.create(null);function g(b){if(p[b])return p[b];for(var h=b,f,s=[],a=0;h;){if((f=e.text.exec(h))!==null)s.push(f[0]);else if((f=e.modulo.exec(h))!==null)s.push("%");else if((f=e.placeholder.exec(h))!==null){if(f[2]){a|=1;var u=[],c=f[2],i=[];if((i=e.key.exec(c))!==null)for(u.push(i[1]);(c=c.substring(i[0].length))!=="";)if((i=e.key_access.exec(c))!==null)u.push(i[1]);else if((i=e.index_access.exec(c))!==null)u.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");h=h.substring(f[0].length)}return p[b]=s}n.sprintf=t,n.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()}(Xg)),Xg}AA();var ec={exports:{}};/**
|
|
1463
|
+
* @license
|
|
1464
|
+
* Lodash <https://lodash.com/>
|
|
1465
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
1466
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1467
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1468
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1469
|
+
*/var SA=ec.exports,Zg;function _A(){return Zg||(Zg=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,s="__lodash_placeholder__",a=1,u=2,c=4,i=1,l=2,m=1,w=2,x=4,E=8,_=16,k=32,C=64,R=128,D=256,L=512,I=30,H="...",P=800,O=16,$=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,J=4294967295,he=J-1,ne=J>>>1,le=[["ary",R],["bind",m],["bindKey",w],["curry",E],["curryRight",_],["flip",L],["partial",k],["partialRight",C],["rearg",D]],se="[object Arguments]",de="[object Array]",me="[object AsyncFunction]",_e="[object Boolean]",Te="[object Date]",Me="[object DOMException]",Je="[object Error]",Xe="[object Function]",ht="[object GeneratorFunction]",st="[object Map]",dt="[object Number]",Zt="[object Null]",$n="[object Object]",Ht="[object Promise]",kr="[object Proxy]",fn="[object RegExp]",Wn="[object Set]",ir="[object String]",Or="[object Symbol]",bt="[object Undefined]",qe="[object WeakMap]",Nt="[object WeakSet]",tn="[object ArrayBuffer]",Bn="[object DataView]",Ar="[object Float32Array]",vr="[object Float64Array]",bn="[object Int8Array]",qn="[object Int16Array]",Hn="[object Int32Array]",Xt="[object Uint8Array]",dn="[object Uint8ClampedArray]",Hr="[object Uint16Array]",Jr="[object Uint32Array]",ei=/\b__p \+= '';/g,Ii=/\b(__p \+=) '' \+/g,gi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kn=/&(?:amp|lt|gt|quot|#39);/g,co=/[&<>"']/g,mi=RegExp(Kn.source),zs=RegExp(co.source),ti=/<%-([\s\S]+?)%>/g,Rn=/<%([\s\S]+?)%>/g,vi=/<%=([\s\S]+?)%>/g,os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yi=/^\w*$/,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,bi=RegExp(yr.source),Mn=/^\s+/,Ln=/\s/,Sr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wi=/\{\n\/\* \[wrapped with (.+)\] \*/,ko=/,? & /,Ao=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ss=/[()=,{}\[\]\/\s]/,ni=/\\(\\)?/g,xi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zr=/\w*$/,Dt=/^[-+]0x[0-9a-f]+$/i,No=/^0b[01]+$/i,_r=/^\[object .+?Constructor\]$/,ce=/^0o[0-7]+$/i,ze=/^(?:0|[1-9]\d*)$/,Fe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tt=/($^)/,Qt=/['\n\r\u2028\u2029\\]/g,Ut="\\ud800-\\udfff",$r="\\u0300-\\u036f",br="\\ufe20-\\ufe2f",Gn="\\u20d0-\\u20ff",Tr=$r+br+Gn,wn="\\u2700-\\u27bf",uo="a-z\\xdf-\\xf6\\xf8-\\xff",jr="\\xac\\xb1\\xd7\\xf7",as="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",js="\\u2000-\\u206f",Us=" \\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",ls="A-Z\\xc0-\\xd6\\xd8-\\xde",wr="\\ufe0e\\ufe0f",Vs=jr+as+js+Us,Do="['’]",cs="["+Ut+"]",us="["+Vs+"]",So="["+Tr+"]",qs="\\d+",_a="["+wn+"]",hs="["+uo+"]",ds="[^"+Ut+Vs+qs+wn+uo+ls+"]",Ks="\\ud83c[\\udffb-\\udfff]",ps="(?:"+So+"|"+Ks+")",Fo="[^"+Ut+"]",Ui="(?:\\ud83c[\\udde6-\\uddff]){2}",xr="[\\ud800-\\udbff][\\udc00-\\udfff]",_o="["+ls+"]",ho="\\u200d",$a="(?:"+hs+"|"+ds+")",yl="(?:"+_o+"|"+ds+")",Po="(?:"+Do+"(?:d|ll|m|re|s|t|ve))?",po="(?:"+Do+"(?:D|LL|M|RE|S|T|VE))?",Wo=ps+"?",fs="["+wr+"]?",Bo="(?:"+ho+"(?:"+[Fo,Ui,xr].join("|")+")"+fs+Wo+")*",Ta="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$o="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=fs+Wo+Bo,Ma="(?:"+[_a,Ui,xr].join("|")+")"+Be,Ne="(?:"+[Fo+So+"?",So,Ui,xr,cs].join("|")+")",zn=RegExp(Do,"g"),Ho=RegExp(So,"g"),Ri=RegExp(Ks+"(?="+Ks+")|"+Ne+Be,"g"),or=RegExp([_o+"?"+hs+"+"+Po+"(?="+[us,_o,"$"].join("|")+")",yl+"+"+po+"(?="+[us,_o+$a,"$"].join("|")+")",_o+"?"+$a+"+"+Po,_o+"+"+po,$o,Ta,qs,Ma].join("|"),"g"),Ea=RegExp("["+ho+Ut+Tr+wr+"]"),zo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vi=["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"],To=-1,an={};an[Ar]=an[vr]=an[bn]=an[qn]=an[Hn]=an[Xt]=an[dn]=an[Hr]=an[Jr]=!0,an[se]=an[de]=an[tn]=an[_e]=an[Bn]=an[Te]=an[Je]=an[Xe]=an[st]=an[dt]=an[$n]=an[fn]=an[Wn]=an[ir]=an[qe]=!1;var nn={};nn[se]=nn[de]=nn[tn]=nn[Bn]=nn[_e]=nn[Te]=nn[Ar]=nn[vr]=nn[bn]=nn[qn]=nn[Hn]=nn[st]=nn[dt]=nn[$n]=nn[fn]=nn[Wn]=nn[ir]=nn[Or]=nn[Xt]=nn[dn]=nn[Hr]=nn[Jr]=!0,nn[Je]=nn[Xe]=nn[qe]=!1;var ln={À:"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"},Vt={"&":"&","<":"<",">":">",'"':""","'":"'"},qi={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,An=parseInt,wt=typeof ns=="object"&&ns&&ns.Object===Object&&ns,ri=typeof self=="object"&&self&&self.Object===Object&&self,gn=wt||ri||Function("return this")(),En=e&&!e.nodeType&&e,ur=En&&!0&&n&&!n.nodeType&&n,ii=ur&&ur.exports===En,Ki=ii&&wt.process,Xn=function(){try{var fe=ur&&ur.require&&ur.require("util").types;return fe||Ki&&Ki.binding&&Ki.binding("util")}catch{}}(),Ci=Xn&&Xn.isArrayBuffer,gs=Xn&&Xn.isDate,Qn=Xn&&Xn.isMap,Li=Xn&&Xn.isRegExp,Oi=Xn&&Xn.isSet,Gi=Xn&&Xn.isTypedArray;function Mr(fe,$e,Ce){switch(Ce.length){case 0:return fe.call($e);case 1:return fe.call($e,Ce[0]);case 2:return fe.call($e,Ce[0],Ce[1]);case 3:return fe.call($e,Ce[0],Ce[1],Ce[2])}return fe.apply($e,Ce)}function Er(fe,$e,Ce,Ke){for(var ft=-1,Et=fe==null?0:fe.length;++ft<Et;){var Jt=fe[ft];$e(Ke,Jt,Ce(Jt),fe)}return Ke}function Nr(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function Gs(fe,$e){for(var Ce=fe==null?0:fe.length;Ce--&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function Dr(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke;)if(!$e(fe[Ce],Ce,fe))return!1;return!0}function Ur(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length,ft=0,Et=[];++Ce<Ke;){var Jt=fe[Ce];$e(Jt,Ce,fe)&&(Et[ft++]=Jt)}return Et}function Ni(fe,$e){var Ce=fe==null?0:fe.length;return!!Ce&&ae(fe,$e,0)>-1}function Di(fe,$e,Ce){for(var Ke=-1,ft=fe==null?0:fe.length;++Ke<ft;)if(Ce($e,fe[Ke]))return!0;return!1}function y(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length,ft=Array(Ke);++Ce<Ke;)ft[Ce]=$e(fe[Ce],Ce,fe);return ft}function T(fe,$e){for(var Ce=-1,Ke=$e.length,ft=fe.length;++Ce<Ke;)fe[ft+Ce]=$e[Ce];return fe}function S(fe,$e,Ce,Ke){var ft=-1,Et=fe==null?0:fe.length;for(Ke&&Et&&(Ce=fe[++ft]);++ft<Et;)Ce=$e(Ce,fe[ft],ft,fe);return Ce}function F(fe,$e,Ce,Ke){var ft=fe==null?0:fe.length;for(Ke&&ft&&(Ce=fe[--ft]);ft--;)Ce=$e(Ce,fe[ft],ft,fe);return Ce}function W(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke;)if($e(fe[Ce],Ce,fe))return!0;return!1}var z=we("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(Ao)||[]}function Q(fe,$e,Ce){var Ke;return Ce(fe,function(ft,Et,Jt){if($e(ft,Et,Jt))return Ke=Et,!1}),Ke}function re(fe,$e,Ce,Ke){for(var ft=fe.length,Et=Ce+(Ke?1:-1);Ke?Et--:++Et<ft;)if($e(fe[Et],Et,fe))return Et;return-1}function ae(fe,$e,Ce){return $e===$e?tt(fe,$e,Ce):re(fe,ke,Ce)}function be(fe,$e,Ce,Ke){for(var ft=Ce-1,Et=fe.length;++ft<Et;)if(Ke(fe[ft],$e))return ft;return-1}function ke(fe){return fe!==fe}function ve(fe,$e){var Ce=fe==null?0:fe.length;return Ce?ut(fe,$e)/Ce:Z}function we(fe){return function($e){return $e==null?t:$e[fe]}}function Oe(fe){return function($e){return fe==null?t:fe[$e]}}function Le(fe,$e,Ce,Ke,ft){return ft(fe,function(Et,Jt,Lt){Ce=Ke?(Ke=!1,Et):$e(Ce,Et,Jt,Lt)}),Ce}function Ge(fe,$e){var Ce=fe.length;for(fe.sort($e);Ce--;)fe[Ce]=fe[Ce].value;return fe}function ut(fe,$e){for(var Ce,Ke=-1,ft=fe.length;++Ke<ft;){var Et=$e(fe[Ke]);Et!==t&&(Ce=Ce===t?Et:Ce+Et)}return Ce}function et(fe,$e){for(var Ce=-1,Ke=Array(fe);++Ce<fe;)Ke[Ce]=$e(Ce);return Ke}function at(fe,$e){return y($e,function(Ce){return[Ce,fe[Ce]]})}function Sn(fe){return fe&&fe.slice(0,Ft(fe)+1).replace(Mn,"")}function pt(fe){return function($e){return fe($e)}}function On(fe,$e){return y($e,function(Ce){return fe[Ce]})}function kt(fe,$e){return fe.has($e)}function Mt(fe,$e){for(var Ce=-1,Ke=fe.length;++Ce<Ke&&ae($e,fe[Ce],0)>-1;);return Ce}function hr(fe,$e){for(var Ce=fe.length;Ce--&&ae($e,fe[Ce],0)>-1;);return Ce}function Ir(fe,$e){for(var Ce=fe.length,Ke=0;Ce--;)fe[Ce]===$e&&++Ke;return Ke}var Nn=Oe(ln),V=Oe(Vt);function X(fe){return"\\"+Yn[fe]}function ie(fe,$e){return fe==null?t:fe[$e]}function oe(fe){return Ea.test(fe)}function ge(fe){return zo.test(fe)}function xe(fe){for(var $e,Ce=[];!($e=fe.next()).done;)Ce.push($e.value);return Ce}function Ee(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ke,ft){Ce[++$e]=[ft,Ke]}),Ce}function We(fe,$e){return function(Ce){return fe($e(Ce))}}function He(fe,$e){for(var Ce=-1,Ke=fe.length,ft=0,Et=[];++Ce<Ke;){var Jt=fe[Ce];(Jt===$e||Jt===s)&&(fe[Ce]=s,Et[ft++]=Ce)}return Et}function Ye(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ke){Ce[++$e]=Ke}),Ce}function Ze(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ke){Ce[++$e]=[Ke,Ke]}),Ce}function tt(fe,$e,Ce){for(var Ke=Ce-1,ft=fe.length;++Ke<ft;)if(fe[Ke]===$e)return Ke;return-1}function xt(fe,$e,Ce){for(var Ke=Ce+1;Ke--;)if(fe[Ke]===$e)return Ke;return Ke}function Wt(fe){return oe(fe)?ct(fe):z(fe)}function At(fe){return oe(fe)?xn(fe):q(fe)}function Ft(fe){for(var $e=fe.length;$e--&&Ln.test(fe.charAt($e)););return $e}var gt=Oe(qi);function ct(fe){for(var $e=Ri.lastIndex=0;Ri.test(fe);)++$e;return $e}function xn(fe){return fe.match(Ri)||[]}function Dn(fe){return fe.match(or)||[]}var dr=function fe($e){$e=$e==null?gn:Gt.defaults(gn.Object(),$e,Gt.pick(gn,Vi));var Ce=$e.Array,Ke=$e.Date,ft=$e.Error,Et=$e.Function,Jt=$e.Math,Lt=$e.Object,oi=$e.RegExp,Yi=$e.String,mn=$e.TypeError,Rr=Ce.prototype,jo=Et.prototype,Zn=Lt.prototype,Ys=$e["__core-js_shared__"],Uc=jo.toString,pn=Zn.hasOwnProperty,PR=0,m0=function(){var o=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Vc=Zn.toString,WR=Uc.call(Lt),BR=gn._,HR=oi("^"+Uc.call(pn).replace(yr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qc=ii?$e.Buffer:t,ms=$e.Symbol,Kc=$e.Uint8Array,v0=qc?qc.allocUnsafe:t,Gc=We(Lt.getPrototypeOf,Lt),y0=Lt.create,b0=Zn.propertyIsEnumerable,Yc=Rr.splice,w0=ms?ms.isConcatSpreadable:t,bl=ms?ms.iterator:t,Xs=ms?ms.toStringTag:t,Xc=function(){try{var o=ta(Lt,"defineProperty");return o({},"",{}),o}catch{}}(),zR=$e.clearTimeout!==gn.clearTimeout&&$e.clearTimeout,jR=Ke&&Ke.now!==gn.Date.now&&Ke.now,UR=$e.setTimeout!==gn.setTimeout&&$e.setTimeout,Qc=Jt.ceil,Zc=Jt.floor,Zd=Lt.getOwnPropertySymbols,VR=qc?qc.isBuffer:t,x0=$e.isFinite,qR=Rr.join,KR=We(Lt.keys,Lt),Cr=Jt.max,Vr=Jt.min,GR=Ke.now,YR=$e.parseInt,C0=Jt.random,XR=Rr.reverse,Jd=ta($e,"DataView"),wl=ta($e,"Map"),ep=ta($e,"Promise"),Ia=ta($e,"Set"),xl=ta($e,"WeakMap"),Cl=ta(Lt,"create"),Jc=xl&&new xl,Ra={},QR=na(Jd),ZR=na(wl),JR=na(ep),eL=na(Ia),tL=na(xl),eu=ms?ms.prototype:t,kl=eu?eu.valueOf:t,k0=eu?eu.toString:t;function ee(o){if(Jn(o)&&!St(o)&&!(o instanceof qt)){if(o instanceof Xi)return o;if(pn.call(o,"__wrapped__"))return Aw(o)}return new Xi(o)}var La=function(){function o(){}return function(v){if(!jn(v))return{};if(y0)return y0(v);o.prototype=v;var M=new o;return o.prototype=t,M}}();function tu(){}function Xi(o,v){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=t}ee.templateSettings={escape:ti,evaluate:Rn,interpolate:vi,variable:"",imports:{_:ee}},ee.prototype=tu.prototype,ee.prototype.constructor=ee,Xi.prototype=La(tu.prototype),Xi.prototype.constructor=Xi;function qt(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function nL(){var o=new qt(this.__wrapped__);return o.__actions__=ki(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=ki(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=ki(this.__views__),o}function rL(){if(this.__filtered__){var o=new qt(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function iL(){var o=this.__wrapped__.value(),v=this.__dir__,M=St(o),j=v<0,G=M?o.length:0,te=mO(0,G,this.__views__),ue=te.start,pe=te.end,ye=pe-ue,Ie=j?pe:ue-1,Re=this.__iteratees__,De=Re.length,Qe=0,lt=Vr(ye,this.__takeCount__);if(!M||!j&&G==ye&<==ye)return K0(o,this.__actions__);var vt=[];e:for(;ye--&&Qe<lt;){Ie+=v;for(var Ot=-1,yt=o[Ie];++Ot<De;){var zt=Re[Ot],Yt=zt.iteratee,Wi=zt.type,li=Yt(yt);if(Wi==A)yt=li;else if(!li){if(Wi==$)continue e;break e}}vt[Qe++]=yt}return vt}qt.prototype=La(tu.prototype),qt.prototype.constructor=qt;function Qs(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function oL(){this.__data__=Cl?Cl(null):{},this.size=0}function sL(o){var v=this.has(o)&&delete this.__data__[o];return this.size-=v?1:0,v}function aL(o){var v=this.__data__;if(Cl){var M=v[o];return M===h?t:M}return pn.call(v,o)?v[o]:t}function lL(o){var v=this.__data__;return Cl?v[o]!==t:pn.call(v,o)}function cL(o,v){var M=this.__data__;return this.size+=this.has(o)?0:1,M[o]=Cl&&v===t?h:v,this}Qs.prototype.clear=oL,Qs.prototype.delete=sL,Qs.prototype.get=aL,Qs.prototype.has=lL,Qs.prototype.set=cL;function Uo(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function uL(){this.__data__=[],this.size=0}function hL(o){var v=this.__data__,M=nu(v,o);if(M<0)return!1;var j=v.length-1;return M==j?v.pop():Yc.call(v,M,1),--this.size,!0}function dL(o){var v=this.__data__,M=nu(v,o);return M<0?t:v[M][1]}function pL(o){return nu(this.__data__,o)>-1}function fL(o,v){var M=this.__data__,j=nu(M,o);return j<0?(++this.size,M.push([o,v])):M[j][1]=v,this}Uo.prototype.clear=uL,Uo.prototype.delete=hL,Uo.prototype.get=dL,Uo.prototype.has=pL,Uo.prototype.set=fL;function Vo(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var j=o[v];this.set(j[0],j[1])}}function gL(){this.size=0,this.__data__={hash:new Qs,map:new(wl||Uo),string:new Qs}}function mL(o){var v=fu(this,o).delete(o);return this.size-=v?1:0,v}function vL(o){return fu(this,o).get(o)}function yL(o){return fu(this,o).has(o)}function bL(o,v){var M=fu(this,o),j=M.size;return M.set(o,v),this.size+=M.size==j?0:1,this}Vo.prototype.clear=gL,Vo.prototype.delete=mL,Vo.prototype.get=vL,Vo.prototype.has=yL,Vo.prototype.set=bL;function Zs(o){var v=-1,M=o==null?0:o.length;for(this.__data__=new Vo;++v<M;)this.add(o[v])}function wL(o){return this.__data__.set(o,h),this}function xL(o){return this.__data__.has(o)}Zs.prototype.add=Zs.prototype.push=wL,Zs.prototype.has=xL;function fo(o){var v=this.__data__=new Uo(o);this.size=v.size}function CL(){this.__data__=new Uo,this.size=0}function kL(o){var v=this.__data__,M=v.delete(o);return this.size=v.size,M}function AL(o){return this.__data__.get(o)}function SL(o){return this.__data__.has(o)}function _L(o,v){var M=this.__data__;if(M instanceof Uo){var j=M.__data__;if(!wl||j.length<d-1)return j.push([o,v]),this.size=++M.size,this;M=this.__data__=new Vo(j)}return M.set(o,v),this.size=M.size,this}fo.prototype.clear=CL,fo.prototype.delete=kL,fo.prototype.get=AL,fo.prototype.has=SL,fo.prototype.set=_L;function A0(o,v){var M=St(o),j=!M&&ra(o),G=!M&&!j&&xs(o),te=!M&&!j&&!G&&Fa(o),ue=M||j||G||te,pe=ue?et(o.length,Yi):[],ye=pe.length;for(var Ie in o)(v||pn.call(o,Ie))&&!(ue&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||te&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Yo(Ie,ye)))&&pe.push(Ie);return pe}function S0(o){var v=o.length;return v?o[hp(0,v-1)]:t}function $L(o,v){return gu(ki(o),Js(v,0,o.length))}function TL(o){return gu(ki(o))}function tp(o,v,M){(M!==t&&!go(o[v],M)||M===t&&!(v in o))&&qo(o,v,M)}function Al(o,v,M){var j=o[v];(!(pn.call(o,v)&&go(j,M))||M===t&&!(v in o))&&qo(o,v,M)}function nu(o,v){for(var M=o.length;M--;)if(go(o[M][0],v))return M;return-1}function ML(o,v,M,j){return vs(o,function(G,te,ue){v(j,G,M(G),ue)}),j}function _0(o,v){return o&&Eo(v,Lr(v),o)}function EL(o,v){return o&&Eo(v,Si(v),o)}function qo(o,v,M){v=="__proto__"&&Xc?Xc(o,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):o[v]=M}function np(o,v){for(var M=-1,j=v.length,G=Ce(j),te=o==null;++M<j;)G[M]=te?t:Dp(o,v[M]);return G}function Js(o,v,M){return o===o&&(M!==t&&(o=o<=M?o:M),v!==t&&(o=o>=v?o:v)),o}function Qi(o,v,M,j,G,te){var ue,pe=v&a,ye=v&u,Ie=v&c;if(M&&(ue=G?M(o,j,G,te):M(o)),ue!==t)return ue;if(!jn(o))return o;var Re=St(o);if(Re){if(ue=yO(o),!pe)return ki(o,ue)}else{var De=qr(o),Qe=De==Xe||De==ht;if(xs(o))return X0(o,pe);if(De==$n||De==se||Qe&&!G){if(ue=ye||Qe?{}:gw(o),!pe)return ye?aO(o,EL(ue,o)):sO(o,_0(ue,o))}else{if(!nn[De])return G?o:{};ue=bO(o,De,pe)}}te||(te=new fo);var lt=te.get(o);if(lt)return lt;te.set(o,ue),Uw(o)?o.forEach(function(yt){ue.add(Qi(yt,v,M,yt,o,te))}):zw(o)&&o.forEach(function(yt,zt){ue.set(zt,Qi(yt,v,M,zt,o,te))});var vt=Ie?ye?Cp:xp:ye?Si:Lr,Ot=Re?t:vt(o);return Nr(Ot||o,function(yt,zt){Ot&&(zt=yt,yt=o[zt]),Al(ue,zt,Qi(yt,v,M,zt,o,te))}),ue}function IL(o){var v=Lr(o);return function(M){return $0(M,o,v)}}function $0(o,v,M){var j=M.length;if(o==null)return!j;for(o=Lt(o);j--;){var G=M[j],te=v[G],ue=o[G];if(ue===t&&!(G in o)||!te(ue))return!1}return!0}function T0(o,v,M){if(typeof o!="function")throw new mn(g);return Il(function(){o.apply(t,M)},v)}function Sl(o,v,M,j){var G=-1,te=Ni,ue=!0,pe=o.length,ye=[],Ie=v.length;if(!pe)return ye;M&&(v=y(v,pt(M))),j?(te=Di,ue=!1):v.length>=d&&(te=kt,ue=!1,v=new Zs(v));e:for(;++G<pe;){var Re=o[G],De=M==null?Re:M(Re);if(Re=j||Re!==0?Re:0,ue&&De===De){for(var Qe=Ie;Qe--;)if(v[Qe]===De)continue e;ye.push(Re)}else te(v,De,j)||ye.push(Re)}return ye}var vs=tw(Mo),M0=tw(ip,!0);function RL(o,v){var M=!0;return vs(o,function(j,G,te){return M=!!v(j,G,te),M}),M}function ru(o,v,M){for(var j=-1,G=o.length;++j<G;){var te=o[j],ue=v(te);if(ue!=null&&(pe===t?ue===ue&&!Pi(ue):M(ue,pe)))var pe=ue,ye=te}return ye}function LL(o,v,M,j){var G=o.length;for(M=It(M),M<0&&(M=-M>G?0:G+M),j=j===t||j>G?G:It(j),j<0&&(j+=G),j=M>j?0:qw(j);M<j;)o[M++]=v;return o}function E0(o,v){var M=[];return vs(o,function(j,G,te){v(j,G,te)&&M.push(j)}),M}function Fr(o,v,M,j,G){var te=-1,ue=o.length;for(M||(M=xO),G||(G=[]);++te<ue;){var pe=o[te];v>0&&M(pe)?v>1?Fr(pe,v-1,M,j,G):T(G,pe):j||(G[G.length]=pe)}return G}var rp=nw(),I0=nw(!0);function Mo(o,v){return o&&rp(o,v,Lr)}function ip(o,v){return o&&I0(o,v,Lr)}function iu(o,v){return Ur(v,function(M){return Xo(o[M])})}function ea(o,v){v=bs(v,o);for(var M=0,j=v.length;o!=null&&M<j;)o=o[Io(v[M++])];return M&&M==j?o:t}function R0(o,v,M){var j=v(o);return St(o)?j:T(j,M(o))}function si(o){return o==null?o===t?bt:Zt:Xs&&Xs in Lt(o)?gO(o):TO(o)}function op(o,v){return o>v}function OL(o,v){return o!=null&&pn.call(o,v)}function NL(o,v){return o!=null&&v in Lt(o)}function DL(o,v,M){return o>=Vr(v,M)&&o<Cr(v,M)}function sp(o,v,M){for(var j=M?Di:Ni,G=o[0].length,te=o.length,ue=te,pe=Ce(te),ye=1/0,Ie=[];ue--;){var Re=o[ue];ue&&v&&(Re=y(Re,pt(v))),ye=Vr(Re.length,ye),pe[ue]=!M&&(v||G>=120&&Re.length>=120)?new Zs(ue&&Re):t}Re=o[0];var De=-1,Qe=pe[0];e:for(;++De<G&&Ie.length<ye;){var lt=Re[De],vt=v?v(lt):lt;if(lt=M||lt!==0?lt:0,!(Qe?kt(Qe,vt):j(Ie,vt,M))){for(ue=te;--ue;){var Ot=pe[ue];if(!(Ot?kt(Ot,vt):j(o[ue],vt,M)))continue e}Qe&&Qe.push(vt),Ie.push(lt)}}return Ie}function FL(o,v,M,j){return Mo(o,function(G,te,ue){v(j,M(G),te,ue)}),j}function _l(o,v,M){v=bs(v,o),o=bw(o,v);var j=o==null?o:o[Io(Ji(v))];return j==null?t:Mr(j,o,M)}function L0(o){return Jn(o)&&si(o)==se}function PL(o){return Jn(o)&&si(o)==tn}function WL(o){return Jn(o)&&si(o)==Te}function $l(o,v,M,j,G){return o===v?!0:o==null||v==null||!Jn(o)&&!Jn(v)?o!==o&&v!==v:BL(o,v,M,j,$l,G)}function BL(o,v,M,j,G,te){var ue=St(o),pe=St(v),ye=ue?de:qr(o),Ie=pe?de:qr(v);ye=ye==se?$n:ye,Ie=Ie==se?$n:Ie;var Re=ye==$n,De=Ie==$n,Qe=ye==Ie;if(Qe&&xs(o)){if(!xs(v))return!1;ue=!0,Re=!1}if(Qe&&!Re)return te||(te=new fo),ue||Fa(o)?dw(o,v,M,j,G,te):pO(o,v,ye,M,j,G,te);if(!(M&i)){var lt=Re&&pn.call(o,"__wrapped__"),vt=De&&pn.call(v,"__wrapped__");if(lt||vt){var Ot=lt?o.value():o,yt=vt?v.value():v;return te||(te=new fo),G(Ot,yt,M,j,te)}}return Qe?(te||(te=new fo),fO(o,v,M,j,G,te)):!1}function HL(o){return Jn(o)&&qr(o)==st}function ap(o,v,M,j){var G=M.length,te=G,ue=!j;if(o==null)return!te;for(o=Lt(o);G--;){var pe=M[G];if(ue&&pe[2]?pe[1]!==o[pe[0]]:!(pe[0]in o))return!1}for(;++G<te;){pe=M[G];var ye=pe[0],Ie=o[ye],Re=pe[1];if(ue&&pe[2]){if(Ie===t&&!(ye in o))return!1}else{var De=new fo;if(j)var Qe=j(Ie,Re,ye,o,v,De);if(!(Qe===t?$l(Re,Ie,i|l,j,De):Qe))return!1}}return!0}function O0(o){if(!jn(o)||kO(o))return!1;var v=Xo(o)?HR:_r;return v.test(na(o))}function zL(o){return Jn(o)&&si(o)==fn}function jL(o){return Jn(o)&&qr(o)==Wn}function UL(o){return Jn(o)&&xu(o.length)&&!!an[si(o)]}function N0(o){return typeof o=="function"?o:o==null?_i:typeof o=="object"?St(o)?P0(o[0],o[1]):F0(o):rx(o)}function lp(o){if(!El(o))return KR(o);var v=[];for(var M in Lt(o))pn.call(o,M)&&M!="constructor"&&v.push(M);return v}function VL(o){if(!jn(o))return $O(o);var v=El(o),M=[];for(var j in o)j=="constructor"&&(v||!pn.call(o,j))||M.push(j);return M}function cp(o,v){return o<v}function D0(o,v){var M=-1,j=Ai(o)?Ce(o.length):[];return vs(o,function(G,te,ue){j[++M]=v(G,te,ue)}),j}function F0(o){var v=Ap(o);return v.length==1&&v[0][2]?vw(v[0][0],v[0][1]):function(M){return M===o||ap(M,o,v)}}function P0(o,v){return _p(o)&&mw(v)?vw(Io(o),v):function(M){var j=Dp(M,o);return j===t&&j===v?Fp(M,o):$l(v,j,i|l)}}function ou(o,v,M,j,G){o!==v&&rp(v,function(te,ue){if(G||(G=new fo),jn(te))qL(o,v,ue,M,ou,j,G);else{var pe=j?j(Tp(o,ue),te,ue+"",o,v,G):t;pe===t&&(pe=te),tp(o,ue,pe)}},Si)}function qL(o,v,M,j,G,te,ue){var pe=Tp(o,M),ye=Tp(v,M),Ie=ue.get(ye);if(Ie){tp(o,M,Ie);return}var Re=te?te(pe,ye,M+"",o,v,ue):t,De=Re===t;if(De){var Qe=St(ye),lt=!Qe&&xs(ye),vt=!Qe&&!lt&&Fa(ye);Re=ye,Qe||lt||vt?St(pe)?Re=pe:sr(pe)?Re=ki(pe):lt?(De=!1,Re=X0(ye,!0)):vt?(De=!1,Re=Q0(ye,!0)):Re=[]:Rl(ye)||ra(ye)?(Re=pe,ra(pe)?Re=Kw(pe):(!jn(pe)||Xo(pe))&&(Re=gw(ye))):De=!1}De&&(ue.set(ye,Re),G(Re,ye,j,te,ue),ue.delete(ye)),tp(o,M,Re)}function W0(o,v){var M=o.length;if(M)return v+=v<0?M:0,Yo(v,M)?o[v]:t}function B0(o,v,M){v.length?v=y(v,function(te){return St(te)?function(ue){return ea(ue,te.length===1?te[0]:te)}:te}):v=[_i];var j=-1;v=y(v,pt(mt()));var G=D0(o,function(te,ue,pe){var ye=y(v,function(Ie){return Ie(te)});return{criteria:ye,index:++j,value:te}});return Ge(G,function(te,ue){return oO(te,ue,M)})}function KL(o,v){return H0(o,v,function(M,j){return Fp(o,j)})}function H0(o,v,M){for(var j=-1,G=v.length,te={};++j<G;){var ue=v[j],pe=ea(o,ue);M(pe,ue)&&Tl(te,bs(ue,o),pe)}return te}function GL(o){return function(v){return ea(v,o)}}function up(o,v,M,j){var G=j?be:ae,te=-1,ue=v.length,pe=o;for(o===v&&(v=ki(v)),M&&(pe=y(o,pt(M)));++te<ue;)for(var ye=0,Ie=v[te],Re=M?M(Ie):Ie;(ye=G(pe,Re,ye,j))>-1;)pe!==o&&Yc.call(pe,ye,1),Yc.call(o,ye,1);return o}function z0(o,v){for(var M=o?v.length:0,j=M-1;M--;){var G=v[M];if(M==j||G!==te){var te=G;Yo(G)?Yc.call(o,G,1):fp(o,G)}}return o}function hp(o,v){return o+Zc(C0()*(v-o+1))}function YL(o,v,M,j){for(var G=-1,te=Cr(Qc((v-o)/(M||1)),0),ue=Ce(te);te--;)ue[j?te:++G]=o,o+=M;return ue}function dp(o,v){var M="";if(!o||v<1||v>U)return M;do v%2&&(M+=o),v=Zc(v/2),v&&(o+=o);while(v);return M}function Pt(o,v){return Mp(yw(o,v,_i),o+"")}function XL(o){return S0(Pa(o))}function QL(o,v){var M=Pa(o);return gu(M,Js(v,0,M.length))}function Tl(o,v,M,j){if(!jn(o))return o;v=bs(v,o);for(var G=-1,te=v.length,ue=te-1,pe=o;pe!=null&&++G<te;){var ye=Io(v[G]),Ie=M;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return o;if(G!=ue){var Re=pe[ye];Ie=j?j(Re,ye,pe):t,Ie===t&&(Ie=jn(Re)?Re:Yo(v[G+1])?[]:{})}Al(pe,ye,Ie),pe=pe[ye]}return o}var j0=Jc?function(o,v){return Jc.set(o,v),o}:_i,ZL=Xc?function(o,v){return Xc(o,"toString",{configurable:!0,enumerable:!1,value:Wp(v),writable:!0})}:_i;function JL(o){return gu(Pa(o))}function Zi(o,v,M){var j=-1,G=o.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 te=Ce(G);++j<G;)te[j]=o[j+v];return te}function eO(o,v){var M;return vs(o,function(j,G,te){return M=v(j,G,te),!M}),!!M}function su(o,v,M){var j=0,G=o==null?j:o.length;if(typeof v=="number"&&v===v&&G<=ne){for(;j<G;){var te=j+G>>>1,ue=o[te];ue!==null&&!Pi(ue)&&(M?ue<=v:ue<v)?j=te+1:G=te}return G}return pp(o,v,_i,M)}function pp(o,v,M,j){var G=0,te=o==null?0:o.length;if(te===0)return 0;v=M(v);for(var ue=v!==v,pe=v===null,ye=Pi(v),Ie=v===t;G<te;){var Re=Zc((G+te)/2),De=M(o[Re]),Qe=De!==t,lt=De===null,vt=De===De,Ot=Pi(De);if(ue)var yt=j||vt;else Ie?yt=vt&&(j||Qe):pe?yt=vt&&Qe&&(j||!lt):ye?yt=vt&&Qe&&!lt&&(j||!Ot):lt||Ot?yt=!1:yt=j?De<=v:De<v;yt?G=Re+1:te=Re}return Vr(te,he)}function U0(o,v){for(var M=-1,j=o.length,G=0,te=[];++M<j;){var ue=o[M],pe=v?v(ue):ue;if(!M||!go(pe,ye)){var ye=pe;te[G++]=ue===0?0:ue}}return te}function V0(o){return typeof o=="number"?o:Pi(o)?Z:+o}function Fi(o){if(typeof o=="string")return o;if(St(o))return y(o,Fi)+"";if(Pi(o))return k0?k0.call(o):"";var v=o+"";return v=="0"&&1/o==-B?"-0":v}function ys(o,v,M){var j=-1,G=Ni,te=o.length,ue=!0,pe=[],ye=pe;if(M)ue=!1,G=Di;else if(te>=d){var Ie=v?null:hO(o);if(Ie)return Ye(Ie);ue=!1,G=kt,ye=new Zs}else ye=v?[]:pe;e:for(;++j<te;){var Re=o[j],De=v?v(Re):Re;if(Re=M||Re!==0?Re:0,ue&&De===De){for(var Qe=ye.length;Qe--;)if(ye[Qe]===De)continue e;v&&ye.push(De),pe.push(Re)}else G(ye,De,M)||(ye!==pe&&ye.push(De),pe.push(Re))}return pe}function fp(o,v){return v=bs(v,o),o=bw(o,v),o==null||delete o[Io(Ji(v))]}function q0(o,v,M,j){return Tl(o,v,M(ea(o,v)),j)}function au(o,v,M,j){for(var G=o.length,te=j?G:-1;(j?te--:++te<G)&&v(o[te],te,o););return M?Zi(o,j?0:te,j?te+1:G):Zi(o,j?te+1:0,j?G:te)}function K0(o,v){var M=o;return M instanceof qt&&(M=M.value()),S(v,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function gp(o,v,M){var j=o.length;if(j<2)return j?ys(o[0]):[];for(var G=-1,te=Ce(j);++G<j;)for(var ue=o[G],pe=-1;++pe<j;)pe!=G&&(te[G]=Sl(te[G]||ue,o[pe],v,M));return ys(Fr(te,1),v,M)}function G0(o,v,M){for(var j=-1,G=o.length,te=v.length,ue={};++j<G;){var pe=j<te?v[j]:t;M(ue,o[j],pe)}return ue}function mp(o){return sr(o)?o:[]}function vp(o){return typeof o=="function"?o:_i}function bs(o,v){return St(o)?o:_p(o,v)?[o]:kw(un(o))}var tO=Pt;function ws(o,v,M){var j=o.length;return M=M===t?j:M,!v&&M>=j?o:Zi(o,v,M)}var Y0=zR||function(o){return gn.clearTimeout(o)};function X0(o,v){if(v)return o.slice();var M=o.length,j=v0?v0(M):new o.constructor(M);return o.copy(j),j}function yp(o){var v=new o.constructor(o.byteLength);return new Kc(v).set(new Kc(o)),v}function nO(o,v){var M=v?yp(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.byteLength)}function rO(o){var v=new o.constructor(o.source,zr.exec(o));return v.lastIndex=o.lastIndex,v}function iO(o){return kl?Lt(kl.call(o)):{}}function Q0(o,v){var M=v?yp(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.length)}function Z0(o,v){if(o!==v){var M=o!==t,j=o===null,G=o===o,te=Pi(o),ue=v!==t,pe=v===null,ye=v===v,Ie=Pi(v);if(!pe&&!Ie&&!te&&o>v||te&&ue&&ye&&!pe&&!Ie||j&&ue&&ye||!M&&ye||!G)return 1;if(!j&&!te&&!Ie&&o<v||Ie&&M&&G&&!j&&!te||pe&&M&&G||!ue&&G||!ye)return-1}return 0}function oO(o,v,M){for(var j=-1,G=o.criteria,te=v.criteria,ue=G.length,pe=M.length;++j<ue;){var ye=Z0(G[j],te[j]);if(ye){if(j>=pe)return ye;var Ie=M[j];return ye*(Ie=="desc"?-1:1)}}return o.index-v.index}function J0(o,v,M,j){for(var G=-1,te=o.length,ue=M.length,pe=-1,ye=v.length,Ie=Cr(te-ue,0),Re=Ce(ye+Ie),De=!j;++pe<ye;)Re[pe]=v[pe];for(;++G<ue;)(De||G<te)&&(Re[M[G]]=o[G]);for(;Ie--;)Re[pe++]=o[G++];return Re}function ew(o,v,M,j){for(var G=-1,te=o.length,ue=-1,pe=M.length,ye=-1,Ie=v.length,Re=Cr(te-pe,0),De=Ce(Re+Ie),Qe=!j;++G<Re;)De[G]=o[G];for(var lt=G;++ye<Ie;)De[lt+ye]=v[ye];for(;++ue<pe;)(Qe||G<te)&&(De[lt+M[ue]]=o[G++]);return De}function ki(o,v){var M=-1,j=o.length;for(v||(v=Ce(j));++M<j;)v[M]=o[M];return v}function Eo(o,v,M,j){var G=!M;M||(M={});for(var te=-1,ue=v.length;++te<ue;){var pe=v[te],ye=j?j(M[pe],o[pe],pe,M,o):t;ye===t&&(ye=o[pe]),G?qo(M,pe,ye):Al(M,pe,ye)}return M}function sO(o,v){return Eo(o,Sp(o),v)}function aO(o,v){return Eo(o,pw(o),v)}function lu(o,v){return function(M,j){var G=St(M)?Er:ML,te=v?v():{};return G(M,o,mt(j,2),te)}}function Oa(o){return Pt(function(v,M){var j=-1,G=M.length,te=G>1?M[G-1]:t,ue=G>2?M[2]:t;for(te=o.length>3&&typeof te=="function"?(G--,te):t,ue&&ai(M[0],M[1],ue)&&(te=G<3?t:te,G=1),v=Lt(v);++j<G;){var pe=M[j];pe&&o(v,pe,j,te)}return v})}function tw(o,v){return function(M,j){if(M==null)return M;if(!Ai(M))return o(M,j);for(var G=M.length,te=v?G:-1,ue=Lt(M);(v?te--:++te<G)&&j(ue[te],te,ue)!==!1;);return M}}function nw(o){return function(v,M,j){for(var G=-1,te=Lt(v),ue=j(v),pe=ue.length;pe--;){var ye=ue[o?pe:++G];if(M(te[ye],ye,te)===!1)break}return v}}function lO(o,v,M){var j=v&m,G=Ml(o);function te(){var ue=this&&this!==gn&&this instanceof te?G:o;return ue.apply(j?M:this,arguments)}return te}function rw(o){return function(v){v=un(v);var M=oe(v)?At(v):t,j=M?M[0]:v.charAt(0),G=M?ws(M,1).join(""):v.slice(1);return j[o]()+G}}function Na(o){return function(v){return S(tx(ex(v).replace(zn,"")),o,"")}}function Ml(o){return function(){var v=arguments;switch(v.length){case 0:return new o;case 1:return new o(v[0]);case 2:return new o(v[0],v[1]);case 3:return new o(v[0],v[1],v[2]);case 4:return new o(v[0],v[1],v[2],v[3]);case 5:return new o(v[0],v[1],v[2],v[3],v[4]);case 6:return new o(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new o(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=La(o.prototype),j=o.apply(M,v);return jn(j)?j:M}}function cO(o,v,M){var j=Ml(o);function G(){for(var te=arguments.length,ue=Ce(te),pe=te,ye=Da(G);pe--;)ue[pe]=arguments[pe];var Ie=te<3&&ue[0]!==ye&&ue[te-1]!==ye?[]:He(ue,ye);if(te-=Ie.length,te<M)return lw(o,v,cu,G.placeholder,t,ue,Ie,t,t,M-te);var Re=this&&this!==gn&&this instanceof G?j:o;return Mr(Re,this,ue)}return G}function iw(o){return function(v,M,j){var G=Lt(v);if(!Ai(v)){var te=mt(M,3);v=Lr(v),M=function(pe){return te(G[pe],pe,G)}}var ue=o(v,M,j);return ue>-1?G[te?v[ue]:ue]:t}}function ow(o){return Go(function(v){var M=v.length,j=M,G=Xi.prototype.thru;for(o&&v.reverse();j--;){var te=v[j];if(typeof te!="function")throw new mn(g);if(G&&!ue&&pu(te)=="wrapper")var ue=new Xi([],!0)}for(j=ue?j:M;++j<M;){te=v[j];var pe=pu(te),ye=pe=="wrapper"?kp(te):t;ye&&$p(ye[0])&&ye[1]==(R|E|k|D)&&!ye[4].length&&ye[9]==1?ue=ue[pu(ye[0])].apply(ue,ye[3]):ue=te.length==1&&$p(te)?ue[pe]():ue.thru(te)}return function(){var Ie=arguments,Re=Ie[0];if(ue&&Ie.length==1&&St(Re))return ue.plant(Re).value();for(var De=0,Qe=M?v[De].apply(this,Ie):Re;++De<M;)Qe=v[De].call(this,Qe);return Qe}})}function cu(o,v,M,j,G,te,ue,pe,ye,Ie){var Re=v&R,De=v&m,Qe=v&w,lt=v&(E|_),vt=v&L,Ot=Qe?t:Ml(o);function yt(){for(var zt=arguments.length,Yt=Ce(zt),Wi=zt;Wi--;)Yt[Wi]=arguments[Wi];if(lt)var li=Da(yt),Bi=Ir(Yt,li);if(j&&(Yt=J0(Yt,j,G,lt)),te&&(Yt=ew(Yt,te,ue,lt)),zt-=Bi,lt&&zt<Ie){var ar=He(Yt,li);return lw(o,v,cu,yt.placeholder,M,Yt,ar,pe,ye,Ie-zt)}var mo=De?M:this,Zo=Qe?mo[o]:o;return zt=Yt.length,pe?Yt=MO(Yt,pe):vt&&zt>1&&Yt.reverse(),Re&&ye<zt&&(Yt.length=ye),this&&this!==gn&&this instanceof yt&&(Zo=Ot||Ml(Zo)),Zo.apply(mo,Yt)}return yt}function sw(o,v){return function(M,j){return FL(M,o,v(j),{})}}function uu(o,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=Fi(M),j=Fi(j)):(M=V0(M),j=V0(j)),G=o(M,j)}return G}}function bp(o){return Go(function(v){return v=y(v,pt(mt())),Pt(function(M){var j=this;return o(v,function(G){return Mr(G,j,M)})})})}function hu(o,v){v=v===t?" ":Fi(v);var M=v.length;if(M<2)return M?dp(v,o):v;var j=dp(v,Qc(o/Wt(v)));return oe(v)?ws(At(j),0,o).join(""):j.slice(0,o)}function uO(o,v,M,j){var G=v&m,te=Ml(o);function ue(){for(var pe=-1,ye=arguments.length,Ie=-1,Re=j.length,De=Ce(Re+ye),Qe=this&&this!==gn&&this instanceof ue?te:o;++Ie<Re;)De[Ie]=j[Ie];for(;ye--;)De[Ie++]=arguments[++pe];return Mr(Qe,G?M:this,De)}return ue}function aw(o){return function(v,M,j){return j&&typeof j!="number"&&ai(v,M,j)&&(M=j=t),v=Qo(v),M===t?(M=v,v=0):M=Qo(M),j=j===t?v<M?1:-1:Qo(j),YL(v,M,j,o)}}function du(o){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=eo(v),M=eo(M)),o(v,M)}}function lw(o,v,M,j,G,te,ue,pe,ye,Ie){var Re=v&E,De=Re?ue:t,Qe=Re?t:ue,lt=Re?te:t,vt=Re?t:te;v|=Re?k:C,v&=~(Re?C:k),v&x||(v&=-4);var Ot=[o,v,G,lt,De,vt,Qe,pe,ye,Ie],yt=M.apply(t,Ot);return $p(o)&&ww(yt,Ot),yt.placeholder=j,xw(yt,o,v)}function wp(o){var v=Jt[o];return function(M,j){if(M=eo(M),j=j==null?0:Vr(It(j),292),j&&x0(M)){var G=(un(M)+"e").split("e"),te=v(G[0]+"e"+(+G[1]+j));return G=(un(te)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return v(M)}}var hO=Ia&&1/Ye(new Ia([,-0]))[1]==B?function(o){return new Ia(o)}:zp;function cw(o){return function(v){var M=qr(v);return M==st?Ee(v):M==Wn?Ze(v):at(v,o(v))}}function Ko(o,v,M,j,G,te,ue,pe){var ye=v&w;if(!ye&&typeof o!="function")throw new mn(g);var Ie=j?j.length:0;if(Ie||(v&=-97,j=G=t),ue=ue===t?ue:Cr(It(ue),0),pe=pe===t?pe:It(pe),Ie-=G?G.length:0,v&C){var Re=j,De=G;j=G=t}var Qe=ye?t:kp(o),lt=[o,v,M,j,G,Re,De,te,ue,pe];if(Qe&&_O(lt,Qe),o=lt[0],v=lt[1],M=lt[2],j=lt[3],G=lt[4],pe=lt[9]=lt[9]===t?ye?0:o.length:Cr(lt[9]-Ie,0),!pe&&v&(E|_)&&(v&=-25),!v||v==m)var vt=lO(o,v,M);else v==E||v==_?vt=cO(o,v,pe):(v==k||v==(m|k))&&!G.length?vt=uO(o,v,M,j):vt=cu.apply(t,lt);var Ot=Qe?j0:ww;return xw(Ot(vt,lt),o,v)}function uw(o,v,M,j){return o===t||go(o,Zn[M])&&!pn.call(j,M)?v:o}function hw(o,v,M,j,G,te){return jn(o)&&jn(v)&&(te.set(v,o),ou(o,v,t,hw,te),te.delete(v)),o}function dO(o){return Rl(o)?t:o}function dw(o,v,M,j,G,te){var ue=M&i,pe=o.length,ye=v.length;if(pe!=ye&&!(ue&&ye>pe))return!1;var Ie=te.get(o),Re=te.get(v);if(Ie&&Re)return Ie==v&&Re==o;var De=-1,Qe=!0,lt=M&l?new Zs:t;for(te.set(o,v),te.set(v,o);++De<pe;){var vt=o[De],Ot=v[De];if(j)var yt=ue?j(Ot,vt,De,v,o,te):j(vt,Ot,De,o,v,te);if(yt!==t){if(yt)continue;Qe=!1;break}if(lt){if(!W(v,function(zt,Yt){if(!kt(lt,Yt)&&(vt===zt||G(vt,zt,M,j,te)))return lt.push(Yt)})){Qe=!1;break}}else if(!(vt===Ot||G(vt,Ot,M,j,te))){Qe=!1;break}}return te.delete(o),te.delete(v),Qe}function pO(o,v,M,j,G,te,ue){switch(M){case Bn:if(o.byteLength!=v.byteLength||o.byteOffset!=v.byteOffset)return!1;o=o.buffer,v=v.buffer;case tn:return!(o.byteLength!=v.byteLength||!te(new Kc(o),new Kc(v)));case _e:case Te:case dt:return go(+o,+v);case Je:return o.name==v.name&&o.message==v.message;case fn:case ir:return o==v+"";case st:var pe=Ee;case Wn:var ye=j&i;if(pe||(pe=Ye),o.size!=v.size&&!ye)return!1;var Ie=ue.get(o);if(Ie)return Ie==v;j|=l,ue.set(o,v);var Re=dw(pe(o),pe(v),j,G,te,ue);return ue.delete(o),Re;case Or:if(kl)return kl.call(o)==kl.call(v)}return!1}function fO(o,v,M,j,G,te){var ue=M&i,pe=xp(o),ye=pe.length,Ie=xp(v),Re=Ie.length;if(ye!=Re&&!ue)return!1;for(var De=ye;De--;){var Qe=pe[De];if(!(ue?Qe in v:pn.call(v,Qe)))return!1}var lt=te.get(o),vt=te.get(v);if(lt&&vt)return lt==v&&vt==o;var Ot=!0;te.set(o,v),te.set(v,o);for(var yt=ue;++De<ye;){Qe=pe[De];var zt=o[Qe],Yt=v[Qe];if(j)var Wi=ue?j(Yt,zt,Qe,v,o,te):j(zt,Yt,Qe,o,v,te);if(!(Wi===t?zt===Yt||G(zt,Yt,M,j,te):Wi)){Ot=!1;break}yt||(yt=Qe=="constructor")}if(Ot&&!yt){var li=o.constructor,Bi=v.constructor;li!=Bi&&"constructor"in o&&"constructor"in v&&!(typeof li=="function"&&li instanceof li&&typeof Bi=="function"&&Bi instanceof Bi)&&(Ot=!1)}return te.delete(o),te.delete(v),Ot}function Go(o){return Mp(yw(o,t,$w),o+"")}function xp(o){return R0(o,Lr,Sp)}function Cp(o){return R0(o,Si,pw)}var kp=Jc?function(o){return Jc.get(o)}:zp;function pu(o){for(var v=o.name+"",M=Ra[v],j=pn.call(Ra,v)?M.length:0;j--;){var G=M[j],te=G.func;if(te==null||te==o)return G.name}return v}function Da(o){var v=pn.call(ee,"placeholder")?ee:o;return v.placeholder}function mt(){var o=ee.iteratee||Bp;return o=o===Bp?N0:o,arguments.length?o(arguments[0],arguments[1]):o}function fu(o,v){var M=o.__data__;return CO(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Ap(o){for(var v=Lr(o),M=v.length;M--;){var j=v[M],G=o[j];v[M]=[j,G,mw(G)]}return v}function ta(o,v){var M=ie(o,v);return O0(M)?M:t}function gO(o){var v=pn.call(o,Xs),M=o[Xs];try{o[Xs]=t;var j=!0}catch{}var G=Vc.call(o);return j&&(v?o[Xs]=M:delete o[Xs]),G}var Sp=Zd?function(o){return o==null?[]:(o=Lt(o),Ur(Zd(o),function(v){return b0.call(o,v)}))}:jp,pw=Zd?function(o){for(var v=[];o;)T(v,Sp(o)),o=Gc(o);return v}:jp,qr=si;(Jd&&qr(new Jd(new ArrayBuffer(1)))!=Bn||wl&&qr(new wl)!=st||ep&&qr(ep.resolve())!=Ht||Ia&&qr(new Ia)!=Wn||xl&&qr(new xl)!=qe)&&(qr=function(o){var v=si(o),M=v==$n?o.constructor:t,j=M?na(M):"";if(j)switch(j){case QR:return Bn;case ZR:return st;case JR:return Ht;case eL:return Wn;case tL:return qe}return v});function mO(o,v,M){for(var j=-1,G=M.length;++j<G;){var te=M[j],ue=te.size;switch(te.type){case"drop":o+=ue;break;case"dropRight":v-=ue;break;case"take":v=Vr(v,o+ue);break;case"takeRight":o=Cr(o,v-ue);break}}return{start:o,end:v}}function vO(o){var v=o.match(wi);return v?v[1].split(ko):[]}function fw(o,v,M){v=bs(v,o);for(var j=-1,G=v.length,te=!1;++j<G;){var ue=Io(v[j]);if(!(te=o!=null&&M(o,ue)))break;o=o[ue]}return te||++j!=G?te:(G=o==null?0:o.length,!!G&&xu(G)&&Yo(ue,G)&&(St(o)||ra(o)))}function yO(o){var v=o.length,M=new o.constructor(v);return v&&typeof o[0]=="string"&&pn.call(o,"index")&&(M.index=o.index,M.input=o.input),M}function gw(o){return typeof o.constructor=="function"&&!El(o)?La(Gc(o)):{}}function bO(o,v,M){var j=o.constructor;switch(v){case tn:return yp(o);case _e:case Te:return new j(+o);case Bn:return nO(o,M);case Ar:case vr:case bn:case qn:case Hn:case Xt:case dn:case Hr:case Jr:return Q0(o,M);case st:return new j;case dt:case ir:return new j(o);case fn:return rO(o);case Wn:return new j;case Or:return iO(o)}}function wO(o,v){var M=v.length;if(!M)return o;var j=M-1;return v[j]=(M>1?"& ":"")+v[j],v=v.join(M>2?", ":" "),o.replace(Sr,`{
|
|
1470
|
+
/* [wrapped with `+v+`] */
|
|
1471
|
+
`)}function xO(o){return St(o)||ra(o)||!!(w0&&o&&o[w0])}function Yo(o,v){var M=typeof o;return v=v??U,!!v&&(M=="number"||M!="symbol"&&ze.test(o))&&o>-1&&o%1==0&&o<v}function ai(o,v,M){if(!jn(M))return!1;var j=typeof v;return(j=="number"?Ai(M)&&Yo(v,M.length):j=="string"&&v in M)?go(M[v],o):!1}function _p(o,v){if(St(o))return!1;var M=typeof o;return M=="number"||M=="symbol"||M=="boolean"||o==null||Pi(o)?!0:yi.test(o)||!os.test(o)||v!=null&&o in Lt(v)}function CO(o){var v=typeof o;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?o!=="__proto__":o===null}function $p(o){var v=pu(o),M=ee[v];if(typeof M!="function"||!(v in qt.prototype))return!1;if(o===M)return!0;var j=kp(M);return!!j&&o===j[0]}function kO(o){return!!m0&&m0 in o}var AO=Ys?Xo:Up;function El(o){var v=o&&o.constructor,M=typeof v=="function"&&v.prototype||Zn;return o===M}function mw(o){return o===o&&!jn(o)}function vw(o,v){return function(M){return M==null?!1:M[o]===v&&(v!==t||o in Lt(M))}}function SO(o){var v=bu(o,function(j){return M.size===f&&M.clear(),j}),M=v.cache;return v}function _O(o,v){var M=o[1],j=v[1],G=M|j,te=G<(m|w|R),ue=j==R&&M==E||j==R&&M==D&&o[7].length<=v[8]||j==(R|D)&&v[7].length<=v[8]&&M==E;if(!(te||ue))return o;j&m&&(o[2]=v[2],G|=M&m?0:x);var pe=v[3];if(pe){var ye=o[3];o[3]=ye?J0(ye,pe,v[4]):pe,o[4]=ye?He(o[3],s):v[4]}return pe=v[5],pe&&(ye=o[5],o[5]=ye?ew(ye,pe,v[6]):pe,o[6]=ye?He(o[5],s):v[6]),pe=v[7],pe&&(o[7]=pe),j&R&&(o[8]=o[8]==null?v[8]:Vr(o[8],v[8])),o[9]==null&&(o[9]=v[9]),o[0]=v[0],o[1]=G,o}function $O(o){var v=[];if(o!=null)for(var M in Lt(o))v.push(M);return v}function TO(o){return Vc.call(o)}function yw(o,v,M){return v=Cr(v===t?o.length-1:v,0),function(){for(var j=arguments,G=-1,te=Cr(j.length-v,0),ue=Ce(te);++G<te;)ue[G]=j[v+G];G=-1;for(var pe=Ce(v+1);++G<v;)pe[G]=j[G];return pe[v]=M(ue),Mr(o,this,pe)}}function bw(o,v){return v.length<2?o:ea(o,Zi(v,0,-1))}function MO(o,v){for(var M=o.length,j=Vr(v.length,M),G=ki(o);j--;){var te=v[j];o[j]=Yo(te,M)?G[te]:t}return o}function Tp(o,v){if(!(v==="constructor"&&typeof o[v]=="function")&&v!="__proto__")return o[v]}var ww=Cw(j0),Il=UR||function(o,v){return gn.setTimeout(o,v)},Mp=Cw(ZL);function xw(o,v,M){var j=v+"";return Mp(o,wO(j,EO(vO(j),M)))}function Cw(o){var v=0,M=0;return function(){var j=GR(),G=O-(j-M);if(M=j,G>0){if(++v>=P)return arguments[0]}else v=0;return o.apply(t,arguments)}}function gu(o,v){var M=-1,j=o.length,G=j-1;for(v=v===t?j:v;++M<v;){var te=hp(M,G),ue=o[te];o[te]=o[M],o[M]=ue}return o.length=v,o}var kw=SO(function(o){var v=[];return o.charCodeAt(0)===46&&v.push(""),o.replace(Tn,function(M,j,G,te){v.push(G?te.replace(ni,"$1"):j||M)}),v});function Io(o){if(typeof o=="string"||Pi(o))return o;var v=o+"";return v=="0"&&1/o==-B?"-0":v}function na(o){if(o!=null){try{return Uc.call(o)}catch{}try{return o+""}catch{}}return""}function EO(o,v){return Nr(le,function(M){var j="_."+M[0];v&M[1]&&!Ni(o,j)&&o.push(j)}),o.sort()}function Aw(o){if(o instanceof qt)return o.clone();var v=new Xi(o.__wrapped__,o.__chain__);return v.__actions__=ki(o.__actions__),v.__index__=o.__index__,v.__values__=o.__values__,v}function IO(o,v,M){(M?ai(o,v,M):v===t)?v=1:v=Cr(It(v),0);var j=o==null?0:o.length;if(!j||v<1)return[];for(var G=0,te=0,ue=Ce(Qc(j/v));G<j;)ue[te++]=Zi(o,G,G+=v);return ue}function RO(o){for(var v=-1,M=o==null?0:o.length,j=0,G=[];++v<M;){var te=o[v];te&&(G[j++]=te)}return G}function LO(){var o=arguments.length;if(!o)return[];for(var v=Ce(o-1),M=arguments[0],j=o;j--;)v[j-1]=arguments[j];return T(St(M)?ki(M):[M],Fr(v,1))}var OO=Pt(function(o,v){return sr(o)?Sl(o,Fr(v,1,sr,!0)):[]}),NO=Pt(function(o,v){var M=Ji(v);return sr(M)&&(M=t),sr(o)?Sl(o,Fr(v,1,sr,!0),mt(M,2)):[]}),DO=Pt(function(o,v){var M=Ji(v);return sr(M)&&(M=t),sr(o)?Sl(o,Fr(v,1,sr,!0),t,M):[]});function FO(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===t?1:It(v),Zi(o,v<0?0:v,j)):[]}function PO(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===t?1:It(v),v=j-v,Zi(o,0,v<0?0:v)):[]}function WO(o,v){return o&&o.length?au(o,mt(v,3),!0,!0):[]}function BO(o,v){return o&&o.length?au(o,mt(v,3),!0):[]}function HO(o,v,M,j){var G=o==null?0:o.length;return G?(M&&typeof M!="number"&&ai(o,v,M)&&(M=0,j=G),LL(o,v,M,j)):[]}function Sw(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=Cr(j+G,0)),re(o,mt(v,3),G)}function _w(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=j-1;return M!==t&&(G=It(M),G=M<0?Cr(j+G,0):Vr(G,j-1)),re(o,mt(v,3),G,!0)}function $w(o){var v=o==null?0:o.length;return v?Fr(o,1):[]}function zO(o){var v=o==null?0:o.length;return v?Fr(o,B):[]}function jO(o,v){var M=o==null?0:o.length;return M?(v=v===t?1:It(v),Fr(o,v)):[]}function UO(o){for(var v=-1,M=o==null?0:o.length,j={};++v<M;){var G=o[v];j[G[0]]=G[1]}return j}function Tw(o){return o&&o.length?o[0]:t}function VO(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=Cr(j+G,0)),ae(o,v,G)}function qO(o){var v=o==null?0:o.length;return v?Zi(o,0,-1):[]}var KO=Pt(function(o){var v=y(o,mp);return v.length&&v[0]===o[0]?sp(v):[]}),GO=Pt(function(o){var v=Ji(o),M=y(o,mp);return v===Ji(M)?v=t:M.pop(),M.length&&M[0]===o[0]?sp(M,mt(v,2)):[]}),YO=Pt(function(o){var v=Ji(o),M=y(o,mp);return v=typeof v=="function"?v:t,v&&M.pop(),M.length&&M[0]===o[0]?sp(M,t,v):[]});function XO(o,v){return o==null?"":qR.call(o,v)}function Ji(o){var v=o==null?0:o.length;return v?o[v-1]:t}function QO(o,v,M){var j=o==null?0:o.length;if(!j)return-1;var G=j;return M!==t&&(G=It(M),G=G<0?Cr(j+G,0):Vr(G,j-1)),v===v?xt(o,v,G):re(o,ke,G,!0)}function ZO(o,v){return o&&o.length?W0(o,It(v)):t}var JO=Pt(Mw);function Mw(o,v){return o&&o.length&&v&&v.length?up(o,v):o}function e2(o,v,M){return o&&o.length&&v&&v.length?up(o,v,mt(M,2)):o}function t2(o,v,M){return o&&o.length&&v&&v.length?up(o,v,t,M):o}var n2=Go(function(o,v){var M=o==null?0:o.length,j=np(o,v);return z0(o,y(v,function(G){return Yo(G,M)?+G:G}).sort(Z0)),j});function r2(o,v){var M=[];if(!(o&&o.length))return M;var j=-1,G=[],te=o.length;for(v=mt(v,3);++j<te;){var ue=o[j];v(ue,j,o)&&(M.push(ue),G.push(j))}return z0(o,G),M}function Ep(o){return o==null?o:XR.call(o)}function i2(o,v,M){var j=o==null?0:o.length;return j?(M&&typeof M!="number"&&ai(o,v,M)?(v=0,M=j):(v=v==null?0:It(v),M=M===t?j:It(M)),Zi(o,v,M)):[]}function o2(o,v){return su(o,v)}function s2(o,v,M){return pp(o,v,mt(M,2))}function a2(o,v){var M=o==null?0:o.length;if(M){var j=su(o,v);if(j<M&&go(o[j],v))return j}return-1}function l2(o,v){return su(o,v,!0)}function c2(o,v,M){return pp(o,v,mt(M,2),!0)}function u2(o,v){var M=o==null?0:o.length;if(M){var j=su(o,v,!0)-1;if(go(o[j],v))return j}return-1}function h2(o){return o&&o.length?U0(o):[]}function d2(o,v){return o&&o.length?U0(o,mt(v,2)):[]}function p2(o){var v=o==null?0:o.length;return v?Zi(o,1,v):[]}function f2(o,v,M){return o&&o.length?(v=M||v===t?1:It(v),Zi(o,0,v<0?0:v)):[]}function g2(o,v,M){var j=o==null?0:o.length;return j?(v=M||v===t?1:It(v),v=j-v,Zi(o,v<0?0:v,j)):[]}function m2(o,v){return o&&o.length?au(o,mt(v,3),!1,!0):[]}function v2(o,v){return o&&o.length?au(o,mt(v,3)):[]}var y2=Pt(function(o){return ys(Fr(o,1,sr,!0))}),b2=Pt(function(o){var v=Ji(o);return sr(v)&&(v=t),ys(Fr(o,1,sr,!0),mt(v,2))}),w2=Pt(function(o){var v=Ji(o);return v=typeof v=="function"?v:t,ys(Fr(o,1,sr,!0),t,v)});function x2(o){return o&&o.length?ys(o):[]}function C2(o,v){return o&&o.length?ys(o,mt(v,2)):[]}function k2(o,v){return v=typeof v=="function"?v:t,o&&o.length?ys(o,t,v):[]}function Ip(o){if(!(o&&o.length))return[];var v=0;return o=Ur(o,function(M){if(sr(M))return v=Cr(M.length,v),!0}),et(v,function(M){return y(o,we(M))})}function Ew(o,v){if(!(o&&o.length))return[];var M=Ip(o);return v==null?M:y(M,function(j){return Mr(v,t,j)})}var A2=Pt(function(o,v){return sr(o)?Sl(o,v):[]}),S2=Pt(function(o){return gp(Ur(o,sr))}),_2=Pt(function(o){var v=Ji(o);return sr(v)&&(v=t),gp(Ur(o,sr),mt(v,2))}),$2=Pt(function(o){var v=Ji(o);return v=typeof v=="function"?v:t,gp(Ur(o,sr),t,v)}),T2=Pt(Ip);function M2(o,v){return G0(o||[],v||[],Al)}function E2(o,v){return G0(o||[],v||[],Tl)}var I2=Pt(function(o){var v=o.length,M=v>1?o[v-1]:t;return M=typeof M=="function"?(o.pop(),M):t,Ew(o,M)});function Iw(o){var v=ee(o);return v.__chain__=!0,v}function R2(o,v){return v(o),o}function mu(o,v){return v(o)}var L2=Go(function(o){var v=o.length,M=v?o[0]:0,j=this.__wrapped__,G=function(te){return np(te,o)};return v>1||this.__actions__.length||!(j instanceof qt)||!Yo(M)?this.thru(G):(j=j.slice(M,+M+(v?1:0)),j.__actions__.push({func:mu,args:[G],thisArg:t}),new Xi(j,this.__chain__).thru(function(te){return v&&!te.length&&te.push(t),te}))});function O2(){return Iw(this)}function N2(){return new Xi(this.value(),this.__chain__)}function D2(){this.__values__===t&&(this.__values__=Vw(this.value()));var o=this.__index__>=this.__values__.length,v=o?t:this.__values__[this.__index__++];return{done:o,value:v}}function F2(){return this}function P2(o){for(var v,M=this;M instanceof tu;){var j=Aw(M);j.__index__=0,j.__values__=t,v?G.__wrapped__=j:v=j;var G=j;M=M.__wrapped__}return G.__wrapped__=o,v}function W2(){var o=this.__wrapped__;if(o instanceof qt){var v=o;return this.__actions__.length&&(v=new qt(this)),v=v.reverse(),v.__actions__.push({func:mu,args:[Ep],thisArg:t}),new Xi(v,this.__chain__)}return this.thru(Ep)}function B2(){return K0(this.__wrapped__,this.__actions__)}var H2=lu(function(o,v,M){pn.call(o,M)?++o[M]:qo(o,M,1)});function z2(o,v,M){var j=St(o)?Dr:RL;return M&&ai(o,v,M)&&(v=t),j(o,mt(v,3))}function j2(o,v){var M=St(o)?Ur:E0;return M(o,mt(v,3))}var U2=iw(Sw),V2=iw(_w);function q2(o,v){return Fr(vu(o,v),1)}function K2(o,v){return Fr(vu(o,v),B)}function G2(o,v,M){return M=M===t?1:It(M),Fr(vu(o,v),M)}function Rw(o,v){var M=St(o)?Nr:vs;return M(o,mt(v,3))}function Lw(o,v){var M=St(o)?Gs:M0;return M(o,mt(v,3))}var Y2=lu(function(o,v,M){pn.call(o,M)?o[M].push(v):qo(o,M,[v])});function X2(o,v,M,j){o=Ai(o)?o:Pa(o),M=M&&!j?It(M):0;var G=o.length;return M<0&&(M=Cr(G+M,0)),Cu(o)?M<=G&&o.indexOf(v,M)>-1:!!G&&ae(o,v,M)>-1}var Q2=Pt(function(o,v,M){var j=-1,G=typeof v=="function",te=Ai(o)?Ce(o.length):[];return vs(o,function(ue){te[++j]=G?Mr(v,ue,M):_l(ue,v,M)}),te}),Z2=lu(function(o,v,M){qo(o,M,v)});function vu(o,v){var M=St(o)?y:D0;return M(o,mt(v,3))}function J2(o,v,M,j){return o==null?[]:(St(v)||(v=v==null?[]:[v]),M=j?t:M,St(M)||(M=M==null?[]:[M]),B0(o,v,M))}var eN=lu(function(o,v,M){o[M?0:1].push(v)},function(){return[[],[]]});function tN(o,v,M){var j=St(o)?S:Le,G=arguments.length<3;return j(o,mt(v,4),M,G,vs)}function nN(o,v,M){var j=St(o)?F:Le,G=arguments.length<3;return j(o,mt(v,4),M,G,M0)}function rN(o,v){var M=St(o)?Ur:E0;return M(o,wu(mt(v,3)))}function iN(o){var v=St(o)?S0:XL;return v(o)}function oN(o,v,M){(M?ai(o,v,M):v===t)?v=1:v=It(v);var j=St(o)?$L:QL;return j(o,v)}function sN(o){var v=St(o)?TL:JL;return v(o)}function aN(o){if(o==null)return 0;if(Ai(o))return Cu(o)?Wt(o):o.length;var v=qr(o);return v==st||v==Wn?o.size:lp(o).length}function lN(o,v,M){var j=St(o)?W:eO;return M&&ai(o,v,M)&&(v=t),j(o,mt(v,3))}var cN=Pt(function(o,v){if(o==null)return[];var M=v.length;return M>1&&ai(o,v[0],v[1])?v=[]:M>2&&ai(v[0],v[1],v[2])&&(v=[v[0]]),B0(o,Fr(v,1),[])}),yu=jR||function(){return gn.Date.now()};function uN(o,v){if(typeof v!="function")throw new mn(g);return o=It(o),function(){if(--o<1)return v.apply(this,arguments)}}function Ow(o,v,M){return v=M?t:v,v=o&&v==null?o.length:v,Ko(o,R,t,t,t,t,v)}function Nw(o,v){var M;if(typeof v!="function")throw new mn(g);return o=It(o),function(){return--o>0&&(M=v.apply(this,arguments)),o<=1&&(v=t),M}}var Rp=Pt(function(o,v,M){var j=m;if(M.length){var G=He(M,Da(Rp));j|=k}return Ko(o,j,v,M,G)}),Dw=Pt(function(o,v,M){var j=m|w;if(M.length){var G=He(M,Da(Dw));j|=k}return Ko(v,j,o,M,G)});function Fw(o,v,M){v=M?t:v;var j=Ko(o,E,t,t,t,t,t,v);return j.placeholder=Fw.placeholder,j}function Pw(o,v,M){v=M?t:v;var j=Ko(o,_,t,t,t,t,t,v);return j.placeholder=Pw.placeholder,j}function Ww(o,v,M){var j,G,te,ue,pe,ye,Ie=0,Re=!1,De=!1,Qe=!0;if(typeof o!="function")throw new mn(g);v=eo(v)||0,jn(M)&&(Re=!!M.leading,De="maxWait"in M,te=De?Cr(eo(M.maxWait)||0,v):te,Qe="trailing"in M?!!M.trailing:Qe);function lt(ar){var mo=j,Zo=G;return j=G=t,Ie=ar,ue=o.apply(Zo,mo),ue}function vt(ar){return Ie=ar,pe=Il(zt,v),Re?lt(ar):ue}function Ot(ar){var mo=ar-ye,Zo=ar-Ie,ix=v-mo;return De?Vr(ix,te-Zo):ix}function yt(ar){var mo=ar-ye,Zo=ar-Ie;return ye===t||mo>=v||mo<0||De&&Zo>=te}function zt(){var ar=yu();if(yt(ar))return Yt(ar);pe=Il(zt,Ot(ar))}function Yt(ar){return pe=t,Qe&&j?lt(ar):(j=G=t,ue)}function Wi(){pe!==t&&Y0(pe),Ie=0,j=ye=G=pe=t}function li(){return pe===t?ue:Yt(yu())}function Bi(){var ar=yu(),mo=yt(ar);if(j=arguments,G=this,ye=ar,mo){if(pe===t)return vt(ye);if(De)return Y0(pe),pe=Il(zt,v),lt(ye)}return pe===t&&(pe=Il(zt,v)),ue}return Bi.cancel=Wi,Bi.flush=li,Bi}var hN=Pt(function(o,v){return T0(o,1,v)}),dN=Pt(function(o,v,M){return T0(o,eo(v)||0,M)});function pN(o){return Ko(o,L)}function bu(o,v){if(typeof o!="function"||v!=null&&typeof v!="function")throw new mn(g);var M=function(){var j=arguments,G=v?v.apply(this,j):j[0],te=M.cache;if(te.has(G))return te.get(G);var ue=o.apply(this,j);return M.cache=te.set(G,ue)||te,ue};return M.cache=new(bu.Cache||Vo),M}bu.Cache=Vo;function wu(o){if(typeof o!="function")throw new mn(g);return function(){var v=arguments;switch(v.length){case 0:return!o.call(this);case 1:return!o.call(this,v[0]);case 2:return!o.call(this,v[0],v[1]);case 3:return!o.call(this,v[0],v[1],v[2])}return!o.apply(this,v)}}function fN(o){return Nw(2,o)}var gN=tO(function(o,v){v=v.length==1&&St(v[0])?y(v[0],pt(mt())):y(Fr(v,1),pt(mt()));var M=v.length;return Pt(function(j){for(var G=-1,te=Vr(j.length,M);++G<te;)j[G]=v[G].call(this,j[G]);return Mr(o,this,j)})}),Lp=Pt(function(o,v){var M=He(v,Da(Lp));return Ko(o,k,t,v,M)}),Bw=Pt(function(o,v){var M=He(v,Da(Bw));return Ko(o,C,t,v,M)}),mN=Go(function(o,v){return Ko(o,D,t,t,t,v)});function vN(o,v){if(typeof o!="function")throw new mn(g);return v=v===t?v:It(v),Pt(o,v)}function yN(o,v){if(typeof o!="function")throw new mn(g);return v=v==null?0:Cr(It(v),0),Pt(function(M){var j=M[v],G=ws(M,0,v);return j&&T(G,j),Mr(o,this,G)})}function bN(o,v,M){var j=!0,G=!0;if(typeof o!="function")throw new mn(g);return jn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Ww(o,v,{leading:j,maxWait:v,trailing:G})}function wN(o){return Ow(o,1)}function xN(o,v){return Lp(vp(v),o)}function CN(){if(!arguments.length)return[];var o=arguments[0];return St(o)?o:[o]}function kN(o){return Qi(o,c)}function AN(o,v){return v=typeof v=="function"?v:t,Qi(o,c,v)}function SN(o){return Qi(o,a|c)}function _N(o,v){return v=typeof v=="function"?v:t,Qi(o,a|c,v)}function $N(o,v){return v==null||$0(o,v,Lr(v))}function go(o,v){return o===v||o!==o&&v!==v}var TN=du(op),MN=du(function(o,v){return o>=v}),ra=L0(function(){return arguments}())?L0:function(o){return Jn(o)&&pn.call(o,"callee")&&!b0.call(o,"callee")},St=Ce.isArray,EN=Ci?pt(Ci):PL;function Ai(o){return o!=null&&xu(o.length)&&!Xo(o)}function sr(o){return Jn(o)&&Ai(o)}function IN(o){return o===!0||o===!1||Jn(o)&&si(o)==_e}var xs=VR||Up,RN=gs?pt(gs):WL;function LN(o){return Jn(o)&&o.nodeType===1&&!Rl(o)}function ON(o){if(o==null)return!0;if(Ai(o)&&(St(o)||typeof o=="string"||typeof o.splice=="function"||xs(o)||Fa(o)||ra(o)))return!o.length;var v=qr(o);if(v==st||v==Wn)return!o.size;if(El(o))return!lp(o).length;for(var M in o)if(pn.call(o,M))return!1;return!0}function NN(o,v){return $l(o,v)}function DN(o,v,M){M=typeof M=="function"?M:t;var j=M?M(o,v):t;return j===t?$l(o,v,t,M):!!j}function Op(o){if(!Jn(o))return!1;var v=si(o);return v==Je||v==Me||typeof o.message=="string"&&typeof o.name=="string"&&!Rl(o)}function FN(o){return typeof o=="number"&&x0(o)}function Xo(o){if(!jn(o))return!1;var v=si(o);return v==Xe||v==ht||v==me||v==kr}function Hw(o){return typeof o=="number"&&o==It(o)}function xu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function jn(o){var v=typeof o;return o!=null&&(v=="object"||v=="function")}function Jn(o){return o!=null&&typeof o=="object"}var zw=Qn?pt(Qn):HL;function PN(o,v){return o===v||ap(o,v,Ap(v))}function WN(o,v,M){return M=typeof M=="function"?M:t,ap(o,v,Ap(v),M)}function BN(o){return jw(o)&&o!=+o}function HN(o){if(AO(o))throw new ft(p);return O0(o)}function zN(o){return o===null}function jN(o){return o==null}function jw(o){return typeof o=="number"||Jn(o)&&si(o)==dt}function Rl(o){if(!Jn(o)||si(o)!=$n)return!1;var v=Gc(o);if(v===null)return!0;var M=pn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&Uc.call(M)==WR}var Np=Li?pt(Li):zL;function UN(o){return Hw(o)&&o>=-U&&o<=U}var Uw=Oi?pt(Oi):jL;function Cu(o){return typeof o=="string"||!St(o)&&Jn(o)&&si(o)==ir}function Pi(o){return typeof o=="symbol"||Jn(o)&&si(o)==Or}var Fa=Gi?pt(Gi):UL;function VN(o){return o===t}function qN(o){return Jn(o)&&qr(o)==qe}function KN(o){return Jn(o)&&si(o)==Nt}var GN=du(cp),YN=du(function(o,v){return o<=v});function Vw(o){if(!o)return[];if(Ai(o))return Cu(o)?At(o):ki(o);if(bl&&o[bl])return xe(o[bl]());var v=qr(o),M=v==st?Ee:v==Wn?Ye:Pa;return M(o)}function Qo(o){if(!o)return o===0?o:0;if(o=eo(o),o===B||o===-B){var v=o<0?-1:1;return v*K}return o===o?o:0}function It(o){var v=Qo(o),M=v%1;return v===v?M?v-M:v:0}function qw(o){return o?Js(It(o),0,J):0}function eo(o){if(typeof o=="number")return o;if(Pi(o))return Z;if(jn(o)){var v=typeof o.valueOf=="function"?o.valueOf():o;o=jn(v)?v+"":v}if(typeof o!="string")return o===0?o:+o;o=Sn(o);var M=No.test(o);return M||ce.test(o)?An(o.slice(2),M?2:8):Dt.test(o)?Z:+o}function Kw(o){return Eo(o,Si(o))}function XN(o){return o?Js(It(o),-U,U):o===0?o:0}function un(o){return o==null?"":Fi(o)}var QN=Oa(function(o,v){if(El(v)||Ai(v)){Eo(v,Lr(v),o);return}for(var M in v)pn.call(v,M)&&Al(o,M,v[M])}),Gw=Oa(function(o,v){Eo(v,Si(v),o)}),ku=Oa(function(o,v,M,j){Eo(v,Si(v),o,j)}),ZN=Oa(function(o,v,M,j){Eo(v,Lr(v),o,j)}),JN=Go(np);function eD(o,v){var M=La(o);return v==null?M:_0(M,v)}var tD=Pt(function(o,v){o=Lt(o);var M=-1,j=v.length,G=j>2?v[2]:t;for(G&&ai(v[0],v[1],G)&&(j=1);++M<j;)for(var te=v[M],ue=Si(te),pe=-1,ye=ue.length;++pe<ye;){var Ie=ue[pe],Re=o[Ie];(Re===t||go(Re,Zn[Ie])&&!pn.call(o,Ie))&&(o[Ie]=te[Ie])}return o}),nD=Pt(function(o){return o.push(t,hw),Mr(Yw,t,o)});function rD(o,v){return Q(o,mt(v,3),Mo)}function iD(o,v){return Q(o,mt(v,3),ip)}function oD(o,v){return o==null?o:rp(o,mt(v,3),Si)}function sD(o,v){return o==null?o:I0(o,mt(v,3),Si)}function aD(o,v){return o&&Mo(o,mt(v,3))}function lD(o,v){return o&&ip(o,mt(v,3))}function cD(o){return o==null?[]:iu(o,Lr(o))}function uD(o){return o==null?[]:iu(o,Si(o))}function Dp(o,v,M){var j=o==null?t:ea(o,v);return j===t?M:j}function hD(o,v){return o!=null&&fw(o,v,OL)}function Fp(o,v){return o!=null&&fw(o,v,NL)}var dD=sw(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Vc.call(v)),o[v]=M},Wp(_i)),pD=sw(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Vc.call(v)),pn.call(o,v)?o[v].push(M):o[v]=[M]},mt),fD=Pt(_l);function Lr(o){return Ai(o)?A0(o):lp(o)}function Si(o){return Ai(o)?A0(o,!0):VL(o)}function gD(o,v){var M={};return v=mt(v,3),Mo(o,function(j,G,te){qo(M,v(j,G,te),j)}),M}function mD(o,v){var M={};return v=mt(v,3),Mo(o,function(j,G,te){qo(M,G,v(j,G,te))}),M}var vD=Oa(function(o,v,M){ou(o,v,M)}),Yw=Oa(function(o,v,M,j){ou(o,v,M,j)}),yD=Go(function(o,v){var M={};if(o==null)return M;var j=!1;v=y(v,function(te){return te=bs(te,o),j||(j=te.length>1),te}),Eo(o,Cp(o),M),j&&(M=Qi(M,a|u|c,dO));for(var G=v.length;G--;)fp(M,v[G]);return M});function bD(o,v){return Xw(o,wu(mt(v)))}var wD=Go(function(o,v){return o==null?{}:KL(o,v)});function Xw(o,v){if(o==null)return{};var M=y(Cp(o),function(j){return[j]});return v=mt(v),H0(o,M,function(j,G){return v(j,G[0])})}function xD(o,v,M){v=bs(v,o);var j=-1,G=v.length;for(G||(G=1,o=t);++j<G;){var te=o==null?t:o[Io(v[j])];te===t&&(j=G,te=M),o=Xo(te)?te.call(o):te}return o}function CD(o,v,M){return o==null?o:Tl(o,v,M)}function kD(o,v,M,j){return j=typeof j=="function"?j:t,o==null?o:Tl(o,v,M,j)}var Qw=cw(Lr),Zw=cw(Si);function AD(o,v,M){var j=St(o),G=j||xs(o)||Fa(o);if(v=mt(v,4),M==null){var te=o&&o.constructor;G?M=j?new te:[]:jn(o)?M=Xo(te)?La(Gc(o)):{}:M={}}return(G?Nr:Mo)(o,function(ue,pe,ye){return v(M,ue,pe,ye)}),M}function SD(o,v){return o==null?!0:fp(o,v)}function _D(o,v,M){return o==null?o:q0(o,v,vp(M))}function $D(o,v,M,j){return j=typeof j=="function"?j:t,o==null?o:q0(o,v,vp(M),j)}function Pa(o){return o==null?[]:On(o,Lr(o))}function TD(o){return o==null?[]:On(o,Si(o))}function MD(o,v,M){return M===t&&(M=v,v=t),M!==t&&(M=eo(M),M=M===M?M:0),v!==t&&(v=eo(v),v=v===v?v:0),Js(eo(o),v,M)}function ED(o,v,M){return v=Qo(v),M===t?(M=v,v=0):M=Qo(M),o=eo(o),DL(o,v,M)}function ID(o,v,M){if(M&&typeof M!="boolean"&&ai(o,v,M)&&(v=M=t),M===t&&(typeof v=="boolean"?(M=v,v=t):typeof o=="boolean"&&(M=o,o=t)),o===t&&v===t?(o=0,v=1):(o=Qo(o),v===t?(v=o,o=0):v=Qo(v)),o>v){var j=o;o=v,v=j}if(M||o%1||v%1){var G=C0();return Vr(o+G*(v-o+Ue("1e-"+((G+"").length-1))),v)}return hp(o,v)}var RD=Na(function(o,v,M){return v=v.toLowerCase(),o+(M?Jw(v):v)});function Jw(o){return Pp(un(o).toLowerCase())}function ex(o){return o=un(o),o&&o.replace(Fe,Nn).replace(Ho,"")}function LD(o,v,M){o=un(o),v=Fi(v);var j=o.length;M=M===t?j:Js(It(M),0,j);var G=M;return M-=v.length,M>=0&&o.slice(M,G)==v}function OD(o){return o=un(o),o&&zs.test(o)?o.replace(co,V):o}function ND(o){return o=un(o),o&&bi.test(o)?o.replace(yr,"\\$&"):o}var DD=Na(function(o,v,M){return o+(M?"-":"")+v.toLowerCase()}),FD=Na(function(o,v,M){return o+(M?" ":"")+v.toLowerCase()}),PD=rw("toLowerCase");function WD(o,v,M){o=un(o),v=It(v);var j=v?Wt(o):0;if(!v||j>=v)return o;var G=(v-j)/2;return hu(Zc(G),M)+o+hu(Qc(G),M)}function BD(o,v,M){o=un(o),v=It(v);var j=v?Wt(o):0;return v&&j<v?o+hu(v-j,M):o}function HD(o,v,M){o=un(o),v=It(v);var j=v?Wt(o):0;return v&&j<v?hu(v-j,M)+o:o}function zD(o,v,M){return M||v==null?v=0:v&&(v=+v),YR(un(o).replace(Mn,""),v||0)}function jD(o,v,M){return(M?ai(o,v,M):v===t)?v=1:v=It(v),dp(un(o),v)}function UD(){var o=arguments,v=un(o[0]);return o.length<3?v:v.replace(o[1],o[2])}var VD=Na(function(o,v,M){return o+(M?"_":"")+v.toLowerCase()});function qD(o,v,M){return M&&typeof M!="number"&&ai(o,v,M)&&(v=M=t),M=M===t?J:M>>>0,M?(o=un(o),o&&(typeof v=="string"||v!=null&&!Np(v))&&(v=Fi(v),!v&&oe(o))?ws(At(o),0,M):o.split(v,M)):[]}var KD=Na(function(o,v,M){return o+(M?" ":"")+Pp(v)});function GD(o,v,M){return o=un(o),M=M==null?0:Js(It(M),0,o.length),v=Fi(v),o.slice(M,M+v.length)==v}function YD(o,v,M){var j=ee.templateSettings;M&&ai(o,v,M)&&(v=t),o=un(o),v=ku({},v,j,uw);var G=ku({},v.imports,j.imports,uw),te=Lr(G),ue=On(G,te),pe,ye,Ie=0,Re=v.interpolate||Tt,De="__p += '",Qe=oi((v.escape||Tt).source+"|"+Re.source+"|"+(Re===vi?xi:Tt).source+"|"+(v.evaluate||Tt).source+"|$","g"),lt="//# sourceURL="+(pn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++To+"]")+`
|
|
1472
|
+
`;o.replace(Qe,function(yt,zt,Yt,Wi,li,Bi){return Yt||(Yt=Wi),De+=o.slice(Ie,Bi).replace(Qt,X),zt&&(pe=!0,De+=`' +
|
|
1473
|
+
__e(`+zt+`) +
|
|
1474
|
+
'`),li&&(ye=!0,De+=`';
|
|
1475
|
+
`+li+`;
|
|
1476
|
+
__p += '`),Yt&&(De+=`' +
|
|
1477
|
+
((__t = (`+Yt+`)) == null ? '' : __t) +
|
|
1478
|
+
'`),Ie=Bi+yt.length,yt}),De+=`';
|
|
1479
|
+
`;var vt=pn.call(v,"variable")&&v.variable;if(!vt)De=`with (obj) {
|
|
1480
|
+
`+De+`
|
|
1481
|
+
}
|
|
1482
|
+
`;else if(ss.test(vt))throw new ft(b);De=(ye?De.replace(ei,""):De).replace(Ii,"$1").replace(gi,"$1;"),De="function("+(vt||"obj")+`) {
|
|
1483
|
+
`+(vt?"":`obj || (obj = {});
|
|
1484
|
+
`)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(ye?`, __j = Array.prototype.join;
|
|
1485
|
+
function print() { __p += __j.call(arguments, '') }
|
|
1486
|
+
`:`;
|
|
1487
|
+
`)+De+`return __p
|
|
1488
|
+
}`;var Ot=nx(function(){return Et(te,lt+"return "+De).apply(t,ue)});if(Ot.source=De,Op(Ot))throw Ot;return Ot}function XD(o){return un(o).toLowerCase()}function QD(o){return un(o).toUpperCase()}function ZD(o,v,M){if(o=un(o),o&&(M||v===t))return Sn(o);if(!o||!(v=Fi(v)))return o;var j=At(o),G=At(v),te=Mt(j,G),ue=hr(j,G)+1;return ws(j,te,ue).join("")}function JD(o,v,M){if(o=un(o),o&&(M||v===t))return o.slice(0,Ft(o)+1);if(!o||!(v=Fi(v)))return o;var j=At(o),G=hr(j,At(v))+1;return ws(j,0,G).join("")}function eF(o,v,M){if(o=un(o),o&&(M||v===t))return o.replace(Mn,"");if(!o||!(v=Fi(v)))return o;var j=At(o),G=Mt(j,At(v));return ws(j,G).join("")}function tF(o,v){var M=I,j=H;if(jn(v)){var G="separator"in v?v.separator:G;M="length"in v?It(v.length):M,j="omission"in v?Fi(v.omission):j}o=un(o);var te=o.length;if(oe(o)){var ue=At(o);te=ue.length}if(M>=te)return o;var pe=M-Wt(j);if(pe<1)return j;var ye=ue?ws(ue,0,pe).join(""):o.slice(0,pe);if(G===t)return ye+j;if(ue&&(pe+=ye.length-pe),Np(G)){if(o.slice(pe).search(G)){var Ie,Re=ye;for(G.global||(G=oi(G.source,un(zr.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Re);)var De=Ie.index;ye=ye.slice(0,De===t?pe:De)}}else if(o.indexOf(Fi(G),pe)!=pe){var Qe=ye.lastIndexOf(G);Qe>-1&&(ye=ye.slice(0,Qe))}return ye+j}function nF(o){return o=un(o),o&&mi.test(o)?o.replace(Kn,gt):o}var rF=Na(function(o,v,M){return o+(M?" ":"")+v.toUpperCase()}),Pp=rw("toUpperCase");function tx(o,v,M){return o=un(o),v=M?t:v,v===t?ge(o)?Dn(o):Y(o):o.match(v)||[]}var nx=Pt(function(o,v){try{return Mr(o,t,v)}catch(M){return Op(M)?M:new ft(M)}}),iF=Go(function(o,v){return Nr(v,function(M){M=Io(M),qo(o,M,Rp(o[M],o))}),o});function oF(o){var v=o==null?0:o.length,M=mt();return o=v?y(o,function(j){if(typeof j[1]!="function")throw new mn(g);return[M(j[0]),j[1]]}):[],Pt(function(j){for(var G=-1;++G<v;){var te=o[G];if(Mr(te[0],this,j))return Mr(te[1],this,j)}})}function sF(o){return IL(Qi(o,a))}function Wp(o){return function(){return o}}function aF(o,v){return o==null||o!==o?v:o}var lF=ow(),cF=ow(!0);function _i(o){return o}function Bp(o){return N0(typeof o=="function"?o:Qi(o,a))}function uF(o){return F0(Qi(o,a))}function hF(o,v){return P0(o,Qi(v,a))}var dF=Pt(function(o,v){return function(M){return _l(M,o,v)}}),pF=Pt(function(o,v){return function(M){return _l(o,M,v)}});function Hp(o,v,M){var j=Lr(v),G=iu(v,j);M==null&&!(jn(v)&&(G.length||!j.length))&&(M=v,v=o,o=this,G=iu(v,Lr(v)));var te=!(jn(M)&&"chain"in M)||!!M.chain,ue=Xo(o);return Nr(G,function(pe){var ye=v[pe];o[pe]=ye,ue&&(o.prototype[pe]=function(){var Ie=this.__chain__;if(te||Ie){var Re=o(this.__wrapped__),De=Re.__actions__=ki(this.__actions__);return De.push({func:ye,args:arguments,thisArg:o}),Re.__chain__=Ie,Re}return ye.apply(o,T([this.value()],arguments))})}),o}function fF(){return gn._===this&&(gn._=BR),this}function zp(){}function gF(o){return o=It(o),Pt(function(v){return W0(v,o)})}var mF=bp(y),vF=bp(Dr),yF=bp(W);function rx(o){return _p(o)?we(Io(o)):GL(o)}function bF(o){return function(v){return o==null?t:ea(o,v)}}var wF=aw(),xF=aw(!0);function jp(){return[]}function Up(){return!1}function CF(){return{}}function kF(){return""}function AF(){return!0}function SF(o,v){if(o=It(o),o<1||o>U)return[];var M=J,j=Vr(o,J);v=mt(v),o-=J;for(var G=et(j,v);++M<o;)v(M);return G}function _F(o){return St(o)?y(o,Io):Pi(o)?[o]:ki(kw(un(o)))}function $F(o){var v=++PR;return un(o)+v}var TF=uu(function(o,v){return o+v},0),MF=wp("ceil"),EF=uu(function(o,v){return o/v},1),IF=wp("floor");function RF(o){return o&&o.length?ru(o,_i,op):t}function LF(o,v){return o&&o.length?ru(o,mt(v,2),op):t}function OF(o){return ve(o,_i)}function NF(o,v){return ve(o,mt(v,2))}function DF(o){return o&&o.length?ru(o,_i,cp):t}function FF(o,v){return o&&o.length?ru(o,mt(v,2),cp):t}var PF=uu(function(o,v){return o*v},1),WF=wp("round"),BF=uu(function(o,v){return o-v},0);function HF(o){return o&&o.length?ut(o,_i):0}function zF(o,v){return o&&o.length?ut(o,mt(v,2)):0}return ee.after=uN,ee.ary=Ow,ee.assign=QN,ee.assignIn=Gw,ee.assignInWith=ku,ee.assignWith=ZN,ee.at=JN,ee.before=Nw,ee.bind=Rp,ee.bindAll=iF,ee.bindKey=Dw,ee.castArray=CN,ee.chain=Iw,ee.chunk=IO,ee.compact=RO,ee.concat=LO,ee.cond=oF,ee.conforms=sF,ee.constant=Wp,ee.countBy=H2,ee.create=eD,ee.curry=Fw,ee.curryRight=Pw,ee.debounce=Ww,ee.defaults=tD,ee.defaultsDeep=nD,ee.defer=hN,ee.delay=dN,ee.difference=OO,ee.differenceBy=NO,ee.differenceWith=DO,ee.drop=FO,ee.dropRight=PO,ee.dropRightWhile=WO,ee.dropWhile=BO,ee.fill=HO,ee.filter=j2,ee.flatMap=q2,ee.flatMapDeep=K2,ee.flatMapDepth=G2,ee.flatten=$w,ee.flattenDeep=zO,ee.flattenDepth=jO,ee.flip=pN,ee.flow=lF,ee.flowRight=cF,ee.fromPairs=UO,ee.functions=cD,ee.functionsIn=uD,ee.groupBy=Y2,ee.initial=qO,ee.intersection=KO,ee.intersectionBy=GO,ee.intersectionWith=YO,ee.invert=dD,ee.invertBy=pD,ee.invokeMap=Q2,ee.iteratee=Bp,ee.keyBy=Z2,ee.keys=Lr,ee.keysIn=Si,ee.map=vu,ee.mapKeys=gD,ee.mapValues=mD,ee.matches=uF,ee.matchesProperty=hF,ee.memoize=bu,ee.merge=vD,ee.mergeWith=Yw,ee.method=dF,ee.methodOf=pF,ee.mixin=Hp,ee.negate=wu,ee.nthArg=gF,ee.omit=yD,ee.omitBy=bD,ee.once=fN,ee.orderBy=J2,ee.over=mF,ee.overArgs=gN,ee.overEvery=vF,ee.overSome=yF,ee.partial=Lp,ee.partialRight=Bw,ee.partition=eN,ee.pick=wD,ee.pickBy=Xw,ee.property=rx,ee.propertyOf=bF,ee.pull=JO,ee.pullAll=Mw,ee.pullAllBy=e2,ee.pullAllWith=t2,ee.pullAt=n2,ee.range=wF,ee.rangeRight=xF,ee.rearg=mN,ee.reject=rN,ee.remove=r2,ee.rest=vN,ee.reverse=Ep,ee.sampleSize=oN,ee.set=CD,ee.setWith=kD,ee.shuffle=sN,ee.slice=i2,ee.sortBy=cN,ee.sortedUniq=h2,ee.sortedUniqBy=d2,ee.split=qD,ee.spread=yN,ee.tail=p2,ee.take=f2,ee.takeRight=g2,ee.takeRightWhile=m2,ee.takeWhile=v2,ee.tap=R2,ee.throttle=bN,ee.thru=mu,ee.toArray=Vw,ee.toPairs=Qw,ee.toPairsIn=Zw,ee.toPath=_F,ee.toPlainObject=Kw,ee.transform=AD,ee.unary=wN,ee.union=y2,ee.unionBy=b2,ee.unionWith=w2,ee.uniq=x2,ee.uniqBy=C2,ee.uniqWith=k2,ee.unset=SD,ee.unzip=Ip,ee.unzipWith=Ew,ee.update=_D,ee.updateWith=$D,ee.values=Pa,ee.valuesIn=TD,ee.without=A2,ee.words=tx,ee.wrap=xN,ee.xor=S2,ee.xorBy=_2,ee.xorWith=$2,ee.zip=T2,ee.zipObject=M2,ee.zipObjectDeep=E2,ee.zipWith=I2,ee.entries=Qw,ee.entriesIn=Zw,ee.extend=Gw,ee.extendWith=ku,Hp(ee,ee),ee.add=TF,ee.attempt=nx,ee.camelCase=RD,ee.capitalize=Jw,ee.ceil=MF,ee.clamp=MD,ee.clone=kN,ee.cloneDeep=SN,ee.cloneDeepWith=_N,ee.cloneWith=AN,ee.conformsTo=$N,ee.deburr=ex,ee.defaultTo=aF,ee.divide=EF,ee.endsWith=LD,ee.eq=go,ee.escape=OD,ee.escapeRegExp=ND,ee.every=z2,ee.find=U2,ee.findIndex=Sw,ee.findKey=rD,ee.findLast=V2,ee.findLastIndex=_w,ee.findLastKey=iD,ee.floor=IF,ee.forEach=Rw,ee.forEachRight=Lw,ee.forIn=oD,ee.forInRight=sD,ee.forOwn=aD,ee.forOwnRight=lD,ee.get=Dp,ee.gt=TN,ee.gte=MN,ee.has=hD,ee.hasIn=Fp,ee.head=Tw,ee.identity=_i,ee.includes=X2,ee.indexOf=VO,ee.inRange=ED,ee.invoke=fD,ee.isArguments=ra,ee.isArray=St,ee.isArrayBuffer=EN,ee.isArrayLike=Ai,ee.isArrayLikeObject=sr,ee.isBoolean=IN,ee.isBuffer=xs,ee.isDate=RN,ee.isElement=LN,ee.isEmpty=ON,ee.isEqual=NN,ee.isEqualWith=DN,ee.isError=Op,ee.isFinite=FN,ee.isFunction=Xo,ee.isInteger=Hw,ee.isLength=xu,ee.isMap=zw,ee.isMatch=PN,ee.isMatchWith=WN,ee.isNaN=BN,ee.isNative=HN,ee.isNil=jN,ee.isNull=zN,ee.isNumber=jw,ee.isObject=jn,ee.isObjectLike=Jn,ee.isPlainObject=Rl,ee.isRegExp=Np,ee.isSafeInteger=UN,ee.isSet=Uw,ee.isString=Cu,ee.isSymbol=Pi,ee.isTypedArray=Fa,ee.isUndefined=VN,ee.isWeakMap=qN,ee.isWeakSet=KN,ee.join=XO,ee.kebabCase=DD,ee.last=Ji,ee.lastIndexOf=QO,ee.lowerCase=FD,ee.lowerFirst=PD,ee.lt=GN,ee.lte=YN,ee.max=RF,ee.maxBy=LF,ee.mean=OF,ee.meanBy=NF,ee.min=DF,ee.minBy=FF,ee.stubArray=jp,ee.stubFalse=Up,ee.stubObject=CF,ee.stubString=kF,ee.stubTrue=AF,ee.multiply=PF,ee.nth=ZO,ee.noConflict=fF,ee.noop=zp,ee.now=yu,ee.pad=WD,ee.padEnd=BD,ee.padStart=HD,ee.parseInt=zD,ee.random=ID,ee.reduce=tN,ee.reduceRight=nN,ee.repeat=jD,ee.replace=UD,ee.result=xD,ee.round=WF,ee.runInContext=fe,ee.sample=iN,ee.size=aN,ee.snakeCase=VD,ee.some=lN,ee.sortedIndex=o2,ee.sortedIndexBy=s2,ee.sortedIndexOf=a2,ee.sortedLastIndex=l2,ee.sortedLastIndexBy=c2,ee.sortedLastIndexOf=u2,ee.startCase=KD,ee.startsWith=GD,ee.subtract=BF,ee.sum=HF,ee.sumBy=zF,ee.template=YD,ee.times=SF,ee.toFinite=Qo,ee.toInteger=It,ee.toLength=qw,ee.toLower=XD,ee.toNumber=eo,ee.toSafeInteger=XN,ee.toString=un,ee.toUpper=QD,ee.trim=ZD,ee.trimEnd=JD,ee.trimStart=eF,ee.truncate=tF,ee.unescape=nF,ee.uniqueId=$F,ee.upperCase=rF,ee.upperFirst=Pp,ee.each=Rw,ee.eachRight=Lw,ee.first=Tw,Hp(ee,function(){var o={};return Mo(ee,function(v,M){pn.call(ee.prototype,M)||(o[M]=v)}),o}(),{chain:!1}),ee.VERSION=r,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){ee[o].placeholder=ee}),Nr(["drop","take"],function(o,v){qt.prototype[o]=function(M){M=M===t?1:Cr(It(M),0);var j=this.__filtered__&&!v?new qt(this):this.clone();return j.__filtered__?j.__takeCount__=Vr(M,j.__takeCount__):j.__views__.push({size:Vr(M,J),type:o+(j.__dir__<0?"Right":"")}),j},qt.prototype[o+"Right"]=function(M){return this.reverse()[o](M).reverse()}}),Nr(["filter","map","takeWhile"],function(o,v){var M=v+1,j=M==$||M==N;qt.prototype[o]=function(G){var te=this.clone();return te.__iteratees__.push({iteratee:mt(G,3),type:M}),te.__filtered__=te.__filtered__||j,te}}),Nr(["head","last"],function(o,v){var M="take"+(v?"Right":"");qt.prototype[o]=function(){return this[M](1).value()[0]}}),Nr(["initial","tail"],function(o,v){var M="drop"+(v?"":"Right");qt.prototype[o]=function(){return this.__filtered__?new qt(this):this[M](1)}}),qt.prototype.compact=function(){return this.filter(_i)},qt.prototype.find=function(o){return this.filter(o).head()},qt.prototype.findLast=function(o){return this.reverse().find(o)},qt.prototype.invokeMap=Pt(function(o,v){return typeof o=="function"?new qt(this):this.map(function(M){return _l(M,o,v)})}),qt.prototype.reject=function(o){return this.filter(wu(mt(o)))},qt.prototype.slice=function(o,v){o=It(o);var M=this;return M.__filtered__&&(o>0||v<0)?new qt(M):(o<0?M=M.takeRight(-o):o&&(M=M.drop(o)),v!==t&&(v=It(v),M=v<0?M.dropRight(-v):M.take(v-o)),M)},qt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},qt.prototype.toArray=function(){return this.take(J)},Mo(qt.prototype,function(o,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),j=/^(?:head|last)$/.test(v),G=ee[j?"take"+(v=="last"?"Right":""):v],te=j||/^find/.test(v);G&&(ee.prototype[v]=function(){var ue=this.__wrapped__,pe=j?[1]:arguments,ye=ue instanceof qt,Ie=pe[0],Re=ye||St(ue),De=function(zt){var Yt=G.apply(ee,T([zt],pe));return j&&Qe?Yt[0]:Yt};Re&&M&&typeof Ie=="function"&&Ie.length!=1&&(ye=Re=!1);var Qe=this.__chain__,lt=!!this.__actions__.length,vt=te&&!Qe,Ot=ye&&!lt;if(!te&&Re){ue=Ot?ue:new qt(this);var yt=o.apply(ue,pe);return yt.__actions__.push({func:mu,args:[De],thisArg:t}),new Xi(yt,Qe)}return vt&&Ot?o.apply(this,pe):(yt=this.thru(De),vt?j?yt.value()[0]:yt.value():yt)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(o){var v=Rr[o],M=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",j=/^(?:pop|shift)$/.test(o);ee.prototype[o]=function(){var G=arguments;if(j&&!this.__chain__){var te=this.value();return v.apply(St(te)?te:[],G)}return this[M](function(ue){return v.apply(St(ue)?ue:[],G)})}}),Mo(qt.prototype,function(o,v){var M=ee[v];if(M){var j=M.name+"";pn.call(Ra,j)||(Ra[j]=[]),Ra[j].push({name:v,func:M})}}),Ra[cu(t,w).name]=[{name:"wrapper",func:t}],qt.prototype.clone=nL,qt.prototype.reverse=rL,qt.prototype.value=iL,ee.prototype.at=L2,ee.prototype.chain=O2,ee.prototype.commit=N2,ee.prototype.next=D2,ee.prototype.plant=P2,ee.prototype.reverse=W2,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=B2,ee.prototype.first=ee.prototype.head,bl&&(ee.prototype[bl]=F2),ee},Gt=dr();ur?((ur.exports=Gt)._=Gt,En._=Gt):gn._=Gt}).call(SA)}(ec,ec.exports)),ec.exports}var $A=_A();pr("O",Fl($A)).debounce(function(){this.rebuildDisplayText()},300);var Jg={exports:{}},em;function TA(){return em||(em=1,function(n,e){(function(){ace.require(["ace/mode/text"],function(t){n&&(n.exports=t)})})()}(Jg)),Jg.exports}TA();const MA=!0,fr="u-",EA="uplot",IA=fr+"hz",RA=fr+"vt",LA=fr+"title",OA=fr+"wrap",NA=fr+"under",DA=fr+"over",FA=fr+"axis",Rs=fr+"off",PA=fr+"select",WA=fr+"cursor-x",BA=fr+"cursor-y",HA=fr+"cursor-pt",zA=fr+"legend",jA=fr+"live",UA=fr+"inline",VA=fr+"series",qA=fr+"marker",tm=fr+"label",KA=fr+"value",Qa="width",Za="height",Ja="top",nm="bottom",da="left",th="right",nh="#000",rm=nh+"0",rh="mousemove",im="mousedown",ih="mouseup",om="mouseenter",sm="mouseleave",am="dblclick",GA="resize",YA="scroll",lm="change",tc="dppxchange",oh="--",pa=typeof window<"u",sh=pa?document:null,fa=pa?window:null,XA=pa?navigator:null;let on,nc;function ah(){let n=devicePixelRatio;on!=n&&(on=n,nc&&uh(lm,nc,ah),nc=matchMedia(`(min-resolution: ${on-.001}dppx) and (max-resolution: ${on+.001}dppx)`),Ls(lm,nc,ah),fa.dispatchEvent(new CustomEvent(tc)))}function $i(n,e){if(e!=null){let t=n.classList;!t.contains(e)&&t.add(e)}}function lh(n,e){let t=n.classList;t.contains(e)&&t.remove(e)}function _n(n,e,t){n.style[e]=t+"px"}function io(n,e,t,r){let d=sh.createElement(n);return e!=null&&$i(d,e),t!=null&&t.insertBefore(d,r),d}function Hi(n,e){return io("div",n,e)}const cm=new WeakMap;function bo(n,e,t,r,d){let p="translate("+e+"px,"+t+"px)",g=cm.get(n);p!=g&&(n.style.transform=p,cm.set(n,p),e<0||t<0||e>r||t>d?$i(n,Rs):lh(n,Rs))}const um=new WeakMap;function hm(n,e,t){let r=e+t,d=um.get(n);r!=d&&(um.set(n,r),n.style.background=e,n.style.borderColor=t)}const dm=new WeakMap;function pm(n,e,t,r){let d=e+""+t,p=dm.get(n);d!=p&&(dm.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 ch={passive:!0},QA={...ch,capture:!0};function Ls(n,e,t,r){e.addEventListener(n,t,r?QA:ch)}function uh(n,e,t,r){e.removeEventListener(n,t,ch)}pa&&ah();function oo(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:Mi((t+r)/2),e[d]<n?t=d:r=d;return n-e[t]<=e[r]-n?t:r}function fm(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 gm=n=>n!=null,mm=n=>n!=null&&n>0,rc=fm(gm),ZA=fm(mm);function JA(n,e,t,r=0,d=!1){let p=d?ZA:rc,g=d?mm:gm;[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 s=n[f];g(s)&&(s<b?b=s:s>h&&(h=s))}return[b??vn,h??-vn]}function ic(n,e,t,r){let d=bm(n),p=bm(e);n==e&&(d==-1?(n*=t,e/=t):(n/=t,e*=t));let g=t==10?Ro:wm,b=d==1?Mi:zi,h=p==1?zi:Mi,f=b(g(gr(n))),s=h(g(gr(e))),a=ga(t,f),u=ga(t,s);return t==10&&(f<0&&(a=yn(a,-f)),s<0&&(u=yn(u,-s))),r||t==2?(n=a*d,e=u*p):(n=$m(n,a),e=ac(e,u)),[n,e]}function hh(n,e,t,r){let d=ic(n,e,t,r);return n==0&&(d[0]=0),e==0&&(d[1]=0),d}const dh=.1,vm={mode:3,pad:dh},el={pad:0,soft:null,mode:0},eS={min:el,max:el};function oc(n,e,t,r){return lc(t)?ym(n,e,t):(el.pad=t,el.soft=r?0:null,el.mode=r?3:0,ym(n,e,eS))}function en(n,e){return n??e}function tS(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 ym(n,e,t){let r=t.min,d=t.max,p=en(r.pad,0),g=en(d.pad,0),b=en(r.hard,-vn),h=en(d.hard,vn),f=en(r.soft,vn),s=en(d.soft,-vn),a=en(r.mode,0),u=en(d.mode,0),c=e-n,i=Ro(c),l=Gr(gr(n),gr(e)),m=Ro(l),w=gr(m-i);(c<1e-24||w>10)&&(c=0,(n==0||e==0)&&(c=1e-24,a==2&&f!=vn&&(p=0),u==2&&s!=-vn&&(g=0)));let x=c||l||1e3,E=Ro(x),_=ga(10,Mi(E)),k=x*(c==0?n==0?.1:1:p),C=yn($m(n-k,_/10),24),R=n>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:vn,D=Gr(b,C<R&&n>=R?R:so(R,C)),L=x*(c==0?e==0?.1:1:g),I=yn(ac(e+L,_/10),24),H=e<=s&&(u==1||u==3&&I>=s||u==2&&I<=s)?s:-vn,P=so(h,I>H&&e<=H?H:Gr(H,I));return D==P&&D==0&&(P=100),[D,P]}const nS=new Intl.NumberFormat(pa?XA.language:"en-US"),ph=n=>nS.format(n),Ti=Math,sc=Ti.PI,gr=Ti.abs,Mi=Ti.floor,mr=Ti.round,zi=Ti.ceil,so=Ti.min,Gr=Ti.max,ga=Ti.pow,bm=Ti.sign,Ro=Ti.log10,wm=Ti.log2,rS=(n,e=1)=>Ti.sinh(n)*e,fh=(n,e=1)=>Ti.asinh(n/e),vn=1/0;function xm(n){return(Ro((n^n>>31)-(n>>31))|0)+1}function gh(n,e,t){return so(Gr(n,e),t)}function Cm(n){return typeof n=="function"}function jt(n){return Cm(n)?n:()=>n}const iS=()=>{},km=n=>n,Am=(n,e)=>e,oS=n=>null,Sm=n=>!0,_m=(n,e)=>n==e,sS=/\.\d*?(?=9{6,}|0{6,})/gm,Os=n=>{if(Mm(n)||rs.has(n))return n;const e=`${n}`,t=e.match(sS);if(t==null)return n;let r=t[0].length-1;if(e.indexOf("e-")!=-1){let[d,p]=e.split("e");return+`${Os(d)}e${p}`}return yn(n,r)};function Ns(n,e){return Os(yn(Os(n/e))*e)}function ac(n,e){return Os(zi(Os(n/e))*e)}function $m(n,e){return Os(Mi(Os(n/e))*e)}function yn(n,e=0){if(Mm(n))return n;let t=10**e,r=n*t*(1+Number.EPSILON);return mr(r)/t}const rs=new Map;function Tm(n){return((""+n).split(".")[1]||"").length}function tl(n,e,t,r){let d=[],p=r.map(Tm);for(let g=e;g<t;g++){let b=gr(g),h=yn(ga(n,g),b);for(let f=0;f<r.length;f++){let s=n==10?+`${r[f]}e${g}`:r[f]*h,a=(g>=0?0:b)+(g>=p[f]?0:p[f]),u=n==10?s:yn(s,a);d.push(u),rs.set(u,a)}}return d}const nl={},mh=[],ma=[null,null],is=Array.isArray,Mm=Number.isInteger,aS=n=>n===void 0;function Em(n){return typeof n=="string"}function lc(n){let e=!1;if(n!=null){let t=n.constructor;e=t==null||t==Object}return e}function lS(n){return n!=null&&typeof n=="object"}const cS=Object.getPrototypeOf(Uint8Array),Im="__proto__";function va(n,e=lc){let t;if(is(n)){let r=n.find(d=>d!=null);if(is(r)||e(r)){t=Array(n.length);for(let d=0;d<n.length;d++)t[d]=va(n[d],e)}else t=n.slice()}else if(n instanceof cS)t=n.slice();else if(e(n)){t={};for(let r in n)r!=Im&&(t[r]=va(n[r],e))}else t=n;return t}function cr(n){let e=arguments;for(let t=1;t<e.length;t++){let r=e[t];for(let d in r)d!=Im&&(lc(n[d])?cr(n[d],va(r[d])):n[d]=va(r[d]))}return n}const uS=0,hS=1,dS=2;function pS(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 fS(n,e){if(vS(n)){let g=n[0].slice();for(let b=1;b<n.length;b++)g.push(...n[b].slice(1));return yS(g[0])||(g=mS(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 s=b[f],a=Array(d).fill(void 0),u=e?e[g][f]:hS,c=[];for(let i=0;i<s.length;i++){let l=s[i],m=p.get(h[i]);l===null?u!=uS&&(a[m]=l,u==dS&&c.push(m)):a[m]=l}pS(a,c,d),r.push(a)}}return r}const gS=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function mS(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 vS(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 yS(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=Gr(1,Mi((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 Rm=["January","February","March","April","May","June","July","August","September","October","November","December"],Lm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Om(n){return n.slice(0,3)}const bS=Lm.map(Om),wS=Rm.map(Om),xS={MMMM:Rm,MMM:wS,WWWW:Lm,WWW:bS};function rl(n){return(n<10?"0":"")+n}function CS(n){return(n<10?"00":n<100?"0":"")+n}const kS={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=>rl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>rl(n.getDate()),D:n=>n.getDate(),WWWW:(n,e)=>e.WWWW[n.getDay()],WWW:(n,e)=>e.WWW[n.getDay()],HH:n=>rl(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=>rl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>rl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>CS(n.getMilliseconds())};function vh(n,e){e=e||xS;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)t.push(d[0][0]=="{"?kS[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 AS=new Intl.DateTimeFormat().resolvedOptions().timeZone;function SS(n,e){let t;return e=="UTC"||e=="Etc/UTC"?t=new Date(+n+n.getTimezoneOffset()*6e4):e==AS?t=n:(t=new Date(n.toLocaleString("en-US",{timeZone:e})),t.setMilliseconds(n.getMilliseconds())),t}const Nm=n=>n%1==0,cc=[1,2,2.5,5],_S=tl(10,-32,0,cc),Dm=tl(10,0,32,cc),$S=Dm.filter(Nm),Ds=_S.concat(Dm),yh=`
|
|
1489
|
+
`,Fm="{YYYY}",Pm=yh+Fm,Wm="{M}/{D}",il=yh+Wm,uc=il+"/{YY}",Bm="{aa}",TS="{h}:{mm}",ya=TS+Bm,Hm=yh+ya,zm=":{ss}",cn=null;function jm(n){let e=n*1e3,t=e*60,r=t*60,d=r*24,p=d*30,g=d*365,b=(n==1?tl(10,0,3,cc).filter(Nm):tl(10,-3,0,cc)).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,Fm,cn,cn,cn,cn,cn,cn,1],[d*28,"{MMM}",Pm,cn,cn,cn,cn,cn,1],[d,Wm,Pm,cn,cn,cn,cn,cn,1],[r,"{h}"+Bm,uc,cn,il,cn,cn,cn,1],[t,ya,uc,cn,il,cn,cn,cn,1],[e,zm,uc+" "+ya,cn,il+" "+ya,cn,Hm,cn,1],[n,zm+".{fff}",uc+" "+ya,cn,il+" "+ya,cn,Hm,cn,1]];function f(s){return(a,u,c,i,l,m)=>{let w=[],x=l>=g,E=l>=p&&l<g,_=s(c),k=yn(_*n,3),C=bh(_.getFullYear(),x?0:_.getMonth(),E||x?1:_.getDate()),R=yn(C*n,3);if(E||x){let D=E?l/p:0,L=x?l/g:0,I=k==R?k:yn(bh(C.getFullYear()+L,C.getMonth()+D,1)*n,3),H=new Date(mr(I/n)),P=H.getFullYear(),O=H.getMonth();for(let $=0;I<=i;$++){let A=bh(P+L*$,O+D*$,1),N=A-s(yn(A*n,3));I=yn((+A+N)*n,3),I<=i&&w.push(I)}}else{let D=l>=d?d:l,L=Mi(c)-Mi(k),I=R+L+ac(k-R,D);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/t+H.getSeconds()/r,O=l/r,$=a.axes[u]._space,A=m/$;for(;I=yn(I+l,n==1?0:3),!(I>i);)if(O>1){let N=Mi(yn(P+O,6))%24,B=s(I).getHours()-N;B>1&&(B=-1),I-=B*r,P=(P+O)%24;let U=w[w.length-1];yn((I-U)/l,3)*A>=.7&&w.push(I)}else w.push(I)}return w}}return[b,h,f]}const[MS,ES,IS]=jm(1),[RS,LS,OS]=jm(.001);tl(2,-53,53,[1]);function Um(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(i=>g>=i[0])||e[e.length-1],h,f,s,a,u,c;return r.map(i=>{let l=n(i),m=l.getFullYear(),w=l.getMonth(),x=l.getDate(),E=l.getHours(),_=l.getMinutes(),k=l.getSeconds(),C=m!=h&&b[2]||w!=f&&b[3]||x!=s&&b[4]||E!=a&&b[5]||_!=u&&b[6]||k!=c&&b[7]||b[1];return h=m,f=w,s=x,a=E,u=_,c=k,C(l)})}}function NS(n,e){let t=vh(e);return(r,d,p,g,b)=>d.map(h=>t(n(h)))}function bh(n,e,t){return new Date(n,e,t)}function qm(n,e){return e(n)}const DS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Km(n,e){return(t,r,d,p)=>p==null?oh:e(n(r))}function FS(n,e){let t=n.series[e];return t.width?t.stroke(n,e):t.points.width?t.points.stroke(n,e):null}function PS(n,e){return n.series[e].fill(n,e)}const WS={show:!0,live:!0,isolate:!1,mount:iS,markers:{show:!0,width:2,stroke:FS,fill:PS,dash:"solid"},idx:null,idxs:null,values:[]};function BS(n,e){let t=n.cursor.points,r=Hi(),d=t.size(n,e);_n(r,Qa,d),_n(r,Za,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 HS(n,e){let t=n.series[e].points;return t._fill||t._stroke}function zS(n,e){let t=n.series[e].points;return t._stroke||t._fill}function jS(n,e){return n.series[e].points.size}const wh=[0,0];function US(n,e,t){return wh[0]=e,wh[1]=t,wh}function hc(n,e,t,r=!0){return d=>{d.button==0&&(!r||d.target==e)&&t(d)}}function xh(n,e,t,r=!0){return d=>{(!r||d.target==e)&&t(d)}}const VS={show:!0,x:!0,y:!0,lock:!1,move:US,points:{one:!1,show:BS,size:jS,width:0,stroke:zS,fill:HS},bind:{mousedown:hc,mouseup:hc,click:hc,dblclick:hc,mousemove:xh,mouseleave:xh,mouseenter:xh},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},Gm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Ch=cr({},Gm,{filter:Am}),Ym=cr({},Ch,{size:10}),Xm=cr({},Gm,{show:!1}),kh='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"',Qm="bold "+kh,Zm=1.5,Jm={show:!0,scale:"x",stroke:nh,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qm,side:2,grid:Ch,ticks:Ym,border:Xm,font:kh,lineGap:Zm,rotate:0},qS="Value",KS="Time",ev={show:!0,scale:"x",auto:!1,sorted:1,min:vn,max:-vn,idxs:[]};function GS(n,e,t,r,d){return e.map(p=>p==null?"":ph(p))}function YS(n,e,t,r,d,p,g){let b=[],h=rs.get(d)||0;t=g?t:yn(ac(t,d),h);for(let f=t;f<=r;f=yn(f+d,h))b.push(Object.is(f,-0)?0:f);return b}function Ah(n,e,t,r,d,p,g){const b=[],h=n.scales[n.axes[e].scale].log,f=h==10?Ro:wm,s=Mi(f(t));d=ga(h,s),h==10&&(d=Ds[oo(d,Ds)]);let a=t,u=d*h;h==10&&(u=Ds[oo(u,Ds)]);do b.push(a),a=a+d,h==10&&!rs.has(a)&&(a=yn(a,rs.get(d))),a>=u&&(d=a,u=d*h,h==10&&(u=Ds[oo(u,Ds)]));while(a<=r);return b}function XS(n,e,t,r,d,p,g){let b=n.scales[n.axes[e].scale].asinh,h=r>b?Ah(n,e,Gr(b,t),r,d):[b],f=r>=0&&t<=0?[0]:[];return(t<-b?Ah(n,e,Gr(b,-r),-t,d):[b]).reverse().map(s=>-s).concat(f,h)}const tv=/./,QS=/[12357]/,ZS=/[125]/,nv=/1/,Sh=(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 JS(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=n.scales[g],h=n.valToPos,f=p._space,s=h(10,g),a=h(9,g)-s>=f?tv:h(7,g)-s>=f?QS:h(5,g)-s>=f?ZS:nv;if(a==nv){let u=gr(h(1,g)-s);if(u<f)return Sh(e.slice().reverse(),b.distr,a,zi(f/u)).reverse()}return Sh(e,b.distr,a,1)}function e_(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=p._space,h=n.valToPos,f=gr(h(1,g)-h(2,g));return f<b?Sh(e.slice().reverse(),3,tv,zi(b/f)).reverse():e}function t_(n,e,t,r){return r==null?oh:e==null?"":ph(e)}const rv={show:!0,scale:"y",stroke:nh,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Qm,side:3,grid:Ch,ticks:Ym,border:Xm,font:kh,lineGap:Zm,rotate:0};function n_(n,e){let t=3+(n||1)*2;return yn(t*e,3)}function r_(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=gr(g-p),h=n.series[e],f=b/(h.points.space*on);return r[1]-r[0]<=f}const iv={scale:null,auto:!0,sorted:0,min:vn,max:-vn},ov=(n,e,t,r,d)=>d,sv={show:!0,auto:!0,sorted:0,gaps:ov,alpha:1,facets:[cr({},iv,{scale:"x"}),cr({},iv,{scale:"y"})]},av={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ov,alpha:1,points:{show:r_,filter:null},values:null,min:vn,max:-vn,idxs:[],path:null,clip:null};function i_(n,e,t,r,d){return t/10}const lv={time:MA,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},o_=cr({},lv,{time:!1,ori:1}),cv={};function uv(n,e){let t=cv[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 s=0;s<t.plots.length;s++)t.plots[s]!=d&&t.plots[s].pub(r,d,p,g,b,h,f)}},n!=null&&(cv[n]=t)),t}const ba=1,_h=2;function Fs(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],s=r==2?g[d.facets[0].scale]:g[n.series[0].scale],a=r==2?g[d.facets[1].scale]:g[d.scale],u=b.left,c=b.top,i=b.width,l=b.height,m=n.valToPosH,w=n.valToPosV;return s.ori==0?t(d,h,f,s,a,m,w,u,c,i,l,pc,wa,gc,pv,gv):t(d,h,f,s,a,w,m,c,u,l,i,fc,xa,Mh,fv,mv)}function $h(n,e){let t=0,r=0,d=en(n.bands,mh);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 s_(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 Lo(n,e,t,r,d,p){return Fs(n,e,(g,b,h,f,s,a,u,c,i,l,m)=>{let w=g.pxRound;const x=f.dir*(f.ori==0?1:-1),E=f.ori==0?wa:xa;let _,k;x==1?(_=t,k=r):(_=r,k=t);let C=w(a(b[_],f,l,c)),R=w(u(h[_],s,m,i)),D=w(a(b[k],f,l,c)),L=w(u(p==1?s.max:s.min,s,m,i)),I=new Path2D(d);return E(I,D,L),E(I,C,L),E(I,C,R),I})}function dc(n,e,t,r,d,p){let g=null;if(n.length>0){g=new Path2D;const b=e==0?gc:Mh;let h=t;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let c=u[0]-h;c>0&&b(g,h,r,c,r+p),h=u[1]}}let f=t+d-h,s=10;f>0&&b(g,h,r-s/2,f,r+p+s)}return g}function a_(n,e,t){let r=n[n.length-1];r&&r[0]==e?r[1]=t:n.push([e,t])}function Th(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 s=f,a=f;if(d==1)for(;++f<=r&&e[f]===null;)a=f;else for(;--f>=t&&e[f]===null;)a=f;let u=p(n[s]),c=a==s?u:p(n[a]),i=s-d;u=g<=0&&i>=0&&i<h?p(n[i]):u;let l=a+d;c=g>=0&&l>=0&&l<h?p(n[l]):c,c>=u&&b.push([u,c])}return b}function hv(n){return n==0?km:n==1?mr:e=>Ns(e,n)}function dv(n){let e=n==0?pc:fc,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,s=0)=>{f==0&&s==0?r(d,p,g,b,h):(f=so(f,b/2,h/2),s=so(s,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,s),t(d,p,g+h,p,g,s),t(d,p,g,p+b,g,f),d.closePath())}}const pc=(n,e,t)=>{n.moveTo(e,t)},fc=(n,e,t)=>{n.moveTo(t,e)},wa=(n,e,t)=>{n.lineTo(e,t)},xa=(n,e,t)=>{n.lineTo(t,e)},gc=dv(0),Mh=dv(1),pv=(n,e,t,r,d,p)=>{n.arc(e,t,r,d,p)},fv=(n,e,t,r,d,p)=>{n.arc(t,e,r,d,p)},gv=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(e,t,r,d,p,g)},mv=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(t,e,d,r,g,p)};function vv(n){return(e,t,r,d,p)=>Fs(e,t,(g,b,h,f,s,a,u,c,i,l,m)=>{let{pxRound:w,points:x}=g,E,_;f.ori==0?(E=pc,_=pv):(E=fc,_=fv);const k=yn(x.width*on,3);let C=(x.size-x.width)/2*on,R=yn(C*2,3),D=new Path2D,L=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;gc(L,I-R,H-R,P+R*2,O+R*2);const $=A=>{if(h[A]!=null){let N=w(a(b[A],f,l,c)),B=w(u(h[A],s,m,i));E(D,N+C,B),_(D,N,B,C,0,sc*2)}};if(p)p.forEach($);else for(let A=r;A<=d;A++)$(A);return{stroke:k>0?D:null,fill:D,clip:L,flags:ba|_h}})}function yv(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 l_=yv(wa),c_=yv(xa);function bv(n){const e=en(n==null?void 0:n.alignGaps,0);return(t,r,d,p)=>Fs(t,r,(g,b,h,f,s,a,u,c,i,l,m)=>{[d,p]=rc(h,d,p);let w=g.pxRound,x=P=>w(a(P,f,l,c)),E=P=>w(u(P,s,m,i)),_,k;f.ori==0?(_=wa,k=l_):(_=xa,k=c_);const C=f.dir*(f.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ba},D=R.stroke;let L=!1;if(p-d>=l*4){let P=he=>t.posToVal(he,f.key,!0),O=null,$=null,A,N,B,U=x(b[C==1?d:p]),K=x(b[d]),Z=x(b[p]),J=P(C==1?K+1:Z-1);for(let he=C==1?d:p;he>=d&&he<=p;he+=C){let ne=b[he],le=(C==1?ne<J:ne>J)?U:x(ne),se=h[he];le==U?se!=null?(N=se,O==null?(_(D,le,E(N)),A=O=$=N):N<O?O=N:N>$&&($=N)):se===null&&(L=!0):(O!=null&&k(D,U,E(O),E($),E(A),E(N)),se!=null?(N=se,_(D,le,E(N)),O=$=A=N):(O=$=null,se===null&&(L=!0)),U=le,J=P(U+C))}O!=null&&O!=$&&B!=U&&k(D,U,E(O),E($),E(A),E(N))}else for(let P=C==1?d:p;P>=d&&P<=p;P+=C){let O=h[P];O===null?L=!0:O!=null&&_(D,x(b[P]),E(O))}let[I,H]=$h(t,r);if(g.fill!=null||I!=0){let P=R.fill=new Path2D(D),O=g.fillTo(t,r,g.min,g.max,I),$=E(O),A=x(b[d]),N=x(b[p]);C==-1&&([N,A]=[A,N]),_(P,N,$),_(P,A,$)}if(!g.spanGaps){let P=[];L&&P.push(...Th(b,h,d,p,C,x,e)),R.gaps=P=g.gaps(t,r,d,p,P),R.clip=dc(P,f.ori,c,i,l,m)}return H!=0&&(R.band=H==2?[Lo(t,r,d,p,D,-1),Lo(t,r,d,p,D,1)]:Lo(t,r,d,p,D,H)),R})}function u_(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)=>Fs(p,g,(f,s,a,u,c,i,l,m,w,x,E)=>{[b,h]=rc(a,b,h);let _=f.pxRound,{left:k,width:C}=p.bbox,R=Z=>_(i(Z,u,x,m)),D=Z=>_(l(Z,c,E,w)),L=u.ori==0?wa:xa;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ba},H=I.stroke,P=u.dir*(u.ori==0?1:-1);let O=D(a[P==1?b:h]),$=R(s[P==1?b:h]),A=$,N=$;d&&e==-1&&(N=k,L(H,N,O)),L(H,$,O);for(let Z=P==1?b:h;Z>=b&&Z<=h;Z+=P){let J=a[Z];if(J==null)continue;let he=R(s[Z]),ne=D(J);e==1?L(H,he,O):L(H,A,ne),L(H,he,ne),O=ne,A=he}let B=A;d&&e==1&&(B=k+C,L(H,B,O));let[U,K]=$h(p,g);if(f.fill!=null||U!=0){let Z=I.fill=new Path2D(H),J=f.fillTo(p,g,f.min,f.max,U),he=D(J);L(Z,B,he),L(Z,N,he)}if(!f.spanGaps){let Z=[];Z.push(...Th(s,a,b,h,P,R,r));let J=f.width*on/2,he=t||e==1?J:-J,ne=t||e==-1?-J:J;Z.forEach(le=>{le[0]+=he,le[1]+=ne}),I.gaps=Z=f.gaps(p,g,b,h,Z),I.clip=dc(Z,u.ori,m,w,x,E)}return K!=0&&(I.band=K==2?[Lo(p,g,b,h,H,-1),Lo(p,g,b,h,H,1)]:Lo(p,g,b,h,H,K)),I})}function wv(n,e,t,r,d,p,g=vn){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 s=gr(n[h]-n[b]);s<f&&(f=s,g=gr(t(n[h],r,d,p)-t(n[b],r,d,p)))}b=h}}return g}function h_(n){n=n||nl;const e=en(n.size,[.6,vn,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=jt(d),g=1-e[0],b=en(e[1],vn),h=en(e[2],1),f=en(n.disp,nl),s=en(n.each,c=>{}),{fill:a,stroke:u}=f;return(c,i,l,m)=>Fs(c,i,(w,x,E,_,k,C,R,D,L,I,H)=>{let P=w.pxRound,O=t,$=r*on,A=b*on,N=h*on,B,U;_.ori==0?[B,U]=p(c,i):[U,B]=p(c,i);const K=_.dir*(_.ori==0?1:-1);let Z=_.ori==0?gc:Mh,J=_.ori==0?s:(qe,Nt,tn,Bn,Ar,vr,bn)=>{s(qe,Nt,tn,Ar,Bn,bn,vr)},he=en(c.bands,mh).find(qe=>qe.series[0]==i),ne=he!=null?he.dir:0,le=w.fillTo(c,i,w.min,w.max,ne),se=P(R(le,k,H,L)),de,me,_e,Te=I,Me=P(w.width*on),Je=!1,Xe=null,ht=null,st=null,dt=null;a!=null&&(Me==0||u!=null)&&(Je=!0,Xe=a.values(c,i,l,m),ht=new Map,new Set(Xe).forEach(qe=>{qe!=null&&ht.set(qe,new Path2D)}),Me>0&&(st=u.values(c,i,l,m),dt=new Map,new Set(st).forEach(qe=>{qe!=null&&dt.set(qe,new Path2D)})));let{x0:Zt,size:$n}=f;if(Zt!=null&&$n!=null){O=1,x=Zt.values(c,i,l,m),Zt.unit==2&&(x=x.map(Nt=>c.posToVal(D+Nt*I,_.key,!0)));let qe=$n.values(c,i,l,m);$n.unit==2?me=qe[0]*I:me=C(qe[0],_,I,D)-C(0,_,I,D),Te=wv(x,E,C,_,I,D,Te),_e=Te-me+$}else Te=wv(x,E,C,_,I,D,Te),_e=Te*g+$,me=Te-_e;_e<1&&(_e=0),Me>=me/2&&(Me=0),_e<5&&(P=km);let Ht=_e>0,kr=Te-_e-(Ht?Me:0);me=P(gh(kr,N,A)),de=(O==0?me/2:O==K?0:me)-O*K*((O==0?$/2:0)+(Ht?Me/2:0));const fn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Wn=Je?null:new Path2D;let ir=null;if(he!=null)ir=c.data[he.series[1]];else{let{y0:qe,y1:Nt}=f;qe!=null&&Nt!=null&&(E=Nt.values(c,i,l,m),ir=qe.values(c,i,l,m))}let Or=B*me,bt=U*me;for(let qe=K==1?l:m;qe>=l&&qe<=m;qe+=K){let Nt=E[qe];if(Nt==null)continue;if(ir!=null){let Xt=ir[qe]??0;if(Nt-Xt==0)continue;se=R(Xt,k,H,L)}let tn=_.distr!=2||f!=null?x[qe]:qe,Bn=C(tn,_,I,D),Ar=R(en(Nt,le),k,H,L),vr=P(Bn-de),bn=P(Gr(Ar,se)),qn=P(so(Ar,se)),Hn=bn-qn;if(Nt!=null){let Xt=Nt<0?bt:Or,dn=Nt<0?Or:bt;Je?(Me>0&&st[qe]!=null&&Z(dt.get(st[qe]),vr,qn+Mi(Me/2),me,Gr(0,Hn-Me),Xt,dn),Xe[qe]!=null&&Z(ht.get(Xe[qe]),vr,qn+Mi(Me/2),me,Gr(0,Hn-Me),Xt,dn)):Z(Wn,vr,qn+Mi(Me/2),me,Gr(0,Hn-Me),Xt,dn),J(c,i,qe,vr-Me/2,qn,me+Me,Hn)}}return Me>0?fn.stroke=Je?dt:Wn:Je||(fn._fill=w.width==0?w._fill:w._stroke??w._fill,fn.width=0),fn.fill=Je?ht:Wn,fn})}function d_(n,e){const t=en(e==null?void 0:e.alignGaps,0);return(r,d,p,g)=>Fs(r,d,(b,h,f,s,a,u,c,i,l,m,w)=>{[p,g]=rc(f,p,g);let x=b.pxRound,E=B=>x(u(B,s,m,i)),_=B=>x(c(B,a,w,l)),k,C,R;s.ori==0?(k=pc,R=wa,C=gv):(k=fc,R=xa,C=mv);const D=s.dir*(s.ori==0?1:-1);let L=E(h[D==1?p:g]),I=L,H=[],P=[];for(let B=D==1?p:g;B>=p&&B<=g;B+=D)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,R,C,x),fill:null,clip:null,band:null,gaps:null,flags:ba},$=O.stroke;let[A,N]=$h(r,d);if(b.fill!=null||A!=0){let B=O.fill=new Path2D($),U=b.fillTo(r,d,b.min,b.max,A),K=_(U);R(B,I,K),R(B,L,K)}if(!b.spanGaps){let B=[];B.push(...Th(h,f,p,g,D,E,t)),O.gaps=B=b.gaps(r,d,p,g,B),O.clip=dc(B,s.ori,i,l,m,w)}return N!=0&&(O.band=N==2?[Lo(r,d,p,g,$,-1),Lo(r,d,p,g,$,1)]:Lo(r,d,p,g,$,N)),O})}function p_(n){return d_(f_,n)}function f_(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),s=Array(g-1),a=Array(g-1);for(let u=0;u<g-1;u++)s[u]=e[u+1]-e[u],a[u]=n[u+1]-n[u],f[u]=s[u]/a[u];h[0]=f[0];for(let u=1;u<g-1;u++)f[u]===0||f[u-1]===0||f[u-1]>0!=f[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/f[u-1]+(a[u]+2*a[u-1])/f[u]),isFinite(h[u])||(h[u]=0));h[g-1]=f[g-2];for(let u=0;u<g-1;u++)d(b,n[u]+a[u]/3,e[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,e[u+1]-h[u+1]*a[u]/3,n[u+1],e[u+1])}return b}const Eh=new Set;function xv(){for(let n of Eh)n.syncRect(!0)}pa&&(Ls(GA,fa,xv),Ls(YA,fa,xv,!0),Ls(tc,fa,()=>{Wr.pxRatio=on}));const g_=bv(),m_=vv();function Cv(n,e,t,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,p)=>Ih(d,p,e,t))}function v_(n,e){return n.map((t,r)=>r==0?{}:cr({},e,t))}function Ih(n,e,t,r){return cr({},e==0?t:r,n)}function kv(n,e,t){return e==null?ma:[e,t]}const y_=kv;function b_(n,e,t){return e==null?ma:oc(e,t,dh,!0)}function Av(n,e,t,r){return e==null?ma:ic(e,t,n.scales[r].log,!1)}const w_=Av;function Sv(n,e,t,r){return e==null?ma:hh(e,t,n.scales[r].log,!1)}const x_=Sv;function C_(n,e,t,r,d){let p=Gr(xm(n),xm(e)),g=e-n,b=oo(d/r*g,t);do{let h=t[b],f=r*h/g;if(f>=d&&p+(h<5?rs.get(h):0)<=17)return[h,f]}while(++b<t.length);return[0,0]}function _v(n){let e,t;return n=n.replace(/(\d+)px/,(r,d)=>(e=mr((t=+d)*on))+"px"),[n,e,t]}function k_(n){n.show&&[n.font,n.labelFont].forEach(e=>{let t=yn(e[2]*on,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t})}function Wr(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=Hi(EA);if(n.id!=null&&(f.id=n.id),$i(f,n.class),n.title){let V=Hi(LA,f);V.textContent=n.title}const s=io("canvas"),a=r.ctx=s.getContext("2d"),u=Hi(OA,f);Ls("click",u,V=>{V.target===i&&(ln!=Vi||Vt!=To)&&Yn.click(r,V)},!0);const c=r.under=Hi(NA,u);u.appendChild(s);const i=r.over=Hi(DA,u);n=va(n);const l=+en(n.pxAlign,1),m=hv(l);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,x=r.series=d==1?Cv(n.series||[],ev,av,!1):v_(n.series||[null],sv),E=r.axes=Cv(n.axes||[],Jm,rv,!0),_=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=jt(V.fill||null),V.dir=en(V.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,R={axes:Po,series:_a},D=(n.drawOrder||["axes","series"]).map(V=>R[V]);function L(V){const X=V.distr==3?ie=>Ro(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>fh(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:xe}=V,Ee=xe-ge;return(oe-ge)/Ee}}function I(V){let X=_[V];if(X==null){let ie=(n.scales||nl)[V]||nl;if(ie.from!=null){I(ie.from);let oe=cr({},_[ie.from],ie,{key:V});oe.valToPct=L(oe),_[V]=oe}else{X=_[V]=cr({},V==C?lv:o_,ie),X.key=V;let oe=X.time,ge=X.range,xe=is(ge);if((V!=C||d==2&&!oe)&&(xe&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?vm:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?vm:{mode:1,hard:ge[1],soft:ge[1]}},xe=!1),!xe&&lc(ge))){let Ee=ge;ge=(We,He,Ye)=>He==null?ma:oc(He,Ye,Ee)}X.range=jt(ge||(oe?y_:V==C?X.distr==3?w_:X.distr==4?x_:kv:X.distr==3?Av:X.distr==4?Sv:b_)),X.auto=jt(xe?!1:X.auto),X.clamp=jt(X.clamp||i_),X._min=X._max=null,X.valToPct=L(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,$;H.ori==0?($i(f,IA),O=p,$=g):($i(f,RA),O=g,$=p);const A={};for(let V in _){let X=_[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(mr(V/w))),B=n.fmtDate||vh,U=w==1?IS(N):OS(N),K=Vm(N,Um(w==1?ES:LS,B)),Z=Km(N,qm(DS,B)),J=[],he=r.legend=cr({},WS,n.legend),ne=r.cursor=cr({},VS,{drag:{y:d==2}},n.cursor),le=he.show,se=ne.show,de=he.markers;he.idxs=J,de.width=jt(de.width),de.dash=jt(de.dash),de.stroke=jt(de.stroke),de.fill=jt(de.fill);let me,_e,Te,Me=[],Je=[],Xe,ht=!1,st={};if(he.live){const V=x[1]?x[1].values:null;ht=V!=null,Xe=ht?V(r,1,0):{_:0};for(let X in Xe)st[X]=oh}if(le)if(me=io("table",zA,f),Te=io("tbody",null,me),he.mount(r,me),ht){_e=io("thead",null,me,Te);let V=io("tr",null,_e);io("th",null,V);for(var dt in Xe)io("th",tm,V).textContent=dt}else $i(me,UA),he.live&&$i(me,jA);const Zt={show:!0},$n={show:!1};function Ht(V,X){if(X==0&&(ht||!he.live||d==2))return ma;let ie=[],oe=io("tr",VA,Te,Te.childNodes[X]);$i(oe,V.class),V.show||$i(oe,Rs);let ge=io("th",null,oe);if(de.show){let We=Hi(qA,ge);if(X>0){let He=de.width(r,X);He&&(We.style.border=He+"px "+de.dash(r,X)+" "+de.stroke(r,X)),We.style.background=de.fill(r,X)}}let xe=Hi(tm,ge);V.label instanceof HTMLElement?xe.appendChild(V.label):xe.textContent=V.label,X>0&&(de.show||(xe.style.color=V.width>0?de.stroke(r,X):de.fill(r,X)),fn("click",ge,We=>{if(ne._lock)return;yi(We);let He=x.indexOf(V);if((We.ctrlKey||We.metaKey)!=he.isolate){let Ye=x.some((Ze,tt)=>tt>0&&tt!=He&&Ze.show);x.forEach((Ze,tt)=>{tt>0&&ii(tt,Ye?tt==He?Zt:$n:Zt,!0,pt.setSeries)})}else ii(He,{show:!V.show},!0,pt.setSeries)},!1),bi&&fn(om,ge,We=>{ne._lock||(yi(We),ii(x.indexOf(V),Gi,!0,pt.setSeries))},!1));for(var Ee in Xe){let We=io("td",KA,oe);We.textContent="--",ie.push(We)}return[oe,ie]}const kr=new Map;function fn(V,X,ie,oe=!0){const ge=kr.get(X)||{},xe=ne.bind[V](r,X,ie,oe);xe&&(Ls(V,X,ge[V]=xe),kr.set(X,ge))}function Wn(V,X,ie){const oe=kr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(uh(ge,X,oe[ge]),delete oe[ge]);V==null&&kr.delete(X)}let ir=0,Or=0,bt=0,qe=0,Nt=0,tn=0,Bn=Nt,Ar=tn,vr=bt,bn=qe,qn=0,Hn=0,Xt=0,dn=0;r.bbox={};let Hr=!1,Jr=!1,ei=!1,Ii=!1,gi=!1,Kn=!1;function co(V,X,ie){(ie||V!=r.width||X!=r.height)&&mi(V,X),po(!1),ei=!0,Jr=!0,$o()}function mi(V,X){r.width=ir=bt=V,r.height=Or=qe=X,Nt=tn=0,vi(),os();let ie=r.bbox;qn=ie.left=Ns(Nt*on,.5),Hn=ie.top=Ns(tn*on,.5),Xt=ie.width=Ns(bt*on,.5),dn=ie.height=Ns(qe*on,.5)}const zs=3;function ti(){let V=!1,X=0;for(;!V;){X++;let ie=$a(X),oe=yl(X);V=X==zs||ie&&oe,V||(mi(r.width,r.height),Jr=!0)}}function Rn({width:V,height:X}){co(V,X)}r.setSize=Rn;function vi(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((ge,xe)=>{if(ge.show&&ge._show){let{side:Ee,_size:We}=ge,He=Ee%2,Ye=ge.label!=null?ge.labelSize:0,Ze=We+Ye;Ze>0&&(He?(bt-=Ze,Ee==3?(Nt+=Ze,oe=!0):ie=!0):(qe-=Ze,Ee==0?(tn+=Ze,V=!0):X=!0))}}),xi[0]=V,xi[1]=ie,xi[2]=X,xi[3]=oe,bt-=_r[1]+_r[3],Nt+=_r[3],qe-=_r[2]+_r[0],tn+=_r[0]}function os(){let V=Nt+bt,X=tn+qe,ie=Nt,oe=tn;function ge(xe,Ee){switch(xe){case 1:return V+=Ee,V-Ee;case 2:return X+=Ee,X-Ee;case 3:return ie-=Ee,ie+Ee;case 0:return oe-=Ee,oe+Ee}}E.forEach((xe,Ee)=>{if(xe.show&&xe._show){let We=xe.side;xe._pos=ge(We,xe._size),xe.label!=null&&(xe._lpos=ge(We,xe.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=jt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,xe,Ee,We)=>{if(xe==0)return Ee;let He=Ee,Ye=ie(ge,xe,Ee,We)??vn,Ze=Ye>=0&&Ye<vn,tt=H.ori==0?bt:qe,xt=ne.left,Wt=e[0],At=e[xe];if(X.has(At[Ee])){He=null;let Ft=null,gt=null,ct;if(oe==0||oe==-1)for(ct=Ee;Ft==null&&ct-- >0;)X.has(At[ct])||(Ft=ct);if(oe==0||oe==1)for(ct=Ee;gt==null&&ct++<At.length;)X.has(At[ct])||(gt=ct);if(Ft!=null||gt!=null)if(Ze){let xn=Ft==null?-1/0:O(Wt[Ft],H,tt,0),Dn=gt==null?1/0:O(Wt[gt],H,tt,0),dr=xt-xn,Gt=Dn-xt;dr<=Gt?dr<=Ye&&(He=Ft):Gt<=Ye&&(He=gt)}else He=gt==null?Ft:Ft==null?gt:Ee-Ft<=gt-Ee?Ft:gt}else Ze&&gr(xt-O(Wt[Ee],H,tt,0))>Ye&&(He=null);return He}}const yi=V=>{ne.event=V};ne.idxs=J,ne._lock=!1;let Tn=ne.points;Tn.show=jt(Tn.show),Tn.size=jt(Tn.size),Tn.stroke=jt(Tn.stroke),Tn.width=jt(Tn.width),Tn.fill=jt(Tn.fill);const yr=r.focus=cr({},n.focus||{alpha:.3},ne.focus),bi=yr.prox>=0,Mn=bi&&Tn.one;let Ln=[],Sr=[],wi=[];function ko(V,X){let ie=Tn.show(r,X);if(ie instanceof HTMLElement)return $i(ie,HA),$i(ie,V.class),bo(ie,-10,-10,bt,qe),i.insertBefore(ie,Ln[X]),ie}function Ao(V,X){if(d==1||X>0){let ie=d==1&&_[V.scale].time,oe=V.value;V.value=ie?Em(oe)?Km(N,qm(oe,B)):oe||Z:oe||t_,V.label=V.label||(ie?KS:qS)}if(Mn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||g_||oS,V.fillTo=jt(V.fillTo||s_),V.pxAlign=+en(V.pxAlign,l),V.pxRound=hv(V.pxAlign),V.stroke=jt(V.stroke||null),V.fill=jt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=n_(Gr(1,V.width),1),oe=V.points=cr({},{size:ie,width:Gr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:m_,_stroke:null,_fill:null},V.points);oe.show=jt(oe.show),oe.filter=jt(oe.filter),oe.fill=jt(oe.fill),oe.stroke=jt(oe.stroke),oe.paths=jt(oe.paths),oe.pxAlign=V.pxAlign}if(le){let ie=Ht(V,X);Me.splice(X,0,ie[0]),Je.splice(X,0,ie[1]),he.values.push(null)}if(se){J.splice(X,0,null);let ie=null;Mn?X==0&&(ie=ko(V,X)):X>0&&(ie=ko(V,X)),Ln.splice(X,0,ie),Sr.splice(X,0,0),wi.splice(X,0,0)}at("addSeries",X)}function ss(V,X){X=X??x.length,V=d==1?Ih(V,X,ev,av):Ih(V,X,{},sv),x.splice(X,0,V),Ao(x[X],X)}r.addSeries=ss;function ni(V){if(x.splice(V,1),le){he.values.splice(V,1),Je.splice(V,1);let X=Me.splice(V,1)[0];Wn(null,X.firstChild),X.remove()}se&&(J.splice(V,1),Ln.splice(V,1)[0].remove(),Sr.splice(V,1),wi.splice(V,1)),at("delSeries",V)}r.delSeries=ni;const xi=[!1,!1,!1,!1];function zr(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=jt(V.size),V.space=jt(V.space),V.rotate=jt(V.rotate),is(V.incrs)&&V.incrs.forEach(Ee=>{!rs.has(Ee)&&rs.set(Ee,Tm(Ee))}),V.incrs=jt(V.incrs||(oe.distr==2?$S:ge?w==1?MS:RS:Ds)),V.splits=jt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Ah:oe.distr==4?XS:YS)),V.stroke=jt(V.stroke),V.grid.stroke=jt(V.grid.stroke),V.ticks.stroke=jt(V.ticks.stroke),V.border.stroke=jt(V.border.stroke);let xe=V.values;V.values=is(xe)&&!is(xe[0])?jt(xe):ge?is(xe)?Vm(N,Um(xe,B)):Em(xe)?NS(N,xe):xe||K:xe||GS,V.filter=jt(V.filter||(oe.distr>=3&&oe.log==10?JS:oe.distr==3&&oe.log==2?e_:Am)),V.font=_v(V.font),V.labelFont=_v(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&&(xi[X]=!0,V._el=Hi(FA,u))}}function Dt(V,X,ie,oe){let[ge,xe,Ee,We]=ie,He=X%2,Ye=0;return He==0&&(We||xe)&&(Ye=X==0&&!ge||X==2&&!Ee?mr(Jm.size/3):0),He==1&&(ge||Ee)&&(Ye=X==1&&!xe||X==3&&!We?mr(rv.size/2):0),Ye}const No=r.padding=(n.padding||[Dt,Dt,Dt,Dt]).map(V=>jt(en(V,Dt))),_r=r._padding=No.map((V,X)=>V(r,X,xi,0));let ce,ze=null,Fe=null;const Tt=d==1?x[0].idxs:null;let Qt=null,Ut=!1;function $r(V,X){if(e=V??[],r.data=r._data=e,d==2){ce=0;for(let ie=1;ie<x.length;ie++)ce+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Qt=e[0],ce=Qt.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(ce);for(let ge=0;ge<ce;ge++)oe[ge]=ge}r._data=e=ie}if(po(!0),at("setData"),P==2&&(ei=!0),X!==!1){let ie=H;ie.auto(r,Ut)?br():ur(C,ie.min,ie.max),Ii=Ii||ne.left>=0,Kn=!0,$o()}}r.setData=$r;function br(){Ut=!0;let V,X;d==1&&(ce>0?(ze=Tt[0]=0,Fe=Tt[1]=ce-1,V=e[0][ze],X=e[0][Fe],P==2?(V=ze,X=Fe):V==X&&(P==3?[V,X]=ic(V,V,H.log,!1):P==4?[V,X]=hh(V,V,H.log,!1):H.time?X=V+mr(86400/w):[V,X]=oc(V,X,dh,!0))):(ze=Tt[0]=V=null,Fe=Tt[1]=X=null)),ur(C,V,X)}let Gn,Tr,wn,uo,jr,as,js,Us,ls,wr;function Vs(V,X,ie,oe,ge,xe){V??(V=rm),ie??(ie=mh),oe??(oe="butt"),ge??(ge=rm),xe??(xe="round"),V!=Gn&&(a.strokeStyle=Gn=V),ge!=Tr&&(a.fillStyle=Tr=ge),X!=wn&&(a.lineWidth=wn=X),xe!=jr&&(a.lineJoin=jr=xe),oe!=as&&(a.lineCap=as=oe),ie!=uo&&a.setLineDash(uo=ie)}function Do(V,X,ie,oe){X!=Tr&&(a.fillStyle=Tr=X),V!=js&&(a.font=js=V),ie!=Us&&(a.textAlign=Us=ie),oe!=ls&&(a.textBaseline=ls=oe)}function cs(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,Ut)&&(X==null||X.min==null)){let xe=en(ze,0),Ee=en(Fe,oe.length-1),We=ie.min==null?JA(oe,xe,Ee,ge,V.distr==3):[ie.min,ie.max];V.min=so(V.min,ie.min=We[0]),V.max=Gr(V.max,ie.max=We[1])}}const us={min:null,max:null};function So(){for(let oe in _){let ge=_[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,Ut))&&(A[oe]=us)}for(let oe in _){let ge=_[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=us)}A[C]!=null&&po(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let xe=V[oe]=va(_[oe],lS);if(ge.min!=null)cr(xe,ge);else if(oe!=C||d==2)if(ce==0&&xe.from==null){let Ee=xe.range(r,null,null,oe);xe.min=Ee[0],xe.max=Ee[1]}else xe.min=vn,xe.max=-vn}}if(ce>0){x.forEach((oe,ge)=>{if(d==1){let xe=oe.scale,Ee=A[xe];if(Ee==null)return;let We=V[xe];if(ge==0){let He=We.range(r,We.min,We.max,xe);We.min=He[0],We.max=He[1],ze=oo(We.min,e[0]),Fe=oo(We.max,e[0]),Fe-ze>1&&(e[0][ze]<We.min&&ze++,e[0][Fe]>We.max&&Fe--),oe.min=Qt[ze],oe.max=Qt[Fe]}else oe.show&&oe.auto&&cs(We,Ee,oe,e[ge],oe.sorted);oe.idxs[0]=ze,oe.idxs[1]=Fe}else if(ge>0&&oe.show&&oe.auto){let[xe,Ee]=oe.facets,We=xe.scale,He=Ee.scale,[Ye,Ze]=e[ge],tt=V[We],xt=V[He];tt!=null&&cs(tt,A[We],xe,Ye,xe.sorted),xt!=null&&cs(xt,A[He],Ee,Ze,Ee.sorted),oe.min=Ee.min,oe.max=Ee.max}});for(let oe in V){let ge=V[oe],xe=A[oe];if(ge.from==null&&(xe==null||xe.min==null)){let Ee=ge.range(r,ge.min==vn?null:ge.min,ge.max==-vn?null:ge.max,oe);ge.min=Ee[0],ge.max=Ee[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let xe=V[ge.from];if(xe.min==null)ge.min=ge.max=null;else{let Ee=ge.range(r,xe.min,xe.max,oe);ge.min=Ee[0],ge.max=Ee[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],xe=_[oe];if(xe.min!=ge.min||xe.max!=ge.max){xe.min=ge.min,xe.max=ge.max;let Ee=xe.distr;xe._min=Ee==3?Ro(xe.min):Ee==4?fh(xe.min,xe.asinh):Ee==100?xe.fwd(xe.min):xe.min,xe._max=Ee==3?Ro(xe.max):Ee==4?fh(xe.max,xe.asinh):Ee==100?xe.fwd(xe.max):xe.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)ei=!0,at("setScale",oe);se&&ne.left>=0&&(Ii=Kn=!0)}for(let oe in A)A[oe]=null}function qs(V){let X=gh(ze-1,0,ce-1),ie=gh(Fe+1,0,ce-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<ce-1;)ie++;return[X,ie]}function _a(){if(ce>0){let V=x.some(X=>X._focus)&&wr!=yr.alpha;V&&(a.globalAlpha=wr=yr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(hs(ie,!1),hs(ie,!0),X._paths==null)){let oe=wr;wr!=X.alpha&&(a.globalAlpha=wr=X.alpha);let ge=d==2?[0,e[ie][0].length-1]:qs(e[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),wr!=oe&&(a.globalAlpha=wr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=wr;wr!=X.alpha&&(a.globalAlpha=wr=X.alpha),X._paths!=null&&ds(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,xe=X.points.show(r,ie,ze,Fe,ge),Ee=X.points.filter(r,ie,xe,ge);(xe||Ee)&&(X.points._paths=X.points.paths(r,ie,ze,Fe,Ee),ds(ie,!0))}wr!=oe&&(a.globalAlpha=wr=oe),at("drawSeries",ie)}}),V&&(a.globalAlpha=wr=1)}}function hs(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function ds(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:ge,clip:xe,flags:Ee,_stroke:We=ie._stroke,_fill:He=ie._fill,_width:Ye=ie.width}=ie._paths;Ye=yn(Ye*on,3);let Ze=null,tt=Ye%2/2;X&&He==null&&(He=Ye>0?"#fff":We);let xt=ie.pxAlign==1&&tt>0;if(xt&&a.translate(tt,tt),!X){let Wt=qn-Ye/2,At=Hn-Ye/2,Ft=Xt+Ye,gt=dn+Ye;Ze=new Path2D,Ze.rect(Wt,At,Ft,gt)}X?Fo(We,Ye,ie.dash,ie.cap,He,oe,ge,Ee,xe):Ks(V,We,Ye,ie.dash,ie.cap,He,oe,ge,Ee,Ze,xe),xt&&a.translate(-tt,-tt)}function Ks(V,X,ie,oe,ge,xe,Ee,We,He,Ye,Ze){let tt=!1;He!=0&&k.forEach((xt,Wt)=>{if(xt.series[0]==V){let At=x[xt.series[1]],Ft=e[xt.series[1]],gt=(At._paths||nl).band;is(gt)&&(gt=xt.dir==1?gt[0]:gt[1]);let ct,xn=null;At.show&>&&tS(Ft,ze,Fe)?(xn=xt.fill(r,Wt)||xe,ct=At._paths.clip):gt=null,Fo(X,ie,oe,ge,xn,Ee,We,He,Ye,Ze,ct,gt),tt=!0}}),tt||Fo(X,ie,oe,ge,xe,Ee,We,He,Ye,Ze)}const ps=ba|_h;function Fo(V,X,ie,oe,ge,xe,Ee,We,He,Ye,Ze,tt){Vs(V,X,ie,oe,ge),(He||Ye||tt)&&(a.save(),He&&a.clip(He),Ye&&a.clip(Ye)),tt?(We&ps)==ps?(a.clip(tt),Ze&&a.clip(Ze),xr(ge,Ee),Ui(V,xe,X)):We&_h?(xr(ge,Ee),a.clip(tt),Ui(V,xe,X)):We&ba&&(a.save(),a.clip(tt),Ze&&a.clip(Ze),xr(ge,Ee),a.restore(),Ui(V,xe,X)):(xr(ge,Ee),Ui(V,xe,X)),(He||Ye||tt)&&a.restore()}function Ui(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Gn=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function xr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Tr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function _o(V,X,ie,oe){let ge=E[V],xe;if(oe<=0)xe=[0,0];else{let Ee=ge._space=ge.space(r,V,X,ie,oe),We=ge._incrs=ge.incrs(r,V,X,ie,oe,Ee);xe=C_(X,ie,We,oe,Ee)}return ge._found=xe}function ho(V,X,ie,oe,ge,xe,Ee,We,He,Ye){let Ze=Ee%2/2;l==1&&a.translate(Ze,Ze),Vs(We,Ee,He,Ye,We),a.beginPath();let tt,xt,Wt,At,Ft=ge+(oe==0||oe==3?-xe:xe);ie==0?(xt=ge,At=Ft):(tt=ge,Wt=Ft);for(let gt=0;gt<V.length;gt++)X[gt]!=null&&(ie==0?tt=Wt=V[gt]:xt=At=V[gt],a.moveTo(tt,xt),a.lineTo(Wt,At));a.stroke(),l==1&&a.translate(-Ze,-Ze)}function $a(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,po(!1));return}else ie._show||(X=!1,ie._show=!0,po(!1));let xe=ie.side,Ee=xe%2,{min:We,max:He}=ge,[Ye,Ze]=_o(oe,We,He,Ee==0?bt:qe);if(Ze==0)return;let tt=ge.distr==2,xt=ie._splits=ie.splits(r,oe,We,He,Ye,Ze,tt),Wt=ge.distr==2?xt.map(ct=>Qt[ct]):xt,At=ge.distr==2?Qt[xt[1]]-Qt[xt[0]]:Ye,Ft=ie._values=ie.values(r,ie.filter(r,Wt,oe,Ze,At),oe,Ze,At);ie._rotate=xe==2?ie.rotate(r,Ft,oe,Ze):0;let gt=ie._size;ie._size=zi(ie.size(r,Ft,oe,V)),gt!=null&&ie._size!=gt&&(X=!1)}),X}function yl(V){let X=!0;return No.forEach((ie,oe)=>{let ge=ie(r,oe,xi,V);ge!=_r[oe]&&(X=!1),_r[oe]=ge}),X}function Po(){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,xe,Ee=X.stroke(r,V),We=ie==0||ie==3?-1:1,[He,Ye]=X._found;if(X.label!=null){let mn=X.labelGap*We,Rr=mr((X._lpos+mn)*on);Do(X.labelFont[0],Ee,"center",ie==2?Ja:nm),a.save(),oe==1?(ge=xe=0,a.translate(Rr,mr(Hn+dn/2)),a.rotate((ie==3?-sc:sc)/2)):(ge=mr(qn+Xt/2),xe=Rr);let jo=Cm(X.label)?X.label(r,V,He,Ye):X.label;a.fillText(jo,ge,xe),a.restore()}if(Ye==0)continue;let Ze=_[X.scale],tt=oe==0?Xt:dn,xt=oe==0?qn:Hn,Wt=X._splits,At=Ze.distr==2?Wt.map(mn=>Qt[mn]):Wt,Ft=Ze.distr==2?Qt[Wt[1]]-Qt[Wt[0]]:He,gt=X.ticks,ct=X.border,xn=gt.show?gt.size:0,Dn=mr(xn*on),dr=mr((X.alignTo==2?X._size-xn-X.gap:X.gap)*on),Gt=X._rotate*-sc/180,fe=m(X._pos*on),$e=(Dn+dr)*We,Ce=fe+$e;xe=oe==0?Ce:0,ge=oe==1?Ce:0;let Ke=X.font[0],ft=X.align==1?da:X.align==2?th:Gt>0?da:Gt<0?th:oe==0?"center":ie==3?th:da,Et=Gt||oe==1?"middle":ie==2?Ja:nm;Do(Ke,Ee,ft,Et);let Jt=X.font[1]*X.lineGap,Lt=Wt.map(mn=>m(b(mn,Ze,tt,xt))),oi=X._values;for(let mn=0;mn<oi.length;mn++){let Rr=oi[mn];if(Rr!=null){oe==0?ge=Lt[mn]:xe=Lt[mn],Rr=""+Rr;let jo=Rr.indexOf(`
|
|
1490
|
+
`)==-1?[Rr]:Rr.split(/\n/gm);for(let Zn=0;Zn<jo.length;Zn++){let Ys=jo[Zn];Gt?(a.save(),a.translate(ge,xe+Zn*Jt),a.rotate(Gt),a.fillText(Ys,0,0),a.restore()):a.fillText(Ys,ge,xe+Zn*Jt)}}}gt.show&&ho(Lt,gt.filter(r,At,V,Ye,Ft),oe,ie,fe,Dn,yn(gt.width*on,3),gt.stroke(r,V),gt.dash,gt.cap);let Yi=X.grid;Yi.show&&ho(Lt,Yi.filter(r,At,V,Ye,Ft),oe,oe==0?2:1,oe==0?Hn:qn,oe==0?dn:Xt,yn(Yi.width*on,3),Yi.stroke(r,V),Yi.dash,Yi.cap),ct.show&&ho([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Hn:qn,oe==1?dn:Xt,yn(ct.width*on,3),ct.stroke(r,V),ct.dash,ct.cap)}at("drawAxes")}function po(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 Wo=!1,fs=!1,Bo=[];function Ta(){fs=!1;for(let V=0;V<Bo.length;V++)at(...Bo[V]);Bo.length=0}function $o(){Wo||(gS(Ma),Wo=!0)}function Be(V,X=!1){Wo=!0,fs=X,V(r),Ma(),X&&Bo.length>0&&queueMicrotask(Ta)}r.batch=Be;function Ma(){if(Hr&&(So(),Hr=!1),ei&&(ti(),ei=!1),Jr){if(_n(c,da,Nt),_n(c,Ja,tn),_n(c,Qa,bt),_n(c,Za,qe),_n(i,da,Nt),_n(i,Ja,tn),_n(i,Qa,bt),_n(i,Za,qe),_n(u,Qa,ir),_n(u,Za,Or),s.width=mr(ir*on),s.height=mr(Or*on),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let xe=ge===3||ge===0?ie:0,Ee=ge%2==1;_n(V,Ee?"left":"top",oe-xe),_n(V,Ee?"width":"height",ie),_n(V,Ee?"top":"left",Ee?tn:Nt),_n(V,Ee?"height":"width",Ee?qe:bt),lh(V,Rs)}else $i(V,Rs)}),Gn=Tr=wn=jr=as=js=Us=ls=uo=null,wr=1,W(!0),Nt!=Bn||tn!=Ar||bt!=vr||qe!=bn){po(!1);let V=bt/vr,X=qe/bn;if(se&&!Ii&&ne.left>=0){ne.left*=V,ne.top*=X,Ri&&bo(Ri,mr(ne.left),0,bt,qe),or&&bo(or,0,mr(ne.top),bt,qe);for(let ie=0;ie<Ln.length;ie++){let oe=Ln[ie];oe!=null&&(Sr[ie]*=V,wi[ie]*=X,bo(oe,zi(Sr[ie]),zi(wi[ie]),bt,qe))}}if(wt.show&&!gi&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let ie in Y)_n(ri,ie,wt[ie])}Bn=Nt,Ar=tn,vr=bt,bn=qe}at("setSize"),Jr=!1}ir>0&&Or>0&&(a.clearRect(0,0,s.width,s.height),at("drawClear"),D.forEach(V=>V()),at("draw")),wt.show&&gi&&(gn(wt),gi=!1),se&&Ii&&(S(null,!0,!1),Ii=!1),he.show&&he.live&&Kn&&(y(),Kn=!1),h||(h=!0,r.status=1,at("ready")),Ut=!1,Wo=!1}r.redraw=(V,X)=>{ei=X||!1,V!==!1?ur(C,H.min,H.max):$o()};function Ne(V,X){let ie=_[V];if(ie.from==null){if(ce==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(ce>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&ce>0&&(X.min=oo(X.min,e[0]),X.max=oo(X.max,e[0]),X.min==X.max&&X.max++),A[V]=X,Hr=!0,$o()}}r.setScale=Ne;let zn,Ho,Ri,or,Ea,zo,Vi,To,an,nn,ln,Vt,qi=!1;const Yn=ne.drag;let Ue=Yn.x,An=Yn.y;se&&(ne.x&&(zn=Hi(WA,i)),ne.y&&(Ho=Hi(BA,i)),H.ori==0?(Ri=zn,or=Ho):(Ri=Ho,or=zn),ln=ne.left,Vt=ne.top);const wt=r.select=cr({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),ri=wt.show?Hi(PA,wt.over?i:c):null;function gn(V,X){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&_n(ri,ie,V[ie]);X!==!1&&at("setSelect")}}r.setSelect=gn;function En(V){if(x[V].show)le&&lh(Me[V],Rs);else if(le&&$i(Me[V],Rs),se){let X=Mn?Ln[0]:Ln[V];X!=null&&bo(X,-10,-10,bt,qe)}}function ur(V,X,ie){Ne(V,{min:X,max:ie})}function ii(V,X,ie,oe){X.focus!=null&&Mr(V),X.show!=null&&x.forEach((ge,xe)=>{xe>0&&(V==xe||V==null)&&(ge.show=X.show,En(xe),d==2?(ur(ge.facets[0].scale,null,null),ur(ge.facets[1].scale,null,null)):ur(ge.scale,null,null),$o())}),ie!==!1&&at("setSeries",V,X),oe&&Mt("setSeries",r,V,X)}r.setSeries=ii;function Ki(V,X){cr(k[V],X)}function Xn(V,X){V.fill=jt(V.fill||null),V.dir=en(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Ci(V){V==null?k.length=0:k.splice(V,1)}r.addBand=Xn,r.setBand=Ki,r.delBand=Ci;function gs(V,X){x[V].alpha=X,se&&Ln[V]!=null&&(Ln[V].style.opacity=X),le&&Me[V]&&(Me[V].style.opacity=X)}let Qn,Li,Oi;const Gi={focus:!0};function Mr(V){if(V!=Oi){let X=V==null,ie=yr.alpha!=1;x.forEach((oe,ge)=>{if(d==1||ge>0){let xe=X||ge==0||ge==V;oe._focus=X?null:xe,ie&&gs(ge,xe?1:yr.alpha)}}),Oi=V,ie&&$o()}}le&&bi&&fn(sm,me,V=>{ne._lock||(yi(V),Oi!=null&&ii(null,Gi,!0,pt.setSeries))});function Er(V,X,ie){let oe=_[X];ie&&(V=V/on-(oe.ori==1?tn:Nt));let ge=bt;oe.ori==1&&(ge=qe,V=ge-V),oe.dir==-1&&(V=ge-V);let xe=oe._min,Ee=oe._max,We=V/ge,He=xe+(Ee-xe)*We,Ye=oe.distr;return Ye==3?ga(10,He):Ye==4?rS(He,oe.asinh):Ye==100?oe.bwd(He):He}function Nr(V,X){let ie=Er(V,C,X);return oo(ie,e[0],ze,Fe)}r.valToIdx=V=>oo(V,e[0]),r.posToIdx=Nr,r.posToVal=Er,r.valToPos=(V,X,ie)=>_[X].ori==0?p(V,_[X],ie?Xt:bt,ie?qn:0):g(V,_[X],ie?dn:qe,ie?Hn:0),r.setCursor=(V,X,ie)=>{ln=V.left,Vt=V.top,S(null,X,ie)};function Gs(V,X){_n(ri,da,wt.left=V),_n(ri,Qa,wt.width=X)}function Dr(V,X){_n(ri,Ja,wt.top=V),_n(ri,Za,wt.height=X)}let Ur=H.ori==0?Gs:Dr,Ni=H.ori==1?Gs:Dr;function Di(){if(le&&he.live)for(let V=d==2?1:0;V<x.length;V++){if(V==0&&ht)continue;let X=he.values[V],ie=0;for(let oe in X)Je[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{J[oe]=ie}):aS(V.idx)||J.fill(V.idx),he.idx=J[0]),le&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||d==1&&!ht)&&T(ie,J[ie]);Di()}Kn=!1,X!==!1&&at("setLegend")}r.setLegend=y;function T(V,X){let ie=x[V],oe=V==0&&P==2?Qt:e[V],ge;ht?ge=ie.values(r,V,X)??st:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?st:{_:ge}),he.values[V]=ge}function S(V,X,ie){an=ln,nn=Vt,[ln,Vt]=ne.move(r,ln,Vt),ne.left=ln,ne.top=Vt,se&&(Ri&&bo(Ri,mr(ln),0,bt,qe),or&&bo(or,0,mr(Vt),bt,qe));let oe,ge=ze>Fe;Qn=vn,Li=null;let xe=H.ori==0?bt:qe,Ee=H.ori==1?bt:qe;if(ln<0||ce==0||ge){oe=ne.idx=null;for(let We=0;We<x.length;We++){let He=Ln[We];He!=null&&bo(He,-10,-10,bt,qe)}bi&&ii(null,Gi,!0,V==null&&pt.setSeries),he.live&&(J.fill(oe),Kn=!0)}else{let We,He,Ye;d==1&&(We=H.ori==0?ln:Vt,He=Er(We,C),oe=ne.idx=oo(He,e[0],ze,Fe),Ye=O(e[0][oe],H,xe,0));let Ze=-10,tt=-10,xt=0,Wt=0,At=!0,Ft="",gt="";for(let ct=d==2?1:0;ct<x.length;ct++){let xn=x[ct],Dn=J[ct],dr=Dn==null?null:d==1?e[ct][Dn]:e[ct][1][Dn],Gt=ne.dataIdx(r,ct,oe,He),fe=Gt==null?null:d==1?e[ct][Gt]:e[ct][1][Gt];if(Kn=Kn||fe!=dr||Gt!=Dn,J[ct]=Gt,ct>0&&xn.show){let $e=Gt==null?-10:Gt==oe?Ye:O(d==1?e[0][Gt]:e[ct][0][Gt],H,xe,0),Ce=fe==null?-10:$(fe,d==1?_[xn.scale]:_[xn.facets[1].scale],Ee,0);if(bi&&fe!=null){let Ke=H.ori==1?ln:Vt,ft=gr(yr.dist(r,ct,Gt,Ce,Ke));if(ft<Qn){let Et=yr.bias;if(Et!=0){let Jt=Er(Ke,xn.scale),Lt=fe>=0?1:-1,oi=Jt>=0?1:-1;oi==Lt&&(oi==1?Et==1?fe>=Jt:fe<=Jt:Et==1?fe<=Jt:fe>=Jt)&&(Qn=ft,Li=ct)}else Qn=ft,Li=ct}}if(Kn||Mn){let Ke,ft;H.ori==0?(Ke=$e,ft=Ce):(Ke=Ce,ft=$e);let Et,Jt,Lt,oi,Yi,mn,Rr=!0,jo=Tn.bbox;if(jo!=null){Rr=!1;let Zn=jo(r,ct);Lt=Zn.left,oi=Zn.top,Et=Zn.width,Jt=Zn.height}else Lt=Ke,oi=ft,Et=Jt=Tn.size(r,ct);if(mn=Tn.fill(r,ct),Yi=Tn.stroke(r,ct),Mn)ct==Li&&Qn<=yr.prox&&(Ze=Lt,tt=oi,xt=Et,Wt=Jt,At=Rr,Ft=mn,gt=Yi);else{let Zn=Ln[ct];Zn!=null&&(Sr[ct]=Lt,wi[ct]=oi,pm(Zn,Et,Jt,Rr),hm(Zn,mn,Yi),bo(Zn,zi(Lt),zi(oi),bt,qe))}}}}if(Mn){let ct=yr.prox,xn=Oi==null?Qn<=ct:Qn>ct||Li!=Oi;if(Kn||xn){let Dn=Ln[0];Dn!=null&&(Sr[0]=Ze,wi[0]=tt,pm(Dn,xt,Wt,At),hm(Dn,Ft,gt),bo(Dn,zi(Ze),zi(tt),bt,qe))}}}if(wt.show&&qi)if(V!=null){let[We,He]=pt.scales,[Ye,Ze]=pt.match,[tt,xt]=V.cursor.sync.scales,Wt=V.cursor.drag;if(Ue=Wt._x,An=Wt._y,Ue||An){let{left:At,top:Ft,width:gt,height:ct}=V.select,xn=V.scales[tt].ori,Dn=V.posToVal,dr,Gt,fe,$e,Ce,Ke=We!=null&&Ye(We,tt),ft=He!=null&&Ze(He,xt);Ke&&Ue?(xn==0?(dr=At,Gt=gt):(dr=Ft,Gt=ct),fe=_[We],$e=O(Dn(dr,tt),fe,xe,0),Ce=O(Dn(dr+Gt,tt),fe,xe,0),Ur(so($e,Ce),gr(Ce-$e))):Ur(0,xe),ft&&An?(xn==1?(dr=At,Gt=gt):(dr=Ft,Gt=ct),fe=_[He],$e=$(Dn(dr,xt),fe,Ee,0),Ce=$(Dn(dr+Gt,xt),fe,Ee,0),Ni(so($e,Ce),gr(Ce-$e))):Ni(0,Ee)}else Q()}else{let We=gr(an-Ea),He=gr(nn-zo);if(H.ori==1){let xt=We;We=He,He=xt}Ue=Yn.x&&We>=Yn.dist,An=Yn.y&&He>=Yn.dist;let Ye=Yn.uni;Ye!=null?Ue&&An&&(Ue=We>=Ye,An=He>=Ye,!Ue&&!An&&(He>We?An=!0:Ue=!0)):Yn.x&&Yn.y&&(Ue||An)&&(Ue=An=!0);let Ze,tt;Ue&&(H.ori==0?(Ze=Vi,tt=ln):(Ze=To,tt=Vt),Ur(so(Ze,tt),gr(tt-Ze)),An||Ni(0,Ee)),An&&(H.ori==1?(Ze=Vi,tt=ln):(Ze=To,tt=Vt),Ni(so(Ze,tt),gr(tt-Ze)),Ue||Ur(0,xe)),!Ue&&!An&&(Ur(0,0),Ni(0,0))}if(Yn._x=Ue,Yn._y=An,V==null){if(ie){if(On!=null){let[We,He]=pt.scales;pt.values[0]=We!=null?Er(H.ori==0?ln:Vt,We):null,pt.values[1]=He!=null?Er(H.ori==1?ln:Vt,He):null}Mt(rh,r,ln,Vt,bt,qe,oe)}if(bi){let We=ie&&pt.setSeries,He=yr.prox;Oi==null?Qn<=He&&ii(Li,Gi,!0,We):Qn>He?ii(null,Gi,!0,We):Li!=Oi&&ii(Li,Gi,!0,We)}}Kn&&(he.idx=oe,y()),X!==!1&&at("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&W(!1),F}});function W(V=!1){V?F=null:(F=i.getBoundingClientRect(),at("syncRect",F))}function z(V,X,ie,oe,ge,xe,Ee){ne._lock||qi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,xe,Ee,!1,V!=null),V!=null?S(null,!0,!0):S(X,!0,!1))}function q(V,X,ie,oe,ge,xe,Ee,We,He){if(F==null&&W(!1),yi(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){ln=-10,Vt=-10;return}let[Ye,Ze]=pt.scales,tt=X.cursor.sync,[xt,Wt]=tt.values,[At,Ft]=tt.scales,[gt,ct]=pt.match,xn=X.axes[0].side%2==1,Dn=H.ori==0?bt:qe,dr=H.ori==1?bt:qe,Gt=xn?xe:ge,fe=xn?ge:xe,$e=xn?oe:ie,Ce=xn?ie:oe;if(At!=null?ie=gt(Ye,At)?b(xt,_[Ye],Dn,0):-10:ie=Dn*($e/Gt),Ft!=null?oe=ct(Ze,Ft)?b(Wt,_[Ze],dr,0):-10:oe=dr*(Ce/fe),H.ori==1){let Ke=ie;ie=oe,oe=Ke}}He&&(X==null||X.cursor.event.type==rh)&&((ie<=1||ie>=bt-1)&&(ie=Ns(ie,bt)),(oe<=1||oe>=qe-1)&&(oe=Ns(oe,qe))),We?(Ea=ie,zo=oe,[Vi,To]=ne.move(r,ie,oe)):(ln=ie,Vt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){gn(Y,!1)}let re,ae,be,ke;function ve(V,X,ie,oe,ge,xe,Ee){qi=!0,Ue=An=Yn._x=Yn._y=!1,q(V,X,ie,oe,ge,xe,Ee,!0,!1),V!=null&&(fn(ih,sh,we,!1),Mt(im,r,Vi,To,bt,qe,null));let{left:We,top:He,width:Ye,height:Ze}=wt;re=We,ae=He,be=Ye,ke=Ze}function we(V,X,ie,oe,ge,xe,Ee){qi=Yn._x=Yn._y=!1,q(V,X,ie,oe,ge,xe,Ee,!1,!0);let{left:We,top:He,width:Ye,height:Ze}=wt,tt=Ye>0||Ze>0,xt=re!=We||ae!=He||be!=Ye||ke!=Ze;if(tt&&xt&&gn(wt),Yn.setScale&&tt&&xt){let Wt=We,At=Ye,Ft=He,gt=Ze;if(H.ori==1&&(Wt=He,At=Ze,Ft=We,gt=Ye),Ue&&ur(C,Er(Wt,C),Er(Wt+At,C)),An)for(let ct in _){let xn=_[ct];ct!=C&&xn.from==null&&xn.min!=vn&&ur(ct,Er(Ft+gt,ct),Er(Ft,ct))}Q()}else ne.lock&&(ne._lock=!ne._lock,S(X,!0,V!=null));V!=null&&(Wn(ih,sh),Mt(ih,r,ln,Vt,bt,qe,null))}function Oe(V,X,ie,oe,ge,xe,Ee){if(ne._lock)return;yi(V);let We=qi;if(qi){let He=!0,Ye=!0,Ze=10,tt,xt;H.ori==0?(tt=Ue,xt=An):(tt=An,xt=Ue),tt&&xt&&(He=ln<=Ze||ln>=bt-Ze,Ye=Vt<=Ze||Vt>=qe-Ze),tt&&He&&(ln=ln<Vi?0:bt),xt&&Ye&&(Vt=Vt<To?0:qe),S(null,!0,!0),qi=!1}ln=-10,Vt=-10,J.fill(null),S(null,!0,!0),We&&(qi=We)}function Le(V,X,ie,oe,ge,xe,Ee){ne._lock||(yi(V),br(),Q(),V!=null&&Mt(am,r,ln,Vt,bt,qe,null))}function Ge(){E.forEach(k_),co(r.width,r.height,!0)}Ls(tc,fa,Ge);const ut={};ut.mousedown=ve,ut.mousemove=z,ut.mouseup=we,ut.dblclick=Le,ut.setSeries=(V,X,ie,oe)=>{let ge=pt.match[2];ie=ge(r,X,ie),ie!=-1&&ii(ie,oe,!0,!1)},se&&(fn(im,i,ve),fn(rh,i,z),fn(om,i,V=>{yi(V),W(!1)}),fn(sm,i,Oe),fn(am,i,Le),Eh.add(r),r.syncRect=W);const et=r.hooks=n.hooks||{};function at(V,X,ie){fs?Bo.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,pt=cr({key:null,setSeries:!1,filters:{pub:Sm,sub:Sm},scales:[C,x[1]?x[1].scale:null],match:[_m,_m,Sn],values:[null,null]},ne.sync);pt.match.length==2&&pt.match.push(Sn),ne.sync=pt;const On=pt.key,kt=uv(On);function Mt(V,X,ie,oe,ge,xe,Ee){pt.filters.pub(V,X,ie,oe,ge,xe,Ee)&&kt.pub(V,X,ie,oe,ge,xe,Ee)}kt.sub(r);function hr(V,X,ie,oe,ge,xe,Ee){pt.filters.sub(V,X,ie,oe,ge,xe,Ee)&&ut[V](null,X,ie,oe,ge,xe,Ee)}r.pub=hr;function Ir(){kt.unsub(r),Eh.delete(r),kr.clear(),uh(tc,fa,Ge),f.remove(),me==null||me.remove(),at("destroy")}r.destroy=Ir;function Nn(){at("init",n,e),$r(e||n.data,!1),A[C]?Ne(C,A[C]):br(),gi=wt.show&&(wt.width>0||wt.height>0),Ii=Kn=!0,co(n.width,n.height)}return x.forEach(Ao),E.forEach(zr),t?t instanceof HTMLElement?(t.appendChild(f),Nn()):t(r,Nn):Nn(),r}Wr.assign=cr,Wr.fmtNum=ph,Wr.rangeNum=oc,Wr.rangeLog=ic,Wr.rangeAsinh=hh,Wr.orient=Fs,Wr.pxRatio=on,Wr.join=fS,Wr.fmtDate=vh,Wr.tzDate=SS,Wr.sync=uv;{Wr.addGap=a_,Wr.clipGaps=dc;let n=Wr.paths={points:vv};n.linear=bv,n.stepped=u_,n.bars=h_,n.spline=p_}var $v,Tv;function A_(){return Tv||(Tv=1,$v=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}),$v}var S_=A_();const cP=pr("e",Fl(S_));var Rh,Mv;function __(){if(Mv)return Rh;Mv=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 Rh=n,Rh}var Lh,Ev;function $_(){if(Ev)return Lh;Ev=1;var n=__();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 Lh=e,Lh}var Oh,Iv;function Rv(){if(Iv)return Oh;Iv=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 Oh=h,Oh}var Nh,Lv;function T_(){if(Lv)return Nh;Lv=1;function n(e){return e.split("")}return Nh=n,Nh}var Dh,Ov;function M_(){if(Ov)return Dh;Ov=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+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",i=f+"?",l="["+p+"]?",m="(?:"+c+"(?:"+[s,a,u].join("|")+")"+l+i+")*",w=l+i+m,x="(?:"+[s+b+"?",b,a,u,g].join("|")+")",E=RegExp(h+"(?="+h+")|"+x+w,"g");function _(k){return k.match(E)||[]}return Dh=_,Dh}var Fh,Nv;function E_(){if(Nv)return Fh;Nv=1;var n=T_(),e=Rv(),t=M_();function r(d){return e(d)?t(d):n(d)}return Fh=r,Fh}var Ph,Dv;function I_(){if(Dv)return Ph;Dv=1;var n=typeof ns=="object"&&ns&&ns.Object===Object&&ns;return Ph=n,Ph}var Wh,Fv;function R_(){if(Fv)return Wh;Fv=1;var n=I_(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return Wh=t,Wh}var Bh,Pv;function Hh(){if(Pv)return Bh;Pv=1;var n=R_(),e=n.Symbol;return Bh=e,Bh}var zh,Wv;function L_(){if(Wv)return zh;Wv=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 zh=n,zh}var jh,Bv;function O_(){if(Bv)return jh;Bv=1;var n=Array.isArray;return jh=n,jh}var Uh,Hv;function N_(){if(Hv)return Uh;Hv=1;var n=Hh(),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 s=r.call(g);return f&&(b?g[d]=h:delete g[d]),s}return Uh=p,Uh}var Vh,zv;function D_(){if(zv)return Vh;zv=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Vh=t,Vh}var qh,jv;function F_(){if(jv)return qh;jv=1;var n=Hh(),e=N_(),t=D_(),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 qh=g,qh}var Kh,Uv;function P_(){if(Uv)return Kh;Uv=1;function n(e){return e!=null&&typeof e=="object"}return Kh=n,Kh}var Gh,Vv;function W_(){if(Vv)return Gh;Vv=1;var n=F_(),e=P_(),t="[object Symbol]";function r(d){return typeof d=="symbol"||e(d)&&n(d)==t}return Gh=r,Gh}var Yh,qv;function B_(){if(qv)return Yh;qv=1;var n=Hh(),e=L_(),t=O_(),r=W_(),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 Yh=g,Yh}var Xh,Kv;function mc(){if(Kv)return Xh;Kv=1;var n=B_();function e(t){return t==null?"":n(t)}return Xh=e,Xh}var Qh,Gv;function H_(){if(Gv)return Qh;Gv=1;var n=$_(),e=Rv(),t=E_(),r=mc();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 Qh=d,Qh}var Zh,Yv;function Xv(){if(Yv)return Zh;Yv=1;var n=H_(),e=n("toUpperCase");return Zh=e,Zh}var z_=Xv();const j_=Fl(z_);var Jh,Qv;function U_(){if(Qv)return Jh;Qv=1;var n=mc(),e=Xv();function t(r){return e(n(r).toLowerCase())}return Jh=t,Jh}var ed,Zv;function V_(){if(Zv)return ed;Zv=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 ed=n,ed}var td,Jv;function q_(){if(Jv)return td;Jv=1;function n(e){return function(t){return e==null?void 0:e[t]}}return td=n,td}var nd,ey;function K_(){if(ey)return nd;ey=1;var n=q_(),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 nd=t,nd}var rd,ty;function G_(){if(ty)return rd;ty=1;var n=K_(),e=mc(),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(s){return s=e(s),s&&s.replace(t,n).replace(h,"")}return rd=f,rd}var id,ny;function Y_(){if(ny)return id;ny=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(n)||[]}return id=e,id}var od,ry;function X_(){if(ry)return od;ry=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 od=e,od}var sd,iy;function Q_(){if(iy)return sd;iy=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",s=" \\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",u="\\ufe0e\\ufe0f",c=b+h+f+s,i="['’]",l="["+c+"]",m="["+d+"]",w="\\d+",x="["+p+"]",E="["+g+"]",_="[^"+n+c+w+p+g+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",R="[^"+n+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",H="\\u200d",P="(?:"+E+"|"+_+")",O="(?:"+I+"|"+_+")",$="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,D,L].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J=B+N+U,he="(?:"+[x,D,L].join("|")+")"+J,ne=RegExp([I+"?"+E+"+"+$+"(?="+[l,I,"$"].join("|")+")",O+"+"+A+"(?="+[l,I+P,"$"].join("|")+")",I+"?"+P+"+"+$,I+"+"+A,Z,K,w,he].join("|"),"g");function le(se){return se.match(ne)||[]}return sd=le,sd}var ad,oy;function Z_(){if(oy)return ad;oy=1;var n=Y_(),e=X_(),t=mc(),r=Q_();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 ad=d,ad}var ld,sy;function J_(){if(sy)return ld;sy=1;var n=V_(),e=G_(),t=Z_(),r="['’]",d=RegExp(r,"g");function p(g){return function(b){return n(t(e(b).replace(d,"")),g,"")}}return ld=p,ld}var cd,ay;function e$(){if(ay)return cd;ay=1;var n=U_(),e=J_(),t=e(function(r,d,p){return d=d.toLowerCase(),r+(p?n(d):d)});return cd=t,cd}var t$=e$();const n$=Fl(t$),r$=Object.assign({"./ArrayWidget.vue":()=>rt(()=>nt.import("./ArrayWidget-C59wpWWk-c030a56edd4dd22834bf.js"),void 0),"./ArrayplotWidget.vue":()=>rt(()=>nt.import("./ArrayplotWidget-tKqIV461-13b02d203d4fad3838c4.js"),void 0),"./BlockWidget.vue":()=>rt(()=>nt.import("./BlockWidget-BdlMR_1A-4f610ac4d0126b68dd03.js"),void 0),"./ButtonWidget.vue":()=>rt(()=>nt.import("./ButtonWidget-C2JVmh3p-926c3617ffb55188d12f.js"),void 0),"./CanvasWidget.vue":()=>rt(()=>nt.import("./CanvasWidget-BRbdw1fu-7953b285c3b97e8dadbd.js"),void 0),"./CanvasdotWidget.vue":()=>rt(()=>nt.import("./CanvasdotWidget-C8T_w03p-10a087ad609ba06ca41b.js"),void 0),"./CanvasimageWidget.vue":()=>rt(()=>nt.import("./CanvasimageWidget-C1w2vSsG-f70a99fd3d3b576f375b.js"),void 0),"./CanvasimagevalueWidget.vue":()=>rt(()=>nt.import("./CanvasimagevalueWidget-BMv2SmEq-7a00b79bc596c12da93e.js"),void 0),"./CanvaslabelWidget.vue":()=>rt(()=>nt.import("./CanvaslabelWidget-LEBZQ3DR-6cedd062ecc369fd509c.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>rt(()=>nt.import("./CanvaslabelvalueWidget-Q6UdEanF-32500eff0f1c6a2e955e.js"),void 0),"./CanvaslineWidget.vue":()=>rt(()=>nt.import("./CanvaslineWidget-BhvBCDoS-dfcc85ac5f45faa098d3.js"),void 0),"./CanvaslinevalueWidget.vue":()=>rt(()=>nt.import("./CanvaslinevalueWidget-EaASC9TU-3ed142406f005eadc7aa.js"),void 0),"./CheckbuttonWidget.vue":()=>rt(()=>nt.import("./CheckbuttonWidget-C3bjQwrp-7e3d2f8bd79fdb619cce.js"),void 0),"./ComboboxWidget.vue":()=>rt(()=>nt.import("./ComboboxWidget-CmruSbJy-82a693f4ac1333fb743a.js"),void 0),"./DateWidget.vue":()=>rt(()=>nt.import("./DateWidget-CcUxRlJ2-20274e9b43415b68da00.js"),void 0),"./DynamicWidget.vue":()=>rt(()=>nt.import("./DynamicWidget-DHL7pbgW-9dd7c4740f9216c96ad6.js"),void 0),"./FormatvalueWidget.vue":()=>rt(()=>nt.import("./FormatvalueWidget-Lk5K0wTL-e3ba95ef3dcc4c431a42.js"),void 0),"./HorizontalWidget.vue":()=>rt(()=>nt.import("./HorizontalWidget-D3Q5IUQg-9292a6765c3d61202751.js"),void 0),"./HorizontalboxWidget.vue":()=>rt(()=>nt.import("./HorizontalboxWidget-D7bUUqfG-91e16e9104903f863667.js"),void 0),"./HorizontallineWidget.vue":()=>rt(()=>nt.import("./HorizontallineWidget-DZcIetQh-9afd02e29a101ef79be4.js"),void 0),"./IframeWidget.vue":()=>rt(()=>nt.import("./IframeWidget-Df7vTYZj-c232216652e566c18435.js"),void 0),"./ImageviewerWidget.vue":()=>rt(()=>nt.import("./ImageviewerWidget-wHbhv08x-94ad73e53f75b76feb4e.js"),void 0),"./LabelWidget.vue":()=>rt(()=>nt.import("./LabelWidget-BehwzOCR-79f76b1c4f02acaf408a.js"),void 0),"./LabelledWidget.vue":()=>rt(()=>nt.import("./LabelledWidget-DJKR8ikj-a2d1f6d0cca12f7a6013.js"),void 0),"./LabelprogressbarWidget.vue":()=>rt(()=>nt.import("./LabelprogressbarWidget-D4Qzq894-cd3da652044cb8d6391c.js"),void 0),"./LabelsparklineWidget.vue":()=>rt(()=>nt.import("./LabelsparklineWidget-CwCOklZG-8be710bf8c28e5d76f00.js"),void 0),"./LabelvalueWidget.vue":()=>rt(()=>nt.import("./LabelvalueWidget-DW8Q7BTX-4b08f7ec25d3eb90008a.js"),void 0),"./LabelvaluedescWidget.vue":()=>rt(()=>nt.import("./LabelvaluedescWidget-DgNX7tK2-d8bfc1397c5ff3a1a091.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitsbarWidget-DAEBW0hU-bac254fcd06ea319afc7.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitscolumnWidget-Dok-of6n-37aebf00cc3cbf57cda0.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>rt(()=>nt.import("./LabelvaluerangebarWidget-CQ0xCUFU-de8a26cc92101c3a7ece.js"),void 0),"./LedWidget.vue":()=>rt(()=>nt.import("./LedWidget-DzQNEDF7-378847eba3af9bf5d574.js"),void 0),"./LimitsbarWidget.vue":()=>rt(()=>nt.import("./LimitsbarWidget-zkoAz9SQ-475e9519dab395d9966b.js"),void 0),"./LimitscolorWidget.vue":()=>rt(()=>nt.import("./LimitscolorWidget-dez316Rk-785ec6cf03663679c3ee.js"),void 0),"./LimitscolumnWidget.vue":()=>rt(()=>nt.import("./LimitscolumnWidget-D-IPNDVg-14a9cfd60151cf7a93a6.js"),void 0),"./LinegraphWidget.vue":()=>rt(()=>nt.import("./LinegraphWidget-CicnZgjt-5a5eb20eb64c130da951.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>rt(()=>nt.import("./MatrixbycolumnsWidget-D3qN6GTr-38bd523f73b358685856.js"),void 0),"./ProgressbarWidget.vue":()=>rt(()=>nt.import("./ProgressbarWidget-CLilcPBe-7895197b2b7cc262777a.js"),void 0),"./RadiobuttonWidget.vue":()=>rt(()=>nt.import("./RadiobuttonWidget-Dsy01RJ--1b9b30a93bb64653d5e8.js"),void 0),"./RadiogroupWidget.vue":()=>rt(()=>nt.import("./RadiogroupWidget-BNcVGNj1-6f7f07264bc6bfd9d00a.js"),void 0),"./RangebarWidget.vue":()=>rt(()=>nt.import("./RangebarWidget-DhcoIdNf-c17a68e5f31cd091d07e.js"),void 0),"./RollupWidget.vue":()=>rt(()=>nt.import("./RollupWidget-BypuPvE7-8ef0295c2b9d2d007ee3.js"),void 0),"./ScrollwindowWidget.vue":()=>rt(()=>nt.import("./ScrollwindowWidget-DNQgHoNO-723a735f85b1a79ab4e2.js"),void 0),"./SignalWidget.vue":()=>rt(()=>nt.import("./SignalWidget-BHwyScCG-9efc8462a3f89e5e46d5.js"),void 0),"./SpacerWidget.vue":()=>rt(()=>nt.import("./SpacerWidget-CFxXXTm7-350648d7eead464d0797.js"),void 0),"./SparklineWidget.vue":()=>rt(()=>nt.import("./SparklineWidget-C0lRpRrp-d2ac085b20d20093ddf4.js"),void 0),"./TabbookWidget.vue":()=>rt(()=>nt.import("./TabbookWidget-CeeBOYOt-49c342f05c2a5c749294.js"),void 0),"./TextboxWidget.vue":()=>rt(()=>nt.import("./TextboxWidget-DoA2b3YU-f9478720ba4c78611dab.js"),void 0),"./TextfieldWidget.vue":()=>rt(()=>nt.import("./TextfieldWidget-Dj4DV74o-34abe84687a57bd2ce54.js"),void 0),"./TimeWidget.vue":()=>rt(()=>nt.import("./TimeWidget-DAQDQ0UM-45e6062597bfbeea981a.js"),void 0),"./TitleWidget.vue":()=>rt(()=>nt.import("./TitleWidget-Ct0JlY9s-5d22357415e6540c4792.js"),void 0),"./ValueWidget.vue":()=>rt(()=>nt.import("./ValueWidget-QaBYsiZz-118de6e0f9d53ef9c72f.js"),void 0),"./ValuelimitsbarWidget.vue":()=>rt(()=>nt.import("./ValuelimitsbarWidget-CFToRM7w-6ffe9552cd597d51f2d9.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>rt(()=>nt.import("./ValuelimitscolumnWidget-BG7naMYx-88beb81c6900bb9e12b6.js"),void 0),"./ValuerangebarWidget.vue":()=>rt(()=>nt.import("./ValuerangebarWidget-CChK2Lmm-ca3fa31259084f38789a.js"),void 0),"./VerticalWidget.vue":()=>rt(()=>nt.import("./VerticalWidget-C8iN5DJK-2d9fcd7f089cfb0461d6.js"),void 0),"./VerticalboxWidget.vue":()=>rt(()=>nt.import("./VerticalboxWidget-CXwUSWrP-2673ce43389276c28024.js"),void 0)}),i$=Object.entries(r$).reduce((n,[e,t])=>{e=e.split("/").pop();const r=j_(n$(e.replace(/\.\w+$/,"")));return{...n,[r]:qp(t)}},{}),uP=pr("a",{components:i$}),ly="openc3-ace-vim-mode-enabled",ud="ace/keyboard/vim",cy="openc3-ace-default-scripting-language",vc=pr("Z",{isVimModeEnabled(){return localStorage.getItem(ly)==="true"},setVimMode(n){localStorage.setItem(ly,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(ud),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:e}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(ud),ace.config.loadModule(ud,t=>{t.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(cy)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(cy,n)}}),o$={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}},s$={class:"app-title mr-2"};function a$(n,e,t,r,d,p){const g=Ve("v-col"),b=Ve("v-row"),h=Ve("v-icon"),f=Ve("v-btn"),s=Ve("v-divider"),a=Ve("v-list-item-title"),u=Ve("v-list-item"),c=Ve("v-list"),i=Ve("v-menu"),l=Ve("v-radio"),m=Ve("v-list-item-action"),w=Ve("v-radio-group"),x=Ve("v-checkbox");return ot(),Kt(Kp,{to:"#openc3-menu"},[je(b,{"no-gutters":""},{default:Pe(()=>[je(g,{"align-self":"end"},{default:Pe(()=>[Fn("span",s$,Cn(t.title),1)]),_:1})]),_:1}),je(b,{dense:"",class:"flex-nowrap"},{default:Pe(()=>[(ot(!0),rn(ci,null,vo(t.menus,(E,_)=>(ot(),Kt(i,{ref_for:!0,ref:"topmenu",key:_},{activator:Pe(({props:k})=>[je(f,Ll({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":p.formatDT(`${t.title} ${E.label}`)}),{append:Pe(()=>[je(h,{class:"menu-button-icon"},{default:Pe(()=>[...e[0]||(e[0]=[Rt(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:Pe(()=>[je(c,null,{default:Pe(()=>[(ot(!0),rn(ci,null,vo(E.items,(k,C)=>(ot(),rn(ci,null,[k.divider?(ot(),Kt(s,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(ot(),rn("div",{key:C+"-submenu"},[(ot(),Kt(i,{"open-on-hover":"",location:"right",key:C},{activator:Pe(({props:R})=>[(ot(),Kt(u,Ll({ref_for:!0},R,{disabled:k.disabled,key:C}),Au({append:Pe(()=>[je(h,null,{default:Pe(()=>[...e[1]||(e[1]=[Rt(" mdi-chevron-right ",-1)])]),_:1})]),default:Pe(()=>[!k.radio&&!k.checkbox?(ot(),Kt(a,{key:0,style:Cs("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Pe(()=>[Rt(Cn(k.label),1)]),_:2},1032,["style"])):Kr("",!0)]),_:2},[k.icon?{name:"prepend",fn:Pe(()=>[je(h,{disabled:k.disabled},{default:Pe(()=>[Rt(Cn(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Pe(()=>[je(c,null,{default:Pe(()=>[(ot(!0),rn(ci,null,vo(k.subMenu,(R,D)=>(ot(),Kt(u,{key:D,"prepend-icon":R.icon,onClick:L=>p.subMenuClick(R)},{default:Pe(()=>[je(a,null,{default:Pe(()=>[Rt(Cn(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(ot(),Kt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Pe(()=>[(ot(!0),rn(ci,null,vo(k.choices,(R,D)=>(ot(),Kt(u,{key:D+"-choice"},{default:Pe(()=>[je(m,{class:"list-action"},{default:Pe(()=>[je(l,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(ot(),Kt(u,{onClick:R=>k.command(k),disabled:k.disabled,"data-test":p.formatDT(`${t.title} ${E.label} ${k.label}`),key:C+"-list"},Au({default:Pe(()=>[k.checkbox?(ot(),Kt(m,{key:0,class:"list-action"},{default:Pe(()=>[je(x,{modelValue:k.checked,"onUpdate:modelValue":R=>k.checked=R,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Kr("",!0),!k.radio&&!k.checkbox?(ot(),Kt(a,{key:1,style:Cs("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Pe(()=>[Rt(Cn(k.label),1)]),_:2},1032,["style"])):Kr("",!0)]),_:2},[k.icon?{name:"prepend",fn:Pe(()=>[je(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 l$=to(o$,[["render",a$],["__scopeId","data-v-4d454b93"]]);function uy(n,e){return function(){return n.apply(e,arguments)}}const{toString:c$}=Object.prototype,{getPrototypeOf:hd}=Object,{iterator:yc,toStringTag:hy}=Symbol,bc=(n=>e=>{const t=c$.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ao=n=>(n=n.toLowerCase(),e=>bc(e)===n),wc=n=>e=>typeof e===n,{isArray:Ca}=Array,ka=wc("undefined");function ol(n){return n!==null&&!ka(n)&&n.constructor!==null&&!ka(n.constructor)&&di(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const dy=ao("ArrayBuffer");function u$(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&dy(n.buffer),e}const h$=wc("string"),di=wc("function"),py=wc("number"),sl=n=>n!==null&&typeof n=="object",d$=n=>n===!0||n===!1,xc=n=>{if(bc(n)!=="object")return!1;const e=hd(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hy in n)&&!(yc in n)},p$=n=>{if(!sl(n)||ol(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},f$=ao("Date"),g$=ao("File"),m$=ao("Blob"),v$=ao("FileList"),y$=n=>sl(n)&&di(n.pipe),b$=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||di(n.append)&&((e=bc(n))==="formdata"||e==="object"&&di(n.toString)&&n.toString()==="[object FormData]"))},w$=ao("URLSearchParams"),[x$,C$,k$,A$]=["ReadableStream","Request","Response","Headers"].map(ao),S$=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function al(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),Ca(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{if(ol(n))return;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 fy(n,e){if(ol(n))return null;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 Ps=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gy=n=>!ka(n)&&n!==Ps;function dd(){const{caseless:n,skipUndefined:e}=gy(this)&&this||{},t={},r=(d,p)=>{const g=n&&fy(t,p)||p;xc(t[g])&&xc(d)?t[g]=dd(t[g],d):xc(d)?t[g]=dd({},d):Ca(d)?t[g]=d.slice():(!e||!ka(d))&&(t[g]=d)};for(let d=0,p=arguments.length;d<p;d++)arguments[d]&&al(arguments[d],r);return t}const _$=(n,e,t,{allOwnKeys:r}={})=>(al(e,(d,p)=>{t&&di(d)?n[p]=uy(d,t):n[p]=d},{allOwnKeys:r}),n),$$=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),T$=(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)},M$=(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&&hd(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},E$=(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},I$=n=>{if(!n)return null;if(Ca(n))return n;let e=n.length;if(!py(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},R$=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&hd(Uint8Array)),L$=(n,e)=>{const t=(n&&n[yc]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},O$=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},N$=ao("HTMLFormElement"),D$=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),my=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),F$=ao("RegExp"),vy=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};al(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},P$=n=>{vy(n,(e,t)=>{if(di(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(di(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+"'")})}})},W$=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return Ca(n)?r(n):r(String(n).split(e)),t},B$=()=>{},H$=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function z$(n){return!!(n&&di(n.append)&&n[hy]==="FormData"&&n[yc])}const j$=n=>{const e=new Array(10),t=(r,d)=>{if(sl(r)){if(e.indexOf(r)>=0)return;if(ol(r))return r;if(!("toJSON"in r)){e[d]=r;const p=Ca(r)?[]:{};return al(r,(g,b)=>{const h=t(g,d+1);!ka(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},U$=ao("AsyncFunction"),V$=n=>n&&(sl(n)||di(n))&&di(n.then)&&di(n.catch),yy=((n,e)=>n?setImmediate:e?((t,r)=>(Ps.addEventListener("message",({source:d,data:p})=>{d===Ps&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),Ps.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",di(Ps.postMessage)),q$=typeof queueMicrotask<"u"?queueMicrotask.bind(Ps):typeof process<"u"&&process.nextTick||yy,K$=n=>n!=null&&di(n[yc]),Se={isArray:Ca,isArrayBuffer:dy,isBuffer:ol,isFormData:b$,isArrayBufferView:u$,isString:h$,isNumber:py,isBoolean:d$,isObject:sl,isPlainObject:xc,isEmptyObject:p$,isReadableStream:x$,isRequest:C$,isResponse:k$,isHeaders:A$,isUndefined:ka,isDate:f$,isFile:g$,isBlob:m$,isRegExp:F$,isFunction:di,isStream:y$,isURLSearchParams:w$,isTypedArray:R$,isFileList:v$,forEach:al,merge:dd,extend:_$,trim:S$,stripBOM:$$,inherits:T$,toFlatObject:M$,kindOf:bc,kindOfTest:ao,endsWith:E$,toArray:I$,forEachEntry:L$,matchAll:O$,isHTMLForm:N$,hasOwnProperty:my,hasOwnProp:my,reduceDescriptors:vy,freezeMethods:P$,toObjectSet:W$,toCamelCase:D$,noop:B$,toFiniteNumber:H$,findKey:fy,global:Ps,isContextDefined:gy,isSpecCompliantForm:z$,toJSONObject:j$,isAsyncFn:U$,isThenable:V$,setImmediate:yy,asap:q$,isIterable:K$};function $t(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)}Se.inherits($t,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:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const by=$t.prototype,wy={};["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=>{wy[n]={value:n}}),Object.defineProperties($t,wy),Object.defineProperty(by,"isAxiosError",{value:!0}),$t.from=(n,e,t,r,d,p)=>{const g=Object.create(by);Se.toFlatObject(n,g,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=e==null&&n?n.code:e;return $t.call(g,b,h,t,r,d),n&&g.cause==null&&Object.defineProperty(g,"cause",{value:n,configurable:!0}),g.name=n&&n.name||"Error",p&&Object.assign(g,p),g};const G$=null;function pd(n){return Se.isPlainObject(n)||Se.isArray(n)}function xy(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Cy(n,e,t){return n?n.concat(e).map(function(r,d){return r=xy(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function Y$(n){return Se.isArray(n)&&!n.some(pd)}const X$=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function Cc(n,e,t){if(!Se.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Se.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,i){return!Se.isUndefined(i[c])});const r=t.metaTokens,d=t.visitor||f,p=t.dots,g=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(d))throw new TypeError("visitor must be a function");function h(c){if(c===null)return"";if(Se.isDate(c))return c.toISOString();if(Se.isBoolean(c))return c.toString();if(!b&&Se.isBlob(c))throw new $t("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(c)||Se.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function f(c,i,l){let m=c;if(c&&!l&&typeof c=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),c=JSON.stringify(c);else if(Se.isArray(c)&&Y$(c)||(Se.isFileList(c)||Se.endsWith(i,"[]"))&&(m=Se.toArray(c)))return i=xy(i),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(g===!0?Cy([i],x,p):g===null?i:i+"[]",h(w))}),!1}return pd(c)?!0:(e.append(Cy(l,i,p),h(c)),!1)}const s=[],a=Object.assign(X$,{defaultVisitor:f,convertValue:h,isVisitable:pd});function u(c,i){if(!Se.isUndefined(c)){if(s.indexOf(c)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(c),Se.forEach(c,function(l,m){(!(Se.isUndefined(l)||l===null)&&d.call(e,l,Se.isString(m)?m.trim():m,i,a))===!0&&u(l,i?i.concat(m):[m])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),e}function ky(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function fd(n,e){this._pairs=[],n&&Cc(n,this,e)}const Ay=fd.prototype;Ay.append=function(n,e){this._pairs.push([n,e])},Ay.toString=function(n){const e=n?function(t){return n.call(this,t,ky)}:ky;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function Q$(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Sy(n,e,t){if(!e)return n;const r=t&&t.encode||Q$;Se.isFunction(t)&&(t={serialize:t});const d=t&&t.serialize;let p;if(d?p=d(e,t):p=Se.isURLSearchParams(e)?e.toString():new fd(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}let _y=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){Se.forEach(this.handlers,function(t){t!==null&&e(t)})}};const $y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z$=typeof URLSearchParams<"u"?URLSearchParams:fd,J$=typeof FormData<"u"?FormData:null,eT=typeof Blob<"u"?Blob:null,tT={isBrowser:!0,classes:{URLSearchParams:Z$,FormData:J$,Blob:eT},protocols:["http","https","file","blob","url","data"]},gd=typeof window<"u"&&typeof document<"u",md=typeof navigator=="object"&&navigator||void 0,nT=gd&&(!md||["ReactNative","NativeScript","NS"].indexOf(md.product)<0),rT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iT=gd&&window.location.href||"http://localhost",oT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gd,hasStandardBrowserEnv:nT,hasStandardBrowserWebWorkerEnv:rT,navigator:md,origin:iT},Symbol.toStringTag,{value:"Module"})),Br={...oT,...tT};function sT(n,e){return Cc(n,new Br.classes.URLSearchParams,{visitor:function(t,r,d,p){return Br.isNode&&Se.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function aT(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function lT(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 Ty(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&&Se.isArray(d)?d.length:g,h?(Se.hasOwnProp(d,g)?d[g]=[d[g],r]:d[g]=r,!b):((!d[g]||!Se.isObject(d[g]))&&(d[g]=[]),e(t,r,d[g],p)&&Se.isArray(d[g])&&(d[g]=lT(d[g])),!b)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const t={};return Se.forEachEntry(n,(r,d)=>{e(aT(r),d,t,0)}),t}return null}function cT(n,e,t){if(Se.isString(n))try{return(e||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const ll={transitional:$y,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,d=Se.isObject(n);if(d&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(Ty(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.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 sT(n,this.formSerializer).toString();if((p=Se.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return Cc(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),cT(n)):n}],transformResponse:[function(n){const e=this.transitional||ll.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(t&&!this.responseType||r)){const d=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(p){if(d)throw p.name==="SyntaxError"?$t.from(p,$t.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:Br.classes.FormData,Blob:Br.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{ll.headers[n]={}});const uT=Se.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"]),hT=n=>{const e={};let t,r,d;return n&&n.split(`
|
|
1491
|
+
`).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&uT[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},My=Symbol("internals");function cl(n){return n&&String(n).trim().toLowerCase()}function kc(n){return n===!1||n==null?n:Se.isArray(n)?n.map(kc):String(n)}function dT(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 pT=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function vd(n,e,t,r,d){if(Se.isFunction(r))return r.call(this,e,t);if(d&&(e=t),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function fT(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function gT(n,e){const t=Se.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 pi=class{constructor(e){e&&this.set(e)}set(e,t,r){const d=this;function p(b,h,f){const s=cl(h);if(!s)throw new Error("header name must be a non-empty string");const a=Se.findKey(d,s);(!a||d[a]===void 0||f===!0||f===void 0&&d[a]!==!1)&&(d[a||h]=kc(b))}const g=(b,h)=>Se.forEach(b,(f,s)=>p(f,s,h));if(Se.isPlainObject(e)||e instanceof this.constructor)g(e,t);else if(Se.isString(e)&&(e=e.trim())&&!pT(e))g(hT(e),t);else if(Se.isObject(e)&&Se.isIterable(e)){let b={},h,f;for(const s of e){if(!Se.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[f=s[0]]=(h=b[f])?Se.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}g(b,t)}else e!=null&&p(t,e,r);return this}get(e,t){if(e=cl(e),e){const r=Se.findKey(this,e);if(r){const d=this[r];if(!t)return d;if(t===!0)return dT(d);if(Se.isFunction(t))return t.call(this,d,r);if(Se.isRegExp(t))return t.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=cl(e),e){const r=Se.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||vd(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let d=!1;function p(g){if(g=cl(g),g){const b=Se.findKey(r,g);b&&(!t||vd(r,r[b],b,t))&&(delete r[b],d=!0)}}return Se.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||vd(this,this[p],p,e,!0))&&(delete this[p],d=!0)}return d}normalize(e){const t=this,r={};return Se.forEach(this,(d,p)=>{const g=Se.findKey(r,p);if(g){t[g]=kc(d),delete t[p];return}const b=e?fT(p):String(p).trim();b!==p&&delete t[p],t[b]=kc(d),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Se.forEach(this,(r,d)=>{r!=null&&r!==!1&&(t[d]=e&&Se.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(`
|
|
1492
|
+
`)}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[My]=this[My]={accessors:{}}).accessors,r=this.prototype;function d(p){const g=cl(p);t[g]||(gT(r,p),t[g]=!0)}return Se.isArray(e)?e.forEach(d):d(e),this}};pi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(pi.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Se.freezeMethods(pi);function yd(n,e){const t=this||ll,r=e||t,d=pi.from(r.headers);let p=r.data;return Se.forEach(n,function(g){p=g.call(t,p,d.normalize(),e?e.status:void 0)}),d.normalize(),p}function Ey(n){return!!(n&&n.__CANCEL__)}function Aa(n,e,t){$t.call(this,n??"canceled",$t.ERR_CANCELED,e,t),this.name="CanceledError"}Se.inherits(Aa,$t,{__CANCEL__:!0});function Iy(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new $t("Request failed with status code "+t.status,[$t.ERR_BAD_REQUEST,$t.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function mT(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function vT(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 s=p,a=0;for(;s!==d;)a+=t[s++],s=s%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const u=f&&h-f;return u?Math.round(a*1e3/u):void 0}}function yT(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(...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 Ac=(n,e,t=3)=>{let r=0;const d=vT(50,250);return yT(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),s=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&&s?(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]]},Ly=n=>(...e)=>Se.asap(()=>n(...e)),bT=Br.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Br.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Br.origin),Br.navigator&&/(msie|trident)/i.test(Br.navigator.userAgent)):()=>!0,wT=Br.hasStandardBrowserEnv?{write(n,e,t,r,d,p,g){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];Se.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),Se.isString(r)&&b.push(`path=${r}`),Se.isString(d)&&b.push(`domain=${d}`),p===!0&&b.push("secure"),Se.isString(g)&&b.push(`SameSite=${g}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xT(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function CT(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Oy(n,e,t){let r=!xT(e);return n&&(r||t==!1)?CT(n,e):e}const Ny=n=>n instanceof pi?{...n}:n;function Ws(n,e){e=e||{};const t={};function r(f,s,a,u){return Se.isPlainObject(f)&&Se.isPlainObject(s)?Se.merge.call({caseless:u},f,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function d(f,s,a,u){if(Se.isUndefined(s)){if(!Se.isUndefined(f))return r(void 0,f,a,u)}else return r(f,s,a,u)}function p(f,s){if(!Se.isUndefined(s))return r(void 0,s)}function g(f,s){if(Se.isUndefined(s)){if(!Se.isUndefined(f))return r(void 0,f)}else return r(void 0,s)}function b(f,s,a){if(a in e)return r(f,s);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,s,a)=>d(Ny(f),Ny(s),a,!0)};return Se.forEach(Object.keys({...n,...e}),function(f){const s=h[f]||d,a=s(n[f],e[f],f);Se.isUndefined(a)&&s!==b||(t[f]=a)}),t}const Dy=n=>{const e=Ws({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;if(e.headers=g=pi.from(g),e.url=Sy(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)):""))),Se.isFormData(t)){if(Br.hasStandardBrowserEnv||Br.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(Se.isFunction(t.getHeaders)){const h=t.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&g.set(s,a)})}}if(Br.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&bT(e.url))){const h=d&&p&&wT.read(p);h&&g.set(d,h)}return e},kT=typeof XMLHttpRequest<"u",AT=kT&&function(n){return new Promise(function(e,t){const r=Dy(n);let d=r.data;const p=pi.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,u,c;function i(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const x=pi.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:n,request:l};Iy(function(_){e(_),i()},function(_){t(_),i()},E),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(t(new $t("Request aborted",$t.ECONNABORTED,n,l)),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",_=new $t(E,$t.ERR_NETWORK,n,l);_.event=x||null,t(_),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||$y;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new $t(x,E.clarifyTimeoutError?$t.ETIMEDOUT:$t.ECONNABORTED,n,l)),l=null},d===void 0&&p.setContentType(null),"setRequestHeader"in l&&Se.forEach(p.toJSON(),function(x,E){l.setRequestHeader(E,x)}),Se.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),g&&g!=="json"&&(l.responseType=r.responseType),h&&([a,c]=Ac(h,!0),l.addEventListener("progress",a)),b&&l.upload&&([s,u]=Ac(b),l.upload.addEventListener("progress",s),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(f=x=>{l&&(t(!x||x.type?new Aa(null,n,l):x),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=mT(r.url);if(w&&Br.protocols.indexOf(w)===-1){t(new $t("Unsupported protocol "+w+":",$t.ERR_BAD_REQUEST,n));return}l.send(d||null)})},ST=(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 s=f instanceof Error?f:this.reason;r.abort(s instanceof $t?s:new Aa(s instanceof Error?s.message:s))}};let g=e&&setTimeout(()=>{g=null,p(new $t(`timeout ${e} of ms exceeded`,$t.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=()=>Se.asap(b),h}},_T=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},$T=async function*(n,e){for await(const t of TT(n))yield*_T(t,e)},TT=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()}},Fy=(n,e,t,r)=>{const d=$T(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:s}=await d.next();if(f){b(),h.close();return}let a=s.byteLength;if(t){let u=p+=a;t(u)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},Py=64*1024,{isFunction:Sc}=Se,MT=(({Request:n,Response:e})=>({Request:n,Response:e}))(Se.global),{ReadableStream:Wy,TextEncoder:By}=Se.global,Hy=(n,...e)=>{try{return!!n(...e)}catch{return!1}},ET=n=>{n=Se.merge.call({skipUndefined:!0},MT,n);const{fetch:e,Request:t,Response:r}=n,d=e?Sc(e):typeof fetch=="function",p=Sc(t),g=Sc(r);if(!d)return!1;const b=d&&Sc(Wy),h=d&&(typeof By=="function"?(i=>l=>i.encode(l))(new By):async i=>new Uint8Array(await new t(i).arrayBuffer())),f=p&&b&&Hy(()=>{let i=!1;const l=new t(Br.origin,{body:new Wy,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!l}),s=g&&b&&Hy(()=>Se.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(l,m)=>{let w=l&&l[i];if(w)return w.call(l);throw new $t(`Response type '${i}' is not supported`,$t.ERR_NOT_SUPPORT,m)})});const u=async i=>{if(i==null)return 0;if(Se.isBlob(i))return i.size;if(Se.isSpecCompliantForm(i))return(await new t(Br.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(i)||Se.isArrayBuffer(i))return i.byteLength;if(Se.isURLSearchParams(i)&&(i=i+""),Se.isString(i))return(await h(i)).byteLength},c=async(i,l)=>Se.toFiniteNumber(i.getContentLength())??u(l);return async i=>{let{url:l,method:m,data:w,signal:x,cancelToken:E,timeout:_,onDownloadProgress:k,onUploadProgress:C,responseType:R,headers:D,withCredentials:L="same-origin",fetchOptions:I}=Dy(i),H=e||fetch;R=R?(R+"").toLowerCase():"text";let P=ST([x,E&&E.toAbortSignal()],_),O=null;const $=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let A;try{if(C&&f&&m!=="get"&&m!=="head"&&(A=await c(D,w))!==0){let J=new t(l,{method:"POST",body:w,duplex:"half"}),he;if(Se.isFormData(w)&&(he=J.headers.get("content-type"))&&D.setContentType(he),J.body){const[ne,le]=Ry(A,Ac(Ly(C)));w=Fy(J.body,Py,ne,le)}}Se.isString(L)||(L=L?"include":"omit");const N=p&&"credentials"in t.prototype,B={...I,signal:P,method:m.toUpperCase(),headers:D.normalize().toJSON(),body:w,duplex:"half",credentials:N?L:void 0};O=p&&new t(l,B);let U=await(p?H(O,I):H(l,B));const K=s&&(R==="stream"||R==="response");if(s&&(k||K&&$)){const J={};["status","statusText","headers"].forEach(se=>{J[se]=U[se]});const he=Se.toFiniteNumber(U.headers.get("content-length")),[ne,le]=k&&Ry(he,Ac(Ly(k),!0))||[];U=new r(Fy(U.body,Py,ne,()=>{le&&le(),$&&$()}),J)}R=R||"text";let Z=await a[Se.findKey(a,R)||"text"](U,i);return!K&&$&&$(),await new Promise((J,he)=>{Iy(J,he,{data:Z,headers:pi.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:O})})}catch(N){throw $&&$(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new $t("Network Error",$t.ERR_NETWORK,i,O),{cause:N.cause||N}):$t.from(N,N&&N.code,i,O)}}},IT=new Map,zy=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:d}=e,p=[r,d,t];let g=p.length,b=g,h,f,s=IT;for(;b--;)h=p[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:ET(e)),s=f;return f};zy();const bd={http:G$,xhr:AT,fetch:{get:zy}};Se.forEach(bd,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const jy=n=>`- ${n}`,RT=n=>Se.isFunction(n)||n===null||n===!1;function LT(n,e){n=Se.isArray(n)?n:[n];const{length:t}=n;let r,d;const p={};for(let g=0;g<t;g++){r=n[g];let b;if(d=r,!RT(r)&&(d=bd[(b=String(r)).toLowerCase()],d===void 0))throw new $t(`Unknown adapter '${b}'`);if(d&&(Se.isFunction(d)||(d=d.get(e))))break;p[b||"#"+g]=d}if(!d){const g=Object.entries(p).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=t?g.length>1?`since :
|
|
1493
|
+
`+g.map(jy).join(`
|
|
1494
|
+
`):" "+jy(g[0]):"as no adapter specified";throw new $t("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return d}const Uy={getAdapter:LT,adapters:bd};function wd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Aa(null,n)}function Vy(n){return wd(n),n.headers=pi.from(n.headers),n.data=yd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Uy.getAdapter(n.adapter||ll.adapter,n)(n).then(function(e){return wd(n),e.data=yd.call(n,n.transformResponse,e),e.headers=pi.from(e.headers),e},function(e){return Ey(e)||(wd(n),e&&e.response&&(e.response.data=yd.call(n,n.transformResponse,e.response),e.response.headers=pi.from(e.response.headers))),Promise.reject(e)})}const qy="1.13.1",_c={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{_c[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Ky={};_c.transitional=function(n,e,t){function r(d,p){return"[Axios v"+qy+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new $t(r(p," has been removed"+(e?" in "+e:"")),$t.ERR_DEPRECATED);return e&&!Ky[p]&&(Ky[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}},_c.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function OT(n,e,t){if(typeof n!="object")throw new $t("options must be an object",$t.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 $t("option "+p+" must be "+h,$t.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new $t("Unknown option "+p,$t.ERR_BAD_OPTION)}}const $c={assertOptions:OT,validators:_c},wo=$c.validators;let Bs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new _y,response:new _y}}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+=`
|
|
1495
|
+
`+p):r.stack=p}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ws(this.defaults,t);const{transitional:r,paramsSerializer:d,headers:p}=t;r!==void 0&&$c.assertOptions(r,{silentJSONParsing:wo.transitional(wo.boolean),forcedJSONParsing:wo.transitional(wo.boolean),clarifyTimeoutError:wo.transitional(wo.boolean)},!1),d!=null&&(Se.isFunction(d)?t.paramsSerializer={serialize:d}:$c.assertOptions(d,{encode:wo.function,serialize:wo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),$c.assertOptions(t,{baseUrl:wo.spelling("baseURL"),withXsrfToken:wo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=p&&Se.merge(p.common,p[t.method]);p&&Se.forEach(["delete","get","head","post","put","patch","common"],i=>{delete p[i]}),t.headers=pi.concat(g,p);const b=[];let h=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(t)===!1||(h=h&&i.synchronous,b.unshift(i.fulfilled,i.rejected))});const f=[];this.interceptors.response.forEach(function(i){f.push(i.fulfilled,i.rejected)});let s,a=0,u;if(!h){const i=[Vy.bind(this),void 0];for(i.unshift(...b),i.push(...f),u=i.length,s=Promise.resolve(t);a<u;)s=s.then(i[a++],i[a++]);return s}u=b.length;let c=t;for(;a<u;){const i=b[a++],l=b[a++];try{c=i(c)}catch(m){l.call(this,m);break}}try{s=Vy.call(this,c)}catch(i){return Promise.reject(i)}for(a=0,u=f.length;a<u;)s=s.then(f[a++],f[a++]);return s}getUri(e){e=Ws(this.defaults,e);const t=Oy(e.baseURL,e.url,e.allowAbsoluteUrls);return Sy(t,e.params,e.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){Bs.prototype[n]=function(e,t){return this.request(Ws(t||{},{method:n,url:e,data:(t||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function e(t){return function(r,d,p){return this.request(Ws(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Bs.prototype[n]=e(),Bs.prototype[n+"Form"]=e(!0)});let NT=class sx{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 Aa(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 sx(function(t){e=t}),cancel:e}}};function DT(n){return function(e){return n.apply(null,e)}}function FT(n){return Se.isObject(n)&&n.isAxiosError===!0}const xd={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xd).forEach(([n,e])=>{xd[e]=n});function Gy(n){const e=new Bs(n),t=uy(Bs.prototype.request,e);return Se.extend(t,Bs.prototype,e,{allOwnKeys:!0}),Se.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Gy(Ws(n,r))},t}const tr=pr("w",Gy(ll));tr.Axios=Bs,tr.CanceledError=Aa,tr.CancelToken=NT,tr.isCancel=Ey,tr.VERSION=qy,tr.toFormData=Cc,tr.AxiosError=$t,tr.Cancel=tr.CanceledError,tr.all=function(n){return Promise.all(n)},tr.spread=DT,tr.isAxiosError=FT,tr.mergeConfig=Ws,tr.AxiosHeaders=pi,tr.formToJSON=n=>Ty(Se.isHTMLForm(n)?new FormData(n):n),tr.getAdapter=Uy.getAdapter,tr.HttpStatusCode=xd,tr.default=tr;const{Axios:hP,AxiosError:dP,CanceledError:pP,isCancel:fP,CancelToken:gP,VERSION:mP,all:vP,Cancel:yP,isAxiosError:bP,spread:wP,toFormData:xP,AxiosHeaders:CP,HttpStatusCode:kP,formToJSON:AP,getAdapter:SP,mergeConfig:_P}=tr;function Yy(){return Object.assign({},oa())}function PT(n,e,t){const r=In(n,void 0);return r.setTime(r.getTime()+e*Nl),r}function WT(n,e){const t=()=>lr(void 0,NaN),r=jT(n);let d;if(r.date){const h=UT(r.date,2);d=VT(h.restDateString,h.year)}if(!d||isNaN(+d))return t();const p=+d;let g=0,b;if(r.time&&(g=qT(r.time),isNaN(g)))return t();if(r.timezone){if(b=KT(r.timezone),isNaN(b))return t()}else{const h=new Date(p+g),f=In(0,void 0);return f.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),f.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),f}return In(p+g+b,void 0)}const Tc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},BT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,HT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,zT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function jT(n){const e={},t=n.split(Tc.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],Tc.timeZoneDelimiter.test(e.date)&&(e.date=n.split(Tc.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const d=Tc.timezone.exec(r);d?(e.time=r.replace(d[1],""),e.timezone=d[1]):e.time=r}return e}function UT(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 VT(n,e){if(e===null)return new Date(NaN);const t=n.match(BT);if(!t)return new Date(NaN);const r=!!t[4],d=ul(t[1]),p=ul(t[2])-1,g=ul(t[3]),b=ul(t[4]),h=ul(t[5])-1;if(r)return ZT(e,b,h)?GT(e,b,h):new Date(NaN);{const f=new Date(0);return!XT(e,p,g)||!QT(e,d)?new Date(NaN):(f.setUTCFullYear(e,p,Math.max(d,g)),f)}}function ul(n){return n?parseInt(n):1}function qT(n){const e=n.match(HT);if(!e)return NaN;const t=Cd(e[1]),r=Cd(e[2]),d=Cd(e[3]);return JT(t,r,d)?t*Mu+r*Nl+d*1e3:NaN}function Cd(n){return n&&parseFloat(n.replace(",","."))||0}function KT(n){if(n==="Z")return 0;const e=n.match(zT);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),d=e[3]&&parseInt(e[3])||0;return eM(r,d)?t*(r*Mu+d*Nl):NaN}function GT(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 YT=[31,null,31,30,31,30,31,31,30,31,30,31];function Xy(n){return n%400===0||n%4===0&&n%100!==0}function XT(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(YT[e]||(Xy(n)?29:28))}function QT(n,e){return e>=1&&e<=(Xy(n)?366:365)}function ZT(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function JT(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function eM(n,e){return e>=0&&e<=59}function tM(n,e,t){return PT(n,-e)}function Qy(n,e,t){const r=Yy(),d=iM(n,t.timeZone,t.locale??r.locale);return"formatToParts"in d?nM(d,e):rM(d,e)}function nM(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 rM(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function iM(n,e,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:e,timeZoneName:n})}function oM(n,e){const t=uM(e);return"formatToParts"in t?aM(t,n):lM(t,n)}const sM={year:0,month:1,day:2,hour:3,minute:4,second:5};function aM(n,e){try{const t=n.formatToParts(e),r=[];for(let d=0;d<t.length;d++){const p=sM[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 lM(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 kd={},Zy=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")),cM=Zy==="06/25/2014, 00:00:00"||Zy==="06/25/2014 00:00:00";function uM(n){return kd[n]||(kd[n]=cM?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"})),kd[n]}function Jy(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 eb=36e5,hM=6e4,Ad={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Sd(n,e,t){if(!n)return 0;let r=Ad.timezoneZ.exec(n);if(r)return 0;let d,p;if(r=Ad.timezoneHH.exec(n),r)return d=parseInt(r[1],10),tb(d)?-(d*eb):NaN;if(r=Ad.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const g=parseInt(r[3],10);return tb(d,g)?(p=Math.abs(d)*eb+g*hM,r[1]==="+"?-p:p):NaN}if(fM(n)){e=new Date(e||Date.now());const g=t?e:dM(e),b=_d(g,n);return-(t?b:pM(e,b,n))}return NaN}function dM(n){return Jy(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function _d(n,e){const t=oM(n,e),r=Jy(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 pM(n,e,t){let r=n.getTime()-e;const d=_d(new Date(r),t);if(e===d)return e;r-=d-e;const p=_d(new Date(r),t);return d===p?d:Math.max(d,p)}function tb(n,e){return-23<=n&&n<=23&&(e==null||0<=e&&e<=59)}const nb={};function fM(n){if(nb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),nb[n]=!0,!0}catch{return!1}}const gM=60*1e3,mM={X:function(n,e,t){const r=$d(t.timeZone,n);if(r===0)return"Z";switch(e){case"X":return rb(r);case"XXXX":case"XX":return Sa(r);case"XXXXX":case"XXX":default:return Sa(r,":")}},x:function(n,e,t){const r=$d(t.timeZone,n);switch(e){case"x":return rb(r);case"xxxx":case"xx":return Sa(r);case"xxxxx":case"xxx":default:return Sa(r,":")}},O:function(n,e,t){const r=$d(t.timeZone,n);switch(e){case"O":case"OO":case"OOO":return"GMT"+vM(r,":");case"OOOO":default:return"GMT"+Sa(r,":")}},z:function(n,e,t){switch(e){case"z":case"zz":case"zzz":return Qy("short",n,t);case"zzzz":default:return Qy("long",n,t)}}};function $d(n,e){const t=n?Sd(n,e,!0)/gM:(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 Sa(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 rb(n,e){return n%60===0?(n>0?"-":"+")+Mc(Math.abs(n)/60,2):Sa(n,e)}function vM(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 ib(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 yM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Td=36e5,ob=6e4,bM=2,Yr={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:yM};function sb(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?bM: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=wM(n),{year:d,restDateString:p}=xM(r.date,t),g=CM(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=kM(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(f=Sd(r.timeZone||e.timeZone,new Date(b+h)),isNaN(f))return new Date(NaN)}else f=ib(new Date(b+h)),f=ib(new Date(b+h+f));return new Date(b+h+f)}else return new Date(NaN)}function wM(n){const e={};let t=Yr.dateTimePattern.exec(n),r;if(t?(e.date=t[1],r=t[3]):(t=Yr.datePattern.exec(n),t?(e.date=t[1],r=t[2]):(e.date=null,r=n)),r){const d=Yr.timeZone.exec(r);d?(e.time=r.replace(d[1],""),e.timeZone=d[1].trim()):e.time=r}return e}function xM(n,e){if(n){const t=Yr.YYY[e],r=Yr.YYYYY[e];let d=Yr.YYYY.exec(n)||r.exec(n);if(d){const p=d[1];return{year:parseInt(p,10),restDateString:n.slice(p.length)}}if(d=Yr.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 CM(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=Yr.MM.exec(n);if(p)return t=new Date(0),r=parseInt(p[1],10)-1,cb(e,r)?(t.setUTCFullYear(e,r),t):new Date(NaN);if(p=Yr.DDD.exec(n),p){t=new Date(0);const g=parseInt(p[1],10);return _M(e,g)?(t.setUTCFullYear(e,0,g),t):new Date(NaN)}if(p=Yr.MMDD.exec(n),p){t=new Date(0),r=parseInt(p[1],10)-1;const g=parseInt(p[2],10);return cb(e,r,g)?(t.setUTCFullYear(e,r,g),t):new Date(NaN)}if(p=Yr.Www.exec(n),p)return d=parseInt(p[1],10)-1,ub(d)?ab(e,d):new Date(NaN);if(p=Yr.WwwD.exec(n),p){d=parseInt(p[1],10)-1;const g=parseInt(p[2],10)-1;return ub(d,g)?ab(e,d,g):new Date(NaN)}return null}function kM(n){let e,t,r=Yr.HH.exec(n);if(r)return e=parseFloat(r[1].replace(",",".")),Md(e)?e%24*Td:NaN;if(r=Yr.HHMM.exec(n),r)return e=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),Md(e,t)?e%24*Td+t*ob:NaN;if(r=Yr.HHMMSS.exec(n),r){e=parseInt(r[1],10),t=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return Md(e,t,d)?e%24*Td+t*ob+d*1e3:NaN}return null}function ab(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 AM=[31,28,31,30,31,30,31,31,30,31,30,31],SM=[31,29,31,30,31,30,31,31,30,31,30,31];function lb(n){return n%400===0||n%4===0&&n%100!==0}function cb(n,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const r=lb(n);if(r&&t>SM[e]||!r&&t>AM[e])return!1}return!0}function _M(n,e){if(e<1)return!1;const t=lb(n);return!(t&&e>366||!t&&e>365)}function ub(n,e){return!(n<0||n>52||e!=null&&(e<0||e>6))}function Md(n,e,t){return!(n<0||n>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}const $M=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function TM(n,e,t={}){e=String(e);const r=e.match($M);if(r){const d=sb(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,"'"+mM[g[0]](d,g,t)+"'");return h?f.substring(0,b-1)+f.substring(b+1):f},e)}return ts(n,e,t)}function MM(n,e,t){n=sb(n,t);const r=Sd(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 Ec(n,e,t,r){return r={...r,timeZone:e,originalDate:n},TM(MM(n,e,{timeZone:r.timeZone}),t,r)}const Ic="yyyy-MM-dd",hb="HH:mm:ss.SSS",db="HH:mm:ss",Rc=`${Ic} ${hb}`,pb=`${Ic} ${db}`,$P=pr("R",{methods:{parseDateTime(n,e){return n.includes(" ")&&(n=n.replace(" ","T")),e&&e==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,e){return ts(!e||e==="local"?tM(n,n.getTimezoneOffset()):n,Rc)},formatDateTime(n,e){return!e||e==="local"?ts(n,Rc):Ec(n,e,Rc)},formatDateTimeHMS(n,e){return!e||e==="local"?ts(n,pb):Ec(n,e,pb)},formatDate:function(n,e){return!e||e==="local"?ts(n,Ic):Ec(n,this.timeZone,Ic)},formatTime:function(n,e,t=hb){return!e||e==="local"?ts(n,t):Ec(n,this.timeZone,t)},formatTimeHMS:function(n,e){return this.formatTime(n,e,db)},formatTimestamp(n,e){return this.formatDateTime(WT(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 EM=Object.defineProperty,IM=(n,e,t)=>e in n?EM(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,it=(n,e,t)=>IM(n,typeof e!="symbol"?e+"":e,t);function Ed(n,e,t){const r=In(n,t==null?void 0:t.in);return isNaN(e)?lr((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function RM(n,e){const t=In(n,void 0).getDay();return t===0?7:t}function LM(n,e){const t=OM(e)?new e(0):lr(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function OM(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const NM=10;let fb=class{constructor(){it(this,"subPriority",0)}validate(e,t){return!0}},DM=class extends fb{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)}},FM=class extends fb{constructor(e,t){super(),it(this,"priority",NM),it(this,"subPriority",-1),this.context=e||(r=>lr(t,r))}set(e,t){return t.timestampIsSet?e:lr(e,LM(e,this.context))}};class sn{run(e,t,r,d){const p=this.parse(e,t,r,d);return p?{setter:new DM(p.value,this.validate,this.set,this.priority,this.subPriority),rest:p.rest}:null}validate(e,t,r){return!0}}let PM=class extends sn{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 nr={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}/},xo={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 rr(n,e){return n&&{value:e(n.value),rest:n.rest}}function Pn(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function Co(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*Mu+p*Nl+g*Ax),rest:e.slice(t[0].length)}}function gb(n){return Pn(nr.anyDigitsSigned,n)}function Un(n,e){switch(n){case 1:return Pn(nr.singleDigit,e);case 2:return Pn(nr.twoDigits,e);case 3:return Pn(nr.threeDigits,e);case 4:return Pn(nr.fourDigits,e);default:return Pn(new RegExp("^\\d{1,"+n+"}"),e)}}function mb(n,e){switch(n){case 1:return Pn(nr.singleDigitSigned,e);case 2:return Pn(nr.twoDigitsSigned,e);case 3:return Pn(nr.threeDigitsSigned,e);case 4:return Pn(nr.fourDigitsSigned,e);default:return Pn(new RegExp("^-?\\d{1,"+n+"}"),e)}}function Id(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 vb(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 yb(n){return n%400===0||n%4===0&&n%100!==0}let WM=class extends sn{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 rr(Un(4,e),d);case"yo":return rr(r.ordinalNumber(e,{unit:"year"}),d);default:return rr(Un(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=vb(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}},BM=class extends sn{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 rr(Un(4,e),d);case"Yo":return rr(r.ordinalNumber(e,{unit:"year"}),d);default:return rr(Un(t.length,e),d)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,d){const p=Iu(e,d);if(r.isTwoDigitYear){const b=vb(r.year,p);return e.setFullYear(b,0,d.firstWeekContainsDate),e.setHours(0,0,0,0),Jo(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),Jo(e,d)}},HM=class extends sn{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 mb(t==="R"?4:t.length,e)}set(e,t,r){const d=lr(e,0);return d.setFullYear(r,0,4),d.setHours(0,0,0,0),sa(d)}},zM=class extends sn{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 mb(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},jM=class extends sn{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 Un(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}},UM=class extends sn{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 Un(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}},VM=class extends sn{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 rr(Pn(nr.month,e),d);case"MM":return rr(Un(2,e),d);case"Mo":return rr(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}},qM=class extends sn{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 rr(Pn(nr.month,e),d);case"LL":return rr(Un(2,e),d);case"Lo":return rr(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 KM(n,e,t){const r=In(n,t==null?void 0:t.in),d=wf(r,t)-e;return r.setDate(r.getDate()-d*7),In(r,t==null?void 0:t.in)}let GM=class extends sn{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 Pn(nr.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Un(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,d){return Jo(KM(e,r,d),d)}};function YM(n,e,t){const r=In(n,void 0),d=bf(r)-e;return r.setDate(r.getDate()-d*7),r}let XM=class extends sn{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 Pn(nr.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Un(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return sa(YM(e,r))}};const QM=[31,28,31,30,31,30,31,31,30,31,30,31],ZM=[31,29,31,30,31,30,31,31,30,31,30,31];class JM extends sn{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 Pn(nr.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Un(t.length,e)}}validate(e,t){const r=e.getFullYear(),d=yb(r),p=e.getMonth();return d?t>=1&&t<=ZM[p]:t>=1&&t<=QM[p]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}let eE=class extends sn{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 Pn(nr.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Un(t.length,e)}}validate(e,t){const r=e.getFullYear();return yb(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 Rd(n,e,t){var r,d,p,g;const b=oa(),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=In(n,t==null?void 0:t.in),s=f.getDay(),a=(e%7+7)%7,u=7-h,c=e<0||e>6?e-(s+u)%7:(a+u)%7-(s+u)%7;return Ed(f,c,t)}let tE=class extends sn{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=Rd(e,r,d),e.setHours(0,0,0,0),e}},nE=class extends sn{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 rr(Un(t.length,e),p);case"eo":return rr(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=Rd(e,r,d),e.setHours(0,0,0,0),e}},rE=class extends sn{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 rr(Un(t.length,e),p);case"co":return rr(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=Rd(e,r,d),e.setHours(0,0,0,0),e}};function iE(n,e,t){const r=In(n,void 0),d=RM(r),p=e-d;return Ed(r,p,t)}let oE=class extends sn{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 Un(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return rr(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 rr(r.day(e,{width:"narrow",context:"formatting"}),d);case"iiiiii":return rr(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d);case"iiii":default:return rr(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=iE(e,r),e.setHours(0,0,0,0),e}},sE=class extends sn{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(Id(r),0,0,0),e}},aE=class extends sn{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(Id(r),0,0,0),e}},lE=class extends sn{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(Id(r),0,0,0),e}},cE=class extends sn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return Pn(nr.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Un(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 uE extends sn{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 Pn(nr.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Un(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}let hE=class extends sn{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return Pn(nr.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Un(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 dE extends sn{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 Pn(nr.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Un(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 pE extends sn{constructor(){super(...arguments),it(this,"priority",60),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return Pn(nr.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Un(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}let fE=class extends sn{constructor(){super(...arguments),it(this,"priority",50),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return Pn(nr.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Un(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}},gE=class extends sn{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 rr(Un(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}},mE=class extends sn{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Co(xo.basicOptionalMinutes,e);case"XX":return Co(xo.basic,e);case"XXXX":return Co(xo.basicOptionalSeconds,e);case"XXXXX":return Co(xo.extendedOptionalSeconds,e);case"XXX":default:return Co(xo.extended,e)}}set(e,t,r){return t.timestampIsSet?e:lr(e,e.getTime()-Dl(e)-r)}},vE=class extends sn{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Co(xo.basicOptionalMinutes,e);case"xx":return Co(xo.basic,e);case"xxxx":return Co(xo.basicOptionalSeconds,e);case"xxxxx":return Co(xo.extendedOptionalSeconds,e);case"xxx":default:return Co(xo.extended,e)}}set(e,t,r){return t.timestampIsSet?e:lr(e,e.getTime()-Dl(e)-r)}},yE=class extends sn{constructor(){super(...arguments),it(this,"priority",40),it(this,"incompatibleTokens","*")}parse(e){return gb(e)}set(e,t,r){return[lr(e,r*1e3),{timestampIsSet:!0}]}},bE=class extends sn{constructor(){super(...arguments),it(this,"priority",20),it(this,"incompatibleTokens","*")}parse(e){return gb(e)}set(e,t,r){return[lr(e,r),{timestampIsSet:!0}]}};const wE={G:new PM,y:new WM,Y:new BM,R:new HM,u:new zM,Q:new jM,q:new UM,M:new VM,L:new qM,w:new GM,I:new XM,d:new JM,D:new eE,E:new tE,e:new nE,c:new rE,i:new oE,a:new sE,b:new aE,B:new lE,h:new cE,H:new uE,K:new hE,k:new dE,m:new pE,s:new fE,S:new gE,X:new mE,x:new vE,t:new yE,T:new bE},xE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kE=/^'([^]*?)'?$/,AE=/''/g,SE=/\S/,_E=/[a-zA-Z]/;function $E(n,e,t,r){var d,p,g,b;const h=()=>lr(t,NaN),f=Yy(),s=f.locale??yf,a=f.firstWeekContainsDate??((p=(d=f.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,u=f.weekStartsOn??((b=(g=f.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0;if(!e)return n?h():In(t,void 0);const c={firstWeekContainsDate:a,weekStartsOn:u,locale:s},i=[new FM(void 0,t)],l=e.match(CE).map(_=>{const k=_[0];if(k in Ru){const C=Ru[k];return C(_,s.formatLong)}return _}).join("").match(xE),m=[];for(let _ of l){$f(_)&&Lu(_,e,n),_f(_)&&Lu(_,e,n);const k=_[0],C=wE[k];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const L=m.find(I=>R.includes(I.token)||I.token===k);if(L)throw new RangeError(`The format string mustn't contain \`${L.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 D=C.run(n,_,s.match,c);if(!D)return h();i.push(D.setter),n=D.rest}else{if(k.match(_E))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(_==="''"?_="'":k==="'"&&(_=TE(_)),n.indexOf(_)===0)n=n.slice(_.length);else return h()}}if(n.length>0&&SE.test(n))return h();const w=i.map(_=>_.priority).sort((_,k)=>k-_).filter((_,k,C)=>C.indexOf(_)===k).map(_=>i.filter(k=>k.priority===_).sort((k,C)=>C.subPriority-k.subPriority)).map(_=>_[0]);let x=In(t,void 0);if(isNaN(+x))return h();const E={};for(const _ of w){if(!_.validate(x,c))return h();const k=_.set(x,E,c);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function TE(n){return n.match(kE)[1].replace(AE,"'")}const ME="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=",EE={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return ME},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=FE.indexOf(bb[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 IE(n,e,t,r,d,p){return ot(),rn("div",{style:Cs(p.iconStyle)},null,4)}const RE=to(EE,[["render",IE]]),LE={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function OE(n,e,t,r,d,p){const g=Ve("rux-icon");return ot(),Kt(g,{size:t.size,icon:t.icon,style:Cs(p.colorStyle)},null,8,["size","icon","style"])}const NE=to(LE,[["render",OE],["__scopeId","data-v-9af48e85"]]),bb={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"},Ld={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},DE=function(n){const e="#000000",t="#ffffff",r=Ld[bb[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},FE=Object.keys(Ld),PE={astro:{component:n=>ia(NE,{...n})},"astro-status":{component:n=>ia(RE,{...n,status:n.icon})}},WE={extras:{component:n=>ia(kx,{...n})}},BE=50,HE=2e3,wb="single-spa:app-change",zE={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(wb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},HE)},unmounted(){window.removeEventListener(wb,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=$u().length>0,$u().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},BE)}}},jE={class:"mx-1"},UE={key:1,class:"d-flex justify-center align-center"};function VE(n,e,t,r,d,p){const g=Ve("v-card-title"),b=Ve("v-card-text"),h=Ve("v-card"),f=Ve("v-progress-circular");return ot(),rn(ci,null,[d.show?(ot(),Kt(h,{key:0},{default:Pe(()=>[je(g,null,{default:Pe(()=>[...e[0]||(e[0]=[Rt(" 404 Not Found ",-1)])]),_:1}),je(b,{class:"d-flex align-center mt-3"},{default:Pe(()=>[e[1]||(e[1]=Rt(" The requested URL ",-1)),Fn("code",jE,Cn(n.$route.fullPath),1),e[2]||(e[2]=Rt(" was not routable. ",-1)),e[3]||(e[3]=Fn("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Kr("",!0),p.showSpinner?(ot(),rn("div",UE,[je(f,{indeterminate:""})])):Kr("",!0)],64)}const qE=to(zE,[["render",VE]]),KE={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,tr.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()}}},GE={class:"pa-3"},YE={class:"px-2"},XE={key:0,class:"mt-4"},QE={key:1,class:"mt-4"};function ZE(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-row"),f=Ve("v-icon"),s=Ve("v-btn"),a=Ve("v-col"),u=Ve("v-list-item-title"),c=Ve("v-progress-circular"),i=Ve("v-list-item"),l=Ve("v-divider"),m=Ve("v-card-text"),w=Ve("v-card"),x=Ve("v-dialog");return ot(),Kt(x,{modelValue:p.show,"onUpdate:modelValue":e[0]||(e[0]=E=>p.show=E),width:"600"},{default:Pe(()=>[je(w,null,{default:Pe(()=>[je(b,{height:"24"},{default:Pe(()=>[je(g),e[1]||(e[1]=Fn("span",null," Download Gems ",-1)),je(g)]),_:1}),je(m,null,{default:Pe(()=>[Fn("div",GE,[je(h,{class:"my-2"},{default:Pe(()=>[...e[2]||(e[2]=[Rt(" Select a download option ",-1)])]),_:1}),je(h,null,{default:Pe(()=>[je(a,null,{default:Pe(()=>[Fn("div",YE,[je(s,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:p.searchGithub},{default:Pe(()=>[e[4]||(e[4]=Rt(" Github ",-1)),je(f,{end:"",theme:"dark"},{default:Pe(()=>[...e[3]||(e[3]=[Rt(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),je(h,{class:"mt-5"},{default:Pe(()=>[...e[5]||(e[5]=[Rt(" Community Gems ",-1)])]),_:1}),p.listData.length<1?(ot(),rn("div",XE,[je(h,{class:"mx-2"},{default:Pe(()=>[...e[6]||(e[6]=[Fn("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(ot(),rn("div",QE,[(ot(!0),rn(ci,null,vo(p.listData,(E,_)=>(ot(),rn("div",{key:_},[je(i,null,{default:Pe(()=>[je(u,null,{default:Pe(()=>[Rt(Cn(E.name),1)]),_:2},1024),je(i,{icon:""},{default:Pe(()=>[d.activeDownload?(ot(),Kt(c,{key:0,indeterminate:"",color:"primary"})):(ot(),Kt(s,{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(),Kt(l,{key:_})):Kr("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const TP=pr("q",to(KE,[["render",ZE]])),JE={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},methods:{cancel(){this.show=!1,this.$emit("cancel")}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)ak.get(`/openc3-api/targets/${n.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:n.name,files:e.data})})}},eI={class:"file-list-container"};function tI(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-list-item-title"),f=Ve("v-list-item-subtitle"),s=Ve("v-list-item"),a=Ve("v-checkbox"),u=Ve("v-card-text"),c=Ve("v-btn"),i=Ve("v-card-actions"),l=Ve("v-card"),m=Ve("v-dialog");return ot(),Kt(m,{modelValue:p.show,"onUpdate:modelValue":e[2]||(e[2]=w=>p.show=w),persistent:"",width:"600",onKeydown:Ol(p.cancel,["esc"])},{default:Pe(()=>[je(l,null,{default:Pe(()=>[je(b,{height:"24"},{default:Pe(()=>[je(g),e[3]||(e[3]=Fn("span",null," Modified Plugin ",-1)),je(g)]),_:1}),je(u,{class:"pa-3 card-container"},{default:Pe(()=>[Fn("div",null," Plugin "+Cn(t.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(ot(!0),rn(ci,null,vo(d.modifiedTargets,(w,x)=>(ot(),Kt(s,{key:x,lines:"two"},{default:Pe(()=>[je(h,null,{default:Pe(()=>[Rt(Cn(w.name),1)]),_:2},1024),Fn("div",eI,[(ot(!0),rn(ci,null,vo(w.files,(E,_)=>(ot(),Kt(f,{key:_},{default:Pe(()=>[Rt(Cn(E),1)]),_:2},1024))),128))])]),_:2},1024))),128)),je(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}),je(i,{class:"px-2"},{default:Pe(()=>[je(g),je(c,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:p.cancel},{default:Pe(()=>[...e[4]||(e[4]=[Rt(" Cancel ",-1)])]),_:1},8,["onClick"]),je(c,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[1]||(e[1]=()=>{p.show=!1,n.$emit("submit",d.deleteModified)})},{default:Pe(()=>[...e[5]||(e[5]=[Rt(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const MP=pr("U",to(JE,[["render",tI],["__scopeId","data-v-13bbb65b"]])),Od=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>rt(()=>nt.import("./PluginsTab-7hWw-8mN-e7f0ca3060f4fc5827bd.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>rt(()=>nt.import("./TargetsTab-5DVtVqPl-87159b4ab20fd7bf5eb2.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>rt(()=>nt.import("./InterfacesTab-Bu__UqSA-168d8ee44f9045f073ef.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>rt(()=>nt.import("./RoutersTab-BtC6UKqX-5c55a1fad40a7a19f061.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>rt(()=>nt.import("./MicroservicesTab-Dj8i8j6a-3be1fd147874266ef2b4.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>rt(()=>nt.import("./PackagesTab-Csom4SGV-d4089e64ca22bd0ca3ab.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>rt(()=>nt.import("./ToolsTab-CbkfaXrn-f1c6e5b4ec3a66151085.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>rt(()=>nt.import("./RedisTab-B98KxQbA-2f65a1c212d3b78e8f85.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>rt(()=>nt.import("./SecretsTab-XHmiVk-n-efeb7f78ce02b5708050.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>rt(()=>nt.import("./SettingsTab-CMpo6tq0-90c7e707b083ce1456da.js"),void 0)}],nI={components:{TopBar:l$},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return Od.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function rI(n,e,t,r,d,p){const g=Ve("top-bar"),b=Ve("v-tab"),h=Ve("v-tabs"),f=Ve("router-view"),s=Ve("v-card");return ot(),rn("div",null,[je(g,{title:d.title},null,8,["title"]),je(s,null,{default:Pe(()=>[je(h,{modelValue:d.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>d.curTab=a),"fixed-tabs":""},{default:Pe(()=>[(ot(!0),rn(ci,null,vo(p.tabs,(a,u)=>(ot(),Kt(b,{key:u,to:a.path},{default:Pe(()=>[Rt(Cn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),je(f)]),_:1})])}const iI=to(nI,[["render",rI]]);function Nd(n){const[e,t]=n;return[e,t]}function xb(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 s=t.substring(g-h);if(f=r.indexOf(s),f===-1)return b;h+=f,(f===0||t.substring(g-h)===r.substring(0,h))&&(b=h,h++)}return b}function Dd(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 Lc(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 oI(n){const e=n.charCodeAt(0);return e>=55296&&e<=56319}function sI(n){const e=n.charCodeAt(0);return e>=56320&&e<=57343}function aI(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 s=r-d,a=s%2!==0;let u=0,c=0,i=0,l=0;for(let m=0;m<p&&!(Date.now()>t);m++){for(let w=-m+u;w<=m-c;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)c+=2;else if(_>d)u+=2;else if(a){const k=g+s-w;if(k>=0&&k<b&&f[k]!==-1){const C=r-f[k];if(E>=C)return Cb(n,e,E,_,t)}}}for(let w=-m+i;w<=m-l;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)l+=2;else if(_>d)i+=2;else if(!a){const k=g+s-w;if(k>=0&&k<b&&h[k]!==-1){const C=h[k],R=g+C-k;if(E=r-E,C>=E)return Cb(n,e,C,R,t)}}}}return[[Ei,n],[fi,e]]}function Cb(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=Hs(p,g,{checkLines:!1,deadline:d}),s=Hs(b,h,{checkLines:!1,deadline:d});return f.concat(s)}function lI(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=kb(r,d,Math.ceil(r.length/4)),g=kb(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,s,a;n.length>e.length?(h=b[0],f=b[1],s=b[2],a=b[3]):(s=b[0],a=b[1],h=b[2],f=b[3]);const u=b[4];return[h,f,s,a,u]}function kb(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 s=Dd(n.slice(t),e.slice(d)),a=Lc(n.slice(0,t),e.slice(0,d));p.length<a+s&&(p=e.slice(d-a,d)+e.slice(d,d+s),g=n.slice(0,t-a),b=n.slice(t+s),h=e.slice(0,d-a),f=e.slice(d+s))}return p.length*2>=n.length?[g||"",b||"",h||"",f||"",p||""]:null}function cI(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 uI(n,e){const t=[],r={};t[0]="";function d(h){let f="",s=0,a=-1,u=t.length;for(;a<h.length-1;){a=h.indexOf(`
|
|
1496
|
+
`,s),a===-1&&(a=h.length-1);let c=h.slice(s,a+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?f+=String.fromCharCode(r[c]):(u===p&&(c=h.slice(s),a=h.length),f+=String.fromCharCode(u),r[c]=u,t[u++]=c),s=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 hI(n,e,t){let r=n,d=e;const p=uI(r,d);r=p.chars1,d=p.chars2;const g=p.lineArray;let b=Hs(r,d,{checkLines:!1,deadline:t.deadline});cI(b,g),b=$b(b),b.push([Vn,""]);let h=0,f=0,s=0,a="",u="";for(;h<b.length;){switch(b[h][0]){case fi:s++,u+=b[h][1];break;case Ei:f++,a+=b[h][1];break;case Vn:if(f>=1&&s>=1){b.splice(h-f-s,f+s),h=h-f-s;const c=Hs(a,u,{checkLines:!1,deadline:t.deadline});for(let i=c.length-1;i>=0;i--)b.splice(h,0,c[i]);h+=c.length}s=0,f=0,a="",u="";break;default:throw new Error("Unknown diff operation.")}h++}return b.pop(),b}function dI(n,e,t){let r;if(!n)return[[fi,e]];if(!e)return[[Ei,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=[[fi,d.substring(0,g)],[Vn,p],[fi,d.substring(g+p.length)]],n.length>e.length&&(r[0][0]=Ei,r[2][0]=Ei),r;if(p.length===1)return[[Ei,n],[fi,e]];const b=lI(n,e);if(b){const h=b[0],f=b[1],s=b[2],a=b[3],u=b[4],c=Hs(h,s,t),i=Hs(f,a,t);return c.concat([[Vn,u]],i)}return t.checkLines&&n.length>100&&e.length>100?hI(n,e,t):aI(n,e,t.deadline)}var pI=Object.defineProperty,Ab=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,gI=Object.prototype.propertyIsEnumerable,Sb=(n,e,t)=>e in n?pI(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mI=(n,e)=>{for(var t in e||(e={}))fI.call(e,t)&&Sb(n,t,e[t]);if(Ab)for(var t of Ab(e))gI.call(e,t)&&Sb(n,t,e[t]);return n};const Ei=-1,fi=1,Vn=0;function vI(n,e,t){if(n===null||e===null)throw new Error("Null input. (diff)");const r=Hs(n,e,bI({}));return xI(r),r}function Hs(n,e,t){let r=n,d=e;if(r===d)return r?[[Vn,r]]:[];let p=Dd(r,d);const g=r.substring(0,p);r=r.substring(p),d=d.substring(p),p=Lc(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=dI(r,d,t);return g&&h.unshift([Vn,g]),b&&h.push([Vn,b]),h=Fd(h),h}function yI(n){let e=1;return typeof n<"u"&&(e=n<=0?Number.MAX_VALUE:n),Date.now()+e*1e3}function bI(n){return mI({checkLines:!0,deadline:yI(n.timeout||1)},n)}function Oc(n,e,t){return t===1?n+e:e+n}function Nc(n,e){return e===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function wI(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 _b(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,s]=n[g];if(s.length!==0){if(f===fi){d===null&&(d=g);continue}else if(f===Ei){p===null&&(p=g);continue}else if(f===Vn){if(d===null&&p===null){const[a,u]=Nc(n[e][1],t);n[e][1]=a,n[g][1]=Oc(n[g][1],u,r);return}break}}}if(d!==null&&p!==null&&wI(n,d,p,t)){const[f,s]=Nc(n[d][1],r),[a]=Nc(n[p][1],r);n[d][1]=f,n[p][1]=a,n[e][1]=Oc(n[e][1],s,t);return}const[b,h]=Nc(n[e][1],t);n[e][1]=b,d===null?(n.splice(g,0,[fi,h]),p!==null&&p>=g&&p++):n[d][1]=Oc(n[d][1],h,r),p===null?n.splice(g,0,[Ei,h]):n[p][1]=Oc(n[p][1],h,r)}function xI(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];oI(p)&&t===Vn&&_b(n,e,1),sI(d)&&t===Vn&&_b(n,e,-1)}for(let e=0;e<n.length;e++)n[e][1].length===0&&n.splice(e,1)}function $b(n){let e=n.map(a=>Nd(a)),t=!1;const r=[];let d=0,p=null,g=0,b=0,h=0,f=0,s=0;for(;g<e.length;)e[g][0]===Vn?(r[d++]=g,b=f,h=s,f=0,s=0,p=e[g][1]):(e[g][0]===fi?f+=e[g][1].length:s+=e[g][1].length,p&&p.length<=Math.max(b,h)&&p.length<=Math.max(f,s)&&(e.splice(r[d-1],0,[Ei,p]),e[r[d-1]+1][0]=fi,d--,d--,g=d>0?r[d-1]:-1,b=0,h=0,f=0,s=0,p=null,t=!0)),g++;for(t&&(e=Fd(e)),e=AI(e),g=1;g<e.length;){if(e[g-1][0]===Ei&&e[g][0]===fi){const a=e[g-1][1],u=e[g][1],c=xb(a,u),i=xb(u,a);c>=i?(c>=a.length/2||c>=u.length/2)&&(e.splice(g,0,[Vn,u.substring(0,c)]),e[g-1][1]=a.substring(0,a.length-c),e[g+1][1]=u.substring(c),g++):(i>=a.length/2||i>=u.length/2)&&(e.splice(g,0,[Vn,a.substring(0,i)]),e[g-1][0]=fi,e[g-1][1]=u.substring(0,u.length-i),e[g+1][0]=Ei,e[g+1][1]=a.substring(i),g++),g++}g++}return e}const Tb=/[^a-zA-Z0-9]/,Mb=/\s/,Eb=/[\r\n]/,CI=/\n\r?\n$/,kI=/^\r?\n\r?\n/;function AI(n){const e=n.map(d=>Nd(d));function t(d,p){if(!d||!p)return 6;const g=d.charAt(d.length-1),b=p.charAt(0),h=g.match(Tb),f=b.match(Tb),s=h&&g.match(Mb),a=f&&b.match(Mb),u=s&&g.match(Eb),c=a&&b.match(Eb),i=u&&d.match(CI),l=c&&p.match(kI);return i||l?5:u||c?4:h&&!s&&a?3:s||a?2:h||f?1:0}let r=1;for(;r<e.length-1;){if(e[r-1][0]===Vn&&e[r+1][0]===Vn){let d=e[r-1][1],p=e[r][1],g=e[r+1][1];const b=Lc(d,p);if(b){const u=p.substring(p.length-b);d=d.substring(0,d.length-b),p=u+p.substring(0,p.length-b),g=u+g}let h=d,f=p,s=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 u=t(d,p)+t(p,g);u>=a&&(a=u,h=d,f=p,s=g)}e[r-1][1]!==h&&(h?e[r-1][1]=h:(e.splice(r-1,1),r--),e[r][1]=f,s?e[r+1][1]=s:(e.splice(r+1,1),r--))}r++}return e}function Fd(n){let e=n.map(f=>Nd(f));e.push([Vn,""]);let t=0,r=0,d=0,p="",g="",b;for(;t<e.length;)switch(e[t][0]){case fi:d++,g+=e[t][1],t++;break;case Ei:r++,p+=e[t][1],t++;break;case Vn:r+d>1?(r!==0&&d!==0&&(b=Dd(g,p),b!==0&&(t-r-d>0&&e[t-r-d-1][0]===Vn?e[t-r-d-1][1]+=g.substring(0,b):(e.splice(0,0,[Vn,g.substring(0,b)]),t++),g=g.substring(b),p=p.substring(b)),b=Lc(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,[Ei,p]),t++),g.length&&(e.splice(t,0,[fi,g]),t++),t++):t!==0&&e[t-1][0]===Vn?(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]===Vn&&e[t+1][0]===Vn&&(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=Fd(e)),e}function Dc(n){return n&&typeof n=="object"&&!Array.isArray(n)&&n!==null}function Pd(n,e){return Dc(n)&&Dc(e)&&Object.keys(e).forEach(t=>{t==="__proto__"||t==="constructor"||(Dc(e[t])?((!n[t]||!Dc(n[t]))&&(n[t]=e[t]),Pd(n[t],e[t])):Object.assign(n,{[t]:e[t]}))}),n}function Ib(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 SI(n,e){let t;return(...r)=>{const d=this;clearTimeout(t),t=setTimeout(()=>n.apply(d,r),e)}}function Rb(n=""){return n.replace(/\r\n/g,`
|
|
1497
|
+
`)}function Lb(n,e,t,r){const d=t-n,p=n+d/2;return`M ${n} ${e} C ${p},${e} ${p},${r} ${t},${r}`}var kn={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 Ob(n,e){let{mode:t}=n.options;return e===kn.EDITOR_LEFT&&n.options.left.mode!==null&&(t=n.options.left.mode),e===kn.EDITOR_RIGHT&&n.options.right.mode!==null&&(t=n.options.right.mode),t}function Nb(n,e){let{theme:t}=n.options;return e===kn.EDITOR_LEFT&&n.options.left.theme!==null&&(t=n.options.left.theme),e===kn.EDITOR_RIGHT&&n.options.right.theme!==null&&(t=n.options.right.theme),t}function Db(n,e){return n.ace.getSession().doc.getLine(e)}function _I(n){return document.getElementById(n.options.left.id).offsetHeight}function Fb(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 Wd(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 Pb(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 s=b;const a=g[h];for(;s&&s!==d;)s===a&&r.call(a,p),s=s.parentNode}})}let Fc;function $I(n){if(n.Range)return n.Range;const e=n.acequire||n.require;return e?e("ace/range"):!1}function Pc(n={}){if(!(this instanceof Pc))return new Pc(n);const e=this,t=()=>window?window.ace:void 0;e.options=Pd({ace:t(),mode:null,theme:null,element:null,diffGranularity:kn.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(Fc=$I(r),!Fc){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=Wd(e.el,"acediff__left"),e.options.classes.gutterID=Wd(e.el,"acediff__gutter"),e.options.right.id=Wd(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(Ob(e,kn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Ob(e,kn.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(Nb(e,kn.EDITOR_LEFT)),e.editors.right.ace.setTheme(Nb(e,kn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Rb(e.options.left.content),-1),e.editors.right.ace.setValue(Rb(e.options.right.content),-1),e.editors.editorHeight=_I(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,TI(e),RI(e),Kb(e),e.diff()},1)}Pc.prototype={setOptions(n){Pd(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=$b(vI(e,n));this.editors.left.lineLengths=Bb(this.editors.left),this.editors.right.lineLengths=Bb(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===kn.DIFF_EQUAL?(d.left+=b.length,d.right+=b.length):g===kn.DIFF_DELETE?(r.push(Ub(this,kn.DIFF_DELETE,d.left,d.right,b)),d.right+=b.length):g===kn.DIFF_INSERT&&(r.push(Ub(this,kn.DIFF_INSERT,d.left,d.right,b)),d.left+=b.length))},this),this.diffs=NI(this,r),!(this.diffs.length>this.options.maxDiffs)&&(jb(this),Yb(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 TI(n){n.editors.left.ace.getSession().on("changeScrollTop",Ib(()=>{zb(n)},16)),n.editors.right.ace.getSession().on("changeScrollTop",Ib(()=>{zb(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&&Pb(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.newCodeConnectorLink}`,r=>{Wb(n,r,kn.LTR)}),n.options.right.copyLinkEnabled&&Pb(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.deletedCodeConnectorLink}`,r=>{Wb(n,r,kn.RTL)});const t=SI(()=>{n.editors.availableHeight=document.getElementById(n.options.left.id).offsetHeight,n.diff()},250);window.addEventListener("resize",t),n.removeEventHandlers=()=>{window.removeEventListener("resize",t)}}function Wb(n,e,t){const r=parseInt(e.target.getAttribute("data-diff-index"),10),d=n.diffs[r];let p,g,b,h,f,s;t===kn.LTR?(p=n.editors.left,g=n.editors.right,b=d.leftStartLine,h=d.leftEndLine,f=d.rightStartLine,s=d.rightEndLine):(p=n.editors.right,g=n.editors.left,b=d.rightStartLine,h=d.rightEndLine,f=d.leftStartLine,s=d.leftEndLine);let a="";for(let c=b;c<h;c+=1)a+=Db(p,c),c<p.ace.getSession().getLength()-1&&(a+=`
|
|
1498
|
+
`);const u=g.ace.getSession().getScrollTop();g.ace.getSession().replace(new Fc(f,0,s,0),a),g.ace.getSession().setScrollTop(parseInt(u,10)),n.diff()}function Bb(n){const e=n.ace.getSession().doc.getAllLines(),t=[];return e.forEach(r=>{t.push(r.length+1)}),t}function Hb(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 Fc(t,0,r,1),g,"fullLine"))}function zb(n){jb(n),Yb(n),II(n)}function jb(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 MI(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,s=r*n.lineHeight-g+.5,a=-1,u=t*n.lineHeight-p+n.connectorYOffset+.5,c=n.gutterWidth+1,i=d*n.lineHeight-g+n.connectorYOffset+.5,l=Lb(b,h,f,s),m=Lb(c,i,a,u),w=`L${f},${s} ${c},${i}`,x=`L${a},${u} ${b},${h}`,E=`${l} ${w} ${m} ${x}`,_=document.createElementNS(kn.SVG_NS,"path");_.setAttribute("d",E),_.setAttribute("class",n.options.classes.connector),n.gutterSVG.appendChild(_)}function EI(n,e,t){if(e.leftEndLine>e.leftStartLine&&n.options.left.copyLinkEnabled){const r=Fb({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=Fb({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 II(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 Ub(n,e,t,r,d){let p={};if(e===kn.DIFF_INSERT){let g=Vb(n.editors.left,t,d),b=qb(n.editors.right,r),h=hl(n.editors.right,b);const f=hl(n.editors.left,g.startLine);let s=b,a=g.startLine===g.endLine,u=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&u++,p={leftStartLine:g.startLine,leftEndLine:g.endLine+1,rightStartLine:s,rightEndLine:s+u}}else{let g=Vb(n.editors.right,r,d),b=qb(n.editors.left,t),h=hl(n.editors.left,b);const f=hl(n.editors.right,g.startLine);let s=b,a=g.startLine===g.endLine,u=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&u++,p={leftStartLine:s,leftEndLine:s+u,rightStartLine:g.startLine,rightEndLine:g.endLine+1}}return p}function Vb(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,s)=>{p+=f,!g&&e<p&&(r.startLine=s,r.startChar=e-p+f,g=!0),!b&&d<=p&&(r.endLine=s,r.endChar=d-p+f,b=!0)}),r.startChar>0&&hl(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 hl(n,e){return Db(n,e).length}function qb(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 Kb(n){n.gutterHeight=document.getElementById(n.options.classes.gutterID).clientHeight,n.gutterWidth=document.getElementById(n.options.classes.gutterID).clientWidth;const e=Gb(n,kn.EDITOR_LEFT),t=Gb(n,kn.EDITOR_RIGHT),r=Math.max(e,t,n.gutterHeight);n.gutterSVG=document.createElementNS(kn.SVG_NS,"svg"),n.gutterSVG.setAttribute("width",n.gutterWidth),n.gutterSVG.setAttribute("height",r),document.getElementById(n.options.classes.gutterID).appendChild(n.gutterSVG)}function Gb(n,e){return(e===kn.EDITOR_LEFT?n.editors.left:n.editors.right).ace.getSession().getLength()*n.lineHeight}function RI(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 LI(n){document.getElementById(n.options.classes.gutterID).removeChild(n.gutterSVG),Kb(n)}function OI(n){n.copyLeftContainer.innerHTML="",n.copyRightContainer.innerHTML=""}function NI(n,e){const t=[];function r(p){return n.options.diffGranularity===kn.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 Yb(n){LI(n),OI(n),n.diffs.forEach((e,t)=>{n.options.showDiffs&&(Hb(n,kn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,n.options.classes.diff),Hb(n,kn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,n.options.classes.diff),n.options.showConnectors&&MI(n,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),EI(n,e,t))},n)}const DI={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storeId:{type:Number,required:!1,default:null},modelValue:Boolean},emits:["callback","update:modelValue"],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=_s.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(),vc.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new Pc({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),vc.applyVimModeIfEnabled(this.differ.getEditors().left),vc.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=_s.require("ace/lib/oop"),e=_s.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 s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};n.inherits(d,e);let p=_s.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=_s.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=_s.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=_s.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(`
|
|
1499
|
+
`)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
|
1500
|
+
`)):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(`
|
|
1501
|
+
`))}).catch(n=>{})},emitSubmit(n){let e={name:this.pluginName,variables:Gp(this.localVariables),plugin_txt_lines:n,store_id:this.storeId};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&&vc.toggleVimMode(this.editor)}}},FI={style:{flex:"1"}},PI={class:"pa-3"},WI={ref:"editor",class:"editor"},BI={key:0};function HI(n,e,t,r,d,p){const g=Ve("v-card-title"),b=Ve("v-icon"),h=Ve("v-row"),f=Ve("v-tab"),s=Ve("v-tabs"),a=Ve("v-text-field"),u=Ve("v-col"),c=Ve("v-window-item"),i=Ve("v-list-item-title"),l=Ve("v-list-item"),m=Ve("v-divider"),w=Ve("v-list"),x=Ve("v-menu"),E=Ve("v-window"),_=Ve("v-btn"),k=Ve("v-spacer"),C=Ve("v-card-actions"),R=Ve("v-card-text"),D=Ve("v-card"),L=Ve("v-dialog");return ot(),Kt(L,{modelValue:p.show,"onUpdate:modelValue":e[5]||(e[5]=I=>p.show=I),persistent:"",width:"80vw",onKeydown:Ol(p.close,["esc"])},{default:Pe(()=>[je(D,null,{default:Pe(()=>[je(R,null,{default:Pe(()=>[je(g,null,{default:Pe(()=>[Rt(Cn(t.pluginName),1)]),_:1}),t.existingPluginTxt!==null?(ot(),Kt(h,{key:0,class:"notice d-flex flex-row"},{default:Pe(()=>[je(b,{size:"x-large",start:"",color:"yellow"},{default:Pe(()=>[...e[6]||(e[6]=[Rt(" mdi-alert-box ",-1)])]),_:1}),Fn("div",FI," The existing plugin.txt is different from the "+Cn(t.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+Cn(t.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Kr("",!0),je(h,{class:"pb-3 pr-3"},{default:Pe(()=>[je(s,{modelValue:d.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>d.tab=I),class:"ml-3"},{default:Pe(()=>[(ot(),Kt(f,{key:0},{default:Pe(()=>[...e[7]||(e[7]=[Rt(" Variables ",-1)])]),_:1})),(ot(),Kt(f,{key:1},{default:Pe(()=>[...e[8]||(e[8]=[Rt(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"])]),_:1}),Fn("form",{onSubmit:e[4]||(e[4]=Wa((...I)=>n.onSubmit&&n.onSubmit(...I),["prevent"]))},[je(E,{modelValue:d.tab,"onUpdate:modelValue":e[3]||(e[3]=I=>d.tab=I)},{default:Pe(()=>[(ot(),Kt(c,{key:0,eager:"true",class:"tab"},{default:Pe(()=>[Fn("div",PI,[je(h,{class:"mt-3"},{default:Pe(()=>[(ot(!0),rn(ci,null,vo(d.localVariables,(I,H)=>(ot(),rn("div",{key:H},[je(u,{style:{width:"220px"}},{default:Pe(()=>[je(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(),Kt(c,{key:"1-new",eager:"true",class:"tab"},{default:Pe(()=>[je(h,{class:"pa-3"},{default:Pe(()=>[je(u,null,{default:Pe(()=>[...e[9]||(e[9]=[Rt(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),Fn("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=Wa((...I)=>p.showContextMenu&&p.showContextMenu(...I),["prevent"]))},null,544),je(x,{modelValue:d.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=I=>d.contextMenu=I),target:[d.menuX,d.menuY]},{default:Pe(()=>[je(w,null,{default:Pe(()=>[je(l,{link:""},{default:Pe(()=>[je(i,{onClick:n.openDocumentation},{default:Pe(()=>[Rt(Cn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),je(m),je(l,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:p.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(ot(),Kt(c,{key:"1-existing",eager:"true",class:"tab"},{default:Pe(()=>[je(h,{class:"pa-3"},{default:Pe(()=>[je(u,null,{default:Pe(()=>[...e[10]||(e[10]=[Rt(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),je(u,{class:"ml-6"},{default:Pe(()=>[...e[11]||(e[11]=[Rt(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),Fn("pre",WI,null,512)]),_:1}))]),_:1},8,["modelValue"]),je(C,{class:"px-2 mt-2"},{default:Pe(()=>[t.existingPluginTxt!==null?(ot(),rn("div",BI,[je(_,{variant:"text",onClick:p.nextDiff},{default:Pe(()=>[...e[12]||(e[12]=[Rt(" Next Diff ",-1)])]),_:1},8,["onClick"]),je(_,{variant:"text",onClick:p.previousDiff},{default:Pe(()=>[...e[13]||(e[13]=[Rt(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):Kr("",!0),je(k),je(_,{variant:"outlined","data-test":"edit-cancel",onClick:Wa(p.close,["prevent"])},{default:Pe(()=>[...e[14]||(e[14]=[Rt(" Cancel ",-1)])]),_:1},8,["onClick"]),je(_,{variant:"flat","data-test":"edit-submit",onClick:p.submit},{default:Pe(()=>[...e[15]||(e[15]=[Rt(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const EP=pr("Y",to(DI,[["render",HI],["__scopeId","data-v-3b685c50"]])),zI=Od.find(n=>n.name==="PluginsTab"),Xb=[{path:"/",component:iI,children:[{component:zI.component,path:""},...Od]},{path:"/:pathMatch(.*)*",name:"NotFound",component:qE}];Xb.forEach(hf);const jI=sf({history:af(),routes:Xb});/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:Qb,setPrototypeOf:Zb,isFrozen:UI,getPrototypeOf:VI,getOwnPropertyDescriptor:qI}=Object;let{freeze:Xr,seal:ji,create:Bd}=Object,{apply:Hd,construct:zd}=typeof Reflect<"u"&&Reflect;Xr||(Xr=function(n){return n}),ji||(ji=function(n){return n}),Hd||(Hd=function(n,e){for(var t=arguments.length,r=new Array(t>2?t-2:0),d=2;d<t;d++)r[d-2]=arguments[d];return n.apply(e,r)}),zd||(zd=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return new n(...t)});const Wc=Zr(Array.prototype.forEach),KI=Zr(Array.prototype.lastIndexOf),Jb=Zr(Array.prototype.pop),dl=Zr(Array.prototype.push),GI=Zr(Array.prototype.splice),Bc=Zr(String.prototype.toLowerCase),jd=Zr(String.prototype.toString),Ud=Zr(String.prototype.match),pl=Zr(String.prototype.replace),YI=Zr(String.prototype.indexOf),XI=Zr(String.prototype.trim),lo=Zr(Object.prototype.hasOwnProperty),Qr=Zr(RegExp.prototype.test),fl=QI(TypeError);function Zr(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),d=1;d<t;d++)r[d-1]=arguments[d];return Hd(n,e,r)}}function QI(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return zd(n,t)}}function Bt(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bc;Zb&&Zb(n,null);let r=e.length;for(;r--;){let d=e[r];if(typeof d=="string"){const p=t(d);p!==d&&(UI(e)||(e[r]=p),d=p)}n[d]=!0}return n}function ZI(n){for(let e=0;e<n.length;e++)lo(n,e)||(n[e]=null);return n}function Oo(n){const e=Bd(null);for(const[t,r]of Qb(n))lo(n,t)&&(Array.isArray(r)?e[t]=ZI(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Oo(r):e[t]=r);return e}function gl(n,e){for(;n!==null;){const r=qI(n,e);if(r){if(r.get)return Zr(r.get);if(typeof r.value=="function")return Zr(r.value)}n=VI(n)}function t(){return null}return t}const e0=Xr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vd=Xr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qd=Xr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),JI=Xr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Kd=Xr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),eR=Xr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),t0=Xr(["#text"]),n0=Xr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Gd=Xr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),r0=Xr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Hc=Xr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tR=ji(/\{\{[\w\W]*|[\w\W]*\}\}/gm),nR=ji(/<%[\w\W]*|[\w\W]*%>/gm),rR=ji(/\$\{[\w\W]*/gm),iR=ji(/^data-[\-\w.\u00B7-\uFFFF]+$/),oR=ji(/^aria-[\-\w]+$/),i0=ji(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sR=ji(/^(?:\w+script|data):/i),aR=ji(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),o0=ji(/^html$/i),lR=ji(/^[a-z][.\w]*(-[.\w]+)+$/i);var s0=Object.freeze({__proto__:null,ARIA_ATTR:oR,ATTR_WHITESPACE:aR,CUSTOM_ELEMENT:lR,DATA_ATTR:iR,DOCTYPE_NAME:o0,ERB_EXPR:nR,IS_ALLOWED_URI:i0,IS_SCRIPT_OR_DATA:sR,MUSTACHE_EXPR:tR,TMPLIT_EXPR:rR});const ml={element:1,text:3,progressingInstruction:7,comment:8,document:9},cR=function(){return typeof window>"u"?null:window},uR=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let t=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(t=e.getAttribute(r));const d="dompurify"+(t?"#"+t:"");try{return n.createPolicy(d,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},a0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function l0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cR();const e=ce=>l0(ce);if(e.version="3.3.0",e.removed=[],!n||!n.document||n.document.nodeType!==ml.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n;const r=t,d=r.currentScript,{DocumentFragment:p,HTMLTemplateElement:g,Node:b,Element:h,NodeFilter:f,NamedNodeMap:s=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:a,DOMParser:u,trustedTypes:c}=n,i=h.prototype,l=gl(i,"cloneNode"),m=gl(i,"remove"),w=gl(i,"nextSibling"),x=gl(i,"childNodes"),E=gl(i,"parentNode");if(typeof g=="function"){const ce=t.createElement("template");ce.content&&ce.content.ownerDocument&&(t=ce.content.ownerDocument)}let _,k="";const{implementation:C,createNodeIterator:R,createDocumentFragment:D,getElementsByTagName:L}=t,{importNode:I}=r;let H=a0();e.isSupported=typeof Qb=="function"&&typeof E=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:O,TMPLIT_EXPR:$,DATA_ATTR:A,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:K}=s0;let{IS_ALLOWED_URI:Z}=s0,J=null;const he=Bt({},[...e0,...Vd,...qd,...Kd,...t0]);let ne=null;const le=Bt({},[...n0,...Gd,...r0,...Hc]);let se=Object.seal(Bd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,me=null;const _e=Object.seal(Bd(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,Me=!0,Je=!1,Xe=!0,ht=!1,st=!0,dt=!1,Zt=!1,$n=!1,Ht=!1,kr=!1,fn=!1,Wn=!0,ir=!1;const Or="user-content-";let bt=!0,qe=!1,Nt={},tn=null;const Bn=Bt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ar=null;const vr=Bt({},["audio","video","img","source","image","track"]);let bn=null;const qn=Bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Hn="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",dn="http://www.w3.org/1999/xhtml";let Hr=dn,Jr=!1,ei=null;const Ii=Bt({},[Hn,Xt,dn],jd);let gi=Bt({},["mi","mo","mn","ms","mtext"]),Kn=Bt({},["annotation-xml"]);const co=Bt({},["title","style","font","a","script"]);let mi=null;const zs=["application/xhtml+xml","text/html"],ti="text/html";let Rn=null,vi=null;const os=t.createElement("form"),yi=function(ce){return ce instanceof RegExp||ce instanceof Function},Tn=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(vi&&vi===ce)){if((!ce||typeof ce!="object")&&(ce={}),ce=Oo(ce),mi=zs.indexOf(ce.PARSER_MEDIA_TYPE)===-1?ti:ce.PARSER_MEDIA_TYPE,Rn=mi==="application/xhtml+xml"?jd:Bc,J=lo(ce,"ALLOWED_TAGS")?Bt({},ce.ALLOWED_TAGS,Rn):he,ne=lo(ce,"ALLOWED_ATTR")?Bt({},ce.ALLOWED_ATTR,Rn):le,ei=lo(ce,"ALLOWED_NAMESPACES")?Bt({},ce.ALLOWED_NAMESPACES,jd):Ii,bn=lo(ce,"ADD_URI_SAFE_ATTR")?Bt(Oo(qn),ce.ADD_URI_SAFE_ATTR,Rn):qn,Ar=lo(ce,"ADD_DATA_URI_TAGS")?Bt(Oo(vr),ce.ADD_DATA_URI_TAGS,Rn):vr,tn=lo(ce,"FORBID_CONTENTS")?Bt({},ce.FORBID_CONTENTS,Rn):Bn,de=lo(ce,"FORBID_TAGS")?Bt({},ce.FORBID_TAGS,Rn):Oo({}),me=lo(ce,"FORBID_ATTR")?Bt({},ce.FORBID_ATTR,Rn):Oo({}),Nt=lo(ce,"USE_PROFILES")?ce.USE_PROFILES:!1,Te=ce.ALLOW_ARIA_ATTR!==!1,Me=ce.ALLOW_DATA_ATTR!==!1,Je=ce.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=ce.SAFE_FOR_TEMPLATES||!1,st=ce.SAFE_FOR_XML!==!1,dt=ce.WHOLE_DOCUMENT||!1,Ht=ce.RETURN_DOM||!1,kr=ce.RETURN_DOM_FRAGMENT||!1,fn=ce.RETURN_TRUSTED_TYPE||!1,$n=ce.FORCE_BODY||!1,Wn=ce.SANITIZE_DOM!==!1,ir=ce.SANITIZE_NAMED_PROPS||!1,bt=ce.KEEP_CONTENT!==!1,qe=ce.IN_PLACE||!1,Z=ce.ALLOWED_URI_REGEXP||i0,Hr=ce.NAMESPACE||dn,gi=ce.MATHML_TEXT_INTEGRATION_POINTS||gi,Kn=ce.HTML_INTEGRATION_POINTS||Kn,se=ce.CUSTOM_ELEMENT_HANDLING||{},ce.CUSTOM_ELEMENT_HANDLING&&yi(ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ce.CUSTOM_ELEMENT_HANDLING&&yi(ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ce.CUSTOM_ELEMENT_HANDLING&&typeof ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ht&&(Me=!1),kr&&(Ht=!0),Nt&&(J=Bt({},t0),ne=[],Nt.html===!0&&(Bt(J,e0),Bt(ne,n0)),Nt.svg===!0&&(Bt(J,Vd),Bt(ne,Gd),Bt(ne,Hc)),Nt.svgFilters===!0&&(Bt(J,qd),Bt(ne,Gd),Bt(ne,Hc)),Nt.mathMl===!0&&(Bt(J,Kd),Bt(ne,r0),Bt(ne,Hc))),ce.ADD_TAGS&&(typeof ce.ADD_TAGS=="function"?_e.tagCheck=ce.ADD_TAGS:(J===he&&(J=Oo(J)),Bt(J,ce.ADD_TAGS,Rn))),ce.ADD_ATTR&&(typeof ce.ADD_ATTR=="function"?_e.attributeCheck=ce.ADD_ATTR:(ne===le&&(ne=Oo(ne)),Bt(ne,ce.ADD_ATTR,Rn))),ce.ADD_URI_SAFE_ATTR&&Bt(bn,ce.ADD_URI_SAFE_ATTR,Rn),ce.FORBID_CONTENTS&&(tn===Bn&&(tn=Oo(tn)),Bt(tn,ce.FORBID_CONTENTS,Rn)),bt&&(J["#text"]=!0),dt&&Bt(J,["html","head","body"]),J.table&&(Bt(J,["tbody"]),delete de.tbody),ce.TRUSTED_TYPES_POLICY){if(typeof ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw fl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=ce.TRUSTED_TYPES_POLICY,k=_.createHTML("")}else _===void 0&&(_=uR(c,d)),_!==null&&typeof k=="string"&&(k=_.createHTML(""));Xr&&Xr(ce),vi=ce}},yr=Bt({},[...Vd,...qd,...JI]),bi=Bt({},[...Kd,...eR]),Mn=function(ce){let ze=E(ce);(!ze||!ze.tagName)&&(ze={namespaceURI:Hr,tagName:"template"});const Fe=Bc(ce.tagName),Tt=Bc(ze.tagName);return ei[ce.namespaceURI]?ce.namespaceURI===Xt?ze.namespaceURI===dn?Fe==="svg":ze.namespaceURI===Hn?Fe==="svg"&&(Tt==="annotation-xml"||gi[Tt]):!!yr[Fe]:ce.namespaceURI===Hn?ze.namespaceURI===dn?Fe==="math":ze.namespaceURI===Xt?Fe==="math"&&Kn[Tt]:!!bi[Fe]:ce.namespaceURI===dn?ze.namespaceURI===Xt&&!Kn[Tt]||ze.namespaceURI===Hn&&!gi[Tt]?!1:!bi[Fe]&&(co[Fe]||!yr[Fe]):!!(mi==="application/xhtml+xml"&&ei[ce.namespaceURI]):!1},Ln=function(ce){dl(e.removed,{element:ce});try{E(ce).removeChild(ce)}catch{m(ce)}},Sr=function(ce,ze){try{dl(e.removed,{attribute:ze.getAttributeNode(ce),from:ze})}catch{dl(e.removed,{attribute:null,from:ze})}if(ze.removeAttribute(ce),ce==="is")if(Ht||kr)try{Ln(ze)}catch{}else try{ze.setAttribute(ce,"")}catch{}},wi=function(ce){let ze=null,Fe=null;if($n)ce="<remove></remove>"+ce;else{const Ut=Ud(ce,/^[\r\n\t ]+/);Fe=Ut&&Ut[0]}mi==="application/xhtml+xml"&&Hr===dn&&(ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ce+"</body></html>");const Tt=_?_.createHTML(ce):ce;if(Hr===dn)try{ze=new u().parseFromString(Tt,mi)}catch{}if(!ze||!ze.documentElement){ze=C.createDocument(Hr,"template",null);try{ze.documentElement.innerHTML=Jr?k:Tt}catch{}}const Qt=ze.body||ze.documentElement;return ce&&Fe&&Qt.insertBefore(t.createTextNode(Fe),Qt.childNodes[0]||null),Hr===dn?L.call(ze,dt?"html":"body")[0]:dt?ze.documentElement:Qt},ko=function(ce){return R.call(ce.ownerDocument||ce,ce,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Ao=function(ce){return ce instanceof a&&(typeof ce.nodeName!="string"||typeof ce.textContent!="string"||typeof ce.removeChild!="function"||!(ce.attributes instanceof s)||typeof ce.removeAttribute!="function"||typeof ce.setAttribute!="function"||typeof ce.namespaceURI!="string"||typeof ce.insertBefore!="function"||typeof ce.hasChildNodes!="function")},ss=function(ce){return typeof b=="function"&&ce instanceof b};function ni(ce,ze,Fe){Wc(ce,Tt=>{Tt.call(e,ze,Fe,vi)})}const xi=function(ce){let ze=null;if(ni(H.beforeSanitizeElements,ce,null),Ao(ce))return Ln(ce),!0;const Fe=Rn(ce.nodeName);if(ni(H.uponSanitizeElement,ce,{tagName:Fe,allowedTags:J}),st&&ce.hasChildNodes()&&!ss(ce.firstElementChild)&&Qr(/<[/\w!]/g,ce.innerHTML)&&Qr(/<[/\w!]/g,ce.textContent)||ce.nodeType===ml.progressingInstruction||st&&ce.nodeType===ml.comment&&Qr(/<[/\w]/g,ce.data))return Ln(ce),!0;if(!(_e.tagCheck instanceof Function&&_e.tagCheck(Fe))&&(!J[Fe]||de[Fe])){if(!de[Fe]&&Dt(Fe)&&(se.tagNameCheck instanceof RegExp&&Qr(se.tagNameCheck,Fe)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Fe)))return!1;if(bt&&!tn[Fe]){const Tt=E(ce)||ce.parentNode,Qt=x(ce)||ce.childNodes;if(Qt&&Tt){const Ut=Qt.length;for(let $r=Ut-1;$r>=0;--$r){const br=l(Qt[$r],!0);br.__removalCount=(ce.__removalCount||0)+1,Tt.insertBefore(br,w(ce))}}}return Ln(ce),!0}return ce instanceof h&&!Mn(ce)||(Fe==="noscript"||Fe==="noembed"||Fe==="noframes")&&Qr(/<\/no(script|embed|frames)/i,ce.innerHTML)?(Ln(ce),!0):(ht&&ce.nodeType===ml.text&&(ze=ce.textContent,Wc([P,O,$],Tt=>{ze=pl(ze,Tt," ")}),ce.textContent!==ze&&(dl(e.removed,{element:ce.cloneNode()}),ce.textContent=ze)),ni(H.afterSanitizeElements,ce,null),!1)},zr=function(ce,ze,Fe){if(Wn&&(ze==="id"||ze==="name")&&(Fe in t||Fe in os))return!1;if(!(Me&&!me[ze]&&Qr(A,ze))&&!(Te&&Qr(N,ze))&&!(_e.attributeCheck instanceof Function&&_e.attributeCheck(ze,ce))){if(!ne[ze]||me[ze]){if(!(Dt(ce)&&(se.tagNameCheck instanceof RegExp&&Qr(se.tagNameCheck,ce)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ce))&&(se.attributeNameCheck instanceof RegExp&&Qr(se.attributeNameCheck,ze)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(ze,ce))||ze==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&Qr(se.tagNameCheck,Fe)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Fe))))return!1}else if(!bn[ze]&&!Qr(Z,pl(Fe,U,""))&&!((ze==="src"||ze==="xlink:href"||ze==="href")&&ce!=="script"&&YI(Fe,"data:")===0&&Ar[ce])&&!(Je&&!Qr(B,pl(Fe,U,"")))&&Fe)return!1}return!0},Dt=function(ce){return ce!=="annotation-xml"&&Ud(ce,K)},No=function(ce){ni(H.beforeSanitizeAttributes,ce,null);const{attributes:ze}=ce;if(!ze||Ao(ce))return;const Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let Tt=ze.length;for(;Tt--;){const Qt=ze[Tt],{name:Ut,namespaceURI:$r,value:br}=Qt,Gn=Rn(Ut),Tr=br;let wn=Ut==="value"?Tr:XI(Tr);if(Fe.attrName=Gn,Fe.attrValue=wn,Fe.keepAttr=!0,Fe.forceKeepAttr=void 0,ni(H.uponSanitizeAttribute,ce,Fe),wn=Fe.attrValue,ir&&(Gn==="id"||Gn==="name")&&(Sr(Ut,ce),wn=Or+wn),st&&Qr(/((--!?|])>)|<\/(style|title|textarea)/i,wn)){Sr(Ut,ce);continue}if(Gn==="attributename"&&Ud(wn,"href")){Sr(Ut,ce);continue}if(Fe.forceKeepAttr)continue;if(!Fe.keepAttr){Sr(Ut,ce);continue}if(!Xe&&Qr(/\/>/i,wn)){Sr(Ut,ce);continue}ht&&Wc([P,O,$],jr=>{wn=pl(wn,jr," ")});const uo=Rn(ce.nodeName);if(!zr(uo,Gn,wn)){Sr(Ut,ce);continue}if(_&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!$r)switch(c.getAttributeType(uo,Gn)){case"TrustedHTML":{wn=_.createHTML(wn);break}case"TrustedScriptURL":{wn=_.createScriptURL(wn);break}}if(wn!==Tr)try{$r?ce.setAttributeNS($r,Ut,wn):ce.setAttribute(Ut,wn),Ao(ce)?Ln(ce):Jb(e.removed)}catch{Sr(Ut,ce)}}ni(H.afterSanitizeAttributes,ce,null)},_r=function ce(ze){let Fe=null;const Tt=ko(ze);for(ni(H.beforeSanitizeShadowDOM,ze,null);Fe=Tt.nextNode();)ni(H.uponSanitizeShadowNode,Fe,null),xi(Fe),No(Fe),Fe.content instanceof p&&ce(Fe.content);ni(H.afterSanitizeShadowDOM,ze,null)};return e.sanitize=function(ce){let ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=null,Tt=null,Qt=null,Ut=null;if(Jr=!ce,Jr&&(ce="<!-->"),typeof ce!="string"&&!ss(ce))if(typeof ce.toString=="function"){if(ce=ce.toString(),typeof ce!="string")throw fl("dirty is not a string, aborting")}else throw fl("toString is not a function");if(!e.isSupported)return ce;if(Zt||Tn(ze),e.removed=[],typeof ce=="string"&&(qe=!1),qe){if(ce.nodeName){const Gn=Rn(ce.nodeName);if(!J[Gn]||de[Gn])throw fl("root node is forbidden and cannot be sanitized in-place")}}else if(ce instanceof b)Fe=wi("<!---->"),Tt=Fe.ownerDocument.importNode(ce,!0),Tt.nodeType===ml.element&&Tt.nodeName==="BODY"||Tt.nodeName==="HTML"?Fe=Tt:Fe.appendChild(Tt);else{if(!Ht&&!ht&&!dt&&ce.indexOf("<")===-1)return _&&fn?_.createHTML(ce):ce;if(Fe=wi(ce),!Fe)return Ht?null:fn?k:""}Fe&&$n&&Ln(Fe.firstChild);const $r=ko(qe?ce:Fe);for(;Qt=$r.nextNode();)xi(Qt),No(Qt),Qt.content instanceof p&&_r(Qt.content);if(qe)return ce;if(Ht){if(kr)for(Ut=D.call(Fe.ownerDocument);Fe.firstChild;)Ut.appendChild(Fe.firstChild);else Ut=Fe;return(ne.shadowroot||ne.shadowrootmode)&&(Ut=I.call(r,Ut,!0)),Ut}let br=dt?Fe.outerHTML:Fe.innerHTML;return dt&&J["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&Qr(o0,Fe.ownerDocument.doctype.name)&&(br="<!DOCTYPE "+Fe.ownerDocument.doctype.name+`>
|
|
1502
|
+
`+br),ht&&Wc([P,O,$],Gn=>{br=pl(br,Gn," ")}),_&&fn?_.createHTML(br):br},e.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tn(ce),Zt=!0},e.clearConfig=function(){vi=null,Zt=!1},e.isValidAttribute=function(ce,ze,Fe){vi||Tn({});const Tt=Rn(ce),Qt=Rn(ze);return zr(Tt,Qt,Fe)},e.addHook=function(ce,ze){typeof ze=="function"&&dl(H[ce],ze)},e.removeHook=function(ce,ze){if(ze!==void 0){const Fe=KI(H[ce],ze);return Fe===-1?void 0:GI(H[ce],Fe,1)[0]}return Jb(H[ce])},e.removeHooks=function(ce){H[ce]=[]},e.removeAllHooks=function(){H=a0()},e}var hR=l0();const dR={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"}},pR={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()}`},sanitizedText:function(){return hR.sanitize(this.params.text)}},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=""}}},fR=["innerHTML"],gR={key:2},mR={key:3,class:"validate mt-4"};function vR(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-icon"),f=Ve("v-text-field"),s=Ve("v-card-text"),a=Ve("v-btn"),u=Ve("v-card-actions"),c=Ve("v-card"),i=Ve("v-dialog"),l=Ve("v-app");return ot(),Kt(l,null,{default:Pe(()=>[je(i,{modelValue:n.show,"onUpdate:modelValue":e[1]||(e[1]=m=>n.show=m),persistent:"",width:"600",onKeydown:Ol(p.cancel,["esc"])},{default:Pe(()=>[je(c,null,{default:Pe(()=>[je(b,{height:"24"},{default:Pe(()=>[je(g),Fn("span",null,Cn(n.params.title),1),je(g)]),_:1}),je(s,{class:"mt-4 pa-3"},{default:Pe(()=>[n.params.validateText?(ot(),Kt(h,{key:0,class:"mr-2"},{default:Pe(()=>[...e[2]||(e[2]=[Rt(" mdi-alert ",-1)])]),_:1})):Kr("",!0),n.params.html?(ot(),rn("span",{key:1,innerHTML:p.sanitizedText},null,8,fR)):(ot(),rn("span",gR,Cn(p.sanitizedText),1)),n.params.validateText?(ot(),rn("div",mR,[Rt(" Enter "+Cn(n.params.validateText)+" to confirm! ",1),je(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"])])):Kr("",!0)]),_:1}),je(u,{class:"px-2"},{default:Pe(()=>[je(g),n.params.cancelText?(ot(),Kt(a,{key:0,variant:"outlined","data-test":p.dataTestCancel,onClick:p.cancel},{default:Pe(()=>[Rt(Cn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Kr("",!0),je(a,{variant:"flat",color:n.params.okClass,"data-test":p.dataTestOk,onClick:p.ok},{default:Pe(()=>[Rt(Cn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const yR=to(pR,[["render",vR],["__scopeId","data-v-016d2acf"]]);class bR{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(yR);e.use(Xd);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 wR={install(n,e){const t=new bR;n.provide("dialog",t),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=t)}},xR={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`
|
|
1503
|
+
--toast-bg-color:${Ld[this.toastNotification.level]};
|
|
1504
|
+
--toast-fg-color:${DE(this.toastNotification.level)};
|
|
1505
|
+
`},contentStyle:function(){return`
|
|
1506
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
|
1507
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
|
1508
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
|
1509
|
+
`}},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}}},CR={key:0,class:"text-subtitle-1 mr-1 notification-text"},kR={key:1,class:"text-body-2 notification-text"},AR={key:2,class:"text-body-2 notification-text"};function SR(n,e,t,r,d,p){const g=Ve("v-icon"),b=Ve("v-spacer"),h=Ve("v-btn"),f=Ve("v-sheet"),s=Ve("v-slide-y-transition");return ot(),Kt(s,null,{default:Pe(()=>[rf(je(f,{style:Cs(p.toastStyle),class:"toast-notification",onClick:p.expand},{default:Pe(()=>[je(g,{class:"mr-1 notification-text"},{default:Pe(()=>[Rt(Cn(p.toastNotificationIcon),1)]),_:1}),Fn("div",{class:"toast-content",style:Cs(p.contentStyle)},[n.toastNotification.title?(ot(),rn("span",CR,[n.toastNotification.body||n.toastNotification.message?(ot(),rn(ci,{key:0},[Rt(Cn(n.toastNotification.title)+": ",1)],64)):(ot(),rn(ci,{key:1},[Rt(Cn(n.toastNotification.title),1)],64))])):Kr("",!0),n.toastNotification.body?(ot(),rn("span",kR,Cn(n.toastNotification.body),1)):Kr("",!0),n.toastNotification.message?(ot(),rn("span",AR,Cn(n.toastNotification.message),1)):Kr("",!0)],4),je(b),je(h,{variant:"text",class:"notification-text",onClick:Wa(p.hide,["stop"])},{default:Pe(()=>[...e[0]||(e[0]=[Rt(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[of,n.showToast]])]),_:1})}const _R=to(xR,[["render",SR],["__scopeId","data-v-84833581"]]);class $R{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=_u(_R);e.use(Xd);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 TR={install(n,e){const t=new $R(e);n.provide("notify",t),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=t)}},c0=100,u0=lf({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>e=>n.namedWidgets[e]},mutations:{notifyAddHistory(n,e){n.notifyHistory.length>=c0&&(n.notifyHistory.length=c0-1),n.notifyHistory.unshift(e)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,e){Object.assign(n.namedWidgets,e)},clearNamedWidget(n,e){delete n.namedWidgets[e]},playback(n,e){Object.assign(n.playback,e)}},modules:{}});function MR(n){Xp(`Vuetify: ${n}`)}function h0(n){let e;return n!==null&&typeof n=="object"&&((e=Object.getPrototypeOf(n))===Object.prototype||e===null)}function ER(n,e){const t={};for(const r of e)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}function d0(){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(h0(p)&&h0(g)){r[d]=d0(p,g,t);continue}if(t&&Array.isArray(p)&&Array.isArray(g)){r[d]=t(p,g);continue}r[d]=g}return r}function vl(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(vl.cache.has(n))return vl.cache.get(n);const e=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return vl.cache.set(n,e),e}vl.cache=new Map;function p0(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 f0(n,e){const t=tf();if(!t)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return t}function IR(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f0("injectSelf");const{provides:t}=e;if(t&&n in t)return t[n]}const Yd=Symbol.for("vuetify:defaults");function g0(){const n=Qp(Yd);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function RR(n,e){return n.props&&(typeof n.props[e]<"u"||typeof n.props[vl(e)]<"u")}function LR(){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]:g0();const r=f0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const d=Su(()=>{var h;return(h=t.value)==null?void 0:h[n._as??e]}),p=new Proxy(n,{get(h,f){var s,a,u,c;const i=Reflect.get(h,f);if(f==="class"||f==="style")return[(s=d.value)==null?void 0:s[f],i].filter(w=>w!=null);if(RR(r.vnode,f))return i;const l=(a=d.value)==null?void 0:a[f];if(l!==void 0)return l;const m=(c=(u=t.value)==null?void 0:u.global)==null?void 0:c[f];return m!==void 0?m:i}}),g=Zp();Jp(()=>{if(d.value){const h=Object.entries(d.value).filter(f=>{let[s]=f;return s.startsWith(s[0].toUpperCase())});g.value=h.length?Object.fromEntries(h):void 0}else g.value=void 0});function b(){const h=IR(Yd,r);nf(Yd,Su(()=>g.value?d0((h==null?void 0:h.value)??{},g.value):h==null?void 0:h.value))}return{props:p,provideSubDefaults:b}}function zc(n){if(n._setup=n._setup??n.setup,!n.name)return MR("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=p0(n.props??{},n.name)();const e=Object.keys(n.props).filter(t=>t!=="class"&&t!=="style");n.filterProps=function(t){return ER(t,e)},n.props._as=String,n.setup=function(t,r){const d=g0();if(!d.value)return n._setup(t,r);const{props:p,provideSubDefaults:g}=LR(t,t._as??n.name,d),b=n._setup(p,r);return g(),b}}return n}function OR(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?zc:Yp)(e)}const NR=[String,Function,Object,Array],jc=p0({icon:{type:NR},tag:{type:[String,Object,Function],required:!0}},"icon");OR()({name:"VComponentIcon",props:jc(),setup(n,e){let{slots:t}=e;return()=>{const r=n.icon;return je(n.tag,null,{default:()=>{var d;return[n.icon?je(r,null,null):(d=t.default)==null?void 0:d.call(t)]}})}}}),zc({name:"VSvgIcon",inheritAttrs:!1,props:jc(),setup(n,e){let{attrs:t}=e;return()=>je(n.tag,Ll(t,{style:null}),{default:()=>[Fn("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)?Fn("path",{d:r[0],"fill-opacity":r[1]},null):Fn("path",{d:r},null)):Fn("path",{d:n.icon},null)])]})}}),zc({name:"VLigatureIcon",props:jc(),setup(n){return()=>je(n.tag,null,{default:()=>[n.icon]})}});const DR=zc({name:"VClassIcon",props:jc(),setup(n){return()=>je(n.tag,{class:ef(n.icon)},null)}}),FR={component:n=>ia(DR,{...n,class:"mdi"})},Xd=cf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:dR}},icons:{defaultSet:"mdi",sets:{mdi:FR,...PE,...WE}}}),Qd=cx({createApp:_u,appOptions:{render(){return ia(vx,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(jI),n.use(u0),n.use(Xd),n.use(wR),n.use(TR,{store:u0})}}),IP=pr("g",Qd.bootstrap),RP=pr("m",Qd.mount),LP=pr("u",Qd.unmount)}}});
|