openc3-cosmos-tool-admin 6.2.1 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/admin/{ArrayWidget-BxEO5hEG-5c784cf69c59ef56f770.js → ArrayWidget-BbsN1dzF-45b3f0b1b85d0816b4d6.js} +2 -2
- data/tools/admin/{ArrayplotWidget-B_VPoV4v-4c480a3fcc426de0cb30.js → ArrayplotWidget-CCKEyYIx-c2e9f297af8994f10499.js} +1 -1
- data/tools/admin/{BarColumn-C9dkpg2O-e489648e1026c2be35d5.js → BarColumn-C6p07yWK-7ae551032c38dd002d95.js} +1 -1
- data/tools/admin/BlockWidget-DlCHbqZX-d57a3ba05924d0dc73ce.js +2 -0
- data/tools/admin/{ButtonWidget-B6HM0Doo-668706e3573526170916.js → ButtonWidget-CtfJzCBR-15be1cfe08491243621a.js} +2 -2
- data/tools/admin/{CanvasWidget-DZQGG-yQ-9208dd10b8d9bf8fa386.js → CanvasWidget-CqRlXc4r-79ff690f6ab0548bac3b.js} +1 -1
- data/tools/admin/CanvasdotWidget--Xr_KsZs-5a996c74c5a7ef6bfffa.js +1 -0
- data/tools/admin/{CanvasimageWidget-mhcPpAuN-524715bd9e4a9c84bf1a.js → CanvasimageWidget-BPlj5QYK-d8e96ebe13755da5ca94.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-Cx-dH8Gc-127608d7211ba8c85eee.js → CanvasimagevalueWidget-DVFGLt8f-382d16c4c919b192bb21.js} +1 -1
- data/tools/admin/CanvaslabelWidget-CYNqmyP0-d63731e0f2c639a94217.js +1 -0
- data/tools/admin/{CanvaslabelvalueWidget-CwmYDCjr-50109c3b06e5e4acd0e2.js → CanvaslabelvalueWidget-B7yIDmsn-da8a435cddcb14c4220d.js} +1 -1
- data/tools/admin/CanvaslineWidget-BICdxX0Q-e6d7b79766b82eb0aa5f.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-C3sJnjLQ-ffa8ee418ab1756d7518.js → CanvaslinevalueWidget-Cq-Ddh0P-dd25267d6fe776a0eb4d.js} +1 -1
- data/tools/admin/CheckbuttonWidget-B74AWeaW-e5eac04dabbe8e75a50f.js +1 -0
- data/tools/admin/ComboboxWidget-CtyKbEWb-a3645988bb8f618c30b7.js +1 -0
- data/tools/admin/DateWidget-BEVSczU8-a8f6e93811962f188e0e.js +1 -0
- data/tools/admin/{DetailsDialog-BvbziA7Y-ee21a12298c291aba619.js → DetailsDialog-DmEC5BTs-f202c65b40d62e0a0258.js} +1 -1
- data/tools/admin/{DynamicWidget-gFSYxzvT-1236326c70d40ef4d209.js → DynamicWidget-CfMtj7H8-5d1fe4151a3a13875e72.js} +1 -1
- data/tools/admin/{FormatvalueWidget-CGpnTqVH-1965b1425ac5713160a7.js → FormatvalueWidget-DN12xymS-a183974bad17bb7102f9.js} +1 -1
- data/tools/admin/Graph-Bgo0cjl3-b73fb6638f6aac6b1a30.js +1 -0
- data/tools/admin/{GraphWidget-Dycey-mj-a42606ece40c58355625.js → GraphWidget-DurWDmpg-ebee4b7d87defdaf5d8f.js} +1 -1
- data/tools/admin/{HorizontalWidget-D31NRWy5-f726d836b7dd777022b8.js → HorizontalWidget-Cd_wl1b3-fba8f18453014a0565ad.js} +1 -1
- data/tools/admin/HorizontalboxWidget-BcMTFBU--324c3dc4fd5e49eab722.js +1 -0
- data/tools/admin/HorizontallineWidget-CXFqHclf-7ca376904e3068703325.js +1 -0
- data/tools/admin/{IframeWidget-Ctj8OIcG-cc657bab62ca5f6f87d1.js → IframeWidget-BPerHCCa-3abc66888f871f2424e0.js} +1 -1
- data/tools/admin/{ImageLoader-BrNrCBvi-2b1da3a869462ca330c6.js → ImageLoader-4N-7Gj61-d96791fc6c7c24e20145.js} +1 -1
- data/tools/admin/ImageviewerWidget-Cw_H_HmZ-abc4b56b182850c2b4b0.js +1 -0
- data/tools/admin/InterfacesTab-B4glsR9Z-d5c7b16796e27515e044.js +1 -0
- data/tools/admin/{LabelWidget-t7I87dp7-152d5a9b96441cbd8510.js → LabelWidget-xrmcVeq8-894f83570ba8b552e75c.js} +1 -1
- data/tools/admin/LabelledWidget-D48QoyMk-9c821f58c796d7ea4c9b.js +1 -0
- data/tools/admin/LabelprogressbarWidget-C_950t6g-5966ce8bbecbd42abbc8.js +1 -0
- data/tools/admin/LabelsparklineWidget-0KXQyPoU-3930edb58cf690a58dd4.js +1 -0
- data/tools/admin/{LabelvalueWidget-Zx_yHCtl-381f386667d56a433fb9.js → LabelvalueWidget-CQ06wWDK-330aee93b235b971e95c.js} +1 -1
- data/tools/admin/{LabelvaluedescWidget-BBSBh4vI-f245b73d7fee8fc3c134.js → LabelvaluedescWidget-Bo8zT01X-e92f203c5cc5204caebd.js} +1 -1
- data/tools/admin/{LabelvaluelimitsbarWidget-CZueHYWG-ae89b48f0240d8c4b536.js → LabelvaluelimitsbarWidget-BucTw8Yk-ef66fe7faa51e1c7fc96.js} +1 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-Dflb1hNd-bb82c73da598c7e933c6.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-BhYTBgDq-7f89e5b9ff7b9b67c0f1.js → LabelvaluerangebarWidget-D8cbfXFM-92fab7f5051516ce528f.js} +1 -1
- data/tools/admin/{Layout-Bh7VzCZd-e80015c167b538416f2a.js → Layout-Tf--nruw-e15025d3ca9d03d87e1b.js} +1 -1
- data/tools/admin/LedWidget-qH_FthkK-a5e74d98a22307a883a8.js +1 -0
- data/tools/admin/{LimitsbarWidget-Djui0IpK-424433c6317281d1676d.js → LimitsbarWidget-B9lAB2RD-96157ffc116593888b48.js} +1 -1
- data/tools/admin/{LimitscolorWidget-DdmvKzmx-65f584394050c5139c9d.js → LimitscolorWidget-c6Qa6su7-c2b237b1468b716361cd.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-Cc19IEjq-f2597f39e20f5fa18747.js → LimitscolumnWidget-CcLs_443-944fa38b9446f615b635.js} +1 -1
- data/tools/admin/LinegraphWidget-BSVYLFo1-27291b3efda84e682c36.js +1 -0
- data/tools/admin/{MatrixbycolumnsWidget-DnExVRF8-b4be1b437c0b336a1e23.js → MatrixbycolumnsWidget-DXFpZTre-1ca1fd46ec81aa27bdea.js} +1 -1
- data/tools/admin/{MicroservicesTab-IbTmbPxO-69cd3eeece33f36c8a8f.js → MicroservicesTab-mCdS0v39-72fa5667b8c938eb27e1.js} +1 -1
- data/tools/admin/OutputDialog-zVPZiZay-5273ae10027e2cc87949.js +1 -0
- data/tools/admin/{PackagesTab-BX8YP3H1-72f20ce8b559d7fcc13a.js → PackagesTab-SWcXumpK-e5ccc20003b13ccdbc6e.js} +1 -1
- data/tools/admin/{PluginsTab-Ds3jk64b-831383858209ff2c2d5e.js → PluginsTab-B64OvayB-be8b8a771af3d6802e37.js} +4 -4
- data/tools/admin/{ProgressbarWidget-DIfqhHRE-2775a9cde5a45b0de086.js → ProgressbarWidget-iYGw8-Dc-d9aad79edecffa90902a.js} +1 -1
- data/tools/admin/RadiobuttonWidget-ytmoVZ3u-3b94c9dfedbb30542025.js +1 -0
- data/tools/admin/{RadiogroupWidget-Ci9sCX39-e97afc1a22909e8b2b26.js → RadiogroupWidget-CusMBhKH-ee1c8dc1c59df58fd825.js} +1 -1
- data/tools/admin/{RangebarWidget-CN0YuHqy-e1cb05b7f6b1118dd2d0.js → RangebarWidget-D_zGTtCa-7d82a5779754daf85f09.js} +1 -1
- data/tools/admin/RedisTab-CyPo6ADN-aa1a495b5fb6171666f5.js +1 -0
- data/tools/admin/{RollupWidget-y4jBtJB2-bab638d154a5f2fd2c1e.js → RollupWidget-Dolsixyt-199f99293bbff747842b.js} +1 -1
- data/tools/admin/RoutersTab-Cs2dFVNA-aa50a4a447fca3f826bf.js +1 -0
- data/tools/admin/ScrollwindowWidget-DV2nZuNi-2918384639e5b480f5b0.js +1 -0
- data/tools/admin/{SecretsTab-BjviaTxh-33a36e028d57e1378d98.js → SecretsTab-DVyyyGlG-4344d670cf905ab60969.js} +1 -1
- data/tools/admin/SettingsTab-g29K6FyC-fc78aa7aefc9b0f48986.js +2 -0
- data/tools/admin/{SignalWidget-DQ5Uc2uV-1e83f917599853ee7901.js → SignalWidget-d9-6h85k-e129c862ab2e2862b245.js} +1 -1
- data/tools/admin/{SimpleTextDialog-CheuP_ls-d5f5a08e31cdf07b9a61.js → SimpleTextDialog-pwN8oRy1-2e2addd7ce31747515d9.js} +1 -1
- data/tools/admin/SpacerWidget-BH0p2OLi-b5ab05a35a2d859ed908.js +1 -0
- data/tools/admin/{SparklineWidget-CZtvu2ss-588212b5617f199fcd2e.js → SparklineWidget-coxi9r2g-8feb089ce863bd78d520.js} +1 -1
- data/tools/admin/TabbookWidget-B1XKplGH-73f77b706b86971b4ebc.js +1 -0
- data/tools/admin/{TargetsTab-Cd8U1aN_-968369f75aa684d02f9b.js → TargetsTab-BkBkXn9A-8425521e65f5456c008e.js} +1 -1
- data/tools/admin/TextboxWidget-C-_M2M4l-b9bef00f2cfe98fb3bf1.js +1 -0
- data/tools/admin/{TextfieldWidget-Df0ANSiU-766eb0d82b44a91ec200.js → TextfieldWidget-C08N4JE8-af5bb035574b2bdb1e55.js} +1 -1
- data/tools/admin/TimeWidget-DtwdEcFg-d89f9fbaa3072936e270.js +1 -0
- data/tools/admin/TitleWidget-CT-aLcNb-f3785ae131a4a7667761.js +1 -0
- data/tools/admin/{ToolsTab-Cgpb2nAW-5b5a3d23a36b0fdcce3c.js → ToolsTab-NveeVXz2-a2a58dfa69fac13c80e8.js} +2 -2
- data/tools/admin/{VWidget-C4spAawK-c884f9cea073da6d8ce9.js → VWidget-DQqb7NVW-878e082a9a9ab2278496.js} +1 -1
- data/tools/admin/ValueWidget-C6RanBj3-da5499cb68372d5227fc.js +1 -0
- data/tools/admin/ValuelimitsbarWidget-B3bvjfxc-fad1586e079efff45c2c.js +1 -0
- data/tools/admin/ValuelimitscolumnWidget-QvhI6EcE-b6e11e56e8ab9113b662.js +1 -0
- data/tools/admin/ValuerangebarWidget-Dt3K9BnC-4cb31018f254cafc9a8a.js +1 -0
- data/tools/admin/{VerticalWidget-D8jUFxjS-264cdd61b0515fa3092c.js → VerticalWidget-BIIViZgI-bbb379db718beaa2bc28.js} +1 -1
- data/tools/admin/VerticalboxWidget-DY72fLHW-69a1841223e1274653e7.js +1 -0
- data/tools/admin/{Widget-fRCERxGf-f53f0043a8d9f927971c.js → Widget-oyqWpFXJ-f34bf053b788271413fe.js} +1 -1
- data/tools/admin/main-fbb6d24d6c6c7aea815c.js +1508 -0
- data/tools/admin/main.js +1 -1
- metadata +81 -84
- data/tools/admin/BlockWidget-CuefOin6-b962c353c9f0eebc7117.js +0 -2
- data/tools/admin/CanvasdotWidget-6wuCSnw_-7a088d1c0dab274586f1.js +0 -1
- data/tools/admin/CanvaslabelWidget-CQZCeohU-e4296f8d11d95bf27acd.js +0 -1
- data/tools/admin/CanvaslineWidget-nTP3fJB4-9766cead6e6c429a7994.js +0 -1
- data/tools/admin/CheckbuttonWidget-5-8YDsQL-66299903b9cda3bd6623.js +0 -1
- data/tools/admin/ComboboxWidget-DzBL8h9f-f7b29907644dd0f506de.js +0 -1
- data/tools/admin/DateWidget-CW7Od7lB-adfa70f44dccea31a863.js +0 -1
- data/tools/admin/Graph-3rkhFP3G-6869b66611e6318604a7.js +0 -1
- data/tools/admin/HorizontalboxWidget-Br8dSVHD-d4aab2761ca77fa24390.js +0 -1
- data/tools/admin/HorizontallineWidget-CbxREBYI-ba4ec78147ff36e4335d.js +0 -1
- data/tools/admin/ImageviewerWidget-XrsqxmLo-9d5e7238e3c5ecd8748c.js +0 -1
- data/tools/admin/InterfacesTab-DAeNlGlB-e1c02697b38318186672.js +0 -1
- data/tools/admin/LabelledWidget-C7TDf92M-b20b3274d1d4e3403870.js +0 -1
- data/tools/admin/LabelprogressbarWidget-wwLURt1u-a3f647cb3382587c6885.js +0 -1
- data/tools/admin/LabelsparklineWidget-B3awLUyP-ef73c33807cdf20c1632.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-BTvzyQMq-4ee9e762abc78c9e5e22.js +0 -1
- data/tools/admin/LedWidget-CxJjJBBS-956a4190d5e60484cfa9.js +0 -1
- data/tools/admin/LinegraphWidget-BtieJxeL-a423148ceca6c5ff74e5.js +0 -1
- data/tools/admin/OutputDialog-Ci5OT_fH-68240dca0ee2eb272d32.js +0 -1
- data/tools/admin/RadiobuttonWidget-QzIkNP7m-959594855f51f05f1572.js +0 -1
- data/tools/admin/RedisTab-CVimDkIE-975b87301f5a5bcafa9c.js +0 -1
- data/tools/admin/RoutersTab-Dki_66av-ce7a2a94f241858d86d6.js +0 -1
- data/tools/admin/ScrollwindowWidget-CBzYk4Y3-20a2b344d6594be94af9.js +0 -1
- data/tools/admin/SettingsTab-Bo_dYXgb-b0ac92a82847e85fa46f.js +0 -2
- data/tools/admin/SpacerWidget-6rsc_dSM-5d0821a4a5e5cc101d3a.js +0 -1
- data/tools/admin/TabbookWidget-DNALU0jl-cc4c87c03bc6b35b8920.js +0 -1
- data/tools/admin/TextboxWidget-5hqPj74D-603dfe11a4dc847120f1.js +0 -1
- data/tools/admin/TimeWidget-C6XQMUG2-3bd332a4cb0aac40e4ec.js +0 -1
- data/tools/admin/TitleWidget-B9SPUlbW-d60e09a2b1e080a21e01.js +0 -1
- data/tools/admin/ValueWidget-D4RrYVEK-c14156e71f8c70447418.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-Bc9_Vj_f-5cefd3afaa0f3983b22f.js +0 -1
- data/tools/admin/ValuelimitscolumnWidget-DHKIL7sf-5f23f60b788a106ce9ac.js +0 -1
- data/tools/admin/ValuerangebarWidget-CecQRIok-c389d01eb001b34d9382.js +0 -1
- data/tools/admin/VerticalboxWidget-B4eGUSYH-8e7497fac1b85d79028a.js +0 -1
- data/tools/admin/main-89bee744bbd6e4811043.js +0 -1432
@@ -0,0 +1,1508 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,rt){"use strict";var Ue,Zt,lt,De,Pe,hn,ar,uf,hf,df,kn,Li,Xi,jt,_a,Qc,Ur,rs,js,ka,ff,pf,gf,mf,Zc,vf,yf,bf,wf,Jc,xf,Cf,_f,kf,Af,Sf,Tf;return{setters:[It=>{Ue=It.resolveComponent,Zt=It.createBlock,lt=It.openBlock,De=It.withCtx,Pe=It.createVNode,hn=It.createElementBlock,ar=It.createElementVNode,uf=It.useCssVars,hf=It.defineAsyncComponent,df=It.Teleport,kn=It.toDisplayString,Li=It.Fragment,Xi=It.renderList,jt=It.createTextVNode,_a=It.mergeProps,Qc=It.createSlots,Ur=It.createCommentVNode,rs=It.normalizeStyle,js=It.h,ka=It.withModifiers,ff=It.toRaw,pf=It.defineComponent,gf=It.warn,mf=It.inject,Zc=It.computed,vf=It.shallowRef,yf=It.watchEffect,bf=It.getCurrentInstance,wf=It.provide,Jc=It.createApp,xf=It.withDirectives,Cf=It.vShow},It=>{_f=It.createRouter,kf=It.createWebHistory},It=>{Af=It.getMountedApps},It=>{Sf=It.createStore},It=>{Tf=It.createVuetify}],execute:function(){sr({$:Df,c:vM,l:Tn,m:Sr,p:as,y:er,z:sd});var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),n.push.apply(n,r)}return n}function is(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$f(Object(n),!0).forEach(function(r){Gb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$f(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gb(t,e,n){return(e=function(r){var f=function(h,p){if(os(h)!=="object"||h===null)return h;var b=h[Symbol.toPrimitive];if(b!==void 0){var u=b.call(h,p);if(os(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(h)}(r,"string");return os(f)==="symbol"?f:String(f)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function os(t){return os=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},os(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,f=String(n),h=f.length,p=-1,b="",u=f.charCodeAt(0);++p<h;)(r=f.charCodeAt(p))!=0?b+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&u==45?"\\"+r.toString(16)+" ":p==0&&h==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(p):f.charAt(p):b+="�";return b};t.CSS||(t.CSS={}),t.CSS.escape=e})(It);var Yb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Xb(t){if(os(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=is(is({},Yb),t);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(os(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var n={};return{bootstrap:Qb.bind(null,e,n),mount:Zb.bind(null,e,n),unmount:ew.bind(null,e,n),update:Jb.bind(null,e,n)}}function Qb(t){return t.loadRootComponent?t.loadRootComponent().then(function(e){return t.rootComponent=e}):Promise.resolve()}function Zb(t,e,n){var r={};return Promise.resolve().then(function(){return function(f,h){return typeof f.appOptions=="function"?f.appOptions(h):Promise.resolve(is({},f.appOptions))}(t,n).then(function(f){var h;if(n.domElement&&!f.el&&(f.el=n.domElement),f.el)if(typeof f.el=="string"){if(!(h=document.querySelector(f.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(f.el))}else(h=f.el).id||(h.id="single-spa-application:".concat(n.name)),f.el="#".concat(CSS.escape(h.id));else{var p="single-spa-application:".concat(n.name);f.el="#".concat(CSS.escape(p)),(h=document.getElementById(p))||((h=document.createElement("div")).id=p,document.body.appendChild(h))}if(!t.replaceMode&&(f.el=f.el+" .single-spa-container",!h.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",h.appendChild(b)}r.domEl=h,f.render||f.template||!t.rootComponent||(f.render=function(g){return g(t.rootComponent)}),f.data||(f.data={});var u=f.data;if(f.data=function(){return is(is({},typeof u=="function"?u.call(this,this):u),n)},t.createApp){if(r.vueInstance=t.createApp(f),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return r.root=r.vueInstance.mount(f.el),e[n.name]=r,r.vueInstance});r.root=r.vueInstance.mount(f.el)}else if(r.vueInstance=new t.Vue(f),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return e[n.name]=r,r.vueInstance});return e[n.name]=r,r.vueInstance})})}function Jb(t,e,n){return Promise.resolve().then(function(){var r=e[n.name],f=is(is({},t.appOptions.data||{}),n),h=r.root||r.vueInstance;for(var p in f)h[p]=f[p]})}function ew(t,e,n){return Promise.resolve().then(function(){var r=e[n.name];t.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 tw=(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n},nw={};function rw(t,e){const n=Ue("router-view"),r=Ue("v-app");return lt(),Zt(r,{id:"innerapp"},{default:De(()=>[Pe(n)]),_:1})}const iw=tw(nw,[["render",rw]]),Mf=function(t){var e;!t.name!=="NotFound"&&(t.path=`/tools/admin/${t.path.replace(/^\//,"")}`),(e=t.children)==null||e.forEach(Mf)},HD="modulepreload",UD=function(t){return"/"+t},VD={},it=function(e,n,r){let f=Promise.resolve();function h(p){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=p,window.dispatchEvent(b),!b.defaultPrevented)throw p}return f.then(p=>{for(const b of p||[])b.status==="rejected"&&h(b.reason);return e().catch(h)})},Ri=sr("d",(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n}),ow="/icons/customIcons.svg",eu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return ow+"#"+this.icon}}},If=()=>{uf(t=>({"259824e2":t.color}))},Ef=eu.setup;eu.setup=Ef?(t,e)=>(If(),Ef(t,e)):If;const sw={class:"cosmos-custom-icon"},aw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},lw=["href"];function cw(t,e,n,r,f,h){return lt(),hn("span",sw,[(lt(),hn("svg",aw,[ar("use",{href:h.iconSrc},null,8,lw)]))])}const uw=Ri(eu,[["render",cw],["__scopeId","data-v-4b6f1199"]]),pl=6e4,tu=36e5,hw=1e3,Lf=Symbol.for("constructDateFrom");function er(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Lf in t?t[Lf](e):t instanceof Date?new t.constructor(e):new Date(e)}function Tn(t,e){return er(e||t,t)}let dw={};function zs(){return dw}function Oo(t,e){var n,r,f,h;const p=zs(),b=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??p.weekStartsOn??((h=(f=p.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,u=Tn(t,e==null?void 0:e.in),g=u.getDay(),s=(g<b?7:0)+g-b;return u.setDate(u.getDate()-s),u.setHours(0,0,0,0),u}function Hs(t,e){return Oo(t,{...e,weekStartsOn:1})}function Rf(t,e){const n=Tn(t,void 0),r=n.getFullYear(),f=er(n,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const h=Hs(f),p=er(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=Hs(p);return n.getTime()>=h.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function gl(t){const e=Tn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function fw(t,...e){const n=er.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Of(t,e){const n=Tn(t,void 0);return n.setHours(0,0,0,0),n}function pw(t,e,n){const[r,f]=fw(void 0,t,e),h=Of(r),p=Of(f),b=+h-gl(h),u=+p-gl(p);return Math.round((b-u)/864e5)}function gw(t,e){const n=Rf(t),r=er(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Hs(r)}function mw(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Df(t){return!(!mw(t)&&typeof t!="number"||isNaN(+Tn(t)))}function vw(t,e){const n=Tn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const yw={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"}},bw=(t,e,n)=>{let r;const f=yw[t];return typeof f=="string"?r=f:e===1?r=f.one:r=f.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function nu(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ww={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_w={date:nu({formats:ww,defaultWidth:"full"}),time:nu({formats:xw,defaultWidth:"full"}),dateTime:nu({formats:Cw,defaultWidth:"full"})},kw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Aw=(t,e,n,r)=>kw[t];function Aa(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let f;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;f=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;f=t.values[b]||t.values[p]}const h=t.argumentCallback?t.argumentCallback(e):e;return f[h]}}const Sw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$w={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"]},Mw={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"]},Iw={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"}},Ew={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"}},Lw=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rw={ordinalNumber:Lw,era:Aa({values:Sw,defaultWidth:"wide"}),quarter:Aa({values:Tw,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Aa({values:$w,defaultWidth:"wide"}),day:Aa({values:Mw,defaultWidth:"wide"}),dayPeriod:Aa({values:Iw,defaultWidth:"wide",formattingValues:Ew,defaultFormattingWidth:"wide"})};function Sa(t){return(e,n={})=>{const r=n.width,f=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],h=e.match(f);if(!h)return null;const p=h[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(b)?Dw(b,a=>a.test(p)):Ow(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(u):u,g=n.valueCallback?n.valueCallback(g):g;const s=e.slice(p.length);return{value:g,rest:s}}}function Ow(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dw(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Nw(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const f=r[0],h=e.match(t.parsePattern);if(!h)return null;let p=t.valueCallback?t.valueCallback(h[0]):h[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(f.length);return{value:p,rest:b}}}const Fw=/^(\d+)(th|st|nd|rd)?/i,Pw=/\d+/i,Ww={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},Bw={any:[/^b/i,/^(a|c)/i]},jw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zw={any:[/1/i,/2/i,/3/i,/4/i]},Hw={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},Uw={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]},Vw={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},qw={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]},Kw={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},Gw={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}},Yw={ordinalNumber:Nw({matchPattern:Fw,parsePattern:Pw,valueCallback:t=>parseInt(t,10)}),era:Sa({matchPatterns:Ww,defaultMatchWidth:"wide",parsePatterns:Bw,defaultParseWidth:"any"}),quarter:Sa({matchPatterns:jw,defaultMatchWidth:"wide",parsePatterns:zw,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Sa({matchPatterns:Hw,defaultMatchWidth:"wide",parsePatterns:Uw,defaultParseWidth:"any"}),day:Sa({matchPatterns:Vw,defaultMatchWidth:"wide",parsePatterns:qw,defaultParseWidth:"any"}),dayPeriod:Sa({matchPatterns:Kw,defaultMatchWidth:"any",parsePatterns:Gw,defaultParseWidth:"any"})},Nf={code:"en-US",formatDistance:bw,formatLong:_w,formatRelative:Aw,localize:Rw,match:Yw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xw(t,e){const n=Tn(t,void 0);return pw(n,vw(n))+1}function Ff(t,e){const n=Tn(t,void 0),r=+Hs(n)-+gw(n);return Math.round(r/6048e5)+1}function ru(t,e){var n,r,f,h;const p=Tn(t,e==null?void 0:e.in),b=p.getFullYear(),u=zs(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??u.firstWeekContainsDate??((h=(f=u.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=er((e==null?void 0:e.in)||t,0);s.setFullYear(b+1,0,g),s.setHours(0,0,0,0);const a=Oo(s,e),c=er((e==null?void 0:e.in)||t,0);c.setFullYear(b,0,g),c.setHours(0,0,0,0);const l=Oo(c,e);return+p>=+a?b+1:+p>=+l?b:b-1}function Qw(t,e){var n,r,f,h;const p=zs(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((h=(f=p.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,u=ru(t,e),g=er((e==null?void 0:e.in)||t,0);return g.setFullYear(u,0,b),g.setHours(0,0,0,0),Oo(g,e)}function Pf(t,e){const n=Tn(t,e==null?void 0:e.in),r=+Oo(n,e)-+Qw(n,e);return Math.round(r/6048e5)+1}function dn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Do={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return dn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):dn(n+1,2)},d(t,e){return dn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return dn(t.getHours()%12||12,e.length)},H(t,e){return dn(t.getHours(),e.length)},m(t,e){return dn(t.getMinutes(),e.length)},s(t,e){return dn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),f=Math.trunc(r*Math.pow(10,n-3));return dn(f,e.length)}},Us={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wf={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),f=r>0?r:1-r;return n.ordinalNumber(f,{unit:"year"})}return Do.y(t,e)},Y:function(t,e,n,r){const f=ru(t,r),h=f>0?f:1-f;if(e==="YY"){const p=h%100;return dn(p,2)}return e==="Yo"?n.ordinalNumber(h,{unit:"year"}):dn(h,e.length)},R:function(t,e){const n=Rf(t);return dn(n,e.length)},u:function(t,e){const n=t.getFullYear();return dn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return dn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return dn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Do.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return dn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const f=Pf(t,r);return e==="wo"?n.ordinalNumber(f,{unit:"week"}):dn(f,e.length)},I:function(t,e,n){const r=Ff(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):dn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Do.d(t,e)},D:function(t,e,n){const r=Xw(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const f=t.getDay(),h=(f-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(h);case"ee":return dn(h,2);case"eo":return n.ordinalNumber(h,{unit:"day"});case"eee":return n.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(f,{width:"short",context:"formatting"});case"eeee":default:return n.day(f,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const f=t.getDay(),h=(f-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(h);case"cc":return dn(h,e.length);case"co":return n.ordinalNumber(h,{unit:"day"});case"ccc":return n.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(f,{width:"narrow",context:"standalone"});case"cccccc":return n.day(f,{width:"short",context:"standalone"});case"cccc":default:return n.day(f,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),f=r===0?7:r;switch(e){case"i":return String(f);case"ii":return dn(f,e.length);case"io":return n.ordinalNumber(f,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let f;switch(r===12?f=Us.noon:r===0?f=Us.midnight:f=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let f;switch(r>=17?f=Us.evening:r>=12?f=Us.afternoon:r>=4?f=Us.morning:f=Us.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Do.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Do.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):dn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Do.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Do.s(t,e)},S:function(t,e){return Do.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return jf(r);case"XXXX":case"XX":return ss(r);case"XXXXX":case"XXX":default:return ss(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return jf(r);case"xxxx":case"xx":return ss(r);case"xxxxx":case"xxx":default:return ss(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Bf(r,":");case"OOOO":default:return"GMT"+ss(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Bf(r,":");case"zzzz":default:return"GMT"+ss(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return dn(r,e.length)},T:function(t,e,n){return dn(+t,e.length)}};function Bf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.trunc(r/60),h=r%60;return h===0?n+String(f):n+String(f)+e+dn(h,2)}function jf(t,e){return t%60===0?(t>0?"-":"+")+dn(Math.abs(t)/60,2):ss(t,e)}function ss(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=dn(Math.trunc(r/60),2),h=dn(r%60,2);return n+f+e+h}const zf=(t,e)=>{switch(t){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"})}},Hf=(t,e)=>{switch(t){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"})}},Zw=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],f=n[2];if(!f)return zf(t,e);let h;switch(r){case"P":h=e.dateTime({width:"short"});break;case"PP":h=e.dateTime({width:"medium"});break;case"PPP":h=e.dateTime({width:"long"});break;case"PPPP":default:h=e.dateTime({width:"full"});break}return h.replace("{{date}}",zf(r,e)).replace("{{time}}",Hf(f,e))},iu={p:Hf,P:Zw},Jw=/^D+$/,e1=/^Y+$/,t1=["D","DD","YY","YYYY"];function Uf(t){return Jw.test(t)}function Vf(t){return e1.test(t)}function ou(t,e,n){const r=n1(t,e,n);if(console.warn(r),t1.includes(t))throw new RangeError(r)}function n1(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const r1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o1=/^'([^]*?)'?$/,s1=/''/g,a1=/[a-zA-Z]/;function as(t,e,n){var r,f,h,p,b,u,g,s;const a=zs(),c=(n==null?void 0:n.locale)??a.locale??Nf,l=(n==null?void 0:n.firstWeekContainsDate)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(h=a.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((u=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:u.weekStartsOn)??a.weekStartsOn??((s=(g=a.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,d=Tn(t,n==null?void 0:n.in);if(!Df(d))throw new RangeError("Invalid time value");let m=e.match(i1).map(x=>{const I=x[0];if(I==="p"||I==="P"){const T=iu[I];return T(x,c.formatLong)}return x}).join("").match(r1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const I=x[0];if(I==="'")return{isToken:!1,value:l1(x)};if(Wf[I])return{isToken:!0,value:x};if(I.match(a1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:x}});c.localize.preprocessor&&(m=c.localize.preprocessor(d,m));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:c};return m.map(x=>{if(!x.isToken)return x.value;const I=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Vf(I)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Uf(I))&&ou(I,e,String(t));const T=Wf[I[0]];return T(d,I,c.localize,w)}).join("")}function l1(t){const e=t.match(o1);return e?e[1].replace(s1,"'"):t}var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qf={exports:{}},Kf;function c1(){return Kf||(Kf=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(s,a,c){if(typeof s!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),f.modules[s]||(f.payloads[s]=c,f.modules[s]=null)};f.modules={},f.payloads={};var h=function(s,a,c){if(typeof a=="string"){var l=u(s,a);if(l!=null)return c&&c(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],d=0,m=a.length;d<m;++d){var w=u(s,a[d]);if(w==null&&p.original)return;o.push(w)}return c&&c.apply(null,o)||!0}},p=function(s,a){var c=h("",s,a);return c==null&&p.original?p.original.apply(this,arguments):c},b=function(s,a){if(a.indexOf("!")!==-1){var c=a.split("!");return b(s,c[0])+"!"+b(s,c[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},u=function(s,a){a=b(s,a);var c=f.modules[a];if(!c){if(c=f.payloads[a],typeof c=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},d=function(w,x){return h(a,w,x)},m=c(d,l,o);l=m||o.exports,f.modules[a]=l,delete f.payloads[a]}c=f.modules[a]=l||c}return c};function g(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(f.original=a.define,a.define=f,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function h(p,b,u){Object.defineProperty(p,b,{value:u,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||h(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||h(String.prototype,"endsWith",function(p,b){var u=this;(b===void 0||b>u.length)&&(b=u.length),b-=p.length;var g=u.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||h(String.prototype,"repeat",function(p){for(var b="",u=this;p>0;)p&1&&(b+=u),(p>>=1)&&(u+=u);return b}),String.prototype.includes||h(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),u=1;u<arguments.length;u++){var g=arguments[u];g!=null&&Object.keys(g).forEach(function(s){b[s]=g[s]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||h(Array.prototype,"find",function(p){for(var b=this.length,u=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(u,s,g,this))return s}}),Array.prototype.findIndex||h(Array.prototype,"findIndex",function(p){for(var b=this.length,u=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(u,s,g,this))return g}}),Array.prototype.includes||h(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||h(Array.prototype,"fill",function(p){for(var b=this,u=b.length>>>0,g=arguments[1],s=g>>0,a=s<0?Math.max(u+s,0):Math.min(s,u),c=arguments[2],l=c===void 0?u:c>>0,o=l<0?Math.max(u+l,0):Math.min(l,u);a<o;)b[a]=p,a++;return b}),Array.of||h(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function h(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var u=0;u<p.length;u++)b[u]=h(p[u]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var u in p)b[u]=h(p[u]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,u){for(var g="";u>0;)u&1&&(g+=b),(u>>=1)&&(b+=b);return g};var h=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(h,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var u={};for(var g in b)u[g]=b[g];return u},r.copyArray=function(b){for(var u=[],g=0,s=b.length;g<s;g++)b[g]&&typeof b[g]=="object"?u[g]=this.copyObject(b[g]):u[g]=b[g];return u},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var u={},g=0;g<b.length;g++)u[b[g]]=1;return u},r.createMap=function(b){var u=Object.create(null);for(var g in b)u[g]=b[g];return u},r.arrayRemove=function(b,u){for(var g=0;g<=b.length;g++)u===b[g]&&b.splice(g,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,u){var g=[];return b.replace(u,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(b){var u=null,g=function(){u=null,b()},s=function(a){return s.cancel(),u=setTimeout(g,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),b(),s},s.cancel=function(){return clearTimeout(u),u=null,s},s.isPending=function(){return u},s},r.delayedCall=function(b,u){var g=null,s=function(){g=null,b()},a=function(c){g==null&&(g=setTimeout(s,c||u))};return a.delay=function(c){g&&clearTimeout(g),g=setTimeout(s,c||u)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,u,g){return g&&b.codePointAt(u)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){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 h=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),b=h.userAgent||"",u=h.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=u=="Microsoft Internet Explorer"||u.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(n,r,f){var h=n("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function c(l,o,d){if(typeof l=="string"&&l){var m=document.createTextNode(l);return o&&o.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var I=c(l[x],o,d);I&&w.push(I)}return w}var T=document.createElement(l[0]),_=l[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<l.length;x++)c(l[x],T,d);return C==2&&Object.keys(_).forEach(function(L){var R=_[L];L==="class"?T.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||L=="value"||L[0]=="$"?T[L]=R:L==="ref"?d&&(d[R]=T):L==="style"?typeof R=="string"&&(T.style.cssText=R):R!=null&&T.setAttribute(L,R)}),o&&o.appendChild(T),T},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,l){return document.createElementNS?document.createElementNS(l||p,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,l){var o=l?l.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var l=c?c.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(c,l){var o=(c.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(c,l){r.hasCssClass(c,l)||(c.className+=" "+l)},r.removeCssClass=function(c,l){for(var o=c.className.split(/\s+/g);;){var d=o.indexOf(l);if(d==-1)break;o.splice(d,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,l){for(var o=c.className.split(/\s+/g),d=!0;;){var m=o.indexOf(l);if(m==-1)break;d=!1,o.splice(m,1)}return d&&o.push(l),c.className=o.join(" "),d},r.setCssClass=function(c,l,o){o?r.addCssClass(c,l):r.removeCssClass(c,l)},r.hasCssString=function(c,l){var o=0,d;if(l=l||document,d=l.querySelectorAll("style")){for(;o<d.length;)if(d[o++].id===c)return!0}},r.removeElementById=function(c,l){l=l||document,l.getElementById(c)&&l.getElementById(c).remove()};var b,u=[];r.useStrictCSP=function(c){b=c,c==!1?g():u||(u=[])};function g(){var c=u;u=null,c&&c.forEach(function(l){s(l[0],l[1])})}function s(c,l,o){if(!(typeof document>"u")){if(u){if(o)g();else if(o===!1)return u.push([c,l])}if(!b){var d=o;!o||!o.getRootNode?d=document:(d=o.getRootNode(),(!d||d==o)&&(d=document));var m=d.ownerDocument||d;if(l&&r.hasCssString(l,d))return null;l&&(c+=`
|
2
|
+
/*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(c)),l&&(w.id=l),d==m&&(d=r.getDocumentHead(m)),d.insertBefore(w,d.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(c,l){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(l))},r.scrollbarWidth=function(c){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),d=o.style;d.position="absolute",d.left="-10000px",d.overflow="hidden",d.width="200px",d.minWidth="0px",d.height="150px",d.display="block",o.appendChild(l);var m=c&&c.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=l.offsetWidth;d.overflow="scroll";var x=l.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(c,l){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,l,o){c[l]!==o&&(c[l]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=h.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,h.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),!h.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,l,o){c.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,l,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,f){/*
|
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 h=n("./dom");r.get=function(p,b){var u=new XMLHttpRequest;u.open("GET",p,!0),u.onreadystatechange=function(){u.readyState===4&&b(u.responseText)},u.send(null)},r.loadScript=function(p,b){var u=h.getDocumentHead(),g=document.createElement("script");g.src=p,u.appendChild(g),g.onload=g.onreadystatechange=function(s,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||b())}},r.qualifyURL=function(p){var b=document.createElement("a");return b.href=p,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,f){r.inherits=function(h,p){h.super_=p,h.prototype=Object.create(p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(h,p){for(var b in p)h[b]=p[b];return h},r.implement=function(h,p){r.mixin(h,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,f){var h={},p=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};h._emit=h._dispatchEvent=function(u,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[u]||[],a=this._defaultHandlers[u];if(!(!s.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=u),g.stopPropagation||(g.stopPropagation=p),g.preventDefault||(g.preventDefault=b),s=s.slice();for(var c=0;c<s.length&&(s[c](g,this),!g.propagationStopped);c++);if(a&&!g.defaultPrevented)return a(g,this)}},h._signal=function(u,g){var s=(this._eventRegistry||{})[u];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](g,this)}},h.once=function(u,g){var s=this;if(this.on(u,function a(){s.off(u,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},h.setDefaultHandler=function(u,g){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[u]){var a=s[u],c=s._disabled_[u];c||(s._disabled_[u]=c=[]),c.push(a);var l=c.indexOf(g);l!=-1&&c.splice(l,1)}s[u]=g},h.removeDefaultHandler=function(u,g){var s=this._defaultHandlers;if(s){var a=s._disabled_[u];if(s[u]==g)a&&this.setDefaultHandler(u,a.pop());else if(a){var c=a.indexOf(g);c!=-1&&a.splice(c,1)}}},h.on=h.addEventListener=function(u,g,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[u];return a||(a=this._eventRegistry[u]=[]),a.indexOf(g)==-1&&a[s?"unshift":"push"](g),g},h.off=h.removeListener=h.removeEventListener=function(u,g){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[u];if(s){var a=s.indexOf(g);a!==-1&&s.splice(a,1)}},h.removeAllListeners=function(u){u||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[u]=void 0),this._defaultHandlers&&(this._defaultHandlers[u]=void 0)},r.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,r,f){r.reportError=function(h,p){var b=new Error(h);b.data=p,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,r,f){var h={"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=h}),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(n,r,f){"no use strict";var h=n("./oop"),p=n("./event_emitter").EventEmitter,b=n("./report_error").reportError,u=n("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(d){this.setOption(d,o[d])},this)},getOptions:function(o){var d={};if(o)Array.isArray(o)||(d=o,o=Object.keys(d));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){d[w]=this.getOption(w)},this),d},setOption:function(o,d){if(this["$"+o]!==d){var m=this.$options[o];if(!m)return s('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,d);m.handlesSet||(this["$"+o]=d),m&&m.set&&m.set.call(this,d)}},getOption:function(o){var d=this.$options[o];return d?d.forwardTo?this[d.forwardTo]&&this[d.forwardTo].getOption(o):d&&d.get?d.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,c,l=function(){function o(){this.$defaultOptions={},a=u,c="dollarSigns"}return o.prototype.defineOptions=function(d,m,w){return d.$options||(this.$defaultOptions[m]=d.$options={}),Object.keys(w).forEach(function(x){var I=w[x];typeof I=="string"&&(I={forwardTo:I}),I.name||(I.name=x),d.$options[I.name]=I,"initialValue"in I&&(d["$"+I.name]=I.initialValue)}),h.implement(d,g),this},o.prototype.resetOptions=function(d){Object.keys(d.$options).forEach(function(m){var w=d.$options[m];"value"in w&&d.setOption(m,w.value)})},o.prototype.setDefaultValue=function(d,m,w){if(!d){for(d in this.$defaultOptions)if(this.$defaultOptions[d][m])break;if(!this.$defaultOptions[d][m])return!1}var x=this.$defaultOptions[d]||(this.$defaultOptions[d]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(d,m){Object.keys(m).forEach(function(w){this.setDefaultValue(d,w,m[w])},this)},o.prototype.setMessages=function(d,m){a=d,m&&m.placeholders&&(c=m.placeholders)},o.prototype.nls=function(d,m,w){a[d]||(s("No message found for the key '"+d+"' 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[d]||a[m]||m;return w&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(I,T){return T=="$"?"$":w[T]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(I,T){return w[T]}))),x},o}();l.prototype.warn=s,l.prototype.reportError=b,h.implement(l.prototype,p),r.AppConfig=l}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,r,f){f.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(n,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var h=n("../lib/dom");h.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(n,r,f){"no use strict";var h=n("./lib/lang"),p=n("./lib/net"),b=n("./lib/dom"),u=n("./lib/app_config").AppConfig;f.exports=r=new u;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(l){if(!g.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return g[l]},r.set=function(l,o){if(g.hasOwnProperty(l))g[l]=o;else if(this.setDefaultValue("",l,o)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&b.useStrictCSP(o)},r.all=function(){return h.copyObject(g)},r.$modes={},r.moduleUrl=function(l,o){if(g.$moduleUrls[l])return g.$moduleUrls[l];var d=l.split("/");o=o||d[d.length-2]||"";var m=o=="snippets"?"/":"-",w=d[d.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&d.length>1&&(w=d[d.length-2]);var I=g[o+"Path"];return I==null?I=g.basePath:m=="/"&&(o=m=""),I&&I.slice(-1)!="/"&&(I+="/"),I+o+m+w+this.get("suffix")},r.setModuleUrl=function(l,o){return g.$moduleUrls[l]=o};var s=function(l,o){if(l==="ace/theme/textmate"||l==="./theme/textmate")return o(null,n("./theme/textmate"));if(a)return a(l,o);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,o){var d;if(Array.isArray(l))var m=l[0],w=l[1];else if(typeof l=="string")var w=l;var x=function(I){if(I&&!r.$loading[w])return o&&o(I);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){s(w,function(_,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var L=r.$loading[w];r.$loading[w]=null,L.forEach(function(R){R&&R(C)})})};if(!r.get("packaged"))return T();p.loadScript(r.moduleUrl(w,m),T),c()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(I){I.default?x(I.default):x(I)});else{try{d=this.$require(w)}catch{}x(d||r.$loaded[w])}},r.$require=function(l){if(typeof f.require=="function"){var o="require";return f[o](l)}},r.setModuleLoader=function(l,o){r.dynamicModules[l]=o};var c=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};r.version="1.39.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,f){n("./lib/fixoldbrowsers");var h=n("./config");h.setLoader(function(g,s){n([g],function(a){s(null,a)})});var p=function(){return this||typeof window<"u"&&window}();f.exports=function(g){h.init=b,h.$require=n,g.require=n},b(!0);function b(g){if(!(!p||!p.document)){h.set("packaged",g||n.packaged||f.packaged||p.define&&(void 0).packaged);var s={},a="",c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=l.getElementsByTagName("script"),d=0;d<o.length;d++){var m=o[d],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,I=0,T=x.length;I<T;I++){var _=x[I];_.name.indexOf("data-ace-")===0&&(s[u(_.name.replace(/^data-ace-/,""))]=_.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 L in s)typeof s[L]<"u"&&h.set(L,s[L])}}function u(g){return g.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,f){var h=function(){function p(b,u,g,s){this.start={row:b,column:u},this.end={row:g,column:s}}return p.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},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(b,u){return this.compare(b,u)==0},p.prototype.compareRange=function(b){var u,g=b.end,s=b.start;return u=this.compare(g.row,g.column),u==1?(u=this.compare(s.row,s.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(s.row,s.column),u==-1?-1:u==1?42:0)},p.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},p.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},p.prototype.intersects=function(b){var u=this.compareRange(b);return u==-1||u==0||u==1},p.prototype.isEnd=function(b,u){return this.end.row==b&&this.end.column==u},p.prototype.isStart=function(b,u){return this.start.row==b&&this.start.column==u},p.prototype.setStart=function(b,u){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=u)},p.prototype.setEnd=function(b,u){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=u)},p.prototype.inside=function(b,u){return this.compare(b,u)==0?!(this.isEnd(b,u)||this.isStart(b,u)):!1},p.prototype.insideStart=function(b,u){return this.compare(b,u)==0?!this.isEnd(b,u):!1},p.prototype.insideEnd=function(b,u){return this.compare(b,u)==0?!this.isStart(b,u):!1},p.prototype.compare=function(b,u){return!this.isMultiLine()&&b===this.start.row?u<this.start.column?-1:u>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?u>=this.start.column?0:-1:this.end.row===b?u<=this.end.column?0:1:0},p.prototype.compareStart=function(b,u){return this.start.row==b&&this.start.column==u?-1:this.compare(b,u)},p.prototype.compareEnd=function(b,u){return this.end.row==b&&this.end.column==u?1:this.compare(b,u)},p.prototype.compareInside=function(b,u){return this.end.row==b&&this.end.column==u?1:this.start.row==b&&this.start.column==u?-1:this.compare(b,u)},p.prototype.clipRows=function(b,u){if(this.end.row>u)var g={row:u+1,column:0};else if(this.end.row<b)var g={row:b,column:0};if(this.start.row>u)var s={row:u+1,column:0};else if(this.start.row<b)var s={row:b,column:0};return p.fromPoints(s||this.start,g||this.end)},p.prototype.extend=function(b,u){var g=this.compare(b,u);if(g==0)return this;if(g==-1)var s={row:b,column:u};else var a={row:b,column:u};return p.fromPoints(s||this.start,a||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(b){var u=b.documentToScreenPosition(this.start),g=b.documentToScreenPosition(this.end);return new p(u.row,u.column,g.row,g.column)},p.prototype.moveBy=function(b,u){this.start.row+=b,this.start.column+=u,this.end.row+=b,this.end.column+=u},p}();h.fromPoints=function(p,b){return new h(p.row,p.column,b.row,b.column)},h.comparePoints=function(p,b){return p.row-b.row||p.column-b.column},r.Range=h}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,f){for(var h=n("./oop"),p={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},u=0;u<10;u++)b["Digit"+u]=48+u,b["Numpad"+u]=96+u,p.PRINTABLE_KEYS[48+u]=""+u,p.FUNCTION_KEYS[96+u]="Numpad"+u;for(var u=65;u<91;u++){var g=String.fromCharCode(u+32);b["Key"+g.toUpperCase()]=u,p.PRINTABLE_KEYS[u]=g}for(var u=1;u<13;u++)b["F"+u]=111+u,p.FUNCTION_KEYS[111+u]="F"+u;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,p.PRINTABLE_KEYS[173]="-";for(var c in p.FUNCTION_KEYS){var l=p.FUNCTION_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}for(var c in p.PRINTABLE_KEYS){var l=p.PRINTABLE_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}h.mixin(p,p.MODIFIER_KEYS),h.mixin(p,p.PRINTABLE_KEYS),h.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,function(){for(var o=["cmd","ctrl","alt","shift"],d=Math.pow(2,o.length);d--;)p.KEY_MODS[d]=o.filter(function(m){return d&p.KEY_MODS[m]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",h.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var d=p[o];return typeof d!="string"&&(d=String.fromCharCode(o)),d.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var h=n("./keys"),p=n("./useragent"),b=null,u=0,g;function s(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&s(),g}function c(I,T,_){this.elem=I,this.type=T,this.callback=_}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(I,T,_,C){I.addEventListener(T,_,a()),C&&C.$toDestroy.push(new c(I,T,_))},o=r.removeListener=function(I,T,_){I.removeEventListener(T,_,a())};r.stopEvent=function(I){return r.stopPropagation(I),r.preventDefault(I),!1},r.stopPropagation=function(I){I.stopPropagation&&I.stopPropagation()},r.preventDefault=function(I){I.preventDefault&&I.preventDefault()},r.getButton=function(I){return I.type=="dblclick"?0:I.type=="contextmenu"||p.isMac&&I.ctrlKey&&!I.altKey&&!I.shiftKey?2:I.button},r.capture=function(I,T,_){var C=I&&I.ownerDocument||document;function L(R){T&&T(R),_&&_(R),o(C,"mousemove",T),o(C,"mouseup",L),o(C,"dragstart",L)}return l(C,"mousemove",T),l(C,"mouseup",L),l(C,"dragstart",L),L},r.addMouseWheelListener=function(I,T,_){l(I,"wheel",function(C){var L=.15,R=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=R*L,C.wheelY=F*L;break;case C.DOM_DELTA_LINE:var E=15;C.wheelX=R*E,C.wheelY=F*E;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=R*H,C.wheelY=F*H;break}T(C)},_)},r.addMultiMouseDownListener=function(I,T,_,C,L){var R=0,F,E,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(r.getButton(S)!==0?R=0:S.detail>1?(R++,R>4&&(R=1)):R=1,p.isIE){var A=Math.abs(S.clientX-F)>5||Math.abs(S.clientY-E)>5;(!H||A)&&(R=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},T[R-1]||600),R==1&&(F=S.clientX,E=S.clientY)}if(S._clicks=R,_[C]("mousedown",S),R>4)R=0;else if(R>1)return _[C](P[R],S)}Array.isArray(I)||(I=[I]),I.forEach(function(S){l(S,"mousedown",O,L)})};function d(I){return 0|(I.ctrlKey?1:0)|(I.altKey?2:0)|(I.shiftKey?4:0)|(I.metaKey?8:0)}r.getModifierString=function(I){return h.KEY_MODS[d(I)]};function m(I,T,_){var C=d(T);if(!_&&T.code&&(_=h.$codeToKeyCode[T.code]||_),!p.isMac&&b){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(_===18||_===17){var L=T.location;if(_===17&&L===1)b[_]==1&&(u=T.timeStamp);else if(_===18&&C===3&&L===2){var R=T.timeStamp-u;R<50&&(b.altGr=!0)}}}if(_ in h.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&T.location===3&&(I(T,C,-_),T.defaultPrevented))){if(p.isChromeOS&&C&8){if(I(T,C,_),T.defaultPrevented)return;C&=-9}return!C&&!(_ in h.FUNCTION_KEYS)&&!(_ in h.PRINTABLE_KEYS)?!1:I(T,C,_)}}r.addCommandKeyListener=function(I,T,_){var C=null;l(I,"keydown",function(L){b[L.keyCode]=(b[L.keyCode]||0)+1;var R=m(T,L,L.keyCode);return C=L.defaultPrevented,R},_),l(I,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},_),l(I,"keyup",function(L){b[L.keyCode]=null},_),b||(w(),l(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var x=1;r.nextTick=function(I,T){T=T||window;var _="zero-timeout-message-"+x++,C=function(L){L.data==_&&(r.stopPropagation(L),o(T,"message",C),I())};l(T,"message",C),T.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(I,T){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):I()},T)},r.$idleBlockId=null,r.blockIdle=function(I){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},I||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(I){setTimeout(I,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,f){var h;f.exports={lineMode:!1,pasteCancelled:function(){return h&&h>Date.now()-50?!0:h=!1},cancel:function(){h=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(n,r,f){var h=n("../lib/event"),p=n("../config").nls,b=n("../lib/useragent"),u=n("../lib/dom"),g=n("../lib/lang"),s=n("../clipboard"),a=b.isChrome<18,c=b.isIE,l=b.isChrome>63,o=400,d=n("../lib/keys"),m=d.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,I=b.isMobile,T;T=function(_,C){var L=u.createElement("textarea");L.className="ace_text-input",L.setAttribute("wrap","off"),L.setAttribute("autocorrect","off"),L.setAttribute("autocapitalize","off"),L.setAttribute("spellcheck","false"),L.style.opacity="0",_.insertBefore(L,_.firstChild);var R=!1,F=!1,E=!1,H=!1,P="";I||(L.style.fontSize="1px");var O=!1,S=!1,A="",D=0,B=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===L}catch{}this.setNumberOfExtraLines=function(_e){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,_e<0){te=0;return}te=_e},this.setAriaLabel=function(){var _e="";if(C.$textInputAriaLabel&&(_e+="".concat(C.$textInputAriaLabel,", ")),C.session){var Ve=C.session.selection.cursor.row;_e+=p("text-input.aria-label","Cursor at row $0",[Ve+1])}L.setAttribute("aria-label",_e)},this.setAriaOptions=function(_e){_e.activeDescendant?(L.setAttribute("aria-haspopup","true"),L.setAttribute("aria-autocomplete",_e.inline?"both":"list"),L.setAttribute("aria-activedescendant",_e.activeDescendant)):(L.setAttribute("aria-haspopup","false"),L.setAttribute("aria-autocomplete","both"),L.removeAttribute("aria-activedescendant")),_e.role&&L.setAttribute("role",_e.role),_e.setLabel&&(L.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),h.addListener(L,"blur",function(_e){S||(C.onBlur(_e),he=!1)},C),h.addListener(L,"focus",function(_e){if(!S){if(he=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(_e),b.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||l||this.$focusScroll=="browser")return L.focus({preventScroll:!0});var _e=L.style.top;L.style.position="fixed",L.style.top="0px";try{var Ve=L.getBoundingClientRect().top!=0}catch{return}var Je=[];if(Ve)for(var vt=L.parentElement;vt&&vt.nodeType==1;)Je.push(vt),vt.setAttribute("ace_nocontext","true"),!vt.parentElement&&vt.getRootNode?vt=vt.getRootNode().host:vt=vt.parentElement;L.focus({preventScroll:!0}),Ve&&Je.forEach(function(Tt){Tt.removeAttribute("ace_nocontext")}),setTimeout(function(){L.style.position="",L.style.top=="0px"&&(L.style.top=_e)},0)},this.blur=function(){L.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var _e=C.curOp,Ve=_e&&_e.command&&_e.command.name;if(Ve!="insertstring"){var Je=Ve&&(_e.docChanged||_e.selectionChanged);E&&Je&&(A=L.value="",Jt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(_e,Ve){for(var Je=Ve,vt=1;vt<=_e-K&&vt<2*te+1;vt++)Je+=C.session.getLine(_e-vt).length+1;return Je},ae=w?function(_e){if(!(!he||R&&!_e||H)){_e||(_e="");var Ve=`
|
167
|
+
ab`+_e+`cde fg
|
168
|
+
`;Ve!=L.value&&(L.value=A=Ve);var Je=4,vt=4+(_e.length||(C.selection.isEmpty()?0:1));(D!=Je||B!=vt)&&L.setSelectionRange(Je,vt),D=Je,B=vt}}:function(){if(!(E||H)&&!(!he&&!Ae)){E=!0;var _e=0,Ve=0,Je="";if(C.session){var vt=C.selection,Tt=vt.getRange(),St=vt.cursor.row;St===Z+1?(K=Z+1,Z=K+2*te):St===K-1?(Z=K-1,K=Z-2*te):(St<K-1||St>Z+1)&&(K=St>te?St-te:0,Z=St>te?St+te:2*te);for(var Pt=[],Nt=K;Nt<=Z;Nt++)Pt.push(C.session.getLine(Nt));if(Je=Pt.join(`
|
169
|
+
`),_e=ne(Tt.start.row,Tt.start.column),Ve=ne(Tt.end.row,Tt.end.column),Tt.start.row<K){var pt=C.session.getLine(K-1);_e=Tt.start.row<K-1?0:_e,Ve+=pt.length+1,Je=pt+`
|
170
|
+
`+Je}else if(Tt.end.row>Z){var _t=C.session.getLine(Z+1);Ve=Tt.end.row>Z+1?_t.length:Tt.end.column,Ve+=Je.length+1,Je=Je+`
|
171
|
+
`+_t}else I&&St>0&&(Je=`
|
172
|
+
`+Je,Ve+=1,_e+=1);Je.length>o&&(_e<o&&Ve<o?Je=Je.slice(0,o):(Je=`
|
173
|
+
`,_e==Ve?_e=Ve=0:(_e=0,Ve=1)));var $n=Je+`
|
174
|
+
|
175
|
+
`;$n!=A&&(L.value=A=$n,D=B=$n.length)}if(Ae&&(D=L.selectionStart,B=L.selectionEnd),B!=Ve||D!=_e||L.selectionEnd!=B)try{L.setSelectionRange(_e,Ve),D=_e,B=Ve}catch{}E=!1}};this.resetSelection=ae,he&&C.onFocus();var ce=function(_e){return _e.selectionStart===0&&_e.selectionEnd>=A.length&&_e.value===A&&A&&_e.selectionEnd!==B},ue=function(_e){E||(R?R=!1:ce(L)?(C.selectAll(),ae()):I&&L.selectionStart!=D&&ae())},ye=null;this.setInputHandler=function(_e){ye=_e},this.getInputHandler=function(){return ye};var Ae=!1,$e=function(_e,Ve){if(Ae&&(Ae=!1),F)return ae(),_e&&C.onPaste(_e),F=!1,"";for(var Je=L.selectionStart,vt=L.selectionEnd,Tt=D,St=A.length-B,Pt=_e,Nt=_e.length-Je,pt=_e.length-vt,_t=0;Tt>0&&A[_t]==_e[_t];)_t++,Tt--;for(Pt=Pt.slice(_t),_t=1;St>0&&A.length-_t>D-1&&A[A.length-_t]==_e[_e.length-_t];)_t++,St--;Nt-=_t-1,pt-=_t-1;var $n=Pt.length-_t+1;if($n<0&&(Tt=-$n,$n=0),Pt=Pt.slice(0,$n),!Ve&&!Pt&&!Nt&&!Tt&&!St&&!pt)return"";H=!0;var $r=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",$r=!0),Pt&&!Tt&&!St&&!Nt&&!pt||O?C.onTextInput(Pt):C.onTextInput(Pt,{extendLeft:Tt,extendRight:St,restoreStart:Nt,restoreEnd:pt}),H=!1,A=_e,D=Je,B=vt,U=pt,$r?`
|
176
|
+
`:Pt},Ie=function(_e){if(E)return bn();if(_e&&_e.inputType){if(_e.inputType=="historyUndo")return C.execCommand("undo");if(_e.inputType=="historyRedo")return C.execCommand("redo")}var Ve=L.value,Je=$e(Ve,!0);(Ve.length>o+100||x.test(Je)||I&&D<1&&D==B)&&ae()},Ze=function(_e,Ve,Je){var vt=_e.clipboardData||window.clipboardData;if(!(!vt||a)){var Tt=c||Je?"Text":"text/plain";try{return Ve?vt.setData(Tt,Ve)!==!1:vt.getData(Tt)}catch(St){if(!Je)return Ze(St,Ve,!0)}}},Xe=function(_e,Ve){var Je=C.getCopyText();if(!Je)return h.preventDefault(_e);Ze(_e,Je)?(w&&(ae(Je),R=Je,setTimeout(function(){R=!1},10)),Ve?C.onCut():C.onCopy(),h.preventDefault(_e)):(R=!0,L.value=Je,L.select(),setTimeout(function(){R=!1,ae(),Ve?C.onCut():C.onCopy()}))},gt=function(_e){Xe(_e,!0)},at=function(_e){Xe(_e,!1)},mt=function(_e){var Ve=Ze(_e);s.pasteCancelled()||(typeof Ve=="string"?(Ve&&C.onPaste(Ve,_e),b.isIE&&setTimeout(ae),h.preventDefault(_e)):(L.value="",F=!0))};h.addCommandKeyListener(L,function(_e,Ve,Je){if(!E)return C.onCommandKey(_e,Ve,Je)},C),h.addListener(L,"select",ue,C),h.addListener(L,"input",Ie,C),h.addListener(L,"cut",gt,C),h.addListener(L,"copy",at,C),h.addListener(L,"paste",mt,C),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&h.addListener(_,"keydown",function(_e){if(!(b.isMac&&!_e.metaKey||!_e.ctrlKey))switch(_e.keyCode){case 67:at(_e);break;case 86:mt(_e);break;case 88:gt(_e);break}},C);var sn=function(_e){if(!(E||!C.onCompositionStart||C.$readOnly)&&(E={},!O)){_e.data&&(E.useTextareaForIME=!1),setTimeout(bn,0),C._signal("compositionStart"),C.on("mousedown",wr);var Ve=C.getSelectionRange();Ve.end.row=Ve.start.row,Ve.end.column=Ve.start.column,E.markerRange=Ve,E.selectionStart=D,C.onCompositionStart(E),E.useTextareaForIME?(A=L.value="",D=0,B=0):(L.msGetInputContext&&(E.context=L.msGetInputContext()),L.getInputContext&&(E.context=L.getInputContext()))}},bn=function(){if(!(!E||!C.onCompositionUpdate||C.$readOnly)){if(O)return wr();if(E.useTextareaForIME)C.onCompositionUpdate(L.value);else{var _e=L.value;$e(_e),E.markerRange&&(E.context&&(E.markerRange.start.column=E.selectionStart=E.context.compositionStartOffset),E.markerRange.end.column=E.markerRange.start.column+B-E.selectionStart+U)}}},Jt=function(_e){!C.onCompositionEnd||C.$readOnly||(E=!1,C.onCompositionEnd(),C.off("mousedown",wr),_e&&Ie())};function wr(){S=!0,L.blur(),L.focus(),S=!1}var wn=g.delayedCall(bn,50).schedule.bind(null,null);function Fn(_e){_e.keyCode==27&&L.value.length<L.selectionStart&&(E||(A=L.value),D=B=-1,ae()),wn()}h.addListener(L,"compositionstart",sn,C),h.addListener(L,"compositionupdate",bn,C),h.addListener(L,"keyup",Fn,C),h.addListener(L,"keydown",wn,C),h.addListener(L,"compositionend",Jt,C),this.getElement=function(){return L},this.setCommandMode=function(_e){O=_e,L.readOnly=!1},this.setReadOnly=function(_e){O||(L.readOnly=_e)},this.setCopyWithEmptySelection=function(_e){},this.onContextMenu=function(_e){Ae=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:_e}),this.moveToMouse(_e,!0)},this.moveToMouse=function(_e,Ve){P||(P=L.style.cssText),L.style.cssText=(Ve?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(D+B)*C.renderer.characterWidth*.5+"px;";var Je=C.container.getBoundingClientRect(),vt=u.computedStyle(C.container),Tt=Je.top+(parseInt(vt.borderTopWidth)||0),St=Je.left+(parseInt(vt.borderLeftWidth)||0),Pt=Je.bottom-Tt-L.clientHeight-2,Nt=function(pt){u.translate(L,pt.clientX-St-2,Math.min(pt.clientY-Tt-2,Pt))};Nt(_e),_e.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Pn),b.isWin&&h.capture(C.container,Nt,nr))},this.onContextMenuClose=nr;var Pn;function nr(){clearTimeout(Pn),Pn=setTimeout(function(){P&&(L.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var Ct=function(_e){C.textInput.onContextMenu(_e),nr()};h.addListener(L,"mouseup",Ct,C),h.addListener(L,"mousedown",function(_e){_e.preventDefault(),nr()},C),h.addListener(C.renderer.scroller,"contextmenu",Ct,C),h.addListener(L,"contextmenu",Ct,C),w&&Ke(_,C,L);function Ke(_e,Ve,Je){var vt=null,Tt=!1;Je.addEventListener("keydown",function(Pt){vt&&clearTimeout(vt),Tt=!0},!0),Je.addEventListener("keyup",function(Pt){vt=setTimeout(function(){Tt=!1},100)},!0);var St=function(Pt){if(document.activeElement===Je&&!(Tt||E||Ve.$mouseHandler.isMousePressed)&&!R){var Nt=Je.selectionStart,pt=Je.selectionEnd,_t=null,$n=0;if(Nt==0?_t=d.up:Nt==1?_t=d.home:pt>B&&A[pt]==`
|
177
|
+
`?_t=d.end:Nt<D&&A[Nt-1]==" "?(_t=d.left,$n=m.option):Nt<D||Nt==D&&B!=D&&Nt==pt?_t=d.left:pt>B&&A.slice(0,pt).split(`
|
178
|
+
`).length>2?_t=d.down:pt>B&&A[pt-1]==" "?(_t=d.right,$n=m.option):(pt>B||pt==B&&B!=D&&Nt==pt)&&(_t=d.right),Nt!==pt&&($n|=m.shift),_t){var $r=Ve.onCommandKey({},$n,_t);if(!$r&&Ve.commands){_t=d.keyCodeToString(_t);var Kr=Ve.commands.findKeyCommand($n,_t);Kr&&Ve.execCommand(Kr)}D=Nt,B=pt,ae("")}}};document.addEventListener("selectionchange",St),Ve.on("destroy",function(){document.removeEventListener("selectionchange",St)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},r.TextInput=T,r.$setUserAgentForTests=function(_,C){I=_,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var h=n("../lib/useragent"),p=0,b=550,u=function(){function a(c){c.$clickSelection=null;var l=c.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(d){c[d]=this[d]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return a.prototype.onMouseDown=function(c){var l=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var d=this.editor,m=c.getButton();if(m!==0){var w=d.getSelectionRange(),x=w.isEmpty();(x||m==1)&&d.selection.moveToPosition(o),m==2&&(d.textInput.onContextMenu(c.domEvent),h.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!d.isFocused()&&(d.focus(),this.$focusTimeout&&!this.$clickSelection&&!d.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},a.prototype.startSelect=function(c,l){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):l||o.selection.moveToPosition(c),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(o);if(d==-1)c=this.$clickSelection.end;else if(d==1)c=this.$clickSelection.start;else{var m=s(this.$clickSelection,o);o=m.cursor,c=m.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var l,o=this.editor,d=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[c](d.row,d.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(m.end.row!=d.row||m.end.column!=d.column)&&(d=m.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(m.start.row!=d.row||m.start.column!=d.column)&&(d=m.end);else if(w==-1&&x==1)d=m.end,l=m.start;else{var I=s(this.$clickSelection,d);d=I.cursor,l=I.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(d),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(c>p||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var l=c.getDocumentPosition(),o=this.editor,d=o.session,m=d.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(c){var l=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var d=o.getSelectionRange();d.isMultiLine()&&d.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(d.start.row),this.$clickSelection.end=o.selection.getLineRange(d.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(c){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,d=c.domEvent.timeStamp,m=d-o.t,w=m?c.wheelX/m:o.vx,x=m?c.wheelY/m:o.vy;m<b&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var I=Math.abs(w/x),T=!1;if(I>=1&&l.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(T=!0),I<=1&&l.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(T=!0),T)o.allowed=d;else if(d-o.allowed<b){var _=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);_?(T=!0,o.allowed=d):o.allowed=0}if(o.t=d,o.vx=w,o.vy=x,T)return l.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},a}();u.prototype.selectEnd=u.prototype.selectByLinesEnd,u.prototype.selectAllEnd=u.prototype.selectByLinesEnd,u.prototype.selectByWordsEnd=u.prototype.selectByLinesEnd,r.DefaultHandlers=u;function g(a,c,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-c,2))}function s(a,c){if(a.start.row==a.end.row)var l=2*c.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=c.column-4;else var l=2*c.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(h){h.stopPropagation();var p=h.currentTarget,b=p.scrollHeight>p.clientHeight;b||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var h=this&&this.__extends||function(){var d=function(m,w){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(x[T]=I[T])},d(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");d(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(d){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&d[m],x=0;if(w)return w.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&x>=d.length&&(d=void 0),{value:d&&d[x++],done:!d}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var u=n("./range").Range,g=n("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function d(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return d.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},d.prototype.getElement=function(){return this.$element||this.$init()},d.prototype.setText=function(m){this.getElement().textContent=m},d.prototype.setHtml=function(m){this.getElement().innerHTML=m},d.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},d.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},d.prototype.setTheme=function(m){this.$element.className=s+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},d.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)},d.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},d.prototype.getHeight=function(){return this.getElement().offsetHeight},d.prototype.getWidth=function(){return this.getElement().offsetWidth},d.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},d}(),c=function(){function d(){this.popups=[]}return d.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},d.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},d.prototype.updatePopups=function(){var m,w,x,I;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var _=p(this.popups),C=_.next();!C.done;C=_.next()){var L=C.value,R=!0;try{for(var F=(x=void 0,p(T)),E=F.next();!E.done;E=F.next()){var H=E.value;if(this.doPopupsOverlap(H,L)){R=!1;break}}}catch(P){x={error:P}}finally{try{E&&!E.done&&(I=F.return)&&I.call(F)}finally{if(x)throw x.error}}R?T.push(L):L.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=_.return)&&w.call(_)}finally{if(m)throw m.error}}},d.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),I=w.getElement().getBoundingClientRect();return x.left<I.right&&x.right>I.left&&x.top<I.bottom&&x.bottom>I.top},d}(),l=new c;r.popupManager=l,r.Tooltip=a;var o=function(d){h(m,d);function m(w){w===void 0&&(w=document.body);var x=d.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 I=x.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",x.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(x)),I.addEventListener("wheel",g),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var I=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(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,I=w.getDocumentPosition(),T=x.session.getLine(I.row);if(I.column==T.length){var _=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(I.row,I.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,I,T){var _=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=u.fromPoints(x.start,x.end);var L=C.textToScreenCoordinates(x.start.row,x.start.column),R=C.scroller.getBoundingClientRect();L.pageX<R.left&&(L.pageX=R.left);var F=this.getElement();F.innerHTML="",F.appendChild(I),F.style.maxHeight="",F.style.display="block";var E=F.clientHeight,H=F.clientWidth,P=window.innerHeight-L.pageY-C.lineHeight,O=!0;L.pageY-E<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-_+"px",F.style.top=O?"":L.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-H-_)+"px"}},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var h=this&&this.__extends||function(){var d=function(m,w){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(x[T]=I[T])},d(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");d(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(d){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&d[m],x=0;if(w)return w.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&x>=d.length&&(d=void 0),{value:d&&d[x++],done:!d}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),u=n("../lib/event"),g=n("../tooltip").Tooltip,s=n("../config").nls,a=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function l(d){var m=d.editor,w=m.renderer.$gutterLayer,x=new o(m,!0);d.editor.setDefaultHandler("guttermousedown",function(R){if(!(!m.isFocused()||R.getButton()!=0)){var F=w.getRegion(R);if(F!="foldWidgets"){var E=R.getDocumentPosition().row,H=m.session.selection;if(R.getShiftKey())H.selectTo(E,0);else{if(R.domEvent.detail==2)return m.selectAll(),R.preventDefault();d.$clickSelection=m.selection.getLineRange(E)}return d.setState("selectByLines"),d.captureMouse(R),R.preventDefault()}}});var I,T;function _(){var R=T.getDocumentPosition().row,F=m.session.getLength();if(R==F){var E=m.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(E>m.session.documentToScreenRow(H.row,H.column))return C()}if(x.showTooltip(R),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),d.$tooltipFollowsMouse)L(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var S=O.element.querySelector(".ace_gutter_annotation"),A=S.getBoundingClientRect(),D=x.getElement().style;D.left=A.right-a+"px",D.top=A.bottom-c+"px"}else L(T)}}function C(R){R&&R.type==="keydown"&&(R.ctrlKey||R.metaKey)||R&&R.type==="mouseout"&&(!R.relatedTarget||x.getElement().contains(R.relatedTarget))||(I&&(I=clearTimeout(I)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function L(R){x.setPosition(R.x,R.y)}d.editor.setDefaultHandler("guttermousemove",function(R){var F=R.domEvent.target||R.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget"))return C();x.isOpen&&d.$tooltipFollowsMouse&&L(R),T=R,!I&&(I=setTimeout(function(){I=null,T&&!d.isMousePressed&&_()},50))}),u.addListener(m.renderer.$gutter,"mouseout",function(R){T=null,x.isOpen&&(I=setTimeout(function(){I=null,C(R)},50))},m)}r.GutterHandler=l;var o=function(d){h(m,d);function m(w,x){x===void 0&&(x=!1);var I=d.call(this,w.container)||this;I.editor=w,I.visibleTooltipRow;var T=I.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",x&&(I.onMouseOut=I.onMouseOut.bind(I),T.addEventListener("mouseout",I.onMouseOut)),I}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,x){var I=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,_=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+_>I&&(w-=w+_-I),x+C>T&&(x-=20+C),g.prototype.setPosition.call(this,w,x)},Object.defineProperty(m,"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}),m.prototype.showTooltip=function(w){var x,I=this.editor.renderer.$gutterLayer,T=I.$annotations[w],_;T?_={displayText:Array.from(T.displayText),type:Array.from(T.type)}:_={displayText:[],type:[]};var C=I.session.getFoldLine(w);if(C&&I.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},F,E=w+1;E<=C.end.row;E++)if(I.$annotations[E])for(var H=0;H<I.$annotations[E].text.length;H++){var P=I.$annotations[E].type[H];L[P].push(I.$annotations[E].text[H]),(!F||R[P]<R[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(m.annotationsToSummaryString(L)," in folded code.");_.displayText.push(O),_.type.push(F+"_fold")}}if(_.displayText.length===0)return this.hideTooltip();for(var S={error:[],security:[],warning:[],info:[],hint:[]},A=I.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<_.displayText.length;E++){var D=b.createElement("span"),B=b.createElement("span");(x=B.classList).add.apply(x,["ace_".concat(_.type[E]),A]),B.setAttribute("aria-label","".concat(m.annotationLabels[_.type[E].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(b.createTextNode(" ")),D.appendChild(B),D.appendChild(b.createTextNode(_.displayText[E])),D.appendChild(b.createElement("br")),S[_.type[E].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),S.error.forEach(function(K){return U.appendChild(K)}),S.security.forEach(function(K){return U.appendChild(K)}),S.warning.forEach(function(K){return U.appendChild(K)}),S.info.forEach(function(K){return U.appendChild(K)}),S.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var x,I,T=[],_=["error","security","warning","info","hint"];try{for(var C=p(_),L=C.next();!L.done;L=C.next()){var R=L.value;if(w[R].length){var F=w[R].length===1?m.annotationLabels[R].singular:m.annotationLabels[R].plural;T.push("".concat(w[R].length," ").concat(F))}}}catch(E){x={error:E}}finally{try{L&&!L.done&&(I=C.return)&&I.call(C)}finally{if(x)throw x.error}}return T.join(", ")},m}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var h=n("../lib/event"),p=n("../lib/useragent"),b=function(){function u(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return u.prototype.stopPropagation=function(){h.stopPropagation(this.domEvent),this.propagationStopped=!0},u.prototype.preventDefault=function(){h.preventDefault(this.domEvent),this.defaultPrevented=!0},u.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},u.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},u.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},u.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,s=g.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},u.prototype.getButton=function(){return h.getButton(this.domEvent)},u.prototype.getShiftKey=function(){return this.domEvent.shiftKey},u.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},u}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,f){var h=n("../lib/dom"),p=n("../lib/event"),b=n("../lib/useragent"),u=200,g=200,s=5;function a(l){var o=l.editor,d=h.createElement("div");d.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",d.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,x,I,T,_,C,L,R=0,F,E,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ce=ne.dataTransfer;ce.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(d),ce.setDragImage&&ce.setDragImage(d,0,0),setTimeout(function(){o.container.removeChild(d)}),ce.clearData(),ce.setData("Text",o.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,E=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,x||B(),R++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,x||(B(),R++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(R--,R<=0&&x)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(L){var ae=ne.dataTransfer;if(E)switch(F){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var ce=ae.getData("Text");C={start:L,end:o.session.insert(L,ce)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(l),o),p.addListener(w,"dragend",this.onDragEnd.bind(l),o),p.addListener(w,"dragenter",this.onDragEnter.bind(l),o),p.addListener(w,"dragover",this.onDragOver.bind(l),o),p.addListener(w,"dragleave",this.onDragLeave.bind(l),o),p.addListener(w,"drop",this.onDrop.bind(l),o);function S(ne,ae){var ce=Date.now(),ue=!ae||ne.row!=ae.row,ye=!ae||ne.column!=ae.column;if(!P||ue||ye)o.moveCursorToPosition(ne),P=ce,O={x:I,y:T};else{var Ae=c(O.x,O.y,I,T);Ae>s?P=null:ce-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ce=Date.now(),ue=o.renderer.layerConfig.lineHeight,ye=o.renderer.layerConfig.characterWidth,Ae=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:I-Ae.left,right:Ae.right-I},y:{top:T-Ae.top,bottom:Ae.bottom-T}},Ie=Math.min($e.x.left,$e.x.right),Ze=Math.min($e.y.top,$e.y.bottom),Xe={row:ne.row,column:ne.column};Ie/ye<=2&&(Xe.column+=$e.x.left<$e.x.right?-3:2),Ze/ue<=1&&(Xe.row+=$e.y.top<$e.y.bottom?-1:1);var gt=ne.row!=Xe.row,at=ne.column!=Xe.column,mt=!ae||ne.row!=ae.row;gt||at&&!mt?H?ce-H>=u&&o.renderer.scrollCursorIntoView(Xe):H=ce:H=null}function D(){var ne=L;L=o.renderer.screenToTextCoordinates(I,T),S(L,ne),A(L,ne)}function B(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),D(),_=setInterval(D,20),R=0,p.addListener(document,"mousemove",Z)}function U(){clearInterval(_),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!E&&o.$resetCursorStyle(),C=null,L=null,R=0,H=null,P=null,p.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ce){return ce=="text/plain"||ce=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],ue=b.isMac?ne.altKey:ne.ctrlKey,ye="uninitialized";try{ye=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ae="none";return ue&&ae.indexOf(ye)>=0?Ae="copy":ce.indexOf(ye)>=0?Ae="move":ae.indexOf(ye)>=0&&(Ae="copy"),Ae}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var d=b.isWin?"default":"move";l.renderer.setCursorStyle(d),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(b.isIE&&this.state=="dragReady"){var d=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>3&&o.dragDrop()}if(this.state==="dragWait"){var d=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,d=l.inSelection(),m=l.getButton(),w=l.domEvent.detail||1;if(w===1&&m===0&&d){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var I=o.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function c(l,o,d,m){return Math.sqrt(Math.pow(d-l,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var h=n("./mouse_event").MouseEvent,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(u,g){var s="scroll",a,c,l,o,d,m,w=0,x,I=0,T=0,_=0,C,L;function R(){var S=window.navigator&&window.navigator.clipboard,A=!1,D=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.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"],S&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},B=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,D();Z=="paste"?S.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(S?S.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){L&&E();return}L||R();var S=g.selection.cursor,A=g.renderer.textToScreenCoordinates(S.row,S.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,B=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=D+B-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",E)}function E(S){L&&(L.style.display="none"),g.off("input",E)}function H(){d=null,clearTimeout(d);var S=g.selection.getRange(),A=S.contains(x.row,x.column);(S.isEmpty()||!A)&&(g.selection.moveToPosition(x),g.selection.selectWord()),s="wait",F()}function P(){d=null,clearTimeout(d),g.selection.moveToPosition(x);var S=I>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);S&&!S.isEmpty()?g.selection.setRange(S):g.selection.selectWord(),s="wait"}p.addListener(u,"contextmenu",function(S){if(C){var A=g.textInput.getElement();A.focus()}},g),p.addListener(u,"touchstart",function(S){var A=S.touches;if(d||A.length>1){clearTimeout(d),d=null,l=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,B=g.renderer.layerConfig.lineHeight,U=S.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(c-te)>D&&(l=-1),a=S.clientX=Z,c=S.clientY=te,T=_=0;var he=new h(S,g);if(x=he.getDocumentPosition(),U-l<500&&A.length==1&&!w)I++,S.preventDefault(),S.button=0,P();else{I=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ce=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ue=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ye=g.renderer.scroller.getBoundingClientRect(),Ae=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ie=function(gt,at){return gt=gt/B,at=at/D-.75,gt*gt+at*at};if(S.clientX<ye.left){s="zoom";return}var Ze=Ie(S.clientX-ye.left-ce.left+$e,S.clientY-ye.top-ce.top+Ae),Xe=Ie(S.clientX-ye.left-ue.left+$e,S.clientY-ye.top-ue.top+Ae);Ze<3.5&&Xe<3.5&&(s=Ze>Xe?"cursor":"anchor"),Xe<3.5?s="anchor":Ze<3.5?s="cursor":s="scroll",d=setTimeout(H,450)}l=U},g),p.addListener(u,"touchend",function(S){C=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):d?(g.selection.moveToPosition(x),w=0,F()):s=="scroll"?(O(),E()):F(),clearTimeout(d),d=null},g),p.addListener(u,"touchmove",function(S){d&&(clearTimeout(d),d=null);var A=S.touches;if(!(A.length>1||s=="zoom")){var D=A[0],B=a-D.clientX,U=c-D.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return S.preventDefault();a=D.clientX,c=D.clientY,S.clientX=D.clientX,S.clientY=D.clientY;var K=S.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new h(S,g);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&(T=B/Z,_=U/Z),g._emit("mousewheel",te),te.propagationStopped||(T=_=0)}else{var he=new h(S,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),S.preventDefault()}}},g);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(_)<.01&&(_=0),w<20&&(T=.9*T),w<20&&(_=.9*_);var S=g.session.getScrollTop();g.renderer.scrollBy(10*T,10*_),S==g.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(n,r,f){var h=n("../lib/event"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,u=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,c=n("../config"),l=function(){function o(d){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=d,new b(this),new u(this),new s(this);var w=function(T){var _=!document.hasFocus||!document.hasFocus()||!d.isFocused()&&document.activeElement==(d.textInput&&d.textInput.getElement());_&&window.focus(),d.focus(),setTimeout(function(){d.isFocused()||d.focus()})},x=d.renderer.getMouseEventTarget();h.addListener(x,"click",this.onMouseEvent.bind(this,"click"),d),h.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),d),h.addMultiMouseDownListener([x,d.renderer.scrollBarV&&d.renderer.scrollBarV.inner,d.renderer.scrollBarH&&d.renderer.scrollBarH.inner,d.textInput&&d.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",d),h.addMouseWheelListener(d.container,this.onMouseWheel.bind(this,"mousewheel"),d),a(d.container,d);var I=d.renderer.$gutter;h.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),d),h.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),d),h.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),d),h.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),d),h.addListener(x,"mousedown",w,d),h.addListener(I,"mousedown",w,d),p.isIE&&d.renderer.scrollBarV&&(h.addListener(d.renderer.scrollBarV.element,"mousedown",w,d),h.addListener(d.renderer.scrollBarH.element,"mousedown",w,d)),d.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=d.renderer.screenToTextCoordinates(T.x,T.y),C=d.session.selection.getRange(),L=d.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},d)}return o.prototype.onMouseEvent=function(d,m){this.editor.session&&this.editor._emit(d,new g(m,this.editor))},o.prototype.onMouseMove=function(d,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(d,new g(m,this.editor))},o.prototype.onMouseWheel=function(d,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(d,w)},o.prototype.setState=function(d){this.state=d},o.prototype.captureMouse=function(d,m){this.x=d.x,this.y=d.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var I=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&I.releaseMouse)return I.releaseMouse();I.x=F.clientX,I.y=F.clientY,m&&m(F),I.mouseEvent=new g(F,I.editor),I.$mouseMoved=!0}},_=function(F){w.off("beforeEndOperation",L),clearInterval(R),w.session&&C(),I[I.state+"End"]&&I[I.state+"End"](F),I.state="",I.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,F&&I.onMouseEvent("mouseup",F),w.endOperation()},C=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1};if(p.isOldIE&&d.domEvent.type=="dblclick")return setTimeout(function(){_(d)});var L=function(F){I.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=T,I.releaseMouse=h.capture(this.editor.container,T,_);var R=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var d=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",d),m&&m.domEvent&&h.stopEvent(m.domEvent))}).bind(this);setTimeout(d,10),this.editor.on("nativecontextmenu",d)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var h=n("../lib/dom"),p=function(){function b(u){u.on("click",function(g){var s=g.getDocumentPosition(),a=u.session,c=a.getFoldAt(s.row,s.column,1);c&&(g.getAccelKey()?a.removeFold(c):a.expandFold(c),g.stop());var l=g.domEvent&&g.domEvent.target;l&&h.hasCssClass(l,"ace_inline_button")&&h.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),u.renderer.scrollCursorIntoView())}),u.on("gutterclick",function(g){var s=u.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=u.session;c.foldWidgets&&c.foldWidgets[a]&&u.session.onFoldWidgetClick(a,g),u.isFocused()||u.focus(),g.stop()}}),u.on("gutterdblclick",function(g){var s=u.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=u.session,l=c.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var d=c.getFoldAt(a,c.getLine(a).length,1);d?c.removeFold(d):(c.addFold("...",o),u.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var h=n("../lib/keys"),p=n("../lib/event"),b=function(){function u(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return u.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},u.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},u.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},u.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},u.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},u.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,g)||""}).filter(Boolean).join(" ")},u.prototype.$callKeyboardHandlers=function(g,s,a,c){for(var l,o=!1,d=this.$editor.commands,m=this.$handlers.length;m--&&(l=this.$handlers[m].handleKeyboard(this.$data,g,s,a,c),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=d.exec(l.command,this.$editor,l.args,c),o&&c&&g!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&p.stopEvent(c),o))););return!o&&g==-1&&(l={command:"insertstring"},o=d.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},u.prototype.onCommandKey=function(g,s,a){var c=h.keyCodeToString(a);return this.$callKeyboardHandlers(s,c,a,g)},u.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},u}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var h=0,p=0,b=!1,u=!1,g=!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]],c=0,l=1,o=0,d=1,m=2,w=3,x=4,I=5,T=6,_=7,C=8,L=9,R=10,F=11,E=12,H=13,P=14,O=15,S=16,A=17,D=18,B=[D,D,D,D,D,D,D,D,D,T,I,T,C,I,D,D,D,D,D,D,D,D,D,D,D,D,D,D,I,I,I,T,C,x,x,F,F,F,x,x,x,x,x,R,L,R,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,I,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,L,x,F,F,F,F,x,x,x,x,o,x,x,D,x,x,F,F,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,d,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,I,H,P,O,S,A,L,F,F,F,F,F,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function K(ne,ae,ce,ue){var ye=h?a:s,Ae=null,$e=null,Ie=null,Ze=0,Xe=null,gt=null,at=-1,mt=null,sn=null,bn=[];if(!ue)for(mt=0,ue=[];mt<ce;mt++)ue[mt]=he(ne[mt]);for(p=h,b=!1,u=!1,g=!1,sn=0;sn<ce;sn++){if(Ae=Ze,bn[sn]=$e=te(ne,ue,bn,sn),Ze=ye[Ae][$e],Xe=Ze&240,Ze&=15,ae[sn]=Ie=ye[Ze][5],Xe>0)if(Xe==16){for(mt=at;mt<sn;mt++)ae[mt]=1;at=-1}else at=-1;if(gt=ye[Ze][6],gt)at==-1&&(at=sn);else if(at>-1){for(mt=at;mt<sn;mt++)ae[mt]=Ie;at=-1}ue[sn]==I&&(ae[sn]=0),p|=Ie}if(g){for(mt=0;mt<ce;mt++)if(ue[mt]==T){ae[mt]=h;for(var Jt=mt-1;Jt>=0&&ue[Jt]==C;Jt--)ae[Jt]=h}}}function Z(ne,ae,ce){if(!(p<ne)){if(ne==1&&h==l&&!u){ce.reverse();return}for(var ue=ce.length,ye=0,Ae,$e,Ie,Ze;ye<ue;){if(ae[ye]>=ne){for(Ae=ye+1;Ae<ue&&ae[Ae]>=ne;)Ae++;for($e=ye,Ie=Ae-1;$e<Ie;$e++,Ie--)Ze=ce[$e],ce[$e]=ce[Ie],ce[Ie]=Ze;ye=Ae}ye++}}}function te(ne,ae,ce,ue){var ye=ae[ue],Ae,$e,Ie,Ze;switch(ye){case o:case d:b=!1;case x:case w:return ye;case m:return b?w:m;case _:return b=!0,d;case C:return x;case L:return ue<1||ue+1>=ae.length||(Ae=ce[ue-1])!=m&&Ae!=w||($e=ae[ue+1])!=m&&$e!=w?x:(b&&($e=w),$e==Ae?$e:x);case R:return Ae=ue>0?ce[ue-1]:I,Ae==m&&ue+1<ae.length&&ae[ue+1]==m?m:x;case F:if(ue>0&&ce[ue-1]==m)return m;if(b)return x;for(Ze=ue+1,Ie=ae.length;Ze<Ie&&ae[Ze]==F;)Ze++;return Ze<Ie&&ae[Ze]==m?m:x;case E:for(Ie=ae.length,Ze=ue+1;Ze<Ie&&ae[Ze]==E;)Ze++;if(Ze<Ie){var Xe=ne[ue],gt=Xe>=1425&&Xe<=2303||Xe==64286;if(Ae=ae[Ze],gt&&(Ae==d||Ae==_))return d}return ue<1||(Ae=ae[ue-1])==I?x:ce[ue-1];case I:return b=!1,u=!0,h;case T:return g=!0,x;case H:case P:case S:case A:case O:b=!1;case D:return x}}function he(ne){var ae=ne.charCodeAt(0),ce=ae>>8;return ce==0?ae>191?o:B[ae]:ce==5?/[\u0591-\u05f4]/.test(ne)?d:o:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:_:ce==32&&ae<=8287?U[ae&255]:ce==254&&ae>=65136?_:x}r.L=o,r.R=d,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ce){if(ne.length<2)return{};var ue=ne.split(""),ye=new Array(ue.length),Ae=new Array(ue.length),$e=[];h=ce?l:c,K(ue,$e,ue.length,ae);for(var Ie=0;Ie<ye.length;ye[Ie]=Ie,Ie++);Z(2,$e,ye),Z(1,$e,ye);for(var Ie=0;Ie<ye.length-1;Ie++)ae[Ie]===w?$e[Ie]=r.AN:$e[Ie]===d&&(ae[Ie]>_&&ae[Ie]<H||ae[Ie]===x||ae[Ie]===D)?$e[Ie]=r.ON_R:Ie>0&&ue[Ie-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Ie])&&($e[Ie-1]=$e[Ie]=r.R_H,Ie++);ue[ue.length-1]===r.DOT&&($e[ue.length-1]=r.B),ue[0]===""&&($e[0]=r.RLE);for(var Ie=0;Ie<ye.length;Ie++)Ae[Ie]=$e[ye[Ie]];return{logicalFromVisual:ye,bidiLevels:Ae}},r.hasBidiCharacters=function(ne,ae){for(var ce=!1,ue=0;ue<ne.length;ue++)ae[ue]=he(ne.charAt(ue)),!ce&&(ae[ue]==d||ae[ue]==_||ae[ue]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ne,ae){for(var ce=0;ce<ae.logicalFromVisual.length;ce++)if(ae.logicalFromVisual[ce]==ne)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var h=n("./lib/bidiutil"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,u=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=h,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 g.prototype.isBidiRow=function(s,a,c){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var c=this.session.$getRowCacheIndex(a,this.currentRow);c>=0&&(s=this.session.$docRowCache[c])}return s},g.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var c,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-s-1),c===l);)l=c,s++;else s=this.currentRow;return s},g.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var c=s===this.session.getLength()-1,l=c?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 o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[h.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?l:h.DOT))}else this.line+=this.showInvisibles?l:h.DOT;var d=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,I){return x===" "||d.isFullWidth(x.charCodeAt(0))?(w=x===" "?d.getScreenTabSize(I+m):2,m+=w-1,p.stringRepeat(h.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==h.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var s=[];h.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=h.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,c=s.$measureCharWidth("ה");this.charWidths[h.L]=this.charWidths[h.EN]=this.charWidths[h.ON_R]=a,this.charWidths[h.R]=this.charWidths[h.AN]=c,this.charWidths[h.R_H]=c*.45,this.charWidths[h.B]=this.charWidths[h.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},g.prototype.setEolChar=function(s){this.EOL=s},g.prototype.setContentWidth=function(s){this.contentWidth=s},g.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(s,a){for(var c=s.getCursorPosition(),l=s.selection.getSelectionAnchor().row;l<=c.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},s.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,c=s>a?this.session.getOverwrite()?s:s-1:a,l=h.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,d=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var m=0;m<l;m++)d+=this.charWidths[o[m]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(d+=this.charWidths[o[l]]),this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(d+=this.rtlLineOffset),d},g.prototype.getSelections=function(s,a){var c=this.bidiMap,l=c.bidiLevels,o,d=[],m=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,I=!1,T=!1,_=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<l.length;L++)C=c.logicalFromVisual[L],o=l[L],I=C>=w&&C<x,I&&!T?_=m:!I&&T&&d.push({left:_,width:m-_}),m+=this.charWidths[o],T=I;if(I&&L===l.length&&d.push({left:_,width:m-_}),this.isRtlDir)for(var R=0;R<d.length;R++)d[R].left+=this.rtlLineOffset;return d},g.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var a=0,c=Math.max(c,0),l=0,o=0,d=this.bidiMap.bidiLevels,m=this.charWidths[d[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>l+m/2;){if(l+=m,o===d.length-1){m=0;break}m=this.charWidths[d[++o]]}return o>0&&d[o-1]%2!==0&&d[o]%2===0?(c<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&d[o-1]%2===0&&d[o]%2!==0?a=1+(c>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===d.length-1&&m===0&&d[o-1]%2===0||!this.isRtlDir&&o===0&&d[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&d[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g}();r.BidiHandler=u}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,f){var h=n("./lib/oop"),p=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,u=n("./range").Range,g=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 c=this;this.cursor.on("change",function(l){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return 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,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},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,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},s.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?u.fromPoints(c,c):this.isBackwards()?u.fromPoints(c,a):u.fromPoints(a,c)},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,c){var l=c?a.end:a.start,o=c?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,c,l,o){if(!this.$silent){var d=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(l,o),this.$isEmpty=!u.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||d!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},s.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},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,c){if(typeof c>"u"){var l=a||this.lead;a=l.row,c=l.column}return this.session.getWordRange(a,c)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},s.prototype.getLineRange=function(a,c){var l=typeof a=="number"?a:this.lead.row,o,d=this.session.getFoldLine(l);return d?(l=d.start.row,o=d.end.row):o=l,c===!0?new u(l,0,o,this.session.getLine(o).length):new u(l,0,o+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,c,l){var o=a.column,d=a.column+c;return l<0&&(o=a.column-c,d=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,d).split(" ").length-1==c},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,c=this.lead.column,l=this.session.documentToScreenRow(a,c),o=this.session.screenToDocumentPosition(l,0),d=this.session.getDisplayLine(a,null,o.row,o.column),m=d.match(/^\s*/);m[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,c=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==c.column){var l=this.session.getLine(c.row);if(c.column==l.length){var o=l.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var d=this.session.getFoldAt(a,c,1);if(d){this.moveCursorTo(d.end.row,d.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(c)),c>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,c,-1);o==null&&(o=this.doc.getLine(a).substring(0,c));var d=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(d)&&(c-=this.session.nonTokenRe.lastIndex,d=d.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(d)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.$shortWordEndIndex=function(a){var c=0,l,o=/\s/,d=this.session.tokenRe;if(d.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(l=a[c])&&o.test(l);)c++;if(c<1){for(d.lastIndex=0;(l=a[c])&&!d.test(l);)if(d.lastIndex=0,c++,o.test(l))if(c>2){c--;break}else{for(;(l=a[c])&&o.test(l);)c++;if(c>2)break}}}return d.lastIndex=0,c},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c),d=this.session.getFoldAt(a,c,1);if(d)return this.moveCursorTo(d.end.row,d.end.column);if(c==l.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,c+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,c);if(c===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var d=p.stringReverse(o),m=this.$shortWordEndIndex(d);return this.moveCursorTo(a,c-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,c){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var d=this.session.lineWidgets[this.lead.row];a<0?a-=d.rowsAbove||0:a>0&&(a+=d.rowCount-(d.rowsAbove||0))}var m=this.session.screenToDocumentPosition(l.row+a,l.column,o);a!==0&&c===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+c,c===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,c,l){var o=this.session.getFoldAt(a,c,1);o&&(a=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var d=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(d.charAt(c))&&d.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,c,l){var o=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(o.row,o.column,l)},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 c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var l=this.getCursor();return u.fromPoints(c,l)}catch{return u.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var l=c.clone();return l.isBackwards=c.cursor==c.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var c=a.length;c--;){var l=u.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},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 c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},s}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,h.implement(g.prototype,b),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,f){var h=n("./lib/report_error").reportError,p=2e3,b=function(){function u(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],c=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},d="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&d.indexOf("i")===-1&&(d+="i"),x.unicode&&d.indexOf("u")===-1&&(d+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var I=x.regex,T=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||T==1?x.token=x.token[0]:T-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:T-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(T>1?x.onMatch=this.$applyToken:x.onMatch=x.token),T>1&&(/\\\d/.test(x.regex)?I=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+l+1)}):(T=1,I=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[l]=w,l+=T,c.push(I),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,d)},this),this.regExps[s]=new RegExp("("+c.join(")|(")+")|($)",d)}}return u.prototype.$setMaxTokenCount=function(g){p=g|0},u.prototype.$applyToken=function(g){var s=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:g}];for(var c=[],l=0,o=a.length;l<o;l++)s[l]&&(c[c.length]={type:a[l],value:s[l]});return c},u.prototype.$arrayTokens=function(g){if(!g)return[];var s=this.splitRegex.exec(g);if(!s)return"text";for(var a=[],c=this.tokenArray,l=0,o=c.length;l<o;l++)s[l+1]&&(a[a.length]={type:c[l],value:s[l+1]});return a},u.prototype.removeCapturingGroups=function(g){var s=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,c){return c?"(?:":a});return s},u.prototype.createSplitterRegexp=function(g,s){if(g.indexOf("(?=")!=-1){var a=0,c=!1,l={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,d,m,w,x,I){return c?c=x!="]":x?c=!0:w?(a==l.stack&&(l.end=I+1,l.stack=-1),a--):m&&(a++,m.length!=1&&(l.stack=a,l.start=I)),o}),l.end!=null&&/^\)*$/.test(g.substr(l.end))&&(g=g.substring(0,l.start)+g.substr(l.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(s||"").replace("g",""))},u.prototype.getLineTokens=function(g,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 c=s||"start",l=this.states[c];l||(c="start",l=this.states[c]);var o=this.matchMappings[c],d=this.regExps[c];d.lastIndex=0;for(var m,w=[],x=0,I=0,T={type:null,value:""};m=d.exec(g);){var _=o.defaultToken,C=null,L=m[0],R=d.lastIndex;if(R-L.length>x){var F=g.substring(x,R-L.length);T.type==_?T.value+=F:(T.type&&w.push(T),T={type:_,value:F})}for(var E=0;E<m.length-2;E++)if(m[E+1]!==void 0){C=l[o[E]],C.onMatch?_=C.onMatch(L,c,a,g):_=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,a),l=this.states[c],l||(this.reportError("state doesn't exist",c),c="start",l=this.states[c]),o=this.matchMappings[c],x=R,d=this.regExps[c],d.lastIndex=R),C.consumeLineEnd&&(x=R);break}if(L){if(typeof _=="string")(!C||C.merge!==!1)&&T.type===_?T.value+=L:(T.type&&w.push(T),T={type:_,value:L});else if(_){T.type&&w.push(T),T={type:null,value:""};for(var E=0;E<_.length;E++)w.push(_[E])}}if(x==g.length)break;if(x=R,I++>p){for(I>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:g});x<g.length;)T.type&&w.push(T),T={value:g.substring(x,x+=500),type:"overflow"};c="start",a=[];break}}return T.type&&w.push(T),a.length>1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:w,state:a.length?a:c}},u}();b.prototype.reportError=h,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){var h=n("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,s){if(!s){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var c=g[a],l=0;l<c.length;l++){var o=c[l];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(g,s,a,c,l){var o=typeof g=="function"?new g().getRules():g;if(c)for(var d=0;d<c.length;d++)c[d]=s+c[d];else{c=[];for(var m in o)c.push(s+m)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],d=0;d<c.length;d++)w.apply(this.$rules[c[d]],h(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var b=function(g,s){return(g!="start"||s.length)&&s.unshift(this.nextState,g),this.nextState},u=function(g,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var g=0,s=this.$rules;function a(c){var l=s[c];l.processed=!0;for(var o=0;o<l.length;o++){var d=l[o],m=null;Array.isArray(d)&&(m=d,d={}),!d.regex&&d.start&&(d.regex=d.start,d.next||(d.next=[]),d.next.push({defaultToken:d.token},{token:d.token+".end",regex:d.end||d.start,next:"pop"}),d.token=d.token+".start",d.push=!0);var w=d.next||d.push;if(w&&Array.isArray(w)){var x=d.stateName;x||(x=d.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=g++)),s[x]=w,d.next=x,a(x)}else w=="pop"&&(d.next=u);if(d.push&&(d.nextState=d.next||d.push,d.next=b,delete d.push),d.rules)for(var I in d.rules)s[I]?s[I].push&&s[I].push.apply(s[I],d.rules[I]):s[I]=d.rules[I];var T=typeof d=="string"?d:d.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(C){return s[C]}):m=s[T]),m){var _=[o,1].concat(m);d.noEscape&&(_=_.filter(function(C){return!C.next})),l.splice.apply(l,_),o--}d.keywordMap&&(d.token=this.createKeywordMapper(d.keywordMap,d.defaultToken||"text",d.caseInsensitive),delete d.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(g,s,a,c){var l=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var d=g[o],m=d.split(c||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),l[x]=o}},this),g=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,f){var h;h=function(){this.$behaviours={}},(function(){this.add=function(p,b,u){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][b]=u},this.addBehaviours=function(p){for(var b in p)for(var u in p[b])this.add(b,u,p[b][u])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,b){if(typeof p=="function")var u=new p().getBehaviours(b);else var u=p.getBehaviours(b);this.addBehaviours(u)},this.getBehaviours=function(p){if(p){for(var b={},u=0;u<p.length;u++)this.$behaviours[p[u]]&&(b[p[u]]=this.$behaviours[p[u]]);return b}else return this.$behaviours}}).call(h.prototype),r.Behaviour=h}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,f){var h=n("./range").Range,p=function(){function b(u,g,s){this.$session=u,this.$row=g,this.$rowTokens=u.getTokens(g);var a=u.getTokenAt(g,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 u;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,u||(u=this.$session.getLength()),this.$row>=u)return this.$row=u-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 u=this.$rowTokens,g=this.$tokenIndex,s=u[g].start;if(s!==void 0)return s;for(s=0;g>0;)g-=1,s+=u[g].value.length;return s},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var u=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new h(this.$row,g,this.$row,g+u.value.length)},b}();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,f){var h=n("../../lib/oop"),p=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,u=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},l={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,c.rangeCount!=w.multiSelect.rangeCount&&(c={rangeCount:w.multiSelect.rangeCount})),c[x])return a=c[x];a=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(w,x,I,T){var _=w.end.row-w.start.row;return{text:I+x+T,selection:[0,w.start.column+1,_,w.end.column+(_?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,I,T,_,C){var L=T.getCursorPosition(),R=_.doc.getLine(L.row);if(C=="{"){o(T);var F=T.getSelectionRange(),E=_.doc.getTextRange(F),H=_.getTokenAt(L.row,L.column);if(E!==""&&E!=="{"&&T.getWrapBehavioursEnabled())return d(F,E,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[L.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,_))return/[\]\}\)]/.test(R[L.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var O=R.substring(L.column,L.column+1);if(O=="}"){var S=_.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(S!==null&&m.isAutoInsertedClosing(L,R,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o(T);var A="";m.isMaybeInsertedClosing(L,R)&&(A=u.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=R.substring(L.column,L.column+1);if(O==="}"){var D=_.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!D)return null;var B=this.$getIndent(_.getLine(D.row))}else if(A)var B=this.$getIndent(R);else{m.clearMaybeInsertedClosing();return}var U=B+_.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,I,T,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){o(T);var R=_.doc.getLine(C.start.row),F=R.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,I,T,_,C){if(C=="("){o(T);var L=T.getSelectionRange(),R=_.doc.getTextRange(L);if(R!==""&&T.getWrapBehavioursEnabled())return d(L,R,"(",")");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(T);var F=T.getCursorPosition(),E=_.doc.getLine(F.row),H=E.substring(F.column,F.column+1);if(H==")"){var P=_.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,E,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,I,T,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){o(T);var R=_.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,I,T,_,C){if(C=="["){o(T);var L=T.getSelectionRange(),R=_.doc.getTextRange(L);if(R!==""&&T.getWrapBehavioursEnabled())return d(L,R,"[","]");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(T);var F=T.getCursorPosition(),E=_.doc.getLine(F.row),H=E.substring(F.column,F.column+1);if(H=="]"){var P=_.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,E,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,I,T,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){o(T);var R=_.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,I,T,_,C){var L=_.$mode.$quotes||l;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(T);var R=C,F=T.getSelectionRange(),E=_.doc.getTextRange(F);if(E!==""&&(E.length!=1||!L[E])&&T.getWrapBehavioursEnabled())return d(F,E,R,R);if(!E){var H=T.getCursorPosition(),P=_.doc.getLine(H.row),O=P.substring(H.column-1,H.column),S=P.substring(H.column,H.column+1),A=_.getTokenAt(H.row,H.column),D=_.getTokenAt(H.row,H.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!D||/string|escape/.test(D.type),K;if(S==R)K=B!==U,K&&/string\.end/.test(D.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=_.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(S),ne=_.$mode.$pairQuotesAfter,ae=ne&&ne[R]&&ne[R].test(O);if(!ae&&te||he||S&&!/[\s;,.})\]\\]/.test(S))return null;var ce=P[H.column-2];if(O==R&&(ce==R||Z.test(ce)))return null;K=!0}return{text:K?R+R:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,I,T,_,C){var L=_.$mode.$quotes||l,R=_.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(R)){o(T);var F=_.doc.getLine(C.start.row),E=F.substring(C.start.column+1,C.start.column+2);if(E==R)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,I,T,_,C){if(x==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&T.selection.isEmpty()){var L=T.getCursorPosition();if(L.column===0)return;for(var R=_.doc.getLine(L.row),F=_.doc.getLine(L.row+1),E=_.getTokens(L.row),H=0,P=0;P<E.length;P++){H+=E[P].value.length;var O=E[P];if(H>=L.column){if(H===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var S=E[P+1];if(!S||!/\.doc/.test(S.type))return}}var A=L.column-(H-O.value.length),D=O.value.indexOf("*/"),B=O.value.indexOf("/**",D>-1?D+2:0);if(B!==-1&&A>B&&A<B+3||D!==-1&&B!==-1&&A>=D&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(R);if(/\s*\*/.test(F))return/^\s*\*/.test(R)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(R.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var I=w.getCursorPosition(),T=new b(x,I.row,I.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(I.row)[I.column]))return!0;var _=new b(x,I.row,I.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",g))return!1}return T.stepForward(),T.getCurrentTokenRow()!==I.row||this.$matchTokenType(T.getCurrentToken()||"text",s)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,I){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isAutoInsertedClosing(T,_,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=I+_.substr(T.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,I){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isMaybeInsertedClosing(T,_)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=_.substr(0,T.column)+I,a.maybeInsertedLineEnd=_.substr(T.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,I){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&I===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)},h.inherits(m,p),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,f){for(var h=[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],p=0,b=[],u=0;u<h.length;u+=2)b.push(p+=h[u]),h[u+1]&&b.push(45,p+=h[u+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(n,r,f){var h=n("../config"),p=n("../tokenizer").Tokenizer,b=n("./text_highlight_rules").TextHighlightRules,u=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),s=n("../lib/lang"),a=n("../token_iterator").TokenIterator,c=n("../range").Range,l;l=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new u,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,d,m,w){var x=d.doc,I=!0,T=!0,_=1/0,C=d.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var R=this.lineCommentStart.map(s.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var R=s.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;R=new RegExp("^(\\s*)(?:"+R+") ?"),L=d.getUseSoftTabs();var E=function(K,Z){var te=K.match(R);if(te){var he=te[1].length,ne=te[0].length;!S(K,he,ne)&&te[0][ne-1]==" "&&ne--,x.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!I||/\S/.test(K))&&(S(K,_,_)?x.insertInLine({row:Z,column:_},H):x.insertInLine({row:Z,column:_},F))},O=function(K,Z){return R.test(K)},S=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,A=this.blockComment.end,R=new RegExp("^(\\s*)(?:"+s.escapeRegExp(F)+")"),D=new RegExp("(?:"+s.escapeRegExp(A)+")\\s*$"),P=function(ae,ce){O(ae,ce)||(!I||/\S/.test(ae))&&(x.insertInLine({row:ce,column:ae.length},A),x.insertInLine({row:ce,column:_},F))},E=function(ae,ce){var ue;(ue=ae.match(D))&&x.removeInLine(ce,ae.length-ue[0].length,ae.length),(ue=ae.match(R))&&x.removeInLine(ce,ue[1].length,ue[0].length)},O=function(ae,ce){if(R.test(ae))return!0;for(var ue=d.getTokens(ce),ye=0;ye<ue.length;ye++)if(ue[ye].type==="comment")return!0}}function B(K){for(var Z=m;Z<=w;Z++)K(x.getLine(Z),Z)}var U=1/0;B(function(K,Z){var te=K.search(/\S/);te!==-1?(te<_&&(_=te),T&&!O(K,Z)&&(T=!1)):U>K.length&&(U=K.length)}),_==1/0&&(_=U,I=!1,T=!1),L&&_%C!=0&&(_=Math.floor(_/C)*C),B(T?E:P)},this.toggleBlockComment=function(o,d,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var I=new a(d,w.row,w.column),T=I.getCurrentToken();d.selection;var _=d.selection.toOrientedRange(),C,L;if(T&&/comment/.test(T.type)){for(var R,F;T&&/comment/.test(T.type);){var E=T.value.indexOf(x.start);if(E!=-1){var H=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;R=new c(H,P,H,P+x.start.length);break}T=I.stepBackward()}for(var I=new a(d,w.row,w.column),T=I.getCurrentToken();T&&/comment/.test(T.type);){var E=T.value.indexOf(x.end);if(E!=-1){var H=I.getCurrentTokenRow(),P=I.getCurrentTokenColumn()+E;F=new c(H,P,H,P+x.end.length);break}T=I.stepForward()}F&&d.remove(F),R&&(d.remove(R),C=R.start.row,L=-x.start.length)}else L=x.start.length,C=m.start.row,d.insert(m.end,x.end),d.insert(m.start,x.start);_.start.row==C&&(_.start.column+=L),_.end.row==C&&(_.end.column+=L),d.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,d,m){return this.$getIndent(d)},this.checkOutdent=function(o,d,m){return!1},this.autoOutdent=function(o,d,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var d in o)if(o[d]){var m=o[d],w=m.prototype.$id,x=h.$modes[w];x||(h.$modes[w]=x=new m),h.$modes[d]||(h.$modes[d]=x),this.$embeds.push(d),this.$modes[d]=x}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(L){(function(R){var F=I[L],E=R[F];R[I[L]]=function(){return this.$delegator(F,arguments,E)}})(_)},_=this,d=0;d<I.length;d++)T(d)},this.$delegator=function(o,d,m){var w=d[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],I=this.$modes[x];if(I)return I[o].apply(I,[w[1]].concat([].slice.call(d,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var _=w.split(this.$embeds[T]);if(!_[0]&&_[1]){d[0]=_[1];var I=this.$modes[this.$embeds[T]];return I[o].apply(I,d)}}var C=m.apply(this,d);return m?C:void 0},this.transformAction=function(o,d,m,w,x){if(this.$behaviour){var I=this.$behaviour.getBehaviours();for(var T in I)if(I[T][d]){var _=I[T][d].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var d=this.$tokenizer.rules,m=[];for(var w in d)for(var x=d[w],I=0,T=x.length;I<T;I++)if(typeof x[I].token=="string")/keyword|support|storage/.test(x[I].token)&&m.push(x[I].regex);else if(typeof x[I].token=="object"){for(var _=0,C=x[I].token.length;_<C;_++)if(/keyword|support|storage/.test(x[I].token[_])){var w=x[I].regex.match(/\(.+?\)/g)[_];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,d,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(I){return{name:I,value:I,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),r.Mode=l}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,f){var h=n("./lib/dom"),p=function(){function b(u){this.session=u,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(u){var g;return this.lineWidgets?g=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[u]?1+g:this.$wrapData[u].length+1+g},b.prototype.$getWidgetScreenLength=function(){var u=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(u+=g.rowCount)}),u},b.prototype.$onChangeEditor=function(u){this.attach(u.editor)},b.prototype.attach=function(u){u&&u.widgetManager&&u.widgetManager!=this&&u.widgetManager.detach(),this.editor!=u&&(this.detach(),this.editor=u,u&&(u.widgetManager=this,u.renderer.on("beforeRender",this.measureWidgets),u.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(u){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.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(u,g){var s=g.lineWidgets;if(!(!s||!u.action)){for(var a=u.data,c=a.start.row,l=a.end.row,o=u.action=="add",d=c+1;d<l;d++)s[d]&&(s[d].hidden=o);s[l]&&(o?s[c]?s[l].hidden=o:s[c]=s[l]:(s[c]==s[l]&&(s[c]=void 0),s[l].hidden=o))}},b.prototype.updateOnChange=function(u){var g=this.session.lineWidgets;if(g){var s=u.start.row,a=u.end.row-s;if(a!==0)if(u.action=="remove"){var c=g.splice(s+1,a);!g[s]&&c[c.length-1]&&(g[s]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var l=new Array(a);g[s]&&g[s].column!=null&&u.start.column>g[s].column&&s++,l.unshift(s,0),g.splice.apply(g,l),this.$updateRows()}}},b.prototype.$updateRows=function(){var u=this.session.lineWidgets;if(u){var g=!0;u.forEach(function(s,a){if(s)for(g=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),g&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(u){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[u.row];return g&&(u.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[u.row]=u,u},b.prototype.addLineWidget=function(u){if(this.$registerLineWidget(u),u.session=this.session,!this.editor)return u;var g=this.editor.renderer;u.html&&!u.el&&(u.el=h.createElement("div"),u.el.innerHTML=u.html),u.text&&!u.el&&(u.el=h.createElement("div"),u.el.textContent=u.text),u.el&&(h.addCssClass(u.el,"ace_lineWidgetContainer"),u.className&&h.addCssClass(u.el,u.className),u.el.style.position="absolute",u.el.style.zIndex="5",g.container.appendChild(u.el),u._inDocument=!0,u.coverGutter||(u.el.style.zIndex="3"),u.pixelHeight==null&&(u.pixelHeight=u.el.offsetHeight)),u.rowCount==null&&(u.rowCount=u.pixelHeight/g.layerConfig.lineHeight);var s=this.session.getFoldAt(u.row,0);if(u.$fold=s,s){var a=this.session.lineWidgets;u.row==s.end.row&&!a[s.start.row]?a[s.start.row]=u:u.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(u),u},b.prototype.removeLineWidget=function(u){if(u._inDocument=!1,u.session=null,u.el&&u.el.parentNode&&u.el.parentNode.removeChild(u.el),u.editor&&u.editor.destroy)try{u.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[u.row];if(g==u)this.session.lineWidgets[u.row]=u.$oldWidget,u.$oldWidget&&this.onWidgetChanged(u.$oldWidget);else for(;g;){if(g.$oldWidget==u){g.$oldWidget=u.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(u){for(var g=this.session.lineWidgets,s=g&&g[u],a=[];s;)a.push(s),s=s.$oldWidget;return a},b.prototype.onWidgetChanged=function(u){this.session._changedWidgets.push(u),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(u,g){var s=this.session._changedWidgets,a=g.layerConfig;if(!(!s||!s.length)){for(var c=1/0,l=0;l<s.length;l++){var o=s[l];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var d=o.h/a.lineHeight;o.coverLine&&(d-=this.session.getRowLineCount(o.row),d<0&&(d=0)),o.rowCount!=d&&(o.rowCount=d,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(u,g){var s=g.layerConfig,a=this.session.lineWidgets;if(a){for(var c=Math.min(this.firstRow,s.firstRow),l=Math.max(this.lastRow,s.lastRow,a.length);c>0&&!a[c];)c--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,g.$cursorLayer.config=s;for(var o=c;o<=l;o++){var d=a[o];if(!(!d||!d.el)){if(d.hidden){d.el.style.top=-100-(d.pixelHeight||0)+"px";continue}d._inDocument||(d._inDocument=!0,g.container.appendChild(d.el));var m=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;d.coverLine||(m+=s.lineHeight*this.session.getRowLineCount(d.row)),d.el.style.top=m-s.offset+"px";var w=d.coverGutter?0:g.gutterWidth;d.fixedWidth||(w-=g.scrollLeft),d.el.style.left=w+"px",d.fullWidth&&d.screenWidth&&(d.el.style.minWidth=s.width+2*s.padding+"px"),d.fixedWidth?d.el.style.right=g.scrollBar.getWidth()+"px":d.el.style.right=""}}}},b}();r.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,f){r.applyDelta=function(h,p,b){var u=p.start.row,g=p.start.column,s=h[u]||"";switch(p.action){case"insert":var a=p.lines;if(a.length===1)h[u]=s.substring(0,g)+p.lines[0]+s.substring(g);else{var c=[u,1].concat(p.lines);h.splice.apply(h,c),h[u]=s.substring(0,g)+h[u],h[u+p.lines.length-1]+=s.substring(g)}break;case"remove":var l=p.end.column,o=p.end.row;u===o?h[u]=s.substring(0,g)+s.substring(l):h.splice(u,o-u+1,s.substring(0,g)+h[o].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var h=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,b=function(){function s(a,c,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,l)}return 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 c=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},s.prototype.setPosition=function(a,c,l){var o;if(l?o={row:a,column:c}:o=this.$clipPositionToDocument(a,c),!(this.row==o.row&&this.column==o.column)){var d={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:d,value:o})}},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,c){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,c))),c<0&&(l.column=0),l},s}();b.prototype.$insertRight=!1,h.implement(b.prototype,p);function u(s,a,c){var l=c?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&l}function g(s,a,c){var l=s.action=="insert",o=(l?1:-1)*(s.end.row-s.start.row),d=(l?1:-1)*(s.end.column-s.start.column),m=s.start,w=l?m:s.end;return u(a,m,c)?{row:a.row,column:a.column}:u(w,a,!c)?{row:a.row+o,column:a.column+(a.row==w.row?d: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(n,r,f){var h=n("./lib/oop"),p=n("./apply_delta").applyDelta,b=n("./lib/event_emitter").EventEmitter,u=n("./range").Range,g=n("./anchor").Anchor,s=function(){function a(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return a.prototype.setValue=function(c){var l=this.getLength()-1;this.remove(new u(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},c||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(c,l){return new g(this,c,l)},a.prototype.$detectNewLine=function(c){var l=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},a.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(c){return c==`\r
|
190
|
+
`||c=="\r"||c==`
|
191
|
+
`},a.prototype.getLine=function(c){return this.$lines[c]||""},a.prototype.getLines=function(c,l){return this.$lines.slice(c,l+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(c){var l;if(c.start.row===c.end.row)l=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{l=this.getLines(c.start.row,c.end.row),l[0]=(l[0]||"").substring(c.start.column);var o=l.length-1;c.end.row-c.start.row==o&&(l[o]=l[o].substring(0,c.end.column))}return l},a.prototype.insertLines=function(c,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,l)},a.prototype.removeLines=function(c,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,l)},a.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},a.prototype.insert=function(c,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(c,this.$split(l))},a.prototype.insertInLine=function(c,l){var o=this.clippedPos(c.row,c.column),d=this.pos(c.row,c.column+l.length);return this.applyDelta({start:o,end:d,action:"insert",lines:[l]},!0),this.clonePos(d)},a.prototype.clippedPos=function(c,l){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,l=void 0);var d=this.getLine(c);return l==null&&(l=d.length),l=Math.min(Math.max(l,0),d.length),{row:c,column:l}},a.prototype.clonePos=function(c){return{row:c.row,column:c.column}},a.prototype.pos=function(c,l){return{row:c,column:l}},a.prototype.$clipPosition=function(c){var l=this.getLength();return c.row>=l?(c.row=Math.max(0,l-1),c.column=this.getLine(l-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},a.prototype.insertFullLines=function(c,l){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(l=l.concat([""]),o=0):(l=[""].concat(l),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},l)},a.prototype.insertMergedLines=function(c,l){var o=this.clippedPos(c.row,c.column),d={row:o.row+l.length-1,column:(l.length==1?o.column:0)+l[l.length-1].length};return this.applyDelta({start:o,end:d,action:"insert",lines:l}),this.clonePos(d)},a.prototype.remove=function(c){var l=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:l,end:o,action:"remove",lines:this.getLinesForRange({start:l,end:o})}),this.clonePos(l)},a.prototype.removeInLine=function(c,l,o){var d=this.clippedPos(c,l),m=this.clippedPos(c,o);return this.applyDelta({start:d,end:m,action:"remove",lines:this.getLinesForRange({start:d,end:m})},!0),this.clonePos(d)},a.prototype.removeFullLines=function(c,l){c=Math.min(Math.max(0,c),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var o=l==this.getLength()-1&&c>0,d=l<this.getLength()-1,m=o?c-1:c,w=o?this.getLine(m).length:0,x=d?l+1:l,I=d?0:this.getLine(x).length,T=new u(m,w,x,I),_=this.$lines.slice(c,l+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),_},a.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(c,l){if(c instanceof u||(c=u.fromPoints(c.start,c.end)),l.length===0&&c.isEmpty())return c.start;if(l==this.getTextRange(c))return c.end;this.remove(c);var o;return l?o=this.insert(c.start,l):o=c.start,o},a.prototype.applyDeltas=function(c){for(var l=0;l<c.length;l++)this.applyDelta(c[l])},a.prototype.revertDeltas=function(c){for(var l=c.length-1;l>=0;l--)this.revertDelta(c[l])},a.prototype.applyDelta=function(c,l){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!u.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(p(this.$lines,c,l),this._signal("change",c)))},a.prototype.$safeApplyDelta=function(c){var l=this.$lines.length;(c.action=="remove"&&c.start.row<l&&c.end.row<l||c.action=="insert"&&c.start.row<=l)&&this.applyDelta(c)},a.prototype.$splitAndapplyLargeDelta=function(c,l){for(var o=c.lines,d=o.length-l+1,m=c.start.row,w=c.start.column,x=0,I=0;x<d;x=I){I+=l-1;var T=o.slice(x,I);T.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+I,w=0),action:c.action,lines:T},!0)}c.lines=o.slice(x),c.start.row=m+x,c.start.column=w,this.applyDelta(c,!0)},a.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},a.prototype.indexToPosition=function(c,l){for(var o=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=l||0,w=o.length;m<w;m++)if(c-=o[m].length+d,c<0)return{row:m,column:c+o[m].length+d};return{row:w-1,column:c+o[w-1].length+d}},a.prototype.positionToIndex=function(c,l){for(var o=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=0,w=Math.min(c.row,o.length),x=l||0;x<w;++x)m+=o[x].length+d;return m+c.column},a.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},a}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",h.implement(s.prototype,b),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var h=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,b=function(){function u(g,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var c=new Date,l=a.currentLine,o=-1,d=a.doc,m=l;a.lines[l];)l++;var w=d.getLength(),x=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),o=l;do l++;while(a.lines[l]);if(x++,x%5===0&&new Date-c>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,o==-1&&(o=l),m<=o&&a.fireUpdateEvent(m,o)}}}return u.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},u.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},u.prototype.fireUpdateEvent=function(g,s){var a={first:g,last:s};this._signal("update",{data:a})},u.prototype.start=function(g){this.currentLine=Math.min(g||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)},u.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},u.prototype.$updateOnChange=function(g){var s=g.start.row,a=g.end.row-s;if(a===0)this.lines[s]=null;else if(g.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var c=Array(a+1);c.unshift(s,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},u.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},u.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},u.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},u.prototype.$tokenizeRow=function(g){var s=this.doc.getLine(g),a=this.states[g-1],c=this.tokenizer.getLineTokens(s,a,g);return this.states[g]+""!=c.state+""?(this.states[g]=c.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=c.tokens},u.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},u}();h.implement(b.prototype,p),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,f){var h=n("./lib/lang"),p=n("./range").Range,b=function(){function u(g,s,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=s,this.type=a,this.docLen=0}return u.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},u.prototype.update=function(g,s,a,c){if(this.regExp){for(var l=c.firstRow,o=c.lastRow,d={},m=a.$editor.$search,w=m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=l;x<=o;x++){var I=this.cache[x];if(I==null||a.getValue().length!=this.docLen){if(w){I=[];var T=m.$multiLineForward(a,this.regExp,x,o);if(T){var _=T.endRow<=o?T.endRow-1:o;_>x&&(x=_),I.push(new p(T.startRow,T.startCol,T.endRow,T.endCol))}I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES))}else I=h.getMatchOffsets(a.getLine(x),this.regExp),I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES)),I=I.map(function(F){return new p(x,F.offset,x,F.offset+F.length)});this.cache[x]=I.length?I:""}if(I.length!==0)for(var C=I.length;C--;){var L=I[C].toScreenRange(a),R=L.toString();d[R]||(d[R]=!0,s.drawSingleLineMarker(g,L,this.clazz,c))}}this.docLen=a.getValue().length}},u}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,f){var h=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,L,R){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=R.length;F--;){var E=R[F][0];if(E.id<=C)break;E.id<L&&(E.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,L){for(var R=this.selections,F=R.length;F--;){var E=R[F];if(E.rev<C)return L&&(E=R[F+1]),E}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=null,E=0,H=R.length;H--;){var P=R[H][0];if(P.id<L&&!F&&(F=H+1),P.id<=C){E=H+1;break}}return R.slice(E,F)},_.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.undo=function(C,L){this.lastDeltas=null;var R=this.$undoStack;if(p(R,R.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=R.pop(),E=null;return F&&(E=C.undoChanges(F,L),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E}},_.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var R=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,R),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),E=null;return F&&(E=C.redoChanges(F,L),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,E},_.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],R=L&&L[0].id||0;this.$redoStackBaseRev=R,this.$rev=R},_.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=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+a(this.$redoStack)},_}();h.prototype.hasUndo=h.prototype.canUndo,h.prototype.hasRedo=h.prototype.canRedo,h.prototype.isClean=h.prototype.isAtBookmark,h.prototype.markClean=h.prototype.bookmark;function p(_,C){for(var L=C;L--;){var R=_[L];if(R&&!R[0].ignore){for(;L<C-1;){var F=o(_[L],_[L+1]);_[L]=F[0],_[L+1]=F[1],L++}return!0}}}var b=n("./range").Range,u=b.comparePoints;b.comparePoints;function g(_){return{row:_.row,column:_.column}}function s(_){return{start:g(_.start),end:g(_.end),action:_.action,lines:_.lines.slice()}}function a(_){if(_=_||this,Array.isArray(_))return _.map(a).join(`
|
194
|
+
`);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(c).join(`
|
195
|
+
`):C=c(_.value)),_.start&&(C+=c(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function c(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function l(_,C){var L=_.action=="insert",R=C.action=="insert";if(L&&R)if(u(C.start,_.end)>=0)m(C,_,-1);else if(u(C.start,_.start)<=0)m(_,C,1);else return null;else if(L&&!R)if(u(C.start,_.end)>=0)m(C,_,-1);else if(u(C.end,_.start)<=0)m(_,C,-1);else return null;else if(!L&&R)if(u(C.start,_.start)>=0)m(C,_,1);else if(u(C.start,_.start)<=0)m(_,C,1);else return null;else if(!L&&!R)if(u(C.start,_.start)>=0)m(C,_,1);else if(u(C.end,_.start)<=0)m(_,C,-1);else return null;return[C,_]}function o(_,C){for(var L=_.length;L--;)for(var R=0;R<C.length;R++)if(!l(_[L],C[R])){for(;L<_.length;){for(;R--;)l(C[R],_[L]);R=C.length,L++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function d(_,C){var L=_.action=="insert",R=C.action=="insert";if(L&&R)u(_.start,C.start)<0?m(C,_,1):m(_,C,1);else if(L&&!R)u(_.start,C.end)>=0?m(_,C,-1):(u(_.start,C.start)<=0||m(_,b.fromPoints(C.start,_.start),-1),m(C,_,1));else if(!L&&R)u(C.start,_.end)>=0?m(C,_,-1):(u(C.start,_.start)<=0||m(C,b.fromPoints(_.start,C.start),-1),m(_,C,1));else if(!L&&!R)if(u(C.start,_.end)>=0)m(C,_,-1);else if(u(C.end,_.start)<=0)m(_,C,-1);else{var F,E;return u(_.start,C.start)<0&&(F=_,_=x(_,C.start)),u(_.end,C.end)>0&&(E=x(_,C.end)),w(C.end,_.start,_.end,-1),E&&!F&&(_.lines=E.lines,_.start=E.start,_.end=E.end,E=_),[C,F,E].filter(Boolean)}return[C,_]}function m(_,C,L){w(_.start,C.start,C.end,L),w(_.end,C.start,C.end,L)}function w(_,C,L,R){_.row==(R==1?C:L).row&&(_.column+=R*(L.column-C.column)),_.row+=R*(L.row-C.row)}function x(_,C){var L=_.lines,R=_.end;_.end=g(C);var F=_.end.row-_.start.row,E=L.splice(F,L.length),H=F?C.column:C.column-_.start.column;L.push(E[0].substring(0,H)),E[0]=E[0].substr(H);var P={start:g(C),end:R,lines:E,action:_.action};return P}function I(_,C){C=s(C);for(var L=_.length;L--;){for(var R=_[L],F=0;F<R.length;F++){var E=R[F],H=d(E,C);C=H[0],H.length!=2&&(H[2]?(R.splice(F+1,1,H[1],H[2]),F++):H[1]||(R.splice(F,1),F--))}R.length||_.splice(L,1)}return _}function T(_,C){for(var L=0;L<C.length;L++)for(var R=C[L],F=0;F<R.length;F++)I(_,R[F])}r.UndoManager=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,f){var h=n("../range").Range,p=function(){function b(u,g){this.foldData=u,Array.isArray(g)?this.folds=g:g=this.folds=[g];var s=g[g.length-1];this.range=new h(g[0].start.row,g[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(u){this.start.row+=u,this.end.row+=u,this.folds.forEach(function(g){g.start.row+=u,g.end.row+=u})},b.prototype.addFold=function(u){if(u.sameRow){if(u.start.row<this.startRow||u.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(u),this.folds.sort(function(g,s){return-g.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(u.start.row,u.start.column)>0?(this.end.row=u.end.row,this.end.column=u.end.column):this.range.compareStart(u.end.row,u.end.column)<0&&(this.start.row=u.start.row,this.start.column=u.start.column)}else if(u.start.row==this.end.row)this.folds.push(u),this.end.row=u.end.row,this.end.column=u.end.column;else if(u.end.row==this.start.row)this.folds.unshift(u),this.start.row=u.start.row,this.start.column=u.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");u.foldLine=this},b.prototype.containsRow=function(u){return u>=this.start.row&&u<=this.end.row},b.prototype.walk=function(u,g,s){var a=0,c=this.folds,l,o,d,m=!0;g==null&&(g=this.end.row,s=this.end.column);for(var w=0;w<c.length;w++){if(l=c[w],o=l.range.compareStart(g,s),o==-1){u(null,g,s,a,m);return}if(d=u(null,l.start.row,l.start.column,a,m),d=!d&&u(l.placeholder,l.start.row,l.start.column,a),d||o===0)return;m=!l.sameRow,a=l.end.column}u(null,g,s,a,m)},b.prototype.getNextFoldTo=function(u,g){for(var s,a,c=0;c<this.folds.length;c++){if(s=this.folds[c],a=s.range.compareEnd(u,g),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},b.prototype.addRemoveChars=function(u,g,s){var a=this.getNextFoldTo(u,g),c,l;if(a){if(c=a.fold,a.kind=="inside"&&c.start.column!=g&&c.start.row!=u)window.console&&window.console.log(u,g,c);else if(c.start.row==u){l=this.folds;var o=l.indexOf(c);for(o===0&&(this.start.column+=s),o;o<l.length;o++){if(c=l[o],c.start.column+=s,!c.sameRow)return;c.end.column+=s}this.end.column+=s}}},b.prototype.split=function(u,g){var s=this.getNextFoldTo(u,g);if(!s||s.kind=="inside")return null;var a=s.fold,c=this.folds,l=this.foldData,o=c.indexOf(a),d=c[o-1];this.end.row=d.end.row,this.end.column=d.end.column,c=c.splice(o,c.length-o);var m=new b(l,c);return l.splice(l.indexOf(this)+1,0,m),m},b.prototype.merge=function(u){for(var g=u.folds,s=0;s<g.length;s++)this.addFold(g[s]);var a=this.foldData;a.splice(a.indexOf(u),1)},b.prototype.toString=function(){var u=[this.range.toString()+": ["];return this.folds.forEach(function(g){u.push(" "+g.toString())}),u.push("]"),u.join(`
|
196
|
+
`)},b.prototype.idxToPosition=function(u){for(var g=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(u-=a.start.column-g,u<0)return{row:a.start.row,column:a.start.column+u};if(u-=a.placeholder.length,u<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+u}},b}();r.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,f){var h=n("./range").Range,p=h.comparePoints,b=function(){function u(){this.ranges=[],this.$bias=1}return u.prototype.pointIndex=function(g,s,a){for(var c=this.ranges,l=a||0;l<c.length;l++){var o=c[l],d=p(g,o.end);if(!(d>0)){var m=p(g,o.start);return d===0?s&&m!==0?-l-2:l:m>0||m===0&&!s?l:-l-1}}return-l-1},u.prototype.add=function(g){var s=!g.isEmpty(),a=this.pointIndex(g.start,s);a<0&&(a=-a-1);var c=this.pointIndex(g.end,s,a);return c<0?c=-c-1:c++,this.ranges.splice(a,c-a,g)},u.prototype.addList=function(g){for(var s=[],a=g.length;a--;)s.push.apply(s,this.add(g[a]));return s},u.prototype.substractPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges.splice(s,1)},u.prototype.merge=function(){var g=[],s=this.ranges;s=s.sort(function(d,m){return p(d.start,m.start)});for(var a=s[0],c,l=1;l<s.length;l++){c=a,a=s[l];var o=p(c.end,a.start);o<0||o==0&&!c.isEmpty()&&!a.isEmpty()||(p(c.end,a.end)<0&&(c.end.row=a.end.row,c.end.column=a.end.column),s.splice(l,1),g.push(a),a=c,l--)}return this.ranges=s,g},u.prototype.contains=function(g,s){return this.pointIndex({row:g,column:s})>=0},u.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},u.prototype.rangeAtPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges[s]},u.prototype.clipRows=function(g,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<g)return[];var c=this.pointIndex({row:g,column:0});c<0&&(c=-c-1);var l=this.pointIndex({row:s,column:0},c);l<0&&(l=-l-1);for(var o=[],d=c;d<l;d++)o.push(a[d]);return o},u.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},u.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},u.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},u.prototype.$onChange=function(g){for(var s=g.start,a=g.end,c=s.row,l=a.row,o=this.ranges,d=0,m=o.length;d<m;d++){var w=o[d];if(w.end.row>=c)break}if(g.action=="insert")for(var x=l-c,I=-s.column+a.column;d<m;d++){var w=o[d];if(w.start.row>c)break;if(w.start.row==c&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=I,w.start.row+=x)),w.end.row==c&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&I>0&&d<m-1&&w.end.column>w.start.column&&w.end.column==o[d+1].start.column&&(w.end.column-=I),w.end.column+=I,w.end.row+=x}}else for(var x=c-l,I=s.column-a.column;d<m;d++){var w=o[d];if(w.start.row>l)break;w.end.row<l&&(c<w.end.row||c==w.end.row&&s.column<w.end.column)?(w.end.row=c,w.end.column=s.column):w.end.row==l?w.end.column<=a.column?(x||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=I,w.end.row+=x):w.end.row>l&&(w.end.row+=x),w.start.row<l&&(c<w.start.row||c==w.start.row&&s.column<w.start.column)?(w.start.row=c,w.start.column=s.column):w.start.row==l?w.start.column<=a.column?(x||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=I,w.start.row+=x):w.start.row>l&&(w.start.row+=x)}if(x!=0&&d<m)for(;d<m;d++){var w=o[d];w.start.row+=x,w.end.row+=x}},u}();b.prototype.comparePoints=p,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,f){var h=this&&this.__extends||function(){var c=function(l,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(d[w]=m[w])},c(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(l,o);function d(){this.constructor=l}l.prototype=o===null?Object.create(o):(d.prototype=o.prototype,new d)}}(),p=n("../range_list").RangeList,b=function(c){h(l,c);function l(o,d){var m=c.call(this)||this;return m.foldLine=null,m.placeholder=d,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(d){d.setFoldLine(o)})},l.prototype.clone=function(){var o=this.range.clone(),d=new l(o,this.placeholder);return this.subFolds.forEach(function(m){d.subFolds.push(m.clone())}),d.collapseChildren=this.collapseChildren,d},l.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var d=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(d,m),x==1);w++);var I=this.subFolds[w],T=0;if(x==0){if(I.range.containsRange(o))return I.addSubFold(o);T=1}for(var d=o.range.end.row,m=o.range.end.column,_=w,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(d,m),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(w,_-w,o),L=x==0?C.length-1:C.length,R=T;R<L;R++)o.addSubFold(C[R]);return o.setFoldLine(this.foldLine),o}},l.prototype.restoreRange=function(o){return a(o,this.start)},l}(p);function u(c,l){c.row-=l.row,c.row==0&&(c.column-=l.column)}function g(c,l){u(c.start,l),u(c.end,l)}function s(c,l){c.row==0&&(c.column+=l.column),c.row+=l.row}function a(c,l){s(c.start,l),s(c.end,l)}r.Fold=b}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,f){var h=n("../range").Range,p=n("./fold_line").FoldLine,b=n("./fold").Fold,u=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,c,l){var o=this.getFoldLine(a);if(!o)return null;for(var d=o.folds,m=0;m<d.length;m++){var w=d[m].range;if(w.contains(a,c)){if(l==1&&w.isEnd(a,c)&&!w.isEmpty()||l==-1&&w.isStart(a,c)&&!w.isEmpty())continue;return d[m]}}},this.getFoldsInRange=function(a){var c=a.start,l=a.end,o=this.$foldData,d=[];c.column+=1,l.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=o[m].folds,I=0;I<x.length;I++){var T=x[I];if(w=T.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;d.push(T)}}}}return c.column-=1,l.column+=1,d},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var c=[];a.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(a);return c},this.getAllFolds=function(){for(var a=[],c=this.$foldData,l=0;l<c.length;l++)for(var o=0;o<c[l].folds.length;o++)a.push(c[l].folds[o]);return a},this.getFoldStringAt=function(a,c,l,o){if(o=o||this.getFoldLine(a),!o)return null;for(var d={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var I=w.range.compareEnd(a,c);if(I==-1){m=this.getLine(w.start.row).substring(d.end.column,w.start.column);break}else if(I===0)return null;d=w}return m||(m=this.getLine(w.start.row).substring(d.end.column)),l==-1?m.substring(0,c-d.end.column):l==1?m.substring(c-d.end.column):m},this.getFoldLine=function(a,c){var l=this.$foldData,o=0;for(c&&(o=l.indexOf(c)),o==-1&&(o=0),o;o<l.length;o++){var d=l[o];if(d.start.row<=a&&d.end.row>=a)return d;if(d.end.row>a)return null}return null},this.getNextFoldLine=function(a,c){var l=this.$foldData,o=0;for(c&&(o=l.indexOf(c)),o==-1&&(o=0),o;o<l.length;o++){var d=l[o];if(d.end.row>=a)return d}return null},this.getFoldedRowCount=function(a,c){for(var l=this.$foldData,o=c-a+1,d=0;d<l.length;d++){var m=l[d],w=m.end.row,x=m.start.row;if(w>=c){x<c&&(x>=a?o-=c-x:o=0);break}else w>=a&&(x>=a?o-=w-x:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(c,l){return c.start.row-l.start.row}),a},this.addFold=function(a,c){var l=this.$foldData,o=!1,d;a instanceof b?d=a:(d=new b(c,a),d.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(d.range);var m=d.start.row,w=d.start.column,x=d.end.row,I=d.end.column,T=this.getFoldAt(m,w,1),_=this.getFoldAt(x,I,-1);if(T&&_==T)return T.addSubFold(d);T&&!T.range.isStart(m,w)&&this.removeFold(T),_&&!_.range.isEnd(x,I)&&this.removeFold(_);var C=this.getFoldsInRange(d.range);C.length>0&&(this.removeFolds(C),d.collapseChildren||C.forEach(function(E){d.addSubFold(E)}));for(var L=0;L<l.length;L++){var R=l[L];if(x==R.start.row){R.addFold(d),o=!0;break}else if(m==R.end.row){if(R.addFold(d),o=!0,!d.sameRow){var F=l[L+1];if(F&&F.start.row==x){R.merge(F);break}}break}else if(x<=R.start.row)break}return o||(R=this.$addFoldLine(new p(this.$foldData,d))),this.$useWrapMode?this.$updateWrapData(R.start.row,R.start.row):this.$updateRowLengthCache(R.start.row,R.start.row),this.$modified=!0,this._signal("changeFold",{data:d,action:"add"}),d},this.addFolds=function(a){a.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(a){var c=a.foldLine,l=c.start.row,o=c.end.row,d=this.$foldData,m=c.folds;if(m.length==1)d.splice(d.indexOf(c),1);else if(c.range.isEnd(a.end.row,a.end.column))m.pop(),c.end.row=m[m.length-1].end.row,c.end.column=m[m.length-1].end.column;else if(c.range.isStart(a.start.row,a.start.column))m.shift(),c.start.row=m[0].start.row,c.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=c.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(l,o):this.$updateRowLengthCache(l,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var c=[],l=0;l<a.length;l++)c.push(a[l]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(c){a.restoreRange(c),this.addFold(c)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(a,c){var l,o;if(a==null)l=new h(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof a=="number")l=new h(a,0,a,this.getLine(a).length);else if("row"in a)l=h.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(m){o=o.concat(this.unfold(m))},this),o;l=a}o=this.getFoldsInRangeList(l);for(var d=o;o.length==1&&h.comparePoints(o[0].start,l.start)<0&&h.comparePoints(o[0].end,l.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(l);if(c!=!1?this.removeFolds(o):this.expandFolds(o),d.length)return d},this.isRowFolded=function(a,c){return!!this.getFoldLine(a,c)},this.getRowFoldEnd=function(a,c){var l=this.getFoldLine(a,c);return l?l.end.row:a},this.getRowFoldStart=function(a,c){var l=this.getFoldLine(a,c);return l?l.start.row:a},this.getFoldDisplayLine=function(a,c,l,o,d){o==null&&(o=a.start.row),d==null&&(d=0),c==null&&(c=a.end.row),l==null&&(l=this.getLine(c).length);var m=this.doc,w="";return a.walk(function(x,I,T,_){if(!(I<o)){if(I==o){if(T<d)return;_=Math.max(d,_)}x!=null?w+=x:w+=m.getLine(I).substring(_,T)}},c,l),w},this.getDisplayLine=function(a,c,l,o){var d=this.getFoldLine(a);if(d)return this.getFoldDisplayLine(d,a,c,l,o);var m;return m=this.doc.getLine(a),m.substring(o||0,c||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(c){var l=c.folds.map(function(o){return o.clone()});return new p(a,l)}),a},this.toggleFold=function(a){var c=this.selection,l=c.getRange(),o,d;if(l.isEmpty()){var m=l.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else(d=this.findMatchingBracket(m))?l.comparePoint(d)==1?l.end=d:(l.start=d,l.start.column++,l.end.column--):(d=this.findMatchingBracket({row:m.row,column:m.column+1}))?(l.comparePoint(d)==1?l.end=d:l.start=d,l.start.column++):l=this.getCommentFoldRange(m.row,m.column)||l}else{var w=this.getFoldsInRange(l);if(a&&w.length){this.expandFolds(w);return}else w.length==1&&(o=w[0])}if(o||(o=this.getFoldAt(l.start.row,l.start.column)),o&&o.range.toString()==l.toString()){this.expandFold(o);return}var x="...";if(!l.isMultiLine()){if(x=this.getTextRange(l),x.length<4)return;x=x.trim().substring(0,2)+".."}this.addFold(x,l)},this.getCommentFoldRange=function(a,c,l){var o=new u(this,a,c),d=o.getCurrentToken(),m=d&&d.type;if(d&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new h;if(l!=1){do d=o.stepBackward();while(d&&w.test(d.type));d=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+d.value.length,o=new u(this,a,c);var I=this.getState(o.$row);if(l!=-1){var T=-1;do if(d=o.stepForward(),T==-1){var _=this.getState(o.$row);I.toString()!==_.toString()&&(T=o.$row)}else if(o.$row>T)break;while(d&&w.test(d.type));d=o.stepBackward()}else d=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x}},this.foldAll=function(a,c,l,o){l==null&&(l=1e5);var d=this.foldWidgets;if(d){c=c||this.getLength(),a=a||0;for(var m=a;m<c;m++)if(d[m]==null&&(d[m]=this.getFoldWidget(m)),d[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=c&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=l,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(c){for(var l=a.getTokens(c),o=0;o<l.length;o++){var d=l[o];if(!(d.type=="text"&&/^\s+$/.test(d.value)))return!!/comment/.test(d.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,c){var l=this.foldWidgets;if(!l||c&&l[a])return{};for(var o=a-1,d;o>=0;){var m=l[o];if(m==null&&(m=l[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(d||(d=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:d}},this.onFoldWidgetClick=function(a,c){c instanceof g&&(c=c.domEvent);var l={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(a,l);if(!o){var d=c.target||c.srcElement;d&&/ace_fold-widget/.test(d.className)&&(d.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,c){if(this.getFoldWidget){var l=this.getFoldWidget(a),o=this.getLine(a),d=l==="end"?-1:1,m=this.getFoldAt(a,d===-1?0:o.length,d);if(m)return c.children||c.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(c.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var I=x.range.start.row+1,T=x.range.end.row;this.foldAll(I,T,c.all?1e4:0)}else c.children?(T=w?w.end.row:this.getLength(),this.foldAll(a+1,T,c.all?1e4:0)):w&&(c.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var l=this.$toggleFoldWidget(c,{});if(!l){var o=this.getParentFoldRangeData(c,!0);if(l=o.range||o.firstRange,l){c=l.start.row;var d=this.getFoldAt(c,this.getLine(c).length,1);d?this.removeFold(d):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var c=a.start.row,l=a.end.row-c;if(l===0)this.foldWidgets[c]=null;else if(a.action=="remove")this.foldWidgets.splice(c,l+1,null);else{var o=Array(l+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var c=a.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,f){var h=n("../token_iterator").TokenIterator,p=n("../range").Range;function b(){this.findMatchingBracket=function(u,g){if(u.column==0)return null;var s=g||this.getLine(u.row).charAt(u.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],u):this.$findOpeningBracket(a[2],u):null},this.getBracketRange=function(u){var g=this.getLine(u.row),s=!0,a,c=g.charAt(u.column-1),l=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(l||(c=g.charAt(u.column),u={row:u.row,column:u.column+1},l=c&&c.match(/([\(\[\{])|([\)\]\}])/),s=!1),!l)return null;if(l[1]){var o=this.$findClosingBracket(l[1],u);if(!o)return null;a=p.fromPoints(u,o),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(l[2],u);if(!o)return null;a=p.fromPoints(o,u),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(u,g){var s=this.getLine(u.row),a=/([\(\[\{])|([\)\]\}])/,c=!g&&s.charAt(u.column-1),l=c&&c.match(a);if(l||(c=(g===void 0||g)&&s.charAt(u.column),u={row:u.row,column:u.column+1},l=c&&c.match(a)),!l)return null;var o=new p(u.row,u.column-1,u.row,u.column),d=l[1]?this.$findClosingBracket(l[1],u):this.$findOpeningBracket(l[2],u);if(!d)return[o];var m=new p(d.row,d.column,d.row,d.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(u,g,s){var a=this.$brackets[u],c=1,l=new h(this,g.row,g.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var d=g.column-l.getCurrentTokenColumn()-2,m=o.value;;){for(;d>=0;){var w=m.charAt(d);if(w==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:d+l.getCurrentTokenColumn()}}else w==u&&(c+=1);d-=1}do o=l.stepBackward();while(o&&!s.test(o.type));if(o==null)break;m=o.value,d=m.length-1}return null}},this.$findClosingBracket=function(u,g,s){var a=this.$brackets[u],c=1,l=new h(this,g.row,g.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var d=g.column-l.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;d<w;){var x=m.charAt(d);if(x==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:d+l.getCurrentTokenColumn()}}else x==u&&(c+=1);d+=1}do o=l.stepForward();while(o&&!s.test(o.type));if(o==null)break;d=0}return null}},this.getMatchingTags=function(u){var g=new h(this,u.row,u.column),s=this.$findTagName(g);if(s){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,s):this.$findOpeningTag(g,s)}},this.$findTagName=function(u){var g=u.getCurrentToken(),s=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=u.stepBackward():g=u.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(s=!0));while(g&&!s);return g},this.$findClosingTag=function(u,g){var s,a=g.value,c=g.value,l=0,o=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);g=u.stepForward();var d=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+g.value.length),m=!1;do{if(s=g,s.type.indexOf("tag-close")!==-1&&!m){var w=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);m=!0}if(g=u.stepForward(),g){if(g.value===">"&&!m){var w=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,c===a){if(s.value==="<")l++;else if(s.value==="</"&&(l--,l<0)){u.stepBackward();var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2);g=u.stepForward();var I=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=u.stepForward()),g&&g.value===">")var T=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);else return}}}else if(c===a&&g.value==="/>"&&(l--,l<0))var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2),I=x,T=I,w=new p(d.end.row,d.end.column,d.end.row,d.end.column+1)}}while(g&&l>=0);if(o&&w&&x&&T&&d&&I)return{openTag:new p(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new p(x.start.row,x.start.column,T.end.row,T.end.column),openTagName:d,closeTagName:I}},this.$findOpeningTag=function(u,g){var s=u.getCurrentToken(),a=g.value,c=0,l=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),d=o+2,m=new p(l,o,l,d);u.stepForward();var w=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=u.stepForward()),!(!g||g.value!==">")){var x=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);u.stepBackward(),u.stepBackward();do if(g=s,l=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),d=o+g.value.length,s=u.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(s.value==="<"){if(c++,c>0){var I=new p(l,o,l,d),T=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);do g=u.stepForward();while(g&&g.value!==">");var _=new p(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1)}}else s.value==="</"&&c--}else if(g.value==="/>"){for(var C=0,L=s;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===a){c--;break}else if(L.value==="<")break;L=u.stepBackward(),C++}for(var R=0;R<C;R++)u.stepForward()}}while(s&&c<=0);if(T&&_&&m&&x&&I&&w)return{openTag:new p(T.start.row,T.start.column,_.end.row,_.end.column),closeTag:new p(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:I,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(n,r,f){var h=n("./lib/oop"),p=n("./lib/lang"),b=n("./bidihandler").BidiHandler,u=n("./config"),g=n("./lib/event_emitter").EventEmitter,s=n("./selection").Selection,a=n("./mode/text").Mode,c=n("./range").Range,l=n("./line_widgets").LineWidgets,o=n("./document").Document,d=n("./background_tokenizer").BackgroundTokenizer,m=n("./search_highlight").SearchHighlight,w=n("./undomanager").UndoManager,x=function(){function P(O,S){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.bgTokenizer=new d(new a().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(D){A._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new o(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),u.resetOptions(this),this.setMode(S),u._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=p.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 S=this.selection.toJSON();this.curOp.selectionAfter=S,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(S),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new l(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;S>A&&(this.$docRowCache.splice(A,S),this.$screenRowCache.splice(A,S))},P.prototype.$getRowCacheIndex=function(O,S){for(var A=0,D=O.length-1;A<=D;){var B=A+D>>1,U=O[B];if(S>U)A=B+1;else if(S<U)D=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 S=O.data;this.$resetRowCache(S.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var S=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(S&&S.length&&(this.$undoManager.add({action:"removeFolds",folds:S},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 S=new w;S.$undoStack=O.history.undo,S.$redoStack=O.history.redo,S.mark=O.history.mark,S.$rev=O.history.rev;var A=new P(O.value);return O.folds.forEach(function(D){A.addFold("...",c.fromPoints(D.start,D.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager(S),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,S){var A=this.bgTokenizer.getTokens(O),D,B=0;if(S==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>=S));U++);return D=A[U],D?(D.index=U,D.start=B-D.value.length,D):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var S=this;O.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=p.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()?p.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,S){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+S,this._signal("changeBreakpoint",{})},P.prototype.removeGutterDecoration=function(O,S){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var S=0;S<O.length;S++)this.$breakpoints[O[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[O]=S:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,S,A,D){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:S,inFront:!!D,id:B};return D?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},P.prototype.addDynamicMarker=function(O,S){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!S,S?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var S=this.$frontMarkers[O]||this.$backMarkers[O];if(S){var A=S.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var S=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,S,A,D){typeof S!="number"&&(A=S,S=O),A||(A="ace_step");var B=new c(O,0,S,1/0);return B.id=this.addMarker(B,A,"fullLine",D),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 S=O.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(O,S){var A=this.getLine(O),D=!1;if(S>0&&(D=!!A.charAt(S-1).match(this.tokenRe)),D||(D=!!A.charAt(S).match(this.tokenRe)),D)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(S-1,S+1)))var B=/\s/;else var B=this.nonTokenRe;var U=S;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=S;K<A.length&&A.charAt(K).match(B);)K++;return new c(O,U,O,K)},P.prototype.getAWordRange=function(O,S){for(var A=this.getWordRange(O,S),D=this.getLine(A.end.row);D.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 S=O.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,S){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,D=A.path}else D=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!A){this.$onChangeMode(this.$modes[D]),S&&S();return}this.$modeId=D,u.loadModule(["mode",D],(function(B){if(!this.destroyed){if(this.$modeId!==D)return S&&S();this.$modes[D]&&!A?this.$onChangeMode(this.$modes[D]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[D]=B,B.$id=D),this.$onChangeMode(B)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,S){if(S||(this.$modeId=O.$id),this.$mode!==O){var A=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=O.getTokenizer();if(D.on!==void 0){var B=this.onReloadTokenizer.bind(this);D.on("update",B)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,S||(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){u.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(S){S&&S.screenWidth>O&&(O=S.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 S=this.doc.getAllLines(),A=this.$rowLengthCache,D=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=S.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[te]==null&&(A[te]=this.$getStringScreenWidth(S[te])[0]),A[te]>D&&(D=A[te])}this.screenWidth=D}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,S){return this.doc.getLines(O,S)},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,S){return this.doc.insert(O,S)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,S){return this.doc.removeFullLines(O,S)},P.prototype.undoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var D=O[A];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!S&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var D=O[A];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!S&&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,S){function A(Z){return S?Z.action!=="insert":Z.action==="insert"}for(var D,B,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!D){A(K)?D=c.fromPoints(K.start,K.end):D=c.fromPoints(K.start,K.start);continue}A(K)?(B=K.start,D.compare(B.row,B.column)==-1&&D.setStart(B),B=K.end,D.compare(B.row,B.column)==1&&D.setEnd(B)):(B=K.start,D.compare(B.row,B.column)==-1&&(D=c.fromPoints(K.start,K.start)))}}return D},P.prototype.replace=function(O,S){return this.doc.replace(O,S)},P.prototype.moveText=function(O,S,A){var D=this.getTextRange(O),B=this.getFoldsInRange(O),U=c.fromPoints(S,S);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,D),B.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(B.map(function(ce){return ce=ce.clone(),ce.start.row==te.row&&(ce.start.column+=Z),ce.end.row==te.row&&(ce.end.column+=Z),ce.start.row+=K,ce.end.row+=K,ce}))}return U},P.prototype.indentRows=function(O,S,A){A=A.replace(/\t/g,this.getTabString());for(var D=O;D<=S;D++)this.doc.insertInLine({row:D,column:0},A)},P.prototype.outdentRows=function(O){for(var S=O.collapseRows(),A=new c(0,0,0,0),D=this.getTabSize(),B=S.start.row;B<=S.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var K=0;K<D&&U.charAt(K)==" ";++K);K<D&&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,S,A){if(O=this.getRowFoldStart(O),S=this.getRowFoldEnd(S),A<0){var D=this.getRowFoldStart(O+A);if(D<0)return 0;var B=D-O}else if(A>0){var D=this.getRowFoldEnd(S+A);if(D>this.doc.getLength()-1)return 0;var B=D-S}else{O=this.$clipRowToDocument(O),S=this.$clipRowToDocument(S);var B=S-O+1}var U=new c(O,0,S,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=B,te.end.row+=B,te}),Z=A==0?this.doc.getLines(O,S):this.doc.removeFullLines(O,S);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,S){return this.$moveLines(O,S,-1)},P.prototype.moveLinesDown=function(O,S){return this.$moveLines(O,S,1)},P.prototype.duplicateLines=function(O,S){return this.$moveLines(O,S,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,S){return S<0?0:Math.min(this.doc.getLine(O).length,S)},P.prototype.$clipPositionToDocument=function(O,S){if(S=Math.max(0,S),O<0)O=0,S=0;else{var A=this.doc.getLength();O>=A?(O=A-1,S=this.doc.getLine(A-1).length):S=Math.min(this.doc.getLine(O).length,S)}return{row:O,column:S}},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 S=this.doc.getLength()-1;return O.end.row>S?(O.end.row=S,O.end.column=this.doc.getLine(S).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 S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,S){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:O,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,S){var A=this.$wrapLimitRange;A.max<0&&(A={min:S,max:S});var D=this.$constrainWrapLimit(O,A.min,A.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,S,A){return S&&(O=Math.max(S,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 S=this.$useWrapMode,A=O.action,D=O.start,B=O.end,U=D.row,K=B.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(B.row),ae=0;if(ne){ne.addRemoveChars(B.row,B.column,D.column-B.column),ne.shiftRow(-Z);var ce=this.getFoldLine(U);ce&&ce!==ne&&(ce.merge(ne),ne=ce),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var ue=Array(Z);ue.unshift(U,0);var ye=S?this.$wrapData:this.$rowLengthCache;ye.splice.apply(ye,ue);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var Ae=ne.range.compareInside(D.row,D.column);Ae==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-D.column))):Ae==-1&&(ne.addRemoveChars(U,0,B.column-D.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Z)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(O,S){this.$rowLengthCache[O]=null,this.$rowLengthCache[S]=null},P.prototype.$updateWrapData=function(O,S){var A=this.doc.getAllLines(),D=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(S=Math.min(S,A.length-1);te<=S;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ce){var ue;if(he!=null){ue=this.$getDisplayTokens(he,K.length),ue[0]=_;for(var ye=1;ye<ue.length;ye++)ue[ye]=C}else ue=this.$getDisplayTokens(A[ne].substring(ce,ae),K.length);K=K.concat(ue)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,D),te=Z.end.row+1):(K=this.$getDisplayTokens(A[te]),B[te]=this.$computeWrapSplits(K,U,D),te++)},P.prototype.$computeWrapSplits=function(O,S,A){if(O.length==0)return[];var D=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=S<=Math.max(2*A,8)||te===!1?0:Math.floor(S/2);function ne(){var Ae=0;if(he===0)return Ae;if(te)for(var $e=0;$e<O.length;$e++){var Ie=O[$e];if(Ie==R)Ae+=1;else if(Ie==F)Ae+=A;else{if(Ie==E)continue;break}}return Z&&te!==!1&&(Ae+=A),Math.min(Ae,he)}function ae(Ae){for(var $e=Ae-U,Ie=U;Ie<Ae;Ie++){var Ze=O[Ie];(Ze===12||Ze===2)&&($e-=1)}D.length||(ce=ne(),D.indent=ce),K+=$e,D.push(K),U=Ae}for(var ce=0;B-U>S-ce;){var ue=U+S-ce;if(O[ue-1]>=R&&O[ue]>=R){ae(ue);continue}if(O[ue]==_||O[ue]==C){for(ue;ue!=U-1&&O[ue]!=_;ue--);if(ue>U){ae(ue);continue}for(ue=U+S,ue;ue<O.length&&O[ue]==C;ue++);if(ue==O.length)break;ae(ue);continue}for(var ye=Math.max(ue-(S-(S>>2)),U-1);ue>ye&&O[ue]<_;)ue--;if(Z){for(;ue>ye&&O[ue]<_;)ue--;for(;ue>ye&&O[ue]==L;)ue--}else for(;ue>ye&&O[ue]<R;)ue--;if(ue>ye){ae(++ue);continue}ue=U+S,O[ue]==T&&ue--,ae(ue-ce)}return D},P.prototype.$getDisplayTokens=function(O,S){var A=[],D;S=S||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){D=this.getScreenTabSize(A.length+S),A.push(F);for(var K=1;K<D;K++)A.push(E)}else U==32?A.push(R):U>39&&U<48||U>57&&U<64?A.push(L):U>=4352&&H(U)?A.push(I,T):A.push(I)}return A},P.prototype.$getStringScreenWidth=function(O,S,A){if(S==0)return[0,0];S==null&&(S=1/0),A=A||0;var D,B;for(B=0;B<O.length&&(D=O.charCodeAt(B),D==9?A+=this.getScreenTabSize(A):D>=4352&&H(D)?A+=2:A+=1,!(A>S));B++);return[A,B]},P.prototype.getRowLength=function(O){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?S:this.$wrapData[O].length+S},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 S=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[S.row];return A.length&&A[0]<S.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},P.prototype.getDocumentLastRowColumn=function(O,S){var A=this.documentToScreenRow(O,S);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,S){var A=this.documentToScreenRow(O,S);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,S){return this.screenToDocumentPosition(O,S).row},P.prototype.screenToDocumentColumn=function(O,S){return this.screenToDocumentPosition(O,S).column},P.prototype.screenToDocumentPosition=function(O,S,A){if(O<0)return{row:0,column:0};var D,ae=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ce=O>Z[he-1];else var ce=!he;for(var ue=this.getLength()-1,ye=this.getNextFoldLine(ae),Ae=ye?ye.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ue));)ne+=K,ae++,ae>Ae&&(ae=ye.end.row+1,ye=this.getNextFoldLine(ae,ye),Ae=ye?ye.start.row:1/0),ce&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(ye&&ye.start.row<=ae)D=this.getFoldDisplayLine(ye),ae=ye.start.row;else{if(ne+K<=O||ae>ue)return{row:ue,column:this.getLine(ue).length};D=this.getLine(ae),ye=null}var $e=0,Ie=Math.floor(O-ne);if(this.$useWrapMode){var Ze=this.$wrapData[ae];Ze&&(U=Ze[Ie],Ie>0&&Ze.length&&($e=Ze.indent,B=Ze[Ie-1]||Ze[Ze.length-1],D=D.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Ie,ae,Ie)&&(S=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(D,S-$e)[1],this.$useWrapMode&&B>=U&&(B=U-1),ye?ye.idxToPosition(B):{row:ae,column:B}},P.prototype.documentToScreenPosition=function(O,S){if(typeof S>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,S);O=A.row,S=A.column;var ne=0,D=null,B=null;B=this.getFoldAt(O,S,1),B&&(O=B.start.row,S=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ce=this.getNextFoldLine(he),ue=ce?ce.start.row:1/0;he<O;){if(he>=ue){if(U=ce.end.row+1,U>O)break;ce=this.getNextFoldLine(U,ce),ue=ce?ce.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ye="";ce&&he>=ue?(ye=this.getFoldDisplayLine(ce,O,S),D=ce.start.row):(ye=this.getLine(O).substring(0,S),D=O);var Ae=0;if(this.$useWrapMode){var $e=this.$wrapData[D];if($e){for(var Ie=0;ye.length>=$e[Ie];)ne++,Ie++;ye=ye.substring($e[Ie-1]||0,ye.length),Ae=Ie>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ae+this.$getStringScreenWidth(ye)[0]}},P.prototype.documentToScreenColumn=function(O,S){return this.documentToScreenPosition(O,S).column},P.prototype.documentToScreenRow=function(O,S){return this.documentToScreenPosition(O,S).row},P.prototype.getScreenLength=function(){var O=0,S=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,D=0,B=0,S=this.$foldData[B++],U=S?S.start.row:1/0;D<A;){var K=this.$wrapData[D];O+=K?K.length+1:1,D++,D>U&&(D=S.end.row+1,S=this.$foldData[B++],U=S?S.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)S=Z[B],O-=S.end.row-S.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,A,D){if(A===0)return[0,0];A||(A=1/0),D=D||0;var B,U;for(U=0;U<S.length&&(B=S.charAt(U),B===" "?D+=this.getScreenTabSize(D):D+=O.getCharacterWidth(B),!(D>A));U++);return[D,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(O.row);return S[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=u.$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,h.implement(x.prototype,g);var I=1,T=2,_=3,C=4,L=9,R=10,F=11,E=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}n("./edit_session/folding").Folding.call(x.prototype),n("./edit_session/bracket_match").BracketMatch.call(x.prototype),u.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(n,r,f){var h=n("./lib/lang"),p=n("./lib/oop"),b=n("./range").Range,u=function(){function c(){this.$options={}}return c.prototype.set=function(l){return p.mixin(this.$options,l),this},c.prototype.getOptions=function(){return h.copyObject(this.$options)},c.prototype.setOptions=function(l){this.$options=l},c.prototype.find=function(l){var o=this.$options,d=this.$matchIterator(l,o);if(!d)return!1;var m=null;return d.forEach(function(w,x,I,T){return m=new b(w,x,I,T),x==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},c.prototype.findAll=function(l){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var d=o.range,m=d?l.getLines(d.start.row,d.end.row):l.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var I=x.length,T=m.length-I,_;e:for(var C=x.offset||0;C<=T;C++){for(var L=0;L<I;L++)if(m[C+L].search(x[L])==-1)continue e;var R=m[C],F=m[C+I-1],E=R.length-R.match(x[0])[0].length,H=F.match(x[I-1])[0].length;_&&_.end.row===C&&_.end.column>E||(w.push(_=new b(C,E,C+I-1,H)),I>2&&(C=C+I-2))}}else for(var P,O=0;O<m.length;O++)if(this.$isMultilineSearch(o)){var S=m.length-1;if(P=this.$multiLineForward(l,x,O,S),P){var A=P.endRow<=S?P.endRow-1:S;A>O&&(O=A),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=h.getMatchOffsets(m[O],x);for(var L=0;L<P.length;L++){var D=P[L];w.push(new b(O,D.offset,O,D.offset+D.length))}}if(d){for(var B=d.start.column,U=d.end.column,O=0,L=w.length-1;O<L&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=d.end.row-d.start.row;O<L&&w[L].end.column>U&&w[L].end.row==K;)L--;for(w=w.slice(O,L+1),O=0,L=w.length;O<L;O++)w[O].start.row+=d.start.row,w[O].end.row+=d.start.row}return w},c.prototype.parseReplaceString=function(l){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},d="",m=0,w=l.length;m<w;m++){var x=l.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){d+="\\";break}var I=l.charCodeAt(m);switch(I){case o.Backslash:d+="\\";break;case o.n:d+=`
|
199
|
+
`;break;case o.t:d+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){d+="$";break}var T=l.charCodeAt(m);if(T===o.DollarSign){d+="$$";continue}if(T===o.Digit0||T===o.Ampersand){d+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){d+="$"+l[m];continue}}d+=l[m]}return d||l},c.prototype.replace=function(l,o){var d=this.$options,m=this.$assembleRegExp(d);if(d.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(d);w&&(l=l.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var x=m.exec(l);if(!x||!w&&x[0].length!=l.length)return null;if(o=d.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=l.replace(m,o),d.preserveCase){o=o.split("");for(var I=Math.min(l.length,l.length);I--;){var T=l[I];T&&T.toLowerCase()!=T?o[I]=o[I].toUpperCase():o[I]=o[I].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(l,o){if(l.needle instanceof RegExp)return l.re=l.needle;var d=l.needle;if(!l.needle)return l.re=!1;l.regExp||(d=h.escapeRegExp(d));var m=l.caseSensitive?"gm":"gmi";try{new RegExp(d,"u"),l.$supportsUnicodeFlag=!0,m+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(d=g(d,l)),l.$isMultiLine=!o&&/[\n\r]/.test(d),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(d,m);try{var w=new RegExp(d,m)}catch{w=!1}return l.re=w},c.prototype.$assembleMultilineRegExp=function(l,o){for(var d=l.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),m=[],w=0;w<d.length;w++)try{m.push(new RegExp(d[w],o))}catch{return!1}return m},c.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},c.prototype.$multiLineForward=function(l,o,d,m){for(var w,x=a(l,d),I=d;I<=m;){for(var T=0;T<x&&!(I>m);T++){var _=l.getLine(I++);w=w==null?_:w+`
|
203
|
+
`+_}var C=o.exec(w);if(o.lastIndex=0,C){var L=w.slice(0,C.index).split(`
|
204
|
+
`),R=C[0].split(`
|
205
|
+
`),F=d+L.length-1,E=L[L.length-1].length,H=F+R.length-1,P=R.length==1?E+R[0].length:R[R.length-1].length;return{startRow:F,startCol:E,endRow:H,endCol:P}}}return null},c.prototype.$multiLineBackward=function(l,o,d,m,w){for(var x,I=a(l,m),T=l.getLine(m).length-d,_=m;_>=w;){for(var C=0;C<I&&_>=w;C++){var L=l.getLine(_--);x=x==null?L:L+`
|
206
|
+
`+x}var R=s(x,o,T);if(R){var F=x.slice(0,R.index).split(`
|
207
|
+
`),E=R[0].split(`
|
208
|
+
`),H=_+F.length,P=F[F.length-1].length,O=H+E.length-1,S=E.length==1?P+E[0].length:E[E.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:S}}}return null},c.prototype.$matchIterator=function(l,o){var d=this.$assembleRegExp(o);if(!d)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,I=o.backwards==!0,T=o.skipCurrent!=!1,_=d.unicode,C=o.range,L=o.start;L||(L=C?C[I?"end":"start"]:l.selection.getRange()),L.start&&(L=L[T!=I?"end":"start"]);var R=C?C.start.row:0,F=C?C.end.row:l.getLength()-1;if(I)var E=function(O){var S=L.row;if(!P(S,L.column,O)){for(S--;S>=R;S--)if(P(S,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(S=F,R=L.row;S>=R;S--)if(P(S,Number.MAX_VALUE,O))return}}};else var E=function(O){var S=L.row;if(!P(S,L.column,O)){for(S=S+1;S<=F;S++)if(P(S,0,O))return;if(o.wrap!=!1){for(S=R,F=L.row;S<=F;S++)if(P(S,0,O))return}}};if(o.$isMultiLine)var H=d.length,P=function(O,S,A){var D=I?O-H+1:O;if(!(D<0||D+H>l.getLength())){var B=l.getLine(D),U=B.search(d[0]);if(!(!I&&U<S||U===-1)){for(var K=1;K<H;K++)if(B=l.getLine(D+K),B.search(d[K])==-1)return;var Z=B.match(d[H-1])[0].length;if(!(I&&Z>S)&&A(D,U,D+H-1,Z))return!0}}};else if(I)var P=function(O,S,A){if(m){var D=x(l,d,S,O,R);if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var B=l.getLine(O),U=[],K,Z=0;for(d.lastIndex=0;K=d.exec(B);){var te=K[0].length;if(Z=K.index,!te){if(Z>=B.length)break;d.lastIndex=Z+=h.skipEmptyMatch(B,Z,_)}if(K.index+te>S)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(A(O,ne,O,ne+te))return!0}}};else var P=function(O,S,A){if(d.lastIndex=S,m){var D=w(l,d,O,F);if(D){var B=D.endRow<=F?D.endRow-1:F;B>O&&(O=B)}if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=l.getLine(O),K,Z;Z=d.exec(U);){var te=Z[0].length;if(K=Z.index,A(O,K,O,K+te))return!0;if(!te&&(d.lastIndex=K+=h.skipEmptyMatch(U,K,_),K>=U.length))return!1}};return{forEach:E}},c}();function g(c,l){var o=h.supportsLookbehind();function d(I,T){T===void 0&&(T=!0);var _=o&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(I)||l.regExp?o&&l.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(c),w=m[0],x=m[m.length-1];return d(w)+c+d(x,!1)}function s(c,l,o){for(var d=null,m=0;m<=c.length;){l.lastIndex=m;var w=l.exec(c);if(!w)break;var x=w.index+w[0].length;if(x>c.length-o)break;(!d||x>d.index+d[0].length)&&(d=w),m=w.index+1}return d}function a(c,l){var o=5e3,d={row:l,column:0},m=c.doc.positionToIndex(d),w=m+o,x=c.doc.indexToPosition(w),I=x.row;return I+1}r.Search=u}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var h=this&&this.__extends||function(){var c=function(l,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(d[w]=m[w])},c(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(l,o);function d(){this.constructor=l}l.prototype=o===null?Object.create(o):(d.prototype=o.prototype,new d)}}(),p=n("../lib/keys"),b=n("../lib/useragent"),u=p.KEY_MODS,g=function(){function c(l,o){this.$init(l,o,!1)}return c.prototype.$init=function(l,o,d){this.platform=o||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=d},c.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},c.prototype.removeCommand=function(l,o){var d=l&&(typeof l=="string"?l:l.name);l=this.commands[d],o||delete this.commands[d];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==l)delete m[w];else if(Array.isArray(x)){var I=x.indexOf(l);I!=-1&&(x.splice(I,1),x.length==1&&(m[w]=x[0]))}}},c.prototype.bindKey=function(l,o,d){if(typeof l=="object"&&l&&(d==null&&(d=l.position),l=l[this.platform]),!!l){if(typeof o=="function")return this.addCommand({exec:o,bindKey:l,name:o.name||l});l.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),L=u[C.hashId]+C.key;w+=(w?" ":"")+L,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var I=this.parseKeys(m),T=u[I.hashId]+I.key;this._addCommandToBinding(w+T,o,d)},this)}},c.prototype._addCommandToBinding=function(l,o,d){var m=this.commandKeyBinding,w;if(!o)delete m[l];else if(!m[l]||this.$singleCommand)m[l]=o;else{Array.isArray(m[l])?(w=m[l].indexOf(o))!=-1&&m[l].splice(w,1):m[l]=[m[l]],typeof d!="number"&&(d=s(o));var x=m[l];for(w=0;w<x.length;w++){var I=x[w],T=s(I);if(T>d)break}x.splice(w,0,o)}},c.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(o){var d=l[o];if(d){if(typeof d=="string")return this.bindKey(d,o);typeof d=="function"&&(d={exec:d}),typeof d=="object"&&(d.name||(d.name=o),this.addCommand(d))}},this)},c.prototype.removeCommands=function(l){Object.keys(l).forEach(function(o){this.removeCommand(l[o])},this)},c.prototype.bindKeys=function(l){Object.keys(l).forEach(function(o){this.bindKey(o,l[o])},this)},c.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},c.prototype.parseKeys=function(l){var o=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),d=o.pop(),m=p[d];if(p.FUNCTION_KEYS[m])d=p.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:d.toUpperCase(),hashId:-1}}else return{key:d,hashId:-1};for(var w=0,x=o.length;x--;){var I=p.KEY_MODS[o[x]];if(I==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+l),!1;w|=I}return{key:d,hashId:w}},c.prototype.findKeyCommand=function(l,o){var d=u[l]+o;return this.commandKeyBinding[d]},c.prototype.handleKeyboard=function(l,o,d,m){if(!(m<0)){var w=u[o]+d,x=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,x=this.commandKeyBinding[l.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!o||o==4)&&d.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(l.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(l,o){return o.$keyChain||""},c}();function s(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var a=function(c){h(l,c);function l(o,d){var m=c.call(this,o,d)||this;return m.$singleCommand=!0,m}return l}(g);a.call=function(c,l,o){g.prototype.$init.call(c,l,o,!0)},g.call=function(c,l,o){g.prototype.$init.call(c,l,o,!1)},r.HashHandler=a,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,f){var h=this&&this.__extends||function(){var s=function(a,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(l[d]=o[d])},s(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(a,c);function l(){this.constructor=a}a.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),p=n("../lib/oop"),b=n("../keyboard/hash_handler").MultiHashHandler,u=n("../lib/event_emitter").EventEmitter,g=function(s){h(a,s);function a(c,l){var o=s.call(this,l,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(d){return d.args?d.command.exec(d.editor,d.args,d.event,!1):d.command.exec(d.editor,{},d.event,!0)}),o}return a.prototype.exec=function(c,l,o){if(Array.isArray(c)){for(var d=c.length;d--;)if(this.exec(c[d],l,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var m={editor:l,command:c,args:o};return this.canExecute(c,l)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(c,l){return typeof c=="string"&&(c=this.commands[c]),!(!c||l&&l.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(l))},a.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,c):this.exec(l[0],c,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(c){return c.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a}(b);p.implement(g.prototype,u),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,f){var h=n("../lib/lang"),p=n("../config"),b=n("../range").Range;function u(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:u("Ctrl-,","Command-,"),exec:function(s){p.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:u("Alt-E","F4"),exec:function(s){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(s){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:u("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:u(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:u("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:u("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:u("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:u("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:u("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:u("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:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:u("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:u("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:u("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:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:u("Ctrl-F","Command-F"),exec:function(s){p.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:u("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:u("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:u("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:u("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:u("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:u("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:u("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:u("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:u("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:u("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:u("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:u("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:u("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:u("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:u("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:u("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:u("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:u("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:u("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:u("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:u(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:u("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:u(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:u("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:u("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:u("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:u("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:u("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:u("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:u(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(),c=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",c),c.isEmpty()||s.session.remove(c),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:u("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:u("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(s){p.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:u("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:u("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:u("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:u("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:u("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:u("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:u("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:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:u("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:u("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(h.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:u(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:u(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:u("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:u("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:u(null,null),exec:function(s){for(var a=s.selection.isBackwards(),c=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),l=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(c.row).length,d=s.session.doc.getTextRange(s.selection.getRange()),m=d.replace(/\n\s*/," ").length,w=s.session.doc.getLine(c.row),x=c.row+1;x<=l.row+1;x++){var I=h.stringTrimLeft(h.stringTrimRight(s.session.doc.getLine(x)));I.length!==0&&(I=" "+I),w+=I}l.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new b(c.row,0,l.row+2,0),w),m>0?(s.selection.moveCursorTo(c.row,c.column),s.selection.selectTo(c.row,c.column+m)):(o=s.session.doc.getLine(c.row).length>o?o+1:o,s.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:u(null,null),exec:function(s){var a=s.session.doc.getLength()-1,c=s.session.doc.getLine(a).length,l=s.selection.rangeList.ranges,o=[];l.length<1&&(l=[s.selection.getRange()]);for(var d=0;d<l.length;d++)d==l.length-1&&(l[d].end.row===a&&l[d].end.column===c||o.push(new b(l[d].end.row,l[d].end.column,a,c))),d===0?l[d].start.row===0&&l[d].start.column===0||o.push(new b(0,0,l[d].start.row,l[d].start.column)):o.push(new b(l[d-1].end.row,l[d-1].end.column,l[d].start.row,l[d].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var d=0;d<o.length;d++)s.selection.addRange(o[d],!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:u("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:u(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,f){var h=n("../lib/keys"),p=n("../mouse/default_gutter_handler").GutterTooltip,b=function(){function g(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new p(this.editor)}return g.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))},g.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))},g.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===h.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=h.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var c=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldWidget(c),o=this.$findNearestAnnotation(c);if(!(l===null&&o===null)){if(l===null&&o!==null){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(l!==null&&o===null){this.activeRowIndex=l,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(o-c)<Math.abs(l-c)){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=l,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new u(s,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===h.tab){s.preventDefault();return}if(s.keyCode===h.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===h.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===h.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===h.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===h.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===h.enter||s.keyCode===h.space){switch(s.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var a=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var c=this.lines.cells[this.activeRowIndex].element.childNodes[2],l=c.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=l.right+"px",o.top=l.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getFoldWidget(s).style.display!=="none";return a&&c},g.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getAnnotation(s).style.display!=="none";return a&&c},g.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),c=a.element;return c.childNodes[1]},g.prototype.$getAnnotation=function(s){var a=this.lines.get(s),c=a.element;return c.childNodes[2]},g.prototype.$findNearestFoldWidget=function(s){if(this.$isFoldWidgetVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isFoldWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+a))return s+a}return null},g.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isAnnotationVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+a))return s+a}return null},g.prototype.$focusFoldWidget=function(s){if(s!=null){var a=this.$getFoldWidget(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusAnnotation=function(s){if(s!=null){var a=this.$getAnnotation(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(s){var a=this.$getFoldWidget(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurAnnotation=function(s){var a=this.$getAnnotation(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$switchLane=function(s){switch(s){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var c=this.$findNearestFoldWidget(this.activeRowIndex);if(c==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(s){var a=this.lines.get(s);return a?a.row:null},g.prototype.$rowToRowIndex=function(s){for(var a=0;a<this.lines.getLength();a++){var c=this.lines.get(a);if(c.row==s)return a}return null},g}();r.GutterKeyboardHandler=b;var u=function(){function g(s,a){this.gutterKeyboardHandler=a,this.domEvent=s}return g.prototype.getKey=function(){return h.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();r.GutterKeyboardEvent=u}),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(n,r,f){var h=this&&this.__values||function(S){var A=typeof Symbol=="function"&&Symbol.iterator,D=A&&S[A],B=0;if(D)return D.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&B>=S.length&&(S=void 0),{value:S&&S[B++],done:!S}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},p=n("./lib/oop"),b=n("./lib/dom"),u=n("./lib/lang"),g=n("./lib/useragent"),s=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,c=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,o=n("./edit_session").EditSession,d=n("./search").Search,m=n("./range").Range,w=n("./lib/event_emitter").EventEmitter,x=n("./commands/command_manager").CommandManager,I=n("./commands/default_commands").commands,T=n("./config"),_=n("./token_iterator").TokenIterator,C=n("./keyboard/gutter_handler").GutterKeyboardHandler,L=n("./config").nls,R=n("./clipboard"),F=n("./lib/keys"),E=n("./lib/event"),H=n("./tooltip").HoverTooltip,P=function(){function S(A,D,B){this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.id="editor"+ ++S.$uid,this.commands=new x(g.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new c(this)),this.keyBinding=new l(this),this.$search=new d().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=u.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(D||B&&B.session||new o("")),T.resetOptions(this),B&&this.setOptions(B),T._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(A){this.session.startOperation(A)},S.prototype.endOperation=function(A){this.session.endOperation(A)},S.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},S.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 D=this.curOp.command,B=D&&D.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}},S.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var D=this.prevOp,B=this.$mergeableCommands,U=D.command&&A.command.name==D.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(D.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())}},S.prototype.setKeyboardHandler=function(A,D){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;T.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),D&&D()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){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:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(A,D){return this.session.doc.setValue(A),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),A},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(A){this.renderer.onResize(A)},S.prototype.setTheme=function(A,D){this.renderer.setTheme(A,D)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(A){this.renderer.setStyle(A)},S.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(A){this.setOption("fontSize",A)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var D=A.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ce){D.removeMarker(ce)}),D.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Z=D.getMatchingBracketRanges(B,K);if(!Z){var te=new _(D,B.row,B.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=D.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&D.$mode.getMatching&&(Z=D.$mode.getMatching(A.session)),!Z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(m.comparePoints(Z[0].end,Z[1].start)==0?Z=[m.fromPoints(Z[0].start,Z[1].end)]:m.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[m.fromPoints(Z[1].start,Z[0].end)])),D.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ce){return D.addMarker(ce,ae,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},S.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(A){var D=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,D),this._signal("change",A),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(A){var D=A.data;this.renderer.updateLines(D.first,D.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),A.$highlightLineMarker&&!D)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&D){var B=new m(D.row,D.column,D.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else D&&(A.$highlightLineMarker.start.row=D.row,A.$highlightLineMarker.end.row=D.row,A.$highlightLineMarker.start.column=D.column,A._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(A){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(B,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var B=D.start.column,U=D.end.column,K=A.getLine(D.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(te.test(he))return te}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var A=this.getSelectedText(),D=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)+D)}}var te={text:A};return this._signal("copy",te),R.lineMode=B?te.text:!1,te.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(A,D){var B={text:A,event:D};this.commands.exec("paste",this,B)},S.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var D=A.text,B=D===R.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(B)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},D)});else{var K=D.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,D);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},S.prototype.execCommand=function(A,D){return this.commands.exec(A,this,D)},S.prototype.insert=function(A,D){var B=this.session,U=B.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){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 te=m.fromPoints(K,K);te.end.column+=A.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(A==`
|
212
|
+
`||A==`\r
|
213
|
+
`){var ce=B.getLine(K.row);if(K.column>ce.search(/\S|$/)){var he=ce.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=B.getState(K.row),ce=B.getLine(K.row),ue=U.checkOutdent(ae,ce,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 ye=U.getNextLineIndent(ae,ce.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},ye)}ue&&U.autoOutdent(ae,B,K.row)}},S.prototype.autoIndent=function(){for(var A=this.session,D=A.getMode(),B=this.selection.isEmpty()?[new m(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,ae=B[he].end.row,ce=ne;ce<=ae;ce++){ce>0&&(U=A.getState(ce-1),K=A.getLine(ce-1),Z=D.getNextLineIndent(U,K,te));var ue=A.getLine(ce),ye=D.$getIndent(ue);if(Z!==ye){if(ye.length>0){var Ae=new m(ce,0,ce,ye.length);A.remove(Ae)}Z.length>0&&A.insert({row:ce,column:0},Z)}D.autoOutdent(U,A,ce)}},S.prototype.onTextInput=function(A,D){if(!D)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,D);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},S.prototype.applyComposition=function(A,D){if(D.extendLeft||D.extendRight){var B=this.selection.getRange();B.start.column-=D.extendLeft,B.end.column+=D.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),D.restoreStart||D.restoreEnd){var B=this.selection.getRange();B.start.column-=D.restoreStart,B.end.column-=D.restoreEnd,this.selection.setRange(B)}},S.prototype.onCommandKey=function(A,D,B){return this.keyBinding.onCommandKey(A,D,B)},S.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(D.start.row),K=B.getMode().transformAction(U,"deletion",this,B,D);if(D.end.column===0){var Z=B.getTextRange(D);if(Z[Z.length-1]==`
|
214
|
+
`){var te=B.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.length)}}K&&(D=K)}this.session.remove(D),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.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()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(A)},S.prototype.setGhostText=function(A,D){this.renderer.setGhostText(A,D)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),D=A.column;if(D!==0){var B=this.session.getLine(A.row),U,K;D<B.length?(U=B.charAt(D)+B.charAt(D-1),K=new m(A.row,D-1,A.row,D+1)):(U=B.charAt(D-1)+B.charAt(D-2),K=new m(A.row,D-2,A.row,D)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},S.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),B=this.session.getTextRange(D);this.session.replace(D,B.toLowerCase()),this.selection.setSelectionRange(A)},S.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),B=this.session.getTextRange(D);this.session.replace(D,B.toUpperCase()),this.selection.setSelectionRange(A)},S.prototype.indent=function(){var A=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(D.start.column<D.end.column){var U=A.getTextRange(D);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var K=A.getLine(D.start.row),Z=D.start,te=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=u.stringRepeat(" ",ne);else{for(var ne=he%te;K[D.start.column-1]==" "&≠)D.start.column--,ne--;this.selection.setSelectionRange(D),ae=" "}return this.insert(ae)},S.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},S.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},S.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),D=this.session,B=[],U=A.first;U<=A.last;U++)B.push(D.getLine(U));B.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new m(0,0,0,0),U=A.first;U<=A.last;U++){var Z=D.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,D.replace(K,B[U-A.first])}},S.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,D.first,D.last)},S.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),D=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,B,A)},S.prototype.getNumberAt=function(A,D){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);B.lastIndex<D;){var K=B.exec(U);if(K.index<=D&&K.index+K[0].length>=D){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},S.prototype.modifyNumber=function(A){var D=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new m(D,B-1,D,B),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(D,B);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&B<te?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ce=new m(D,Z.start,D,Z.end);this.session.replace(ce,ae),this.moveCursorTo(D,Math.max(Z.start+1,B+ae.length-Z.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var A=this.selection.getCursor().row,D=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=D-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Xe,gt){he=te+Xe.length,Z>=te&&Z<=he&&(B=Xe,ne.selection.clearSelection(),ne.moveCursorTo(A,te+U),ne.selection.selectTo(A,he+U)),te=he});for(var ae=this.$toggleWordPairs,ce,ue=0;ue<ae.length;ue++)for(var ye=ae[ue],Ae=0;Ae<=1;Ae++){var $e=+!Ae,Ie=B.match(new RegExp("^\\s?_?("+u.escapeRegExp(ye[Ae])+")\\s?$","i"));if(Ie){var Ze=B.match(new RegExp("([_]|^|\\s)("+u.escapeRegExp(Ie[1])+")($|\\s)","g"));Ze&&(ce=B.replace(new RegExp(u.escapeRegExp(ye[Ae]),"i"),function(Xe){var gt=ye[$e];return Xe.toUpperCase()==Xe?gt=gt.toUpperCase():Xe.charAt(0).toUpperCase()==Xe.charAt(0)&&(gt=gt.substr(0,0)+ye[$e].charAt(0).toUpperCase()+gt.substr(1)),gt}),this.insert(ce),ce="")}}},S.prototype.findLinkAt=function(A,D){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ce=h(Z),ue=ce.next();!ue.done;ue=ce.next()){var ye=ue.value;if(ne=he+ye.length,te>=he&&te<=ne&&ye.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=ye.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ae){B={error:Ae}}finally{try{ue&&!ue.done&&(U=ce.return)&&U.call(ce)}finally{if(B)throw B.error}}return ae},S.prototype.openLink=function(){var A=this.selection.getCursor(),D=this.findLinkAt(A.row,A.column);return D&&window.open(D,"_blank"),D!=null},S.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var A=this.selection,D=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var K=B.start.row;D.duplicateLines(K,K)}else{var Z=U?B.start:B.end,te=D.insert(Z,D.getTextRange(B));B.start=Z,B.end=te,A.setSelectionRange(B,U)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(A,D,B){return this.session.moveText(A,D,B)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(A,D){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,D?0:A),D&&A==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ce=0;ce<ae;ce++){var ue=ce;te[ce].moveBy(he,0),B=this.$getSelectedRows(te[ce]);for(var ye=B.first,Ae=B.last;++ce<ae;){ne&&te[ce].moveBy(ne,0);var $e=this.$getSelectedRows(te[ce]);if(D&&$e.first!=Ae||!D&&$e.first>Ae+1)break;Ae=$e.last}for(ce--,he=this.session.$moveLines(ye,Ae,D?0:A),D&&A==-1&&(ue=ce+1);ue<=ce;)te[ue].moveBy(he,0),ue++;D||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},S.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},S.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(A,D){var B=this.renderer,U=this.renderer.layerConfig,K=A*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):D===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,K*U.lineHeight),D!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(Z)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},S.prototype.scrollToLine=function(A,D,B,U){this.renderer.scrollToLine(A,D,B,U)},S.prototype.centerSelection=function(){var A=this.getSelectionRange(),D={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(D,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(A,D){this.selection.moveCursorTo(A,D)},S.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},S.prototype.jumpToMatching=function(A,D){var B=this.getCursorPosition(),U=new _(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ce=B.column-te.start,ue,ye={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ce<te.value.length&&!ne;ce++)if(ye[te.value[ce]])switch(ue=ye[te.value[ce]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ue])&&(ae[ue]=0),te.value[ce]){case"(":case"[":case"{":ae[ue]++;break;case")":case"]":case"}":ae[ue]--,ae[ue]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ce=0)}while(te&&!ne);if(he){var Ae,$e;if(he==="bracket")Ae=this.session.getBracketRange(B),Ae||(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1),$e=Ae.start,(D||$e.row===B.row&&Math.abs($e.column-B.column)<2)&&(Ae=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ae.compare(B.row,B.column)===0){var Ie=this.session.getMatchingTags(B);Ie&&(Ie.openTag.contains(B.row,B.column)?(Ae=Ie.closeTag,$e=Ae.start):(Ae=Ie.openTag,Ie.closeTag.start.row===B.row&&Ie.closeTag.start.column===B.column?$e=Ae.end:$e=Ae.start))}$e=$e||Ae.start}$e=Ae&&Ae.cursor||$e,$e&&(A?Ae&&D?this.selection.setRange(Ae):Ae&&Ae.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},S.prototype.gotoLine=function(A,D,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,D||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},S.prototype.navigateTo=function(A,D){this.selection.moveTo(A,D)},S.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},S.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},S.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},S.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(A,D){D&&this.$search.set(D);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},S.prototype.replaceAll=function(A,D){D&&this.$search.set(D);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},S.prototype.$tryReplace=function(A,D){var B=this.session.getTextRange(A);return D=this.$search.replace(B,D),D!==null?(A.end=this.session.replace(A,D),A):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(A,D,B){D||(D={}),typeof A=="string"||A instanceof RegExp?D.needle=A:typeof A=="object"&&p.mixin(D,A);var U=this.selection.getRange();D.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(D),D.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(D.preventScroll)return K;if(K)return this.revealRange(K,B),K;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},S.prototype.findNext=function(A,D){this.find({skipCurrent:!0,backwards:!1},A,D)},S.prototype.findPrevious=function(A,D){this.find(A,{skipCurrent:!0,backwards:!0},D)},S.prototype.revealRange=function(A,D){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),D!==!1&&this.renderer.animateScrolling(B)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(A){if(A){var D,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=B.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&D&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,ae=ne.$cursorLayer.$pixelPos,ce=ne.layerConfig,ue=ae.top-ce.offset;ae.top>=0&&ue+D.top<0?U=!0:ae.top<ce.height&&ae.top+D.top+ce.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ue+"px",K.style.left=ae.left+"px",K.style.height=ce.lineHeight+"px",K.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},S.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(A)),D.isBlinking=!this.$readOnly&&A!="wide",b.setCssClass(D.element,"ace_slim-cursors",/slim/.test(A)))},S.prototype.prompt=function(A,D,B){var U=this;T.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,D,B)})},S}();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"],["&&","||"],["==","!="]],p.implement(P.prototype,w),T.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var A=this;this.textInput.setReadOnly(S),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(U=B&&B.key&&B.key.length==1&&!B.ctrlKey&&!B.metaKey,!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new H);var K=b.createElement("div");K.textContent=L("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 D=this.textInput.getElement();S?(E.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(D,"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(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){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(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?O.attach(this):O.detach(this)}},placeholder:{set:function(S){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 D=b.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,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(S){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},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),B||(B=new C(this)),B.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.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(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(S,A){return(Math.abs(S.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(S,A,D){return Math.max(A.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(S,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,f){var h=n("../lib/dom"),p=function(){function b(u,g){this.element=u,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(u){h.translate(this.element,0,-(u.firstRowScreen*u.lineHeight%this.canvasHeight)-u.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(u,g){return Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(u,g,s){var a=g.firstRowScreen*g.lineHeight,c=Math.floor(a/this.canvasHeight),l=s.documentToScreenRow(u,0)*g.lineHeight;return l-c*this.canvasHeight},b.prototype.computeLineHeight=function(u,g,s){return g.lineHeight*s.getRowLineCount(u)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(u){return this.cells[u]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(u){if(Array.isArray(u)){this.cells.push.apply(this.cells,u);for(var g=h.createFragment(this.element),s=0;s<u.length;s++)g.appendChild(u[s].element);this.element.appendChild(g)}else this.cells.push(u),this.element.appendChild(u.element)},b.prototype.unshift=function(u){if(Array.isArray(u)){this.cells.unshift.apply(this.cells,u);for(var g=h.createFragment(this.element),s=0;s<u.length;s++)g.appendChild(u[s].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(u),this.element.insertAdjacentElement("afterbegin",u.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(u){u&&(u.element.remove(),this.cellCache.push(u))},b.prototype.createCell=function(u,g,s,a){var c=this.cellCache.pop();if(!c){var l=h.createElement("div");a&&a(l),this.element.appendChild(l),c={element:l,text:"",row:u}}return c.row=u,c},b}();r.Lines=p}),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(n,r,f){var h=n("../lib/dom"),p=n("../lib/oop"),b=n("../lib/lang"),u=n("../lib/event_emitter").EventEmitter,g=n("./lines").Lines,s=n("../config").nls,a=function(){function l(o){this.element=h.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return l.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(o,d){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,d)},l.prototype.removeGutterDecoration=function(o,d){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,d)},l.prototype.setAnnotations=function(o){this.$annotations=[];for(var d=0;d<o.length;d++){var m=o[d],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var I=m.text,T=m.text,_=m.type;I=I?b.escapeHTML(I):m.html||"",T=T||m.html||"",x.text.indexOf(I)===-1&&(x.text.push(I),x.type.push(_),x.displayText.push(T));var C=m.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},l.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var d=o.start.row,m=o.end.row-d;if(m!==0)if(o.action=="remove")this.$annotations.splice(d,m+1,null);else{var w=new Array(m+1);w.unshift(d,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(o){this.config=o;var d=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,d.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=d.getNextFoldLine(m),I=x?x.start.row:1/0,T=null,_=-1,C=m;;){if(C>I&&(C=x.end.row+1,x=d.getNextFoldLine(C,x),I=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}T=this.$lines.get(++_),T?T.row=C:(T=this.$lines.createCell(C,o,this.session,c),this.$lines.push(T)),this.$renderCell(T,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$updateGutterWidth=function(o){var d=this.session,m=d.gutterRenderer||this.$renderer,w=d.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||d.$useWrapMode)&&(x=d.getLength()+w-1);var I=m?m.getWidth(d,x,o):x.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();I+=T.left+T.right,I!==this.gutterWidth&&!isNaN(I)&&(this.gutterWidth=I,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",I))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var d=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<d.length;m++){var w=d[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==d[m-1].row)w=d[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(o){var d=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(d,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!d||w<o.firstRow)return this.update(o);if(m<d.firstRow)return this.update(o);if(d.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(d.firstRow,o.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();o.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,d.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$renderLines=function(o,d,m){for(var w=[],x=d,I=this.session.getNextFoldLine(x),T=I?I.start.row:1/0;x>T&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),T=I?I.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session,c);this.$renderCell(_,o,I,x),w.push(_),x++}return w},l.prototype.$renderCell=function(o,d,m,w){var x=o.element,I=this.session,T=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],L=C.firstChild,R=I.$firstLineNumber,F=I.$breakpoints,E=I.$decorations,H=I.gutterRenderer||this.$renderer,P=this.$showFoldWidgets&&I.foldWidgets,O=m?m.start.row:Number.MAX_VALUE,S=d.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",D=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",B=(H?H.getText(I,w):w+R).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=O&&this.$cursorRow<=m.end.row)&&(A+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),F[w]&&(A+=F[w]),E[w]&&(A+=E[w]),this.$annotations[w]&&w!==O&&(A+=this.$annotations[w].className),P){var U=P[w];U==null&&(U=P[w]=I.getFoldWidget(w))}if(U){var K="ace_fold-widget ace_"+U,Z=U=="start"&&w==O&&w<m.end.row;if(Z){K+=" ace_closed";for(var te="",he=!1,ne=w+1;ne<=m.end.row;ne++)if(this.$annotations[ne]){if(this.$annotations[ne].className===" ace_error"){he=!0,te=" ace_error_fold";break}this.$annotations[ne].className===" ace_security"?(he=!0,te=" ace_security_fold"):this.$annotations[ne].className===" ace_warning"&&te!==" ace_security_fold"&&(he=!0,te=" ace_warning_fold")}A+=te}else K+=" ace_open";_.className!=K&&(_.className=K),h.setStyle(_.style,"height",S),h.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ae=I.getFoldWidgetRange(w);ae?_.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ae.start.row+1,ae.end.row+1])):m?_.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])):_.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),Z?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else _&&(h.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));if(he&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",L.className=D,L.className+=te,h.setStyle(L.style,"height",S),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",S);var ce;switch(te){case" ace_error_fold":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security_fold":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning_fold":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",L.className=D,this.$useSvgGutterIcons?L.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),h.setStyle(L.style,"height",S),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",S);var ce;switch(this.$annotations[w].className){case" ace_error":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break;case" ace_info":ce=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[B]);break;case" ace_hint":ce=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else h.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return B!==T.data&&(T.data=B),x.className!=A&&(x.className=A),h.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,d,I)+"px"),h.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,d,I)+"px"),o.text=B,C.style.display==="none"&&_.style.display==="none"?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},l.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},l.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.prototype.setShowFoldWidgets=function(o){o?h.addCssClass(this.element,"ace_folding-enabled"):h.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=h.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},l.prototype.getRegion=function(o){var d=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<d.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-d.right)return"foldWidgets"},l}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,p.implement(a.prototype,u);function c(l){var o=document.createTextNode("");l.appendChild(o);var d=h.createElement("span");l.appendChild(d);var m=h.createElement("span");l.appendChild(m);var w=h.createElement("span");return m.appendChild(w),l}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,f){var h=n("../range").Range,p=n("../lib/dom"),b=function(){function g(s){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setMarkers=function(s){this.markers=s},g.prototype.elt=function(s,a){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=a,c.className=s},g.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var c in this.markers){var l=this.markers[c];if(!l.range){l.update(a,this,this.session,s);continue}var o=l.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),l.renderer){var d=this.$getTop(o.start.row,s),m=this.$padding+o.start.column*s.characterWidth;l.renderer(a,o,m,d,s)}else l.type=="fullLine"?this.drawFullLineMarker(a,o,l.clazz,s):l.type=="screenLine"?this.drawScreenLineMarker(a,o,l.clazz,s):o.isMultiLine()?l.type=="text"?this.drawTextMarker(a,o,l.clazz,s):this.drawMultiLineMarker(a,o,l.clazz,s):this.drawSingleLineMarker(a,o,l.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(s,a,c,l,o){for(var d=this.session,m=a.start.row,w=a.end.row,x=m,I=0,T=0,_=d.getScreenLastRowColumn(x),C=new h(x,a.start.column,x,T);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:d.getRowWrapIndent(x),C.end.column=_,I=T,T=_,_=x+1<w?d.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(s,C,c+(x==m?" ace_start":"")+" ace_br"+u(x==m||x==m+1&&a.start.column,I<T,T>_,x==w),l,x==w?0:1,o)},g.prototype.drawMultiLineMarker=function(s,a,c,l,o){var d=this.$padding,m=l.lineHeight,w=this.$getTop(a.start.row,l),x=d+a.start.column*l.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var I=a.clone();I.end.row=I.start.row,I.end.column=this.session.getLine(I.start.row).length,this.drawBidiSingleLineMarker(s,I,c+" ace_br1 ace_start",l,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+m+"px;right:"+d+"px;top:"+w+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var I=a.clone();I.start.row=I.end.row,I.start.column=0,this.drawBidiSingleLineMarker(s,I,c+" ace_br12",l,null,o)}else{w=this.$getTop(a.end.row,l);var T=a.end.column*l.characterWidth;this.elt(c+" ace_br12","height:"+m+"px;width:"+T+"px;top:"+w+"px;left:"+d+"px;"+(o||""))}if(m=(a.end.row-a.start.row-1)*l.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,l);var _=(a.start.column?1:0)|(a.end.column?0:8);this.elt(c+(_?" ace_br"+_:""),"height:"+m+"px;right:"+d+"px;top:"+w+"px;left:"+d+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(s,a,c,l,o,d){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,c,l,o,d);var m=l.lineHeight,w=(a.end.column+(o||0)-a.start.column)*l.characterWidth,x=this.$getTop(a.start.row,l),I=this.$padding+a.start.column*l.characterWidth;this.elt(c,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+I+"px;"+(d||""))},g.prototype.drawBidiSingleLineMarker=function(s,a,c,l,o,d){var m=l.lineHeight,w=this.$getTop(a.start.row,l),x=this.$padding,I=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);I.forEach(function(T){this.elt(c,"height:"+m+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(x+T.left)+"px;"+(d||""))},this)},g.prototype.drawFullLineMarker=function(s,a,c,l,o){var d=this.$getTop(a.start.row,l),m=l.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,l)-d),this.elt(c,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(s,a,c,l,o){var d=this.$getTop(a.start.row,l),m=l.lineHeight;this.elt(c,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(o||""))},g}();b.prototype.$padding=0;function u(g,s,a,c){return(g?1:0)|(s?2:0)|(a?4:0)|(c?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,f){var h=new Set(["text","rparen","lparen"]);r.isTextToken=function(p){return h.has(p)}}),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(n,r,f){var h=n("../lib/oop"),p=n("../lib/dom"),b=n("../lib/lang"),u=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,s=n("../config").nls,a=n("./text_util").isTextToken,c=function(){function l(o){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new u(this.element)}return l.prototype.$updateEolChar=function(){var o=this.session.doc,d=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",m=d?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},l.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(d){this._signal("changeCharacterSize",d)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},l.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},l.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var d=this.$tabStrings=[0],m=1;m<o+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),d.push(w)}else d.push(this.dom.createTextNode(b.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",I=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=x+I,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+_,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(o,d,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(d,o.firstRow),x=Math.min(m,o.lastRow),I=this.element.childNodes,T=0,_=o.firstRow;_<w;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(w)){w=C.start.row;break}else _=C.end.row;T++}for(var L=!1,_=w,C=this.session.getNextFoldLine(_),R=C?C.start.row:1/0;_>R&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),R=C?C.start.row:1/0),!(_>x);){var F=I[T++];if(F){this.dom.removeChildren(F),this.$renderLine(F,_,_==R?C:!1),L&&(F.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var E=o.lineHeight*this.session.getRowLength(_)+"px";F.style.height!=E&&(L=!0,F.style.height=E)}_++}if(L)for(;T<this.$lines.cells.length;){var H=this.$lines.cells[T++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},l.prototype.scrollLines=function(o){var d=this.config;if(this.config=o,this.$lines.pageChanged(d,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=d?d.lastRow:-1;if(!d||w<o.firstRow)return this.update(o);if(m<d.firstRow)return this.update(o);if(!d||d.lastRow<o.firstRow)return this.update(o);if(o.lastRow<d.firstRow)return this.update(o);if(d.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(d.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(d.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,d.lastRow);x>0;x--)this.$lines.pop();o.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,d.firstRow-1)),o.lastRow>d.lastRow&&this.$lines.push(this.$renderLinesFragment(o,d.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(o,d,m){for(var w=[],x=d,I=this.session.getNextFoldLine(x),T=I?I.start.row:1/0;x>T&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),T=I?I.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session),C=_.element;this.dom.removeChildren(C),p.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),p.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==T?I:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(_),x++}return w},l.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var d=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,d,m))},l.prototype.$renderToken=function(o,d,m,w){for(var x=this,I=/(\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,T=this.dom.createFragment(this.element),_,C=0;_=I.exec(w);){var L=_[1],R=_[2],F=_[3],E=_[4],H=_[5];if(!(!x.showSpaces&&R)){var P=C!=_.index?w.slice(C,_.index):"";if(C=_.index+_[0].length,P&&T.appendChild(this.dom.createTextNode(P,this.element)),L){var O=x.session.getScreenTabSize(d+_.index);T.appendChild(x.$tabStrings[O].cloneNode(!0)),d+=O-1}else if(R)if(x.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=b.stringRepeat(x.SPACE_CHAR,R.length),T.appendChild(S)}else T.appendChild(this.dom.createTextNode(R,this.element));else if(F){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=b.stringRepeat(x.SPACE_CHAR,F.length),T.appendChild(S)}else if(E){d+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=x.showSpaces?x.SPACE_CHAR:E,T.appendChild(S)}else if(H){d+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=H,T.appendChild(S)}}}if(T.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))o.appendChild(T);else{var A="ace_"+m.type.replace(/\./g," ace_"),S=this.dom.createElement("span");m.type=="fold"&&(S.style.width=m.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=A,S.appendChild(T),o.appendChild(S)}return d+w.length},l.prototype.renderIndentGuide=function(o,d,m){var w=d.search(this.$indentGuideRe);if(w<=0||w>=m)return d;if(d[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,I=0;I<x;I++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(w)}else if(d[0]==" "){for(var I=0;I<w;I++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(w)}return this.$highlightIndentGuide(),d},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var d=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(d.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:d.row};var x=this.session.$bracketHighlight;if(x){for(var I=this.session.$bracketHighlight.ranges,T=0;T<I.length;T++)if(d.row!==I[T].start.row){this.$highlightIndentGuideMarker.end=I[T].start.row+1,d.row>I[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[d.row]!==""&&d.column===o[d.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=d.row+1;T<o.length;T++){var _=o[T],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=T,C<=m))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),d=0;d<o.length;d++)o[d].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(o,d){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var I=x[d-1];I&&I.classList&&I.classList.contains("ace_indent-guide")&&I.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var d=this.$highlightIndentGuideMarker.indentLevel;if(d!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,d)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,d)}}}},l.prototype.$createLineElement=function(o){var d=this.dom.createElement("div");return d.className="ace_line",d.style.height=this.config.lineHeight+"px",d},l.prototype.$renderWrappedLine=function(o,d,m){var w=0,x=0,I=m[0],T=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<d.length;C++){var L=d[C],R=L.value;if(C==0&&this.displayIndentGuides){if(w=R.length,R=this.renderIndentGuide(_,R,I),!R)continue;w-=R.length}if(w+R.length<I)T=this.$renderToken(_,T,L,R),w+=R.length;else{for(;w+R.length>=I;)T=this.$renderToken(_,T,L,R.substring(0,I-w)),R=R.substring(I-w),w=I,_=this.$createLineElement(),o.appendChild(_),_.appendChild(this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element)),x++,T=0,I=m[x]||Number.MAX_VALUE;R.length!=0&&(w+=R.length,T=this.$renderToken(_,T,L,R))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,T,null,"",!0)},l.prototype.$renderSimpleLine=function(o,d){for(var m=0,w=0;w<d.length;w++){var x=d[w],I=x.value;if(!(w==0&&this.displayIndentGuides&&(I=this.renderIndentGuide(o,I),!I))){if(m+I.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,I);m=this.$renderToken(o,m,x,I)}}},l.prototype.$renderOverflowMessage=function(o,d,m,w,x){m&&this.$renderToken(o,d,m,w.slice(0,this.MAX_LINE_LENGTH-d));var I=this.dom.createElement("span");I.className="ace_inline_button ace_keyword ace_toggle_wrap",I.textContent=x?"<hide>":"<click to see more...>",o.appendChild(I)},l.prototype.$renderLine=function(o,d,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(d)),m)var w=this.$getFoldLineTokens(d,m);else var w=this.session.getTokens(d);var x=o;if(w.length){var I=this.session.getRowSplitData(d);if(I&&I.length){this.$renderWrappedLine(o,w,I);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(d=m.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=d==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},l.prototype.$getFoldLineTokens=function(o,d){var m=this.session,w=[];function x(T,_,C){for(var L=0,R=0;R+T[L].value.length<_;)if(R+=T[L].value.length,L++,L==T.length)return;if(R!=_){var F=T[L].value.substring(_-R);F.length>C-_&&(F=F.substring(0,C-_)),w.push({type:T[L].type,value:F}),R=_+F.length,L+=1}for(;R<C&&L<T.length;){var F=T[L].value;F.length+R>C?w.push({type:T[L].type,value:F.substring(0,C-R)}):w.push(T[L]),R+=F.length,L+=1}}var I=m.getTokens(o);return d.walk(function(T,_,C,L,R){T!=null?w.push({type:"fold",value:T}):(R&&(I=m.getTokens(_)),I.length&&x(I,L,C))},d.end.row,this.session.getLine(d.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,h.implement(c.prototype,g),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,f){var h=n("../lib/dom"),p=function(){function b(u){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(u){for(var g=this.cursors,s=g.length;s--;)h.setStyle(g[s].style,"opacity",u?"":"0")},b.prototype.$startCssAnimation=function(){for(var u=this.cursors,g=u.length;g--;)u[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&h.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,h.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(u){this.$padding=u},b.prototype.setSession=function(u){this.session=u},b.prototype.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},b.prototype.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},b.prototype.setSmoothBlinking=function(u){u!=this.smoothBlinking&&(this.smoothBlinking=u,h.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var u=h.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},b.prototype.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},b.prototype.hideCursor=function(){this.isVisible=!1,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,h.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,h.removeCssClass(this.element,"ace_smooth-blinking")),u(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&h.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),h.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){u(!0),g()},this.blinkInterval),g()}},b.prototype.getPixelPosition=function(u,g){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(u),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,u.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),c=(s.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:c}},b.prototype.isCursorInView=function(u,g){return u.top>=0&&u.top<g.maxHeight},b.prototype.update=function(u){this.config=u;var g=this.session.$selectionMarkers,s=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var s=0,c=g.length;s<c;s++){var l=this.getPixelPosition(g[s].cursor,!0);if(!((l.top>u.height+u.offset||l.top<0)&&s>1)){var o=this.cursors[a++]||this.addCursor(),d=o.style;this.drawCursor?this.drawCursor(o,l,u,g[s],this.session):this.isCursorInView(l,u)?(h.setStyle(d,"display","block"),h.translate(o,l.left,l.top),h.setStyle(d,"width",Math.round(u.characterWidth)+"px"),h.setStyle(d,"height",u.lineHeight+"px")):h.setStyle(d,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=l,this.restartTimer()},b.prototype.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();p.prototype.$padding=0,p.prototype.drawCursor=null,r.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var h=this&&this.__extends||function(){var o=function(d,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(w[I]=x[I])},o(d,m)};return function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(d,m);function w(){this.constructor=d}d.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),p=n("./lib/oop"),b=n("./lib/dom"),u=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter,s=32768,a=function(){function o(d,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),d.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addListener(this.element,"scroll",this.onScroll.bind(this)),u.addListener(this.element,"mousedown",u.preventDefault)}return o.prototype.setVisible=function(d){this.element.style.display=d?"":"none",this.isVisible=d,this.coeff=1},o}();p.implement(a.prototype,g);var c=function(o){h(d,o);function d(m,w){var x=o.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 d.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},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(m){this.element.style.height=m+"px"},d.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"},d.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},d}(a);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var l=function(o){h(d,o);function d(m,w){var x=o.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 d.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},d.prototype.getHeight=function(){return this.isVisible?this.height:0},d.prototype.setWidth=function(m){this.element.style.width=m+"px"},d.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},d}(a);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=l,r.VScrollBar=c,r.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var h=this&&this.__extends||function(){var l=function(o,d){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},l(o,d)};return function(o,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");l(o,d);function m(){this.constructor=o}o.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}(),p=n("./lib/oop"),b=n("./lib/dom"),u=n("./lib/event"),g=n("./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 l(o,d){this.element=b.createElement("div"),this.element.className="ace_sb"+d,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},l}();p.implement(s.prototype,g);var a=function(l){h(o,l);function o(d,m){var w=l.call(this,d,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=d,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(d,m){if(d==="mousedown"&&!(u.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,I=function(E){x=E.clientY},T=function(){clearInterval(R)},_=m.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var E=w.scrollTopFromThumbTop(C+x-_);E!==w.scrollTop&&w._emit("scroll",{data:E})}};u.capture(this.inner,I,T);var R=setInterval(L,20);return u.preventDefault(m)}var F=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),u.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(d){var m=d*(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},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(d){this.height=Math.max(0,d),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(d,m){this.pageHeight===d&&!m||(this.pageHeight=d,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})))},o.prototype.setScrollTop=function(d){this.scrollTop=d,d<0&&(d=0),this.thumbTop=d*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(l){h(o,l);function o(d,m){var w=l.call(this,d,"-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 o.prototype.onMouseDown=function(d,m){if(d==="mousedown"&&!(u.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,I=function(E){x=E.clientX},T=function(){clearInterval(R)},_=m.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var E=w.scrollLeftFromThumbLeft(C+x-_);E!==w.scrollLeft&&w._emit("scroll",{data:E})}};u.capture(this.inner,I,T);var R=setInterval(L,20);return u.preventDefault(m)}var F=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),u.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(d){var m=d*(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},o.prototype.setWidth=function(d){this.width=Math.max(0,d),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(d,m){this.pageWidth===d&&!m||(this.pageWidth=d,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})))},o.prototype.setScrollLeft=function(d){this.scrollLeft=d,d<0&&(d=0),this.thumbLeft=d*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(s);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=c,r.VScrollBar=a,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,f){var h=n("./lib/event"),p=function(){function b(u,g){this.onRender=u,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var s=this;this._flush=function(a){s.pending=!1;var c=s.changes;if(c&&(h.blockIdle(100),s.changes=0,s.onRender(c)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return b.prototype.schedule=function(u){this.changes=this.changes|u,this.changes&&!this.pending&&(h.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(u){var g=this.changes;return this.changes=0,g},b}();r.RenderLoop=p}),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(n,r,f){var h=n("../lib/oop"),p=n("../lib/dom"),b=n("../lib/lang"),u=n("../lib/event"),g=n("../lib/useragent"),s=n("../lib/event_emitter").EventEmitter,a=512,c=typeof ResizeObserver=="function",l=200,o=function(){function d(m){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return d.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",g.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},d.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})}},d.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},d.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=u.onIdle(function w(){m.checkForSizeChanges(),u.onIdle(w,500)},500)},d.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},d.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},d.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},d.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},d.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},d.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},d.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=p.buildDom([m(0,0),m(l,0),m(0,l),m(l,l)],this.el)},d.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function I(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function T(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function _(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function L(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var R=L(this.els[0]),F=L(this.els[1]),E=L(this.els[2]),H=L(this.els[3]),P=I(T(H,F),T(H,E),T(_(F,E),_(H,R))),O=C(1+P[0],T(F,R)),S=C(1+P[1],T(E,R));if(w){var A=w,D=P[0]*A[0]/l+P[1]*A[1]/l+1,B=_(C(A[0],O),C(A[1],S));return _(C(1/D/l,B),R)}var U=T(m,R),K=I(T(O,C(P[0],U)),T(S,C(P[1],U)),U);return C(l,K)},d}();o.prototype.$characterSize={width:0,height:0},h.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,f){f.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 {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
}
|
769
|
+
|
770
|
+
.ace_folding-enabled .ace_fold-widget {
|
771
|
+
display: inline-block;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_fold-widget.ace_end {
|
775
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_fold-widget.ace_closed {
|
779
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget:hover {
|
783
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
784
|
+
background-color: rgba(255, 255, 255, 0.2);
|
785
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
786
|
+
}
|
787
|
+
|
788
|
+
.ace_fold-widget:active {
|
789
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
790
|
+
background-color: rgba(0, 0, 0, 0.05);
|
791
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
792
|
+
}
|
793
|
+
/**
|
794
|
+
* Dark version for fold widgets
|
795
|
+
*/
|
796
|
+
.ace_dark .ace_fold-widget {
|
797
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
798
|
+
}
|
799
|
+
.ace_dark .ace_fold-widget.ace_end {
|
800
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
801
|
+
}
|
802
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
803
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
804
|
+
}
|
805
|
+
.ace_dark .ace_fold-widget:hover {
|
806
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
807
|
+
background-color: rgba(255, 255, 255, 0.1);
|
808
|
+
}
|
809
|
+
.ace_dark .ace_fold-widget:active {
|
810
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
811
|
+
}
|
812
|
+
|
813
|
+
.ace_inline_button {
|
814
|
+
border: 1px solid lightgray;
|
815
|
+
display: inline-block;
|
816
|
+
margin: -1px 8px;
|
817
|
+
padding: 0 5px;
|
818
|
+
pointer-events: auto;
|
819
|
+
cursor: pointer;
|
820
|
+
}
|
821
|
+
.ace_inline_button:hover {
|
822
|
+
border-color: gray;
|
823
|
+
background: rgba(200,200,200,0.2);
|
824
|
+
display: inline-block;
|
825
|
+
pointer-events: auto;
|
826
|
+
}
|
827
|
+
|
828
|
+
.ace_fold-widget.ace_invalid {
|
829
|
+
background-color: #FFB4B4;
|
830
|
+
border-color: #DE5555;
|
831
|
+
}
|
832
|
+
|
833
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
834
|
+
transition: opacity 0.4s ease 0.05s;
|
835
|
+
opacity: 0;
|
836
|
+
}
|
837
|
+
|
838
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
839
|
+
transition: opacity 0.05s ease 0.05s;
|
840
|
+
opacity:1;
|
841
|
+
}
|
842
|
+
|
843
|
+
.ace_underline {
|
844
|
+
text-decoration: underline;
|
845
|
+
}
|
846
|
+
|
847
|
+
.ace_bold {
|
848
|
+
font-weight: bold;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_nobold .ace_bold {
|
852
|
+
font-weight: normal;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_italic {
|
856
|
+
font-style: italic;
|
857
|
+
}
|
858
|
+
|
859
|
+
|
860
|
+
.ace_error-marker {
|
861
|
+
background-color: rgba(255, 0, 0,0.2);
|
862
|
+
position: absolute;
|
863
|
+
z-index: 9;
|
864
|
+
}
|
865
|
+
|
866
|
+
.ace_highlight-marker {
|
867
|
+
background-color: rgba(255, 255, 0,0.2);
|
868
|
+
position: absolute;
|
869
|
+
z-index: 8;
|
870
|
+
}
|
871
|
+
|
872
|
+
.ace_mobile-menu {
|
873
|
+
position: absolute;
|
874
|
+
line-height: 1.5;
|
875
|
+
border-radius: 4px;
|
876
|
+
-ms-user-select: none;
|
877
|
+
-moz-user-select: none;
|
878
|
+
-webkit-user-select: none;
|
879
|
+
user-select: none;
|
880
|
+
background: white;
|
881
|
+
box-shadow: 1px 3px 2px grey;
|
882
|
+
border: 1px solid #dcdcdc;
|
883
|
+
color: black;
|
884
|
+
}
|
885
|
+
.ace_dark > .ace_mobile-menu {
|
886
|
+
background: #333;
|
887
|
+
color: #ccc;
|
888
|
+
box-shadow: 1px 3px 2px grey;
|
889
|
+
border: 1px solid #444;
|
890
|
+
|
891
|
+
}
|
892
|
+
.ace_mobile-button {
|
893
|
+
padding: 2px;
|
894
|
+
cursor: pointer;
|
895
|
+
overflow: hidden;
|
896
|
+
}
|
897
|
+
.ace_mobile-button:hover {
|
898
|
+
background-color: #eee;
|
899
|
+
opacity:1;
|
900
|
+
}
|
901
|
+
.ace_mobile-button:active {
|
902
|
+
background-color: #ddd;
|
903
|
+
}
|
904
|
+
|
905
|
+
.ace_placeholder {
|
906
|
+
position: relative;
|
907
|
+
font-family: arial;
|
908
|
+
transform: scale(0.9);
|
909
|
+
transform-origin: left;
|
910
|
+
white-space: pre;
|
911
|
+
opacity: 0.7;
|
912
|
+
margin: 0 10px;
|
913
|
+
z-index: 1;
|
914
|
+
}
|
915
|
+
|
916
|
+
.ace_ghost_text {
|
917
|
+
opacity: 0.5;
|
918
|
+
font-style: italic;
|
919
|
+
}
|
920
|
+
|
921
|
+
.ace_ghost_text_container > div {
|
922
|
+
white-space: pre;
|
923
|
+
}
|
924
|
+
|
925
|
+
.ghost_text_line_wrapped::after {
|
926
|
+
content: "↩";
|
927
|
+
position: absolute;
|
928
|
+
}
|
929
|
+
|
930
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
931
|
+
margin: 0px 4px
|
932
|
+
}
|
933
|
+
|
934
|
+
.ace_screenreader-only {
|
935
|
+
position:absolute;
|
936
|
+
left:-10000px;
|
937
|
+
top:auto;
|
938
|
+
width:1px;
|
939
|
+
height:1px;
|
940
|
+
overflow:hidden;
|
941
|
+
}
|
942
|
+
|
943
|
+
.ace_hidden_token {
|
944
|
+
display: none;
|
945
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var h=n("../lib/dom"),p=n("../lib/oop"),b=n("../lib/event_emitter").EventEmitter,u=function(){function g(s,a){this.canvas=h.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},s.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(s){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var c=(s.lastRow+1)*this.lineHeight;c<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var l=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var d=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),d){var m={info:1,warning:2,error:3};d.forEach(function(H){H.priority=m[H.type]||null}),d=d.sort(o);for(var w=this.renderer.session.$foldData,x=0;x<d.length;x++){var I=d[x].row,T=this.compensateFoldRows(I,w),_=Math.round((I-T)*this.lineHeight*this.heightRatio),C=Math.round((I-T)*this.lineHeight*this.heightRatio),L=Math.round(((I-T)*this.lineHeight+this.lineHeight)*this.heightRatio),R=L-C;if(R<this.minDecorationHeight){var F=(C+L)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),L=Math.round(F+this.halfMinDecorationHeight)}l.fillStyle=a[d[x].type]||null,l.fillRect(0,_,this.canvasWidth,L-C)}}var E=this.renderer.session.selection.getCursor();if(E){var T=this.compensateFoldRows(E.row,w),_=Math.round((E.row-T)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,_,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(s,a){var c=0;if(a&&a.length>0)for(var l=0;l<a.length;l++)s>a[l].start.row&&s<a[l].end.row?c+=s-a[l].start.row:s>=a[l].end.row&&(c+=a[l].end.row-a[l].start.row);return c},g}();p.implement(u.prototype,b),r.Decorator=u}),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(n,r,f){var h=n("./lib/oop"),p=n("./lib/dom"),b=n("./lib/lang"),u=n("./config"),g=n("./layer/gutter").Gutter,s=n("./layer/marker").Marker,a=n("./layer/text").Text,c=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,o=n("./scrollbar").VScrollBar,d=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,w=n("./renderloop").RenderLoop,x=n("./layer/font_metrics").FontMetrics,I=n("./lib/event_emitter").EventEmitter,T=n("./css/editor-css"),_=n("./layer/decorators").Decorator,C=n("./lib/useragent"),L=n("./layer/text_util").isTextToken;p.importCssString(T,"ace_editor.css",!1);var R=function(){function F(E,H){var P=this;this.container=E||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),u.get("useStrictCSP")==null&&u.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(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 c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollTop(S.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollLeft(S.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(S){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",S)}),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(),u.resetOptions(this),u._signal("renderer",this)}return F.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},F.prototype.updateLines=function(E,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:E,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(E,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var S=this.container;O||(O=S.clientHeight||S.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",O=S.clientHeight||S.scrollHeight),P||(P=S.clientWidth||S.scrollWidth);var A=this.$updateCachedSize(E,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?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)}},F.prototype.$updateCachedSize=function(E,H,P,O){O-=this.$extraHeight||0;var S=0,A=this.$size,D={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(E||A.height!=O)&&(A.height=O,S|=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",S=S|this.CHANGE_SCROLL),P&&(E||A.width!=P)){S|=this.CHANGE_SIZE,A.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,p.setStyle(this.scrollBarH.element.style,"left",H+"px"),p.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),A.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",B),p.setStyle(this.scroller.style,"right",B),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(S|=this.CHANGE_FULL)}return A.$dirty=!P||!O,S&&this._signal("resize",D),S},F.prototype.onGutterResize=function(E){var H=this.$showGutter?E:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},F.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},F.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},F.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=p.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){p.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,S=P.top,A=P.left;S-=O.offset;var D=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(S<0||S>O.height-D){p.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-D;if(!H)S+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else S+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,p.setStyle(E,"height",D+"px"),p.setStyle(E,"width",B+"px"),p.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(S,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,H=E.lastRow,P=this.session.documentToScreenRow(H,0)*E.lineHeight;return P-this.session.getScrollTop()>E.height-E.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(E,H,P,O){var S=this.scrollMargin;S.top=E|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},F.prototype.setMargin=function(E,H,P,O){var S=this.margin;S.top=E|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},F.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-H&&(E=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(E,H){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!H){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|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,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-P.offset);var S=P.width+2*this.$padding+"px",A=P.minHeight+"px";p.setStyle(this.content.style,"width",S),p.setStyle(this.content.style,"height",A)}if(E&this.CHANGE_H_SCROLL&&(p.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)),E&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",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(E&this.CHANGE_GUTTER||E&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",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",E)},F.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,E))+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,S=!O&&E>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var E=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),S=O*this.lineHeight,A=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-A-2*this.$padding<0),B=this.$horizScroll!==D;B&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));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;S+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,S-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,A+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-S+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ce=Math.ceil(K/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),ye=ue+ce,Ae,$e,Ie=this.lineHeight;ue=E.screenToDocumentRow(ue,0);var Ze=E.getFoldLine(ue);Ze&&(ue=Ze.start.row),Ae=E.documentToScreenRow(ue,0),$e=E.getRowLength(ue)*Ie,ye=Math.min(E.screenToDocumentRow(ye,0),E.getLength()-1),K=H.scrollerHeight+E.getRowLength(ye)*Ie+$e,ae=this.scrollTop-Ae*Ie;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:ue,firstRowScreen:Ae,lastRow:ye,lineHeight:Ie,characterWidth:this.characterWidth,minHeight:K,maxHeight:S,offset:ae,gutterOffset:Ie?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ie)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Xe},F.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(E>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,E,H),!0}}},F.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(E,H){this.$gutterLayer.addGutterDecoration(E,H)},F.prototype.removeGutterDecoration=function(E,H){this.$gutterLayer.removeGutterDecoration(E,H)},F.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(E,H,P){this.scrollCursorIntoView(E,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(E,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(E),S=O.left,A=O.top,D=P&&P.top||0,B=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>A?(H&&U+D>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;S-Z<K?(S-=Z,S<this.$padding+Z&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=Z,K+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&S-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},F.prototype.alignCursor=function(E,H){typeof E=="number"&&(E={row:E,column:0});var P=this.$cursorLayer.getPixelPosition(E),O=this.$size.scrollerHeight-this.lineHeight,S=P.top-O*(H||0);return this.session.setScrollTop(S),S},F.prototype.$calcSteps=function(E,H){var P=0,O=this.STEPS,S=[],A=function(D,B,U){return U*(Math.pow(D-1,3)+1)+B};for(P=0;P<O;++P)S.push(A(P/this.STEPS,E,H-E));return S},F.prototype.scrollToLine=function(E,H,P,O){var S=this.$cursorLayer.getPixelPosition({row:E,column:0}),A=S.top;H&&(A-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(D,O)},F.prototype.animateScrolling=function(E,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(E==P)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(E=S[0],E==P))return}var A=O.$calcSteps(E,P);this.$scrollAnimation={from:E,to:P,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=P;function D(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(O.$stopAnimation){D();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):D()},10)},F.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},F.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(E,H){this.session.setScrollTop(H),this.session.setScrollLeft(E)},F.prototype.scrollBy=function(E,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},F.prototype.isScrollableBy=function(E,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||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(E,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,H]);E=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=E+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,D=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:D,column:B,side:A-B>0?1:-1,offsetX:S}},F.prototype.screenToTextCoordinates=function(E,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([E,H]);E=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=E+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,D=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(D,0),S)},F.prototype.textToScreenCoordinates=function(E,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(E,H),S=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,E)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:P.left+S-this.scrollLeft,pageY:P.top+A-this.scrollTop}},F.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(E){var H=this.session.selection.cursor;this.addToken(E,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(E,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(E,O);this.addToken(S[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:E,position:{row:O.row,column:O.column}};var A=p.createElement("div");if(S.length>1){var D=this.hideTokensAfterPosition(O.row,O.column),B;S.slice(1).forEach(function(ne){var ae=p.createElement("div"),ce=p.createElement("span");ce.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ce.appendChild(p.createTextNode(ne.text)),ae.appendChild(ce),A.appendChild(ae),B=ae}),D.forEach(function(ne){var ae=p.createElement("span");L(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(p.createTextNode(ne.value)),B.appendChild(ae)}),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,te=S.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(E,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var S=E.split(/\r?\n/),A=[],D=0;D<S.length;D++){var B=this.session.$getDisplayTokens(S[D],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(S[D].length);for(var Z=0;Z<U.length;Z++){var te=S[D].slice(K,U[Z]);A.push({text:te,wrapped:!0}),K=U[Z]}}else A.push({text:S[D],wrapped:!1})}return A},F.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(E,H,P,O){var S=this.session;S.bgTokenizer.lines[P]=null;var A={type:H,value:E},D=S.getTokens(P);if(O==null||!D.length)D.push(A);else for(var B=0,U=0;U<D.length;U++){var K=D[U];if(B+=K.value.length,O<=B){var Z=K.value.length-(B-O),te=K.value.slice(0,Z),he=K.value.slice(Z);D.splice(U,1,{type:K.type,value:te},A,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(E,H){for(var P=this.session.getTokens(E),O=0,S=!1,A=[],D=0;D<P.length;D++){var B=P[D];if(O+=B.value.length,B.type!=="ghost_text"){if(S){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===H&&(S=!0)}}return this.updateLines(E,E),A},F.prototype.removeExtraToken=function(E,H){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},F.prototype.setTheme=function(E,H){var P=this;if(this.$themeId=E,P._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var O=E||this.$options.theme.initialValue;u.loadModule(["theme",O],S)}else S(E);function S(A){if(P.$themeId!=E)return H&&H();if(!A||!A.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");A.$id&&(P.$themeId=A.$id),p.importCssString(A.cssText,A.cssClass,P.container),P.theme&&p.removeCssClass(P.container,P.theme.cssClass);var D="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&D!=P.$padding&&P.setPadding(D),P.$theme=A.cssClass,P.theme=A,p.addCssClass(P.container,A.cssClass),p.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="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(E,H){p.setCssClass(this.container,E,H!==!1)},F.prototype.unsetStyle=function(E){p.removeCssClass(this.container,E)},F.prototype.setCursorStyle=function(E){p.setStyle(this.scroller.style,"cursor",E)},F.prototype.setMouseCursor=function(E){p.setStyle(this.scroller.style,"cursor",E)},F.prototype.attachToShadowRoot=function(){p.importCssString(T,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(E){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,E===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=b.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(E.$size.width-P)>1||Math.abs(E.$size.height-O)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,h.implement(R.prototype,I),u.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,f){var h=n("../lib/oop"),p=n("../lib/net"),b=n("../lib/event_emitter").EventEmitter,u=n("../config");function g(l){var o="importScripts('"+p.qualifyURL(l)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new d;return m.append(o),m.getBlob("application/javascript")}}function s(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(u.get("loadWorkerFromBlob")){var o=g(l),d=window.URL||window.webkitURL,m=d.createObjectURL(o);return new Worker(m)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){h.implement(this,b),this.$createWorkerFromOldConfig=function(l,o,d,m,w){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),u.get("packaged")||!n.toUrl)m=m||u.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(n.toUrl("ace/worker/worker.js",null,"_"));var I={};l.forEach(function(T){I[T]=x(n.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:I,module:o,classname:d}),this.$worker},this.onMessage=function(l){var o=l.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var d=this.callbacks[o.id];d&&(d(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return p.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,o){this.$worker.postMessage({command:l,args:o})},this.call=function(l,o,d){if(d){var m=this.callbackId++;this.callbacks[m]=d,o.push(m)}this.send(l,o)},this.emit=function(l,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:o.data}})}catch(d){console.error(d.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var c=function(l,o,d){var m=null,w=!1,x=Object.create(b),I=[],T=new a({messageBuffer:I,terminate:function(){},postMessage:function(C){I.push(C),m&&(w?setTimeout(_):_())}});T.setEmitSync=function(C){w=C};var _=function(){var C=I.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){T.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},u.loadModule(["worker",o],function(C){for(m=new C[d](x);I.length;)_()}),T};r.UIWorkerClient=c,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,f){var h=n("./range").Range,p=n("./lib/event_emitter").EventEmitter,b=n("./lib/oop"),u=function(){function g(s,a,c,l,o,d){var m=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=d,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=c;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var s=this,a=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=c.addMarker(new h(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var d=a.createAnchor(o.row,o.column);d.$insertRight=!0,d.detach(),s.others.push(d)}),c.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=s.addMarker(new h(c.row,c.column,c.row,c.column+a.length),a.othersClass,null,!1)})}},g.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)}},g.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 c=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,l=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(s),l&&(this.length+=c),l&&!this.session.$fromUndo){if(s.action==="insert")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],w={row:m.row,column:m.column+o};this.doc.remove(new h(w.row,w.column,w.row,w.column-c))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,c=function(o,d){a.removeMarker(o.markerId),o.markerId=a.addMarker(new h(o.row,o.column,o.row,o.column+s.length),d,null,!1)};c(this.pos,this.mainClass);for(var l=this.others.length;l--;)c(this.others[l],this.othersClass)}},g.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))}},g.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},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,c=0;c<a;c++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();b.implement(u.prototype,p),r.PlaceHolder=u}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var h=n("../lib/event"),p=n("../lib/useragent");function b(g,s){return g.row==s.row&&g.column==s.column}function u(g){var s=g.domEvent,a=s.altKey,c=s.shiftKey,l=s.ctrlKey,o=g.getAccelKey(),d=g.getButton();if(l&&p.isMac&&(d=s.button),g.editor.inMultiSelectMode&&d==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!l&&!a&&!o){d===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(d===0){var m=g.editor,w=m.selection,x=m.inMultiSelectMode,I=g.getDocumentPosition(),T=w.getCursor(),_=g.inSelection()||w.isEmpty()&&b(I,T),C=g.x,L=g.y,R=function(te){C=te.clientX,L=te.clientY},F=m.session,E=m.renderer.pixelToScreenCoordinates(C,L),H=E,P;if(m.$mouseHandler.$enableJumpToDef)l&&a||o&&a?P=c?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(o&&!a){if(P="add",!x&&c)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&p.isMac&&s.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&_)return;if(!x){var O=w.toOrientedRange();m.addSelectionMarker(O)}var S=w.rangeList.rangeAtPoint(I);m.inVirtualSelectionMode=!0,c&&(S=null,O=w.ranges[0]||O,m.removeSelectionMarker(O)),m.once("mouseup",function(){var te=w.toOrientedRange();S&&te.isEmpty()&&b(S.cursor,te.cursor)?w.substractPoint(te.cursor):(c?w.substractPoint(O.cursor):O&&(m.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),m.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),m.inVirtualSelectionMode=!0;var A,D=[],B=function(){var te=m.renderer.pixelToScreenCoordinates(C,L),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);b(H,te)&&b(he,w.lead)||(H=te,m.selection.moveToPosition(he),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=w.rectangularRangeBlock(H,E),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(A=w.toOrientedRange(),m.addSelectionMarker(A)),c?E=F.documentToScreenPosition(w.lead):w.moveToPosition(I),H={row:-1,column:-1};var U=function(te){B(),clearInterval(Z),m.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),A&&(m.removeSelectionMarker(A),w.toSingleRange(A));for(var he=0;he<D.length;he++)w.addRange(D[he]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},K=B;h.capture(m.container,R,U);var Z=setInterval(function(){K()},20);return g.preventDefault()}}}r.onMouseDown=u}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,f){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.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(p){p.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(p){p.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(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.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(p){p.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(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.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(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var h=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new h(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(n,r,f){var h=n("./range_list").RangeList,p=n("./range").Range,b=n("./selection").Selection,u=n("./mouse/multi_select_handler").onMouseDown,g=n("./lib/event"),s=n("./lib/lang"),a=n("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var c=n("./search").Search,l=new c;function o(T,_,C){return l.$options.wrap=!0,l.$options.needle=_,l.$options.backwards=C==-1,l.find(T)}var d=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,_){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}T.cursor||(T.cursor=T.end);var L=this.rangeList.add(T);return this.$onAddRange(T),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var _=this.rangeList.substractPoint(T);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();T.push(_),this.rangeCount=0}for(var C=T.length;C--;){var L=this.ranges.indexOf(T[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<T.length;C++){var L=T[C],R=L.start.row,F=L.end.row;if(R===F)_.push(L.clone());else{for(_.push(new p(R,L.start.column,R,this.session.getLine(R).length));++R<F;)_.push(this.getLineRange(R,!0));_.push(new p(F,0,F,L.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var T=this.rangeList.ranges,_=T[T.length-1],C=p.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,_=T[T.length-1],C=p.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var L=this.session.documentToScreenPosition(this.cursor),R=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(L,R);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,_,C){var L=[],R=T.column<_.column;if(R)var F=T.column,E=_.column,H=T.offsetX,P=_.offsetX;else var F=_.column,E=T.column,H=_.offsetX,P=T.offsetX;var O=T.row<_.row;if(O)var S=T.row,A=_.row;else var S=_.row,A=T.row;F<0&&(F=0),S<0&&(S=0),S==A&&(C=!0);for(var D,B=S;B<=A;B++){var U=p.fromPoints(this.session.screenToDocumentPosition(B,F,H),this.session.screenToDocumentPosition(B,E,P));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=R?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var K=L.length-1;L[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;L[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)L[te].isEmpty()&&L.splice(te,1)}return L}}).call(b.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var _=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",_),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var _=this.session.$selectionMarkers.indexOf(T);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var _=this.session.$selectionMarkers,C=T.length;C--;){var L=T[C];if(L.marker){this.session.removeMarker(L.marker);var R=_.indexOf(L);R!=-1&&_.splice(R,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){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(T){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(T){var _=T.command,C=T.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?L=C.forEachSelection(_,T.args):_.multiSelectAction=="forEachLine"?L=C.forEachSelection(_,T.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=_.exec(C,T.args||{})):L=_.multiSelectAction(C,T.args||{});else{var L=_.exec(C,T.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(T,_,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,R=C==!0||C&&C.$byLines,F=this.session,E=this.selection,H=E.rangeList,P=(L?E:H).ranges,O;if(!P.length)return T.exec?T.exec(this,_||{}):T(this,_||{});var S=E._eventRegistry;E._eventRegistry={};var A=new b(F);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(R)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;A.fromOrientedRange(P[D]),A.index=D,this.selection=F.selection=A;var B=T.exec?T.exec(this,_||{}):T(this,_||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[D])}A.detach(),this.selection=F.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=S,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.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 T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],L=0;L<_.length;L++)C.push(this.session.getTextRange(_[L]));var R=this.session.getDocument().getNewLineCharacter();T=C.join(R),T.length==(C.length-1)*R.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var L=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=_.row||this.session.$clipPositionToDocument(L.row,L.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,_,C){if(_=_||{},_.needle=T||_.needle,_.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(L)}this.$search.set(_);var R=this.$search.findAll(this.session);if(!R.length)return 0;var F=this.multiSelect;C||F.toSingleRange(R[0]);for(var E=R.length;E--;)F.addRange(R[E],!0);return L&&F.rangeList.rangeAtPoint(L.start)&&F.addRange(L,!0),R.length},this.selectMoreLines=function(T,_){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,R=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(R.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(R.row+T,R.column);if(C.isEmpty())var H=F;else var E=this.session.documentToScreenPosition(L?C.end:C.start),H=this.session.screenToDocumentPosition(E.row+T,E.column);if(L){var P=p.fromPoints(F,H);P.cursor=P.start}else{var P=p.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=R.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function(T){for(var _=this.session,C=_.multiSelect,L=C.ranges,R=L.length;R--;){var F=L[R];if(F.isEmpty()){var E=_.getWordRange(F.start.row,F.start.column);F.start.row=E.start.row,F.start.column=E.start.column,F.end.row=E.end.row,F.end.column=E.end.column}}C.mergeOverlappingRanges();for(var H=[],R=L.length;R--;){var F=L[R];H.unshift(_.getTextRange(F))}T<0?H.unshift(H.pop()):H.push(H.shift());for(var R=L.length;R--;){var F=L[R],P=F.clone();_.replace(F,H[R]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(T,_,C){var L=this.session,R=L.multiSelect,F=R.toOrientedRange();if(!(F.isEmpty()&&(F=L.getWordRange(F.start.row,F.start.column),F.cursor=T==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var E=L.getTextRange(F),H=o(L,E,T);H&&(H.cursor=T==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var T=this.session,_=T.multiSelect,C=_.ranges,L=-1,R=C.filter(function(K){if(K.cursor.row==L)return!0;L=K.cursor.row});if(!C.length||R.length==C.length-1){var F=this.selection.getRange(),E=F.start.row,H=F.end.row,P=E==H;if(P){var O=this.session.getLength(),S;do S=this.session.getLine(H);while(/[=:]/.test(S)&&++H<O);do S=this.session.getLine(E);while(/[=:]/.test(S)&&--E>0);E<0&&(E=0),H>=O&&(H=O-1)}var A=this.session.removeFullLines(E,H);A=this.$reAlignText(A,P),this.session.insert({row:E,column:0},A.join(`
|
946
|
+
`)+`
|
947
|
+
`),P||(F.start.column=0,F.end.column=A[A.length-1].length),this.selection.setRange(F)}else{R.forEach(function(K){_.substractPoint(K.cursor)});var D=0,B=1/0,U=C.map(function(K){var Z=K.cursor,te=T.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>D&&(D=Z.column),he<B&&(B=he),he});C.forEach(function(K,Z){var te=K.cursor,he=D-te.column,ne=U[Z]-B;he>ne?T.insert(te,s.stringRepeat(" ",he-ne)):T.remove(new p(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=D,K.start.row=K.end.row=te.row,K.cursor=K.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,_){var C=!0,L=!0,R,F,E;return T.map(function(A){var D=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?R==null?(R=D[1].length,F=D[2].length,E=D[3].length,D):(R+F+E!=D[1].length+D[2].length+D[3].length&&(L=!1),R!=D[1].length&&(C=!1),R>D[1].length&&(R=D[1].length),F<D[2].length&&(F=D[2].length),E>D[3].length&&(E=D[3].length),D):[A]}).map(_?P:C?L?O:P:S);function H(A){return s.stringRepeat(" ",A)}function P(A){return A[2]?H(R)+A[2]+H(F-A[2].length+E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?H(R+F-A[2].length)+A[2]+H(E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function S(A){return A[2]?H(R)+A[2]+H(E)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(m.prototype);function w(T,_){return T.row==_.row&&T.column==_.column}r.onSessionChange=function(T){var _=T.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=T.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)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",u),T.commands.addCommands(a.defaultCommands),I(T))}function I(T){if(!T.textInput)return;var _=T.textInput.getElement(),C=!1;g.addListener(_,"keydown",function(R){var F=R.keyCode==18&&!(R.ctrlKey||R.shiftKey||R.metaKey);T.$blockSelectEnabled&&F?C||(T.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},T),g.addListener(_,"keyup",L,T),g.addListener(_,"blur",L,T);function L(R){C&&(T.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(T){x(this),T?this.on("mousedown",u):this.off("mousedown",u)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,f){var h=n("../../range").Range,p=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,u,g){var s=b.getLine(g);return this.foldingStartMarker.test(s)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(b,u,g){return null},this.indentationBlock=function(b,u,g){var s=/\S/,a=b.getLine(u),c=a.search(s);if(c!=-1){for(var l=g||a.length,o=b.getLength(),d=u,m=u;++u<o;){var w=b.getLine(u).search(s);if(w!=-1){if(w<=c){var x=b.getTokenAt(u,0);if(!x||x.type!=="string")break}m=u}}if(m>d){var I=b.getLine(m).length;return new h(d,l,m,I)}}},this.openingBracketBlock=function(b,u,g,s,a){var c={row:g,column:s+1},l=b.$findClosingBracket(u,c,a);if(l){var o=b.foldWidgets[l.row];return o==null&&(o=b.getFoldWidget(l.row)),o=="start"&&l.row>c.row&&(l.row--,l.column=b.getLine(l.row).length),h.fromPoints(c,l)}},this.closingBracketBlock=function(b,u,g,s,a){var c={row:g,column:s},l=b.$findOpeningBracket(u,c);if(l)return l.column++,c.column--,h.fromPoints(l,c)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,r,f){var h=n("../lib/dom"),p=n("../range").Range,b=n("../config").nls;function u(s,a,c){for(var l=0,o=s.length-1;l<=o;){var d=l+o>>1,m=c(a,s[d]);if(m>0)l=d+1;else if(m<0)o=d-1;else return d}return-(l+1)}function g(s,a,c){var l=s.getAnnotations().sort(p.comparePoints);if(l.length){var o=u(l,{row:a,column:-1},p.comparePoints);o<0&&(o=-o-1),o>=l.length?o=c>0?0:l.length-1:o===0&&c<0&&(o=l.length-1);var d=l[o];if(!(!d||!c)){if(d.row===a){do d=l[o+=c];while(d&&d.row===a);if(!d)return l.slice()}var m=[];a=d.row;do m[c<0?"unshift":"push"](d),d=l[o+=c];while(d&&d.row==a);return m.length&&m}}}r.showErrorMarker=function(s,a){var c=s.session,l=s.getCursorPosition(),o=l.row,d=c.widgetManager.getWidgetsAtRow(o).filter(function(R){return R.type=="errorMarker"})[0];d?d.destroy():o-=a;var m=g(c,o,a),w;if(m){var x=m[0];l.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,l.row=x.row,w=s.renderer.$gutterLayer.$annotations[l.row]}else{if(d)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(l.row),s.selection.moveToPosition(l);var I={row:l.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},T=I.el.appendChild(h.createElement("div")),_=I.el.appendChild(h.createElement("div"));_.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(l).left;_.style.left=C+s.renderer.gutterWidth-5+"px",I.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(R,F){T.appendChild(h.createTextNode(R)),F<w.displayText.length-1&&T.appendChild(h.createElement("br"))}),T.appendChild(h.createElement("div"));var L=function(R,F,E){if(F===0&&(E==="esc"||E==="return"))return I.destroy(),{command:"null"}};I.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(I),s.off("changeSelection",I.destroy),s.off("changeSession",I.destroy),s.off("mouseup",I.destroy),s.off("change",I.destroy))},s.keyBinding.addKeyboardHandler(L),s.on("changeSelection",I.destroy),s.on("changeSession",I.destroy),s.on("mouseup",I.destroy),s.on("change",I.destroy),s.session.widgetManager.addLineWidget(I),I.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:I.el.offsetHeight})},h.importCssString(`
|
948
|
+
.error_widget_wrapper {
|
949
|
+
background: inherit;
|
950
|
+
color: inherit;
|
951
|
+
border:none
|
952
|
+
}
|
953
|
+
.error_widget {
|
954
|
+
border-top: solid 2px;
|
955
|
+
border-bottom: solid 2px;
|
956
|
+
margin: 5px 0;
|
957
|
+
padding: 10px 40px;
|
958
|
+
white-space: pre-wrap;
|
959
|
+
}
|
960
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
961
|
+
border-color: #ff5a5a
|
962
|
+
}
|
963
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
964
|
+
border-color: #F1D817
|
965
|
+
}
|
966
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
967
|
+
border-color: #5a5a5a
|
968
|
+
}
|
969
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
970
|
+
border-color: #5aaa5a
|
971
|
+
}
|
972
|
+
.error_widget_arrow {
|
973
|
+
position: absolute;
|
974
|
+
border: solid 5px;
|
975
|
+
border-top-color: transparent!important;
|
976
|
+
border-right-color: transparent!important;
|
977
|
+
border-left-color: transparent!important;
|
978
|
+
top: -5px;
|
979
|
+
}
|
980
|
+
`,"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(n,r,f){n("./loader_build")(r);var h=n("./lib/dom"),p=n("./range").Range,b=n("./editor").Editor,u=n("./edit_session").EditSession,g=n("./undomanager").UndoManager,s=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(c,l){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof b)return c.env.editor;var d="";if(c&&/input|textarea/i.test(c.tagName)){var m=c;d=m.value,c=h.createElement("pre"),m.parentNode.replaceChild(c,m)}else c&&(d=c.textContent,c.innerHTML="");var w=r.createEditSession(d),x=new b(new s(c),w,l),I={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(I.textarea=m),x.on("destroy",function(){I.editor.container.env=null}),x.container.env=x.env=I,x},r.createEditSession=function(c,l){var o=new u(c,l);return o.setUndoManager(new g),o},r.Range=p,r.Editor=b,r.EditSession=u,r.UndoManager=g,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var f in n)n.hasOwnProperty(f)&&(r.ace[f]=n[f]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()}(qf)),qf.exports}var ls=sr("a",c1()),Gf={exports:{}},Yf;function u1(){return Yf||(Yf=1,function(t,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop"),p=n("./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 u=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=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/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},l=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},d=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",I="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",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":I,"variable.language":T,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(R,F,E){E.length&&(E=[]);var H=R[R.length-1];return E.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(R,F,E){E.length&&(E=[]);var H=R[R.length-1];return E.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(R,F,E){E.length&&(E=[]);var H=R[R.length-1];return E.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(R,F,E){E.length&&(E=[]);var H=R[R.length-1];return E.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(R,F,E){E.length&&(E=[]);var H=R[R.length-1];return E.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},d,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,l,b,u,o,g,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(R,F,E){var H=R[2]=="-"||R[2]=="~"?"indentedHeredoc":"heredoc",P=R.split(this.splitRegex);return E.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(R,F,E){return R===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(R,F,E){return R===E[1]?(E.shift(),E.shift(),this.next=E[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(R,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:R}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(R,F,E){return this.next="",R=="}"&&E.length>1&&E[1]!="start"&&(E.shift(),this.next=E.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,E){return E.length&&R===E[0]?(E.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,E){return E.length&&R===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,E){return E.length&&R===E[0]?(E.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,E){return E.length&&R===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,E){return E.length&&R===E[0]?(E.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,E){return E.length&&R===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,E){return E.length&&R===E[0]?(E.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,E){return E.length&&R===L[E[0]]?(E.shift(),this.next=E.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(R,F,E){return E.length&&R===E[0]?(E.unshift(R,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(R,F,E){return E.length&&R[0]===L[E[0]]?(E.shift(),this.next=E.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()};h.inherits(m,p),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var h=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,u){return/^\s+$/.test(b)?/^\s*\}/.test(u):!1},this.autoOutdent=function(b,u){var g=b.getLine(u),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:u,column:a});if(!c||c.row==u)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new h(u,0,u,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,r,f){var h=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=n("../../range").Range,u=n("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};h.inherits(g,p),(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,c){var l=s.getLine(c),o=this.foldingStartMarker.test(l),d=this.foldingStopMarker.test(l);if(o&&!d){var m=l.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||m[1]=="when"&&/\sthen\s/.test(l)===!0)return;if(s.getTokenAt(c,m.index+2).type==="keyword")return"start"}else if(!m[3]||s.getTokenAt(c,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!d||o&&d)return"";var m=l.match(this.foldingStopMarker);if(m[3]==="end"){if(s.getTokenAt(c,m.index+1).type==="keyword")return"end"}else if(!m[1]||s.getTokenAt(c,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,c){var l=s.doc.getLine(c),o=this.foldingStartMarker.exec(l);if(o)return o[1]||o[3]?this.rubyBlock(s,c,o.index+2):this.openingBracketBlock(s,"{",c,o.index);var o=this.foldingStopMarker.exec(l);if(o)return o[3]==="end"&&s.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(s,c,o.index+1):o[1]==="=end"&&s.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(s,c,o.index+1):this.closingBracketBlock(s,"}",c,o.index+o[0].length)},this.rubyBlock=function(s,a,c,l){var o=new u(s,a,c),d=o.getCurrentToken();if(!(!d||d.type!="keyword"&&d.type!="comment.multiline")){var m=d.value,w=s.getLine(a);switch(d.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+d.value);if(!x.test(w))return;var I=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var I=1;break;case"else":var x=new RegExp("^\\s*"+d.value+"\\s*$");if(!x.test(w))return;var I=1;break;default:var I=this.indentKeywords[m]}var T=[m];if(I){var _=I===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,L=[];if(L.push(o.getCurrentTokenRange()),o.step=I===-1?o.stepBackward:o.stepForward,d.type=="comment.multiline"){for(;d=o.step();)if(d.type==="comment.multiline"){if(I==1){if(_=6,d.value=="=end")break}else if(d.value=="=begin")break}}else for(;d=o.step();){var R=!1;if(d.type==="keyword"){var F=I*this.indentKeywords[d.value];switch(w=s.getLine(o.getCurrentTokenRow()),d.value){case"do":for(var E=o.$tokenIndex-1;E>=0;E--){var H=o.$rowTokens[E];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var x=new RegExp("^\\s*"+d.value+"\\s*$");(!x.test(w)||m=="case")&&(F=0,R=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+d.value);x.test(w)||(F=0,R=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(F=0,R=!0)}if(F>0)T.unshift(d.value);else if(F<=0&&R===!1){if(T.shift(),!T.length&&((m=="while"||m=="until"||m=="for")&&d.value!="do"||d.value=="do"&&I==-1&&F!=0||d.value!="do"))break;F===0&&T.unshift(d.value)}}}if(!d)return null;if(l)return L.push(o.getCurrentTokenRange()),L;var a=o.getCurrentTokenRow();if(I===-1){if(d.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new b(a,P,C-1,_)}return new b(C,_,a-1,s.getLine(a-1).length)}}}}).call(g.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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./ruby_highlight_rules").RubyHighlightRules,u=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,s=n("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};h.inherits(a,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,o){var d=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return d;if(c=="start"){var x=l.match(/^.*[\{\(\[]\s*$/),I=l.match(/^\s*(class|def|module)\s.*$/),T=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||I||T||_)&&(d+=o)}return d},this.checkOutdent=function(c,l,o){return/^\s+(end|else|rescue|ensure)$/.test(l+o)||this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(c,l,o){var d=l.getLine(o);if(/}/.test(d))return this.$outdent.autoOutdent(l,o);var m=this.$getIndent(d),w=l.getLine(o-1),x=this.$getIndent(w),I=l.getTabString();x.length<=m.length&&m.slice(-I.length)==I&&l.remove(new g(o,m.length-I.length,o,m.length))},this.getMatching=function(c,l,o){if(l==null){var d=c.selection.lead;o=d.column,l=d.row}var m=c.getTokenAt(l,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,l,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(n){t&&(t.exports=n)})}()}(Gf)),Gf.exports}u1();var Xf={exports:{}},Qf;function h1(){return Qf||(Qf=1,function(t,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop"),p=n("./text_highlight_rules").TextHighlightRules,b=function(){var u="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",g="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":g,keyword:u},"identifier"),c="[uU]?",l="[rR]",o="[fF]",d="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",I="(?:0[bB][01]+)",T="(?:"+m+"|"+w+"|"+x+"|"+I+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",R="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",F="(?:(?:"+R+"|"+L+")"+_+")",E="(?:"+F+"|"+R+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:d+'"{3}',next:"rfqqstring3"},{token:"string",regex:d+'"(?=.)',next:"rfqqstring"},{token:"string",regex:d+"'{3}",next:"rfqstring3"},{token:"string",regex:d+"'(?=.)",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:"(?:"+E+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:E},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};h.inherits(b,p),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,f){var h=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=r.FoldMode=function(u){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+u+")(?:\\s*)(?:#.*)?$")};h.inherits(b,p),(function(){this.getFoldWidgetRange=function(u,g,s){var a=u.getLine(s),c=a.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(u,c[1],s,c.index):c[2]?this.indentationBlock(u,s,c.index+c[2].length):this.indentationBlock(u,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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./python_highlight_rules").PythonHighlightRules,u=n("./folding/pythonic").FoldMode,g=n("../range").Range,s=function(){this.HighlightRules=b,this.foldingRules=new u("\\:"),this.$behaviour=this.$defaultBehaviour};h.inherits(s,p),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,l,o){var d=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return d;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(d+=o)}return d};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,o){if(o!==`\r
|
981
|
+
`&&o!=="\r"&&o!==`
|
982
|
+
`)return!1;var d=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!d)return!1;do var m=d.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(c,l,o){o+=1;var d=this.$getIndent(l.getLine(o)),m=l.getTabString();d.slice(-m.length)==m&&l.remove(new g(o,d.length-m.length,o,d.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(n){t&&(t.exports=n)})}()}(Xf)),Xf.exports}h1();var Zf={exports:{}},Jf;function d1(){return Jf||(Jf=1,function(t,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop"),p=n("./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"}]}};h.inherits(b,p),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var h=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,u){return/^\s+$/.test(b)?/^\s*\}/.test(u):!1},this.autoOutdent=function(b,u){var g=b.getLine(u),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:u,column:a});if(!c||c.row==u)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new h(u,0,u,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){var h=n("../../lib/oop"),p=n("../../range").Range,b=n("./fold_mode").FoldMode,u=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};h.inherits(u,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(g,s,a){var c=g.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(g,s,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(g,s,a,c){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var o=l.match(this.foldingStartMarker);if(o){var d=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,d);var m=g.getCommentFoldRange(a,d+o[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var d=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,d):g.getCommentFoldRange(a,d,-1)}}},this.getSectionRange=function(g,s){var a=g.getLine(s),c=a.search(/\S/),l=s,o=a.length;s+=1;for(var d=s,m=g.getLength();++s<m;){a=g.getLine(s);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(g,"all",s);if(x){if(x.start.row<=l)break;if(x.isMultiLine())s=x.end.row;else if(c==w)break}d=s}}return new p(l,o,d,g.getLine(d).length)},this.getCommentRegionBlock=function(g,s,a){for(var c=s.search(/\s*$/),l=g.getLength(),o=a,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){s=g.getLine(a);var w=d.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,c,x,s.length)}}).call(u.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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./json_highlight_rules").JsonHighlightRules,u=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,s=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};h.inherits(a,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,l,o){var d=this.$getIndent(l);if(c=="start"){var m=l.match(/^.*[\{\(\[]\s*$/);m&&(d+=o)}return d},this.checkOutdent=function(c,l,o){return this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(c,l,o){this.$outdent.autoOutdent(l,o)},this.createWorker=function(c){var l=new s(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(c.getDocument()),l.on("annotate",function(o){c.setAnnotations(o.data)}),l.on("terminate",function(){c.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(n){t&&(t.exports=n)})}()}(Zf)),Zf.exports}d1();var ep={exports:{}},tp;function f1(){return tp||(tp=1,function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop");n("../lib/lang");var p=n("./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",u=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=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",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=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",d=function(){var m=this.createKeywordMapper({"support.function":u,"support.constant":g,"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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{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()};h.inherits(d,p),r.CssHighlightRules=d}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop"),p=n("./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()};h.inherits(b,p),b.getTagRule=function(u){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(u){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:u}},b.getEndRule=function(u){return{token:"comment.doc",regex:"\\*\\/",next:u}},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(n,r,f){function h(){var c=s.replace("\\d","\\d\\-"),l={onMatch:function(d,m,w){var x=d.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:d.slice(0,x)},{type:"meta.tag.tag-name.xml",value:d.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(d,m,w){return m==w[0]&&w.shift(),d.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:d}]},nextState:"jsx"},o,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function p(c){return[{token:"comment",regex:/\/\*/,next:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[u.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=n("../lib/oop"),u=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(c){var l={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(l,"identifier"),d="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(l).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[u.getStartRule("doc-start"),p("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:"(?:"+d+")\\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:o,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:[u.getStartRule("doc-start"),p("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:[p("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"}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(I,T,_){if(this.next=I=="{"?this.nextState:"",I=="{"&&_.length)_.unshift("start",T);else if(I=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return I=="{"?"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"}),(!c||c.jsx!=0)&&h.call(this)),this.embedRules(u,"doc-",[u.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,g),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var h=n("../lib/oop"),p=n("./text_highlight_rules").TextHighlightRules,b=function(u){var g="[_: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:"(<\\?)("+g+")",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:g},{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:"(<\\!)("+g+")",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:"(?:(<)|(</))((?:"+g+":)?"+g+")",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:g},{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(u,g,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:g+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,c,l){return l.splice(0),this.token}}],this.embedRules(u,g,[{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(p.prototype),h.inherits(b,p),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(n,r,f){var h=n("../lib/oop"),p=n("../lib/lang"),b=n("./css_highlight_rules").CssHighlightRules,u=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,s=p.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(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,l){var o=s[l];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".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 u({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};h.inherits(a,g),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(n,r,f){var h=n("../config").$modes,p=n("../lib/oop"),b=n("../lib/lang"),u=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,s=function(c){return"(?:[^"+b.escapeRegExp(c)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,d,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),I=/[\w-]+|$/.exec(x[3])[0];return h[I]||(I=""),m.unshift("githubblock",[],[x[1],x[2],I],d),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(o,d,m,w){var x=m[1],I=m[2][0],T=m[2][1],_=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<I.length+3&&C[2].length>=T.length&&C[2][0]==T[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&h[_]){var L=h[_].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+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},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:l}),this.normalizeRules()};p.inherits(a,u),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,f){var h=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=n("../../range").Range,u=r.FoldMode=function(){};h.inherits(u,p),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,s,a){var c=g.getLine(a);return this.foldingStartMarker.test(c)?c[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,s,a){function c(R){return I=g.getTokens(R)[0],I&&I.type.lastIndexOf(T,0)===0}function l(){var R=I.value[0];return R=="="?6:R=="-"?5:7-I.value.search(/[^#]|$/)}var o=g.getLine(a),d=o.length,m=g.getLength(),w=a,x=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(w,d,a,0)}for(;a-- >0&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(a,o.length,w,0)}var I,T="markup.heading";if(c(a)){for(var _=l();++a<m;)if(c(a)){var C=l();if(C>=_)break}if(x=a-(!I||["=","-"].indexOf(I.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(g.getLine(x));)x--;if(x>w){var L=g.getLine(x).length;return new b(w,d,x,L)}}}}}).call(u.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var h=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,u){return/^\s+$/.test(b)?/^\s*\}/.test(u):!1},this.autoOutdent=function(b,u){var g=b.getLine(u),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:u,column:a});if(!c||c.row==u)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new h(u,0,u,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,r,f){function h(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var p=n("../../lib/oop"),b=n("../behaviour").Behaviour,u=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(s,a,c,l,o){if(o=='"'||o=="'"){var d=o,m=l.doc.getTextRange(c.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&c.getWrapBehavioursEnabled())return{text:d+m+d,selection:!1};var w=c.getCursorPosition(),x=l.doc.getLine(w.row),I=x.substring(w.column,w.column+1),T=new u(l,w.row,w.column),_=T.getCurrentToken();if(I==d&&(h(_,"attribute-value")||h(_,"string")))return{text:"",selection:[1,1]};if(_||(_=T.stepBackward()),!_)return;for(;h(_,"tag-whitespace")||h(_,"whitespace");)_=T.stepBackward();var C=!I||I.match(/\s/);if(h(_,"attribute-equals")&&(C||I==">")||h(_,"decl-attribute-equals")&&(C||I=="?"))return{text:d+d,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,c,l,o){var d=l.doc.getTextRange(o);if(!o.isMultiLine()&&(d=='"'||d=="'")){var m=l.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==d)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,a,c,l,o){if(o==">"){var d=c.getSelectionRange().start,m=new u(l,d.row,d.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(h(w,"tag-name")||h(w,"tag-whitespace")||h(w,"attribute-name")||h(w,"attribute-equals")||h(w,"attribute-value"))||h(w,"reference.attribute-value"))return;if(h(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(d.column<x)return;if(d.column==x){var I=m.stepForward();if(I&&h(I,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(l.getLine(d.row).slice(d.column)))return;for(;!h(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var T=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(h(m.stepBackward(),"end-tag-open"))return;var C=w.value;return T==d.row&&(C=C.substring(0,d.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,c,l,o){if(o==`
|
983
|
+
`){var d=c.getCursorPosition(),m=l.getLine(d.row),w=new u(l,d.row,d.column),x=w.getCurrentToken();if(h(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 I=x.value,T=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var _=l.getTokenAt(d.row,d.column+1),m=l.getLine(T),C=this.$getIndent(m),L=C+l.getTabString();return _&&_.value==="</"?{text:`
|
984
|
+
`+L+`
|
985
|
+
`+C,selection:[1,L.length,1,L.length]}:{text:`
|
986
|
+
`+L}}}}})};p.inherits(g,b),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,r,f){var h=n("../../lib/oop"),p=n("../../token_iterator").TokenIterator,b=n("../behaviour/cstyle").CstyleBehaviour,u=n("../behaviour/xml").XmlBehaviour,g=function(){var s=new u({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,c,l,o,d){if(d==">"){var m=l.getSelectionRange().start,w=new p(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};h.inherits(g,b),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){function h(a,c){return a&&a.type&&a.type.lastIndexOf(c+".xml")>-1}var p=n("../../lib/oop"),b=n("../../range").Range,u=n("./fold_mode").FoldMode,g=r.FoldMode=function(a,c){u.call(this),this.voidElements=a||{},this.optionalEndTags=p.mixin({},this.voidElements),c&&p.mixin(this.optionalEndTags,c)};p.inherits(g,u);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,c,l){var o=this._getFirstTagInLine(a,l);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,l,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,c){return/comment/.test(a.getState(c))&&/<!-/.test(a.getLine(c))?"start":""},this._getFirstTagInLine=function(a,c){for(var l=a.getTokens(c),o=new s,d=0;d<l.length;d++){var m=l[d];if(h(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=h(m,"end-tag-open"),m=l[++d],!m)return null;if(o.tagName=m.value,m.value===""){if(m=l[++d],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,d++;d<l.length;d++)if(m=l[d],o.end.column+=m.value.length,h(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(h(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,c,l,o){for(var d=a.getTokens(c),m=0,w=0;w<d.length;w++){var x=d[w];if(m+=x.value.length,!(m<o-1)&&h(x,"end-tag-open")&&(x=d[w+1],h(x,"tag-name")&&x.value===""&&(x=d[w+2]),x&&x.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,c,l){var o=this._getFirstTagInLine(a,l);if(!o)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var d=a.getMatchingTags({row:l,column:0});if(d)return new b(d.openTag.end.row,d.openTag.end.column,d.closeTag.start.row,d.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){var h=n("../../lib/oop"),p=n("../../range").Range,b=n("./fold_mode").FoldMode,u=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};h.inherits(u,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(g,s,a){var c=g.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(g,s,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(g,s,a,c){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var o=l.match(this.foldingStartMarker);if(o){var d=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,d);var m=g.getCommentFoldRange(a,d+o[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var d=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,d):g.getCommentFoldRange(a,d,-1)}}},this.getSectionRange=function(g,s){var a=g.getLine(s),c=a.search(/\S/),l=s,o=a.length;s+=1;for(var d=s,m=g.getLength();++s<m;){a=g.getLine(s);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(g,"all",s);if(x){if(x.start.row<=l)break;if(x.isMultiLine())s=x.end.row;else if(c==w)break}d=s}}return new p(l,o,d,g.getLine(d).length)},this.getCommentRegionBlock=function(g,s,a){for(var c=s.search(/\s*$/),l=g.getLength(),o=a,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){s=g.getLine(a);var w=d.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,c,x,s.length)}}).call(u.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,r,f){var h=n("../../lib/oop"),p=n("./xml").FoldMode,b=n("./cstyle").FoldMode,u=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new p};h.inherits(u,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,a){var c=this.getFoldWidgetBase(g,s,a);return c||this.xmlFoldMode.getFoldWidget(g,s,a)},this.getFoldWidgetRange=function(g,s,a,c){var l=this.getFoldWidgetRangeBase(g,s,a,c);return l||this.xmlFoldMode.getFoldWidgetRange(g,s,a)}}).call(u.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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./javascript_highlight_rules").JavaScriptHighlightRules,u=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,s=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new u,this.$behaviour=new s,this.foldingRules=new a};h.inherits(c,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,o,d){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,l),x=w.tokens,I=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(l=="start"||l=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(m+=d)}else if(l=="doc-start"&&(I=="start"||I=="no_regex"))return"";return m},this.checkOutdent=function(l,o,d){return this.$outdent.checkOutdent(o,d)},this.autoOutdent=function(l,o,d){this.$outdent.autoOutdent(o,d)},this.createWorker=function(l){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(l.getDocument()),o.on("annotate",function(d){l.setAnnotations(d.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,f){var h={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}},p=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var b=document.createElement("c").style;for(var u in b)if(typeof b[u]=="string"){var g=u.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});h.hasOwnProperty(g)||(h[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,u,g,s){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||u.$mode.$id=="ace/mode/scss"){var a=u.getLine(g.row).substr(0,g.column),c=/\([^)]*$/.test(a);return c&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,u,g,s):this.getPropertyCompletions(b,u,g,s,c)}return[]},this.getPropertyCompletions=function(b,u,g,s,a){a=a||!1;var c=Object.keys(h);return c.map(function(l){return{caption:l,snippet:l+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,u,g,s){var a=u.getLine(g.row).substr(0,g.column),c=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!c)return[];var l=[];return c in h&&typeof h[c]=="object"&&(l=Object.keys(h[c])),l.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(p.prototype),r.CssCompletions=p}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,f){var h=n("../../lib/oop");n("../behaviour").Behaviour;var p=n("./cstyle").CstyleBehaviour,b=n("../../token_iterator").TokenIterator,u=function(){this.inherit(p),this.add("colon","insertion",function(g,s,a,c,l){if(l===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),d=new b(c,o.row,o.column),m=d.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=d.stepBackward()),m&&m.type==="support.type"){var w=c.doc.getLine(o.row),x=w.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,s,a,c,l){var o=c.doc.getTextRange(l);if(!l.isMultiLine()&&o===":"){var d=a.getCursorPosition(),m=new b(c,d.row,d.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=c.doc.getLine(l.start.row),I=x.substring(l.end.column,l.end.column+1);if(I===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(g,s,a,c,l){if(l===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),d=c.doc.getLine(o.row),m=d.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,s,a,c,l){if(l==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),d=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(d.substring(o.column)))return{text:"!important",selection:[10,10]}}})};h.inherits(u,p),r.CssBehaviour=u}),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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./css_highlight_rules").CssHighlightRules,u=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,s=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,c=n("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=b,this.$outdent=new u,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new c};h.inherits(l,p),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,d,m){var w=this.$getIndent(d),x=this.getTokenizer().getLineTokens(d,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var I=d.match(/^.*\{\s*$/);return I&&(w+=m),w},this.checkOutdent=function(o,d,m){return this.$outdent.checkOutdent(d,m)},this.autoOutdent=function(o,d,m){this.$outdent.autoOutdent(d,m)},this.getCompletions=function(o,d,m,w){return this.$completer.getCompletions(o,d,m,w)},this.createWorker=function(o){var d=new g(["ace"],"ace/mode/css_worker","Worker");return d.attachToDocument(o.getDocument()),d.on("annotate",function(m){o.setAnnotations(m.data)}),d.on("terminate",function(){o.clearAnnotations()}),d},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,f){var h=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=r.FoldMode=function(u,g){this.defaultMode=u,this.subModes=g};h.inherits(b,p),(function(){this.$getMode=function(u){typeof u!="string"&&(u=u[0]);for(var g in this.subModes)if(u.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(u,g,s,a){var c=this.$getMode(u);return c?c.getFoldWidget(g,s,a):""},this.getFoldWidget=function(u,g,s){return this.$tryMode(u.getState(s-1),u,g,s)||this.$tryMode(u.getState(s),u,g,s)||this.defaultMode.getFoldWidget(u,g,s)},this.getFoldWidgetRange=function(u,g,s){var a=this.$getMode(u.getState(s-1));return(!a||!a.getFoldWidget(u,g,s))&&(a=this.$getMode(u.getState(s))),(!a||!a.getFoldWidget(u,g,s))&&(a=this.defaultMode),a.getFoldWidgetRange(u,g,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(n,r,f){var h=n("../../lib/oop"),p=n("./mixed").FoldMode,b=n("./xml").FoldMode,u=n("./cstyle").FoldMode,g=r.FoldMode=function(s,a){p.call(this,new b(s,a),{"js-":new u,"css-":new u})};h.inherits(g,p)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,r,f){function h(d,m){return d.type.lastIndexOf(m+".xml")>-1}function p(d,m){for(var w=new u(d,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(d,m){for(var w=new u(d,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var u=n("../token_iterator").TokenIterator,g=["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=g.concat(s),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},l=Object.keys(c),o=function(){};(function(){this.getCompletions=function(d,m,w,x){var I=m.getTokenAt(w.row,w.column);if(!I)return[];if(h(I,"tag-name")||h(I,"tag-open")||h(I,"end-tag-open"))return this.getTagCompletions(d,m,w,x);if(h(I,"tag-whitespace")||h(I,"attribute-name"))return this.getAttributeCompletions(d,m,w,x);if(h(I,"attribute-value"))return this.getAttributeValueCompletions(d,m,w,x);var T=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(d,m,w,x):[]},this.getTagCompletions=function(d,m,w,x){return l.map(function(I){return{value:I,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(d,m,w,x){var I=p(m,w);if(!I)return[];var T=a;return I in c&&(T=T.concat(Object.keys(c[I]))),T.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(d,m,w,x){var I=p(m,w),T=b(m,w);if(!I)return[];var _=[];return I in c&&T in c[I]&&typeof c[I][T]=="object"&&(_=Object.keys(c[I][T])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(d,m,w,x){var I=["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 I.map(function(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),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(n,r,f){var h=n("../lib/oop"),p=n("../lib/lang"),b=n("./text").Mode,u=n("./javascript").Mode,g=n("./css").Mode,s=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,c=n("./folding/html").FoldMode,l=n("./html_completions").HtmlCompletions,o=n("../worker/worker_client").WorkerClient,d=["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 l,this.createModeDelegates({"js-":u,"css-":g}),this.foldingRules=new c(this.voidElements,p.arrayToMap(m))};h.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=p.arrayToMap(d),this.getNextLineIndent=function(x,I,T){return this.$getIndent(I)},this.checkOutdent=function(x,I,T){return!1},this.getCompletions=function(x,I,T,_){return this.$completer.getCompletions(x,I,T,_)},this.createWorker=function(x){if(this.constructor==w){var I=new o(["ace"],"ace/mode/html_worker","Worker");return I.attachToDocument(x.getDocument()),this.fragmentContext&&I.call("setOptions",[{context:this.fragmentContext}]),I.on("error",function(T){x.setAnnotations(T.data)}),I.on("terminate",function(){x.clearAnnotations()}),I}},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(n,r,f){var h=n("../lib/oop"),p=n("./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",u=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",g=function(){var s=this.createKeywordMapper({keyword:b,"support.function.builtin":u,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",l="(?:\\d+)",o="(?:(?:"+l+"?"+c+")|(?:"+l+"\\.))",d="(?:(?:"+o+"|"+l+"))",m="(?:"+d+"|"+o+")",w="(?:&"+l+")",x="[a-zA-Z_][a-zA-Z0-9_]*",I="(?:"+x+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,L,R){var F=C[2]=="-"?"indentedHeredoc":"heredoc",E=C.split(this.splitRegex);return R.push(F,E[4]),[{type:"constant",value:E[1]},{type:"text",value:E[2]},{type:"string",value:E[3]},{type:"support.class",value:E[4]},{type:"string",value:E[5]}]},rules:{heredoc:[{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:T},{token:"variable",regex:I},{include:"variables"},{token:"support.function",regex:_},{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()};h.inherits(g,p),r.ShHighlightRules=g}),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(n,r,f){var h=n("../lib/oop"),p=n("./text").Mode,b=n("./sh_highlight_rules").ShHighlightRules,u=n("../range").Range,g=n("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=b,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};h.inherits(s,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,o){var d=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return d;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(d+=o)}return d};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,o){if(o!==`\r
|
987
|
+
`&&o!=="\r"&&o!==`
|
988
|
+
`)return!1;var d=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!d)return!1;do var m=d.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(c,l,o){o+=1;var d=this.$getIndent(l.getLine(o)),m=l.getTabString();d.slice(-m.length)==m&&l.remove(new u(o,d.length-m.length,o,d.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(n,r,f){var h=n("../lib/oop"),p=n("../lib/lang"),b=n("./text").Mode,u=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,s=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=u,this.$behaviour=new g,this.foldingRules=new s};h.inherits(c,b),(function(){this.voidElements=p.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(l){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(l.getDocument()),o.on("error",function(d){l.setAnnotations(d.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,f){var h=n("../lib/oop"),p=n("./behaviour/cstyle").CstyleBehaviour,b=n("./text").Mode,u=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,s=function(){this.HighlightRules=u,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new g,this.$behaviour=new p({braces:!0})};h.inherits(s,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,c,l){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var d=o[2];return d||(d=parseInt(o[3],10)+1+"."),o[1]+d+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()}(ep)),ep.exports}f1();var np={exports:{}},rp;function p1(){return rp||(rp=1,function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,r,f){f.exports=`.ace-twilight .ace_gutter {
|
989
|
+
background: #232323;
|
990
|
+
color: #E2E2E2
|
991
|
+
}
|
992
|
+
|
993
|
+
.ace-twilight .ace_print-margin {
|
994
|
+
width: 1px;
|
995
|
+
background: #232323
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight {
|
999
|
+
background-color: #141414;
|
1000
|
+
color: #F8F8F8
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight .ace_cursor {
|
1004
|
+
color: #A7A7A7
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1008
|
+
background: rgba(221, 240, 255, 0.20)
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1012
|
+
box-shadow: 0 0 3px 0px #141414;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1016
|
+
background: rgb(102, 82, 0)
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1020
|
+
margin: -1px 0 0 -1px;
|
1021
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1025
|
+
background: rgba(255, 255, 255, 0.031)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_gutter-active-line {
|
1029
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1033
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_invisible {
|
1037
|
+
color: rgba(255, 255, 255, 0.25)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_keyword,
|
1041
|
+
.ace-twilight .ace_meta {
|
1042
|
+
color: #CDA869
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_constant,
|
1046
|
+
.ace-twilight .ace_constant.ace_character,
|
1047
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1048
|
+
.ace-twilight .ace_constant.ace_other,
|
1049
|
+
.ace-twilight .ace_heading,
|
1050
|
+
.ace-twilight .ace_markup.ace_heading,
|
1051
|
+
.ace-twilight .ace_support.ace_constant {
|
1052
|
+
color: #CF6A4C
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1056
|
+
color: #F8F8F8;
|
1057
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1061
|
+
text-decoration: underline;
|
1062
|
+
font-style: italic;
|
1063
|
+
color: #D2A8A1
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
.ace-twilight .ace_support {
|
1067
|
+
color: #9B859D
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_fold {
|
1071
|
+
background-color: #AC885B;
|
1072
|
+
border-color: #F8F8F8
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_support.ace_function {
|
1076
|
+
color: #DAD085
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_list,
|
1080
|
+
.ace-twilight .ace_markup.ace_list,
|
1081
|
+
.ace-twilight .ace_storage {
|
1082
|
+
color: #F9EE98
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1086
|
+
.ace-twilight .ace_meta.ace_tag {
|
1087
|
+
color: #AC885B
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_string {
|
1091
|
+
color: #8F9D6A
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string.ace_regexp {
|
1095
|
+
color: #E9C062
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_comment {
|
1099
|
+
font-style: italic;
|
1100
|
+
color: #5F5A60
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_variable {
|
1104
|
+
color: #7587A6
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_xml-pe {
|
1108
|
+
color: #494949
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_indent-guide {
|
1112
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide-active {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1117
|
+
}
|
1118
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(n,r,f){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=n("./twilight-css");var h=n("../lib/dom");h.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(n){t&&(t.exports=n)})}()}(np)),np.exports}p1();var ip={exports:{}},op;function g1(){return op||(op=1,function(t,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(n,r,f){function h(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var p=n("./lib/dom"),b=n("./lib/oop"),u=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),s=n("./range").Range,a=n("./range_list").RangeList,c=n("./keyboard/hash_handler").HashHandler,l=n("./tokenizer").Tokenizer,o=n("./clipboard"),d={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,R){var F=C.session.getTextRange();return R?F.replace(/\n\r?([ \t]*\S)/g,`
|
1119
|
+
`+R+"$1"):F},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};d.SELECTED_TEXT=d.SELECTION;var m=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=d}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(E){return E=E.substr(1),/^\d+$/.test(E)?[{tabstopId:parseInt(E,10)}]:[{text:E}]}function R(E){return"(?:[^\\\\"+E+"]|\\\\.)"}var F={regex:"/("+R("/")+"+)/",onMatch:function(E,H,P){var O=P[0];return O.fmtString=!0,O.guard=E.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(E,H,P){var O=E[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(E=O),[E]}},{regex:/}/,onMatch:function(E,H,P){return[P.length?P.shift():E]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(E,H,P){var O=L(E.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+R("\\|")+"*\\|",onMatch:function(E,H,P){var O=E.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(E,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(E,H,P){var O=E[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?E=O:O=="n"?E=`
|
1120
|
+
`:O=="t"?E=" ":"ulULE".indexOf(O)!=-1&&(E={changeCase:O,local:O>"a"}),[E]}},{regex:"/\\w*}",onMatch:function(E,H,P){var O=P.shift();return O&&(O.flag=E.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(E,H,P){return[{text:E.slice(1)}]}},{regex:/\${\w+/,onMatch:function(E,H,P){var O={text:E.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(E,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||E]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(E,H,P){var O=P[0];return O.formatFunction=E.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(E,H,P){E[1]=="+"&&(P[0].ifEnd=P[0]),E[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,R){return this.getTokenizer().getLineTokens(L,R).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(L,R,F){if(/^\d+$/.test(R))return(this.variables.__||{})[R]||"";if(/^[A-Z]\d+$/.test(R))return(this.variables[R[0]+"__"]||{})[R.substr(1)]||"";if(R=R.replace(/^TM_/,""),!this.variables.hasOwnProperty(R))return"";var E=this.variables[R];return typeof E=="function"&&(E=this.variables[R](L,R,F)),E??""},C.prototype.tmStrFormat=function(L,R,F){if(!R.fmt)return L;var E=R.flag||"",H=R.guard;H=new RegExp(H,E.replace(/[^gim]/g,""));var P=typeof R.fmt=="string"?this.tokenizeTmSnippet(R.fmt,"formatString"):R.fmt,O=this,S=L.replace(H,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var D=O.resolveVariables(P,F),B="E",U=0;U<D.length;U++){var K=D[U];if(typeof K=="object")if(D[U]="",K.changeCase&&K.local){var Z=D[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?D[U]=Z[0].toUpperCase():D[U]=Z[0].toLowerCase(),D[U+1]=Z.substr(1))}else K.changeCase&&(B=K.changeCase);else B=="U"?D[U]=K.toUpperCase():B=="L"&&(D[U]=K.toLowerCase())}return O.variables.__=A,D.join("")});return S},C.prototype.tmFormatFunction=function(L,R,F){return R.formatFunction=="upcase"?L.toUpperCase():R.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,R){function F(B){var U=L.indexOf(B,O+1);U!=-1&&(O=U)}for(var E=[],H="",P=!0,O=0;O<L.length;O++){var S=L[O];if(typeof S=="string"){E.push(S),S==`
|
1121
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec(S)[0],P=/\S/.test(S));continue}if(S){if(P=!1,S.fmtString){var A=L.indexOf(S,O+1);A==-1&&(A=L.length),S.fmt=L.slice(O+1,A),O=A}if(S.text){var D=this.getVariableValue(R,S.text,H)+"";S.fmtString&&(D=this.tmStrFormat(D,S,R)),S.formatFunction&&(D=this.tmFormatFunction(D,S,R)),D&&!S.ifEnd?(E.push(D),F(S)):!D&&S.ifEnd&&F(S.ifEnd)}else S.elseEnd?F(S.elseEnd):(S.tabstopId!=null||S.changeCase!=null)&&E.push(S)}}return E},C.prototype.getDisplayTextForSnippet=function(L,R){var F=w.call(this,L,R);return F.text},C.prototype.insertSnippetForSelection=function(L,R,F){F===void 0&&(F={});var E=w.call(this,L,R,F),H=L.getSelectionRange(),P=L.session.replace(H,E.text),O=new x(L),S=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(E.tabstops,H.start,P,S)},C.prototype.insertSnippet=function(L,R,F){F===void 0&&(F={});var E=this;if(L.inVirtualSelectionMode)return E.insertSnippetForSelection(L,R,F);L.forEachSelection(function(){E.insertSnippetForSelection(L,R,F)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var R=L.session.$mode.$id||"";if(R=R.split("/").pop(),R==="html"||R==="php"){R==="php"&&!L.session.$mode.inlinePhp&&(R="html");var F=L.getCursorPosition(),E=L.session.getState(F.row);typeof E=="object"&&(E=E[0]),E.substring&&(E.substring(0,3)=="js-"?R="javascript":E.substring(0,4)=="css-"?R="css":E.substring(0,4)=="php-"&&(R="php"))}return R},C.prototype.getActiveScopes=function(L){var R=this.$getScope(L),F=[R],E=this.snippetMap;return E[R]&&E[R].includeScopes&&F.push.apply(F,E[R].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(L,R){var F=this,E=L.forEachSelection(function(){return F.expandSnippetForSelection(L,R)},null,{keepOrder:!0});return E&&L.tabstopManager&&L.tabstopManager.tabNext(),E},C.prototype.expandSnippetForSelection=function(L,R){var F=L.getCursorPosition(),E=L.session.getLine(F.row),H=E.substring(0,F.column),P=E.substr(F.column),O=this.snippetMap,S;return this.getActiveScopes(L).some(function(A){var D=O[A];return D&&(S=this.findMatchingSnippet(D,H,P)),!!S},this),S?(R&&R.dryRun||(L.session.doc.removeInLine(F.row,F.column-S.replaceBefore.length,F.column+S.replaceAfter.length),this.variables.M__=S.matchBefore,this.variables.T__=S.matchAfter,this.insertSnippetForSelection(L,S.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,R,F){for(var E=L.length;E--;){var H=L[E];if(!(H.startRe&&!H.startRe.test(R))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(R):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(R)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(L,R){function F(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function E(A,D,B){return A=F(A),D=F(D),A=D+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function H(A){A.scope||(A.scope=R||"_"),R=A.scope,P[R]||(P[R]=[],O[R]={});var D=O[R];if(A.name){var B=D[A.name];B&&S.unregister(B),D[A.name]=A}P[R].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
1122
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=g.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=E(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=E(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,S=this;L||(L=[]),Array.isArray(L)?L.forEach(H):Object.keys(L).forEach(function(A){H(L[A])}),this._signal("registerSnippets",{scope:R})},C.prototype.unregister=function(L,R){function F(P){var O=H[P.scope||R];if(O&&O[P.name]){delete O[P.name];var S=E[P.scope||R],A=S&&S.indexOf(P);A>=0&&S.splice(A,1)}}var E=this.snippetMap,H=this.snippetNameMap;L.content?F(L):Array.isArray(L)&&L.forEach(F)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var R=[],F={},E=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=E.exec(L);){if(H[1])try{F=JSON.parse(H[1]),R.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),R.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=S.exec(O)[1],F.trigger=S.exec(O)[1],F.endTrigger=S.exec(O)[1],F.endGuard=S.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return R},C.prototype.getSnippetByName=function(L,R){var F=this.snippetNameMap,E;return this.getActiveScopes(R).some(function(H){var P=F[H];return P&&(E=P[L]),!!E},this),E},C}();b.implement(m.prototype,u);var w=function(C,L,R){function F(ue){for(var ye=[],Ae=0;Ae<ue.length;Ae++){var $e=ue[Ae];if(typeof $e=="object"){if(D[$e.tabstopId])continue;var Ie=ue.lastIndexOf($e,Ae-1);$e=ye[Ie]||{tabstopId:$e.tabstopId}}ye[Ae]=$e}return ye}R===void 0&&(R={});var E=C.getCursorPosition(),H=C.session.getLine(E.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];E.column<O.length&&(O=O.slice(0,E.column)),L=L.replace(/\r/g,"");var S=this.tokenizeTmSnippet(L);S=this.resolveVariables(S,C),S=S.map(function(ue){return ue==`
|
1123
|
+
`&&!R.excludeExtraIndent?ue+O:typeof ue=="string"?ue.replace(/\t/g,P):ue});var A=[];S.forEach(function(ue,ye){if(typeof ue=="object"){var Ae=ue.tabstopId,$e=A[Ae];if($e||($e=A[Ae]=[],$e.index=Ae,$e.value="",$e.parents={}),$e.indexOf(ue)===-1){ue.choices&&!$e.choices&&($e.choices=ue.choices),$e.push(ue);var Ie=S.indexOf(ue,ye+1);if(Ie!==-1){var Ze=S.slice(ye+1,Ie),Xe=Ze.some(function(gt){return typeof gt=="object"});Xe&&!$e.value?$e.value=Ze:Ze.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ze.join(""))}}}}),A.forEach(function(ue){ue.length=0});for(var D={},B=0;B<S.length;B++){var U=S[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],te=S.indexOf(U,B+1);if(D[K]){D[K]===U&&(delete D[K],Object.keys(D).forEach(function(ue){Z.parents[ue]=!0}));continue}D[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),S.splice.apply(S,[B+1,Math.max(0,te-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ce="";return S.forEach(function(ue){if(typeof ue=="string"){var ye=ue.split(`
|
1124
|
+
`);ye.length>1?(ae=ye[ye.length-1].length,ne+=ye.length-1):ae+=ue.length,ce+=ue}else ue&&(ue.start?ue.end={row:ne,column:ae}:ue.start={row:ne,column:ae})}),{text:ce,tabstops:A,tokens:S}},x=function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(L){for(var R=L.action[0]=="r",F=this.selectedTabstop||{},E=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],S=O==F||E[O.index];if(O.rangeList.$bias=S?0:1,L.action=="remove"&&O!==F){var A=O.parents&&O.parents[F.index],D=O.rangeList.pointIndex(L.start,A);D=D<0?-D-1:D+1;var B=O.rangeList.pointIndex(L.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(D,B),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(L)}var Z=this.session;!this.$inChange&&R&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var R=this.session,F=R.getTextRange(L.firstNonLinked),E=0;E<L.length;E++){var H=L[E];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);R.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,R=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var H=this.ranges[E].contains(L.row,L.column),P=F||this.ranges[E].contains(R.row,R.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var R=this.tabstops.length,F=this.index+(L||1);F=Math.min(Math.max(F,1),R),F==R&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var R=this.tabstops[this.index];if(R&&this.addTabstopMarkers(R),this.index=L,R=this.tabstops[this.index],!(!R||!R.length)){this.selectedTabstop=R;var F=R.firstNonLinked||R;if(R.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var E=this.editor.multiSelect;E.toSingleRange(F);for(var H=0;H<R.length;H++)R.hasLinkedRanges&&R[H].linked||E.addRange(R[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(L,R,F){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var H=s.fromPoints(F,F);T(H.start,R),T(H.end,R),L[0]=[H],L[0].index=0}var P=this.index,O=[P+1,0],S=this.ranges,A=this.snippetId=(this.snippetId||0)+1;L.forEach(function(D,B){var U=this.$openTabstops[B]||D;U.snippetId=A;for(var K=0;K<D.length;K++){var Z=D[K],te=s.fromPoints(Z.start,Z.end||Z.start);I(te.start,R),I(te.end,R),te.original=Z,te.tabstop=U,S.push(te),U!=D?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&E?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(L){var R=this.session;L.forEach(function(F){F.markerId||(F.markerId=R.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var R=this.session;L.forEach(function(F){R.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(R){R.snippetId===L?this.addTabstopMarkers(R):this.removeTabstopMarkers(R)},this)}},C.prototype.removeRange=function(L){var R=L.tabstop.indexOf(L);R!=-1&&L.tabstop.splice(R,1),R=this.ranges.indexOf(L),R!=-1&&this.ranges.splice(R,1),R=L.tabstop.rangeList.ranges.indexOf(L),R!=-1&&L.tabstop.splice(R,1),this.session.removeMarker(L.markerId),L.tabstop.length||(R=this.tabstops.indexOf(L.tabstop),R!=-1&&this.tabstops.splice(R,1),this.tabstops.length||this.detach())},C}();x.prototype.keyboardHandler=new c,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var I=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},T=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};p.importCssString(`
|
1125
|
+
.ace_snippet-marker {
|
1126
|
+
-moz-box-sizing: border-box;
|
1127
|
+
box-sizing: border-box;
|
1128
|
+
background: rgba(194, 193, 208, 0.09);
|
1129
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1130
|
+
position: absolute;
|
1131
|
+
}`,"snippets.css",!1),r.snippetManager=new m;var _=n("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.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(n,r,f){var h=n("../virtual_renderer").VirtualRenderer,p=n("../editor").Editor,b=n("../range").Range,u=n("../lib/event"),g=n("../lib/lang"),s=n("../lib/dom"),a=n("../config").nls,c=n("./../lib/useragent"),l=function(I){return"suggest-aria-id:".concat(I)},o=c.isSafari?"menu":"listbox",d=c.isSafari?"menuitem":"option",m=c.isSafari?"aria-current":"aria-selected",w=function(I){var T=new h(I);T.$maxLines=4;var _=new p(T);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=function(){function I(T){var _=s.createElement("div"),C=w(_);T&&T.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(S){var A=S.getDocumentPosition();C.selection.moveToPosition(A),E.start.row=E.end.row=A.row,S.stop()});var R,F=new b(-1,0,-1,1/0),E=new b(-1,0,-1,1/0);E.id=C.session.addMarker(E,"ace_active-line","fullLine"),C.setSelectOnHover=function(S){S?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(S){if(!R){R=S;return}if(!(R.x==S.x&&R.y==S.y)){R=S,R.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=R.getDocumentPosition().row;F.start.row!=A&&(F.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(R&&F.start.row!=-1){R.$pos=null;var S=R.getDocumentPosition().row;F.id||C.setRow(S),P(S,!0)}}),C.renderer.on("afterRender",function(){for(var S=C.renderer.$textLayer,A=S.config.firstRow,D=S.config.lastRow;A<=D;A++){var B=S.element.childNodes[A-S.config.firstRow];B.setAttribute("role",d),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(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var S=C.getRow(),A=C.renderer.$textLayer,D=A.element.childNodes[S-A.config.firstRow],B=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=l(S);s.addCssClass(D,"ace_selected"),D.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var H=function(){P(-1)},P=function(S,A){S!==F.start.row&&(F.start.row=F.end.row=S,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},u.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(S){var A=C.data[S];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(S){function A(ue,ye){ue&&B.push({type:(D.className||"")+(ye||""),value:ue})}var D=C.data[S],B=[];if(!D)return B;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(D.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ce=K.indexOf(ae,te);if(ce==-1)continue;A(U.slice(te,ce),""),te=ce+ae.length,A(U.slice(ce,te),"completion-highlight")}return A(U.slice(te,U.length),""),B.push({type:"completion-spacer",value:" "}),D.meta&&B.push({type:"completion-meta",value:D.meta}),D.message&&B.push({type:"completion-message",value:D.message}),B},O.$updateOnChange=L,O.start=L,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(S,A){C.filterText=A||"",C.setValue(g.stringRepeat(`
|
1132
|
+
`,S.length),-1),C.data=S||[],C.setRow(0)},C.getData=function(S){return C.data[S]},C.getRow=function(){return E.start.row},C.setRow=function(S){S=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,S)),E.start.row!=S&&(C.selection.clearSelection(),E.start.row=E.end.row=S||0,C.session._emit("changeBackMarker"),C.moveCursorTo(S||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(S,A,D,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===S.top&&C.anchorPos.left===S.left&&C.anchor===D)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,ae={top:0,bottom:0},ce=Z-S.top-3*this.$borderSize-A,ue=S.top-3*this.$borderSize;D||(ue<=ce||ce>=ne?D="bottom":D="top"),D==="top"?(ae.bottom=S.top-this.$borderSize,ae.top=ae.bottom-ne):D==="bottom"&&(ae.top=S.top+A+this.$borderSize,ae.bottom=ae.top+ne);var ye=ae.top>=0&&ae.bottom<=Z;if(!B&&!ye)return!1;ye?he.$maxPixelHeight=null:D==="top"?he.$maxPixelHeight=ue:he.$maxPixelHeight=ce,D==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var Ae=S.left;return Ae+U.offsetWidth>te&&(Ae=te-U.offsetWidth),U.style.left=Ae+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),R=null),C.anchorPos=S,C.anchor=D,!0},C.show=function(S,A,D){this.tryShow(S,A,D?"bottom":void 0,!0)},C.goTo=function(S){var A=this.getRow(),D=this.session.getLength()-1;switch(S){case"up":A=A<=0?D:A-1;break;case"down":A=A>=D?-1:A+1;break;case"start":A=0;break;case"end":A=D}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return I}();s.importCssString(`
|
1133
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1134
|
+
background-color: #CAD6FA;
|
1135
|
+
z-index: 1;
|
1136
|
+
}
|
1137
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1138
|
+
background-color: #3a674e;
|
1139
|
+
}
|
1140
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1141
|
+
border: 1px solid #abbffe;
|
1142
|
+
margin-top: -1px;
|
1143
|
+
background: rgba(233,233,253,0.4);
|
1144
|
+
position: absolute;
|
1145
|
+
z-index: 2;
|
1146
|
+
}
|
1147
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1148
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1149
|
+
background: rgba(58, 103, 78, 0.62);
|
1150
|
+
}
|
1151
|
+
.ace_completion-meta {
|
1152
|
+
opacity: 0.5;
|
1153
|
+
margin-left: 0.9em;
|
1154
|
+
}
|
1155
|
+
.ace_completion-message {
|
1156
|
+
margin-left: 0.9em;
|
1157
|
+
color: blue;
|
1158
|
+
}
|
1159
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1160
|
+
color: #2d69c7;
|
1161
|
+
}
|
1162
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1163
|
+
color: #93ca12;
|
1164
|
+
}
|
1165
|
+
.ace_editor.ace_autocomplete {
|
1166
|
+
width: 300px;
|
1167
|
+
z-index: 200000;
|
1168
|
+
border: 1px lightgray solid;
|
1169
|
+
position: fixed;
|
1170
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1171
|
+
line-height: 1.4;
|
1172
|
+
background: #fefefe;
|
1173
|
+
color: #111;
|
1174
|
+
}
|
1175
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1176
|
+
border: 1px #484747 solid;
|
1177
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1178
|
+
line-height: 1.4;
|
1179
|
+
background: #25282c;
|
1180
|
+
color: #c1c1c1;
|
1181
|
+
}
|
1182
|
+
.ace_autocomplete .ace_text-layer {
|
1183
|
+
width: calc(100% - 8px);
|
1184
|
+
}
|
1185
|
+
.ace_autocomplete .ace_line {
|
1186
|
+
display: flex;
|
1187
|
+
align-items: center;
|
1188
|
+
}
|
1189
|
+
.ace_autocomplete .ace_line > * {
|
1190
|
+
min-width: 0;
|
1191
|
+
flex: 0 0 auto;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_line .ace_ {
|
1194
|
+
flex: 0 1 auto;
|
1195
|
+
overflow: hidden;
|
1196
|
+
text-overflow: ellipsis;
|
1197
|
+
}
|
1198
|
+
.ace_autocomplete .ace_completion-spacer {
|
1199
|
+
flex: 1;
|
1200
|
+
}
|
1201
|
+
.ace_autocomplete.ace_loading:after {
|
1202
|
+
content: "";
|
1203
|
+
position: absolute;
|
1204
|
+
top: 0px;
|
1205
|
+
height: 2px;
|
1206
|
+
width: 8%;
|
1207
|
+
background: blue;
|
1208
|
+
z-index: 100;
|
1209
|
+
animation: ace_progress 3s infinite linear;
|
1210
|
+
animation-delay: 300ms;
|
1211
|
+
transform: translateX(-100%) scaleX(1);
|
1212
|
+
}
|
1213
|
+
@keyframes ace_progress {
|
1214
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1215
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1216
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1217
|
+
}
|
1218
|
+
@media (prefers-reduced-motion) {
|
1219
|
+
.ace_autocomplete.ace_loading:after {
|
1220
|
+
transform: translateX(625%) scaleX(2);
|
1221
|
+
animation: none;
|
1222
|
+
}
|
1223
|
+
}
|
1224
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,r,f){var h=function(){function p(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return p.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 g=this.popup.getRow(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[g-s.config.firstRow];if(a){for(var c="doc-tooltip ",l=0;l<this._lines.length;l++)c+="ace-inline-screenreader-line-".concat(l," ");a.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=b.split(/\r\n|\r|\n/);var u=this.createCodeBlock();this.screenReaderDiv.appendChild(u)},p.prototype.destroy=function(){this.screenReaderDiv.remove()},p.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var u=0;u<this._lines.length;u++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(u));var s=document.createTextNode(this._lines[u]);g.appendChild(s),b.appendChild(g)}return b},p}();r.AceInlineScreenReader=h}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,r,f){var h=n("../snippets").snippetManager,p=n("./inline_screenreader").AceInlineScreenReader,b=function(){function u(){this.editor=null}return u.prototype.show=function(g,s,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new p(g));var c=s.snippet?h.getDisplayTextForSnippet(g,s.snippet):s.value;return s.hideInlinePreview||!c||!c.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(a.length),c===""?g.removeGhostText():g.setGhostText(c),!0)},u.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},u.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},u.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},u}();r.AceInline=b}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,f){r.parForEach=function(p,b,u){var g=0,s=p.length;s===0&&u();for(var a=0;a<s;a++)b(p[a],function(c,l){g++,g===s&&u(c,l)})};var h=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(p,b,u){u=u||h;for(var g=[],s=b-1;s>=0&&u.test(p[s]);s--)g.push(p[s]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(p,b,u){u=u||h;for(var g=[],s=b;s<p.length&&u.test(p[s]);s++)g.push(p[s]);return g},r.getCompletionPrefix=function(p){var b=p.getCursorPosition(),u=p.session.getLine(b.row),g;return p.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(u,b.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(u,b.column)},r.triggerAutocomplete=function(p,u){var u=u??p.session.getPrecedingCharacter();return p.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(u)})}}),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(n,r,f){var h=n("./keyboard/hash_handler").HashHandler,p=n("./autocomplete/popup").AcePopup,b=n("./autocomplete/inline").AceInline,u=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),s=n("./lib/lang"),a=n("./lib/dom"),c=n("./snippets").snippetManager,l=n("./config"),o=n("./lib/event"),d=n("./lib/scroll").preventParentScroll,m=function(T,_){_.completer&&_.completer.destroy()},w=function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new h,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 _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new I(T.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new p(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.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)),o.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},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},T.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?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)},T.prototype.$updateGhostText=function(_){var C=this.base.row,L=this.base.column,R=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(L,R);this.inlineRenderer.show(this.editor,_,F)?this.$seen(_):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var L=this.popup.getData(C);L&&(!_||L.hideInlinePreview)&&this.$seen(L)}},T.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},T.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,L=C.layerConfig.lineHeight,R=C.$cursorLayer.getPixelPosition(this.base,!0);R.left-=this.popup.getTextLeftOffset();var F=_.container.getBoundingClientRect();R.top+=F.top-C.layerConfig.offset,R.left+=F.left-_.renderer.scrollLeft,R.left+=C.gutterWidth;var E={top:R.top,left:R.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(E.top+=C.$ghostTextWidget.el.offsetHeight);var H=_.container.getBoundingClientRect().bottom-L,P=H<E.top?{top:H,left:E.left}:E;this.popup.tryShow(P,L,"bottom")||this.popup.tryShow(R,L,"top")||this.popup.show(R,L)},T.prototype.openPopup=function(_,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var R=this.popup.getRow(),F=this.popup.data[R];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:u(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var E;this.stickySelection&&(E=this.popup.data.indexOf(F)),(!E||E===-1)&&(E=0),this.popup.setRow(this.autoSelect?E:-1),E===R&&F!==this.completions.filtered[E]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(E===R&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}L||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.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()},T.prototype.changeListener=function(_){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()},T.prototype.blurListener=function(_){var C=document.activeElement,L=this.editor.textInput.getElement(),R=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),F=this.popup&&this.popup.container;C!=L&&C.parentNode!=F&&!R&&C!=this.tooltipNode&&_.relatedTarget!=L&&this.detach()},T.prototype.mousedownListener=function(_){this.detach()},T.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(_){this.popup.goTo(_)},T.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var L=this.completions,R=this.getCompletionProvider().insertMatch(this.editor,_,L.filterText,C);return this.completions==L&&this.detach(),R},T.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},T.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},T.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},T.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var R=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:R});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,_);return}if(C&&C.matches){var R=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(R.row,R.column),this.base.$insertRight=!0,this.completions=new I(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var L=this.editor.getSession(),R=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(R.row,R.column-F.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:R}).provideCompletions(this.editor,E,(function(H,P,O){var S=P.filtered,A=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!S.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(A)),D){var B=[{caption:D,value:""}];this.completions=new I(B),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(S.length==1&&S[0].value==A&&!S[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&S.length==1)return this.insertMatch(S[0])}this.completions=!O&&this.showLoadingState?new I(T.completionsForLoading.concat(S),P.filterText):P,this.openPopup(this.editor,A,_),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)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[_.getHoveredRow()]||C[_.getRow()]),R=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,E=0;E<F;E++){var H=this.editor.completers[E];if(H.getDocTooltip&&L.completerId===H.id){R=H.getDocTooltip(L);break}}if(!R&&typeof L!="string"&&(R=L),typeof R=="string"&&(R={docText:R}),!R||!R.docHTML&&!R.docText)return this.hideDocTooltip();this.showDocTooltip(R)},T.prototype.showDocTooltip=function(_){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",d));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;_.docHTML?L.innerHTML=_.docHTML:_.docText&&(L.textContent=_.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var R=this.popup,F=R.container.getBoundingClientRect(),E=400,H=300,P=R.renderer.scrollBar.width||10,O=F.left,S=window.innerWidth-F.right-P,A=R.isTopdown?F.top:window.innerHeight-P-F.bottom,D=[Math.min(S/E,1),Math.min(O/E,1),Math.min(A/H*.9)],B=Math.max.apply(Math,D),U=L.style;U.display="block",B==D[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=E*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==D[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=E*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==D[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(E,window.innerWidth)+"px",R.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=R.container.offsetTop-L.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(R.container.offsetTop,H)+"px"))},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},T.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(_){return _.completer instanceof T||(_.completer&&(_.completer.destroy(),_.completer=null),l.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),_.completer=T.$sharedInstance):(_.completer=new T,_.once("destroy",m))),_.completer},T}();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var _=T.completer.insertMatch();if(_||T.tabstopManager)return _;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var _=g.getCompletionPrefix(T);!_&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,_){var C=w.for(T);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(T,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function T(_){this.initialPosition=_,this.active=!0}return T.prototype.insertByIndex=function(_,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],L)},T.prototype.insertMatch=function(_,C,L){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var R=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(R-=this.initialPosition.prefix.length,R+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),R||F){var E;_.selection.getAllRanges?E=_.selection.getAllRanges():E=[_.getSelectionRange()];for(var H=0,P;P=E[H];H++)P.start.column-=R,P.end.column+=F,_.session.remove(P)}C.snippet?c.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},T.prototype.$insertString=function(_,C){var L=C.value||C;_.execCommand("insertstring",L)},T.prototype.gatherCompletions=function(_,C){var L=_.getSession(),R=_.getCursorPosition(),F=g.getCompletionPrefix(_),E=[];this.completers=_.completers;var H=_.completers.length;return _.completers.forEach(function(P,O){P.getCompletions(_,L,R,F,function(S,A){P.hideInlinePreview&&(A=A.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!S&&A&&(E=E.concat(A)),C(null,{prefix:g.getCompletionPrefix(_),matches:E,finished:--H===0})})}),!0},T.prototype.provideCompletions=function(_,C,L){var R=(function(P){var O=P.prefix,S=P.matches;this.completions=new I(S),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&L(null,this.completions,P.finished)}).bind(this),F=!0,E=null;if(this.gatherCompletions(_,(function(P,O){if(this.active){P&&(L(P,[],!0),this.detach());var S=O.prefix;if(S.indexOf(O.prefix)===0){if(F){E=O;return}R(O)}}}).bind(this)),F=!1,E){var H=E;E=null,R(H)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},T}(),I=function(){function T(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(R,F){return F.exactMatch-R.exactMatch||F.$score-R.$score||(R.caption||R.value).localeCompare(F.caption||F.value)});var L=null;C=C.filter(function(R){var F=R.snippet||R.caption||R.value;return F===L?!1:(L=F,!0)}),this.filtered=C},T.prototype.filterCompletions=function(_,C){var L=[],R=C.toUpperCase(),F=C.toLowerCase();e:for(var E=0,H;H=_[E];E++){if(H.skipFilter){H.$score=H.score,L.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,S=0,A=0,D,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(R[K],O+1);if(D=Z>=0&&(te<0||Z<te)?Z:te,D<0)continue e;B=D-O-1,B>0&&(O===-1&&(A+=10),A+=B,S|=1<<K),O=D}}H.matchMask=S,H.exactMatch=A?0:1,H.$score=(H.score||0)-A,L.push(H)}}return L},T}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=I}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,f){function h(g,s){var a=g.getTextRange(b.fromPoints({row:0,column:0},s));return a.split(u).length-1}function p(g,s){var a=h(g,s),c=g.getValue().split(u),l=Object.create(null),o=c[a];return c.forEach(function(d,m){if(!(!d||d===o)){var w=Math.abs(a-m),x=c.length-w;l[d]?l[d]=Math.max(x,l[d]):l[d]=x}}),l}var b=n("../range").Range,u=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,s,a,c,l){var o=p(s,a),d=Object.keys(o);l(null,d.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,f){var h=n("../snippets").snippetManager,p=n("../autocomplete").Autocomplete,b=n("../config"),u=n("../lib/lang"),g=n("../autocomplete/util"),s=n("../autocomplete/text_completer"),a={getCompletions:function(R,F,E,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(R,F,E,H,P);var O=R.session.getState(E.row),S=F.$mode.getCompletions(O,F,E,H);S=S.map(function(A){return A.completerId=a.id,A}),P(null,S)},id:"keywordCompleter"},c=function(R){var F={};return R.replace(/\${(\d+)(:(.*?))?}/g,function(E,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(E,H){return F[H]})},l={getCompletions:function(R,F,E,H,P){var O=[],S=F.getTokenAt(E.row,E.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=h.getActiveScopes(R);var A=h.snippetMap,D=[];O.forEach(function(B){for(var U=A[B]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&D.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:l.id})}},this),P(null,D)},getDocTooltip:function(R){R.snippet&&!R.docHTML&&(R.docHTML=["<b>",u.escapeHTML(R.caption),"</b>","<hr></hr>",u.escapeHTML(c(R.snippet))].join(""))},id:"snippetCompleter"},o=[l,s,a];r.setCompleters=function(R){o.length=0,R&&o.push.apply(o,R)},r.addCompleter=function(R){o.push(R)},r.textCompleter=s,r.keyWordCompleter=a,r.snippetCompleter=l;var d={name:"expandSnippet",exec:function(R){return h.expandWithTab(R)},bindKey:"Tab"},m=function(R,F){w(F.session.$mode)},w=function(R){typeof R=="string"&&(R=b.$modes[R]),R&&(h.files||(h.files={}),x(R.$id,R.snippetFileId),R.modes&&R.modes.forEach(w))},x=function(R,F){!F||!R||h.files[R]||(h.files[R]={},b.loadModule(F,function(E){E&&(h.files[R]=E,!E.snippets&&E.snippetText&&(E.snippets=h.parseSnippetFile(E.snippetText)),h.register(E.snippets||[],E.scope),E.includeScopes&&(h.snippetMap[E.scope].includeScopes=E.includeScopes,E.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},I=function(R){var F=R.editor,E=F.completer&&F.completer.activated;if(R.command.name==="backspace")E&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(R.command.name==="insertstring"&&!E){T=R;var H=R.editor.$liveAutocompletionDelay;H?_.delay(H):C(R)}},T,_=u.delayedCall(function(){C(T)},0),C=function(R){var F=R.editor,E=g.getCompletionPrefix(F),H=R.args,P=g.triggerAutocomplete(F,H);if(E&&E.length>=F.$liveAutocompletionThreshold||P){var O=p.for(F);O.autoShown=!0,O.showPopup(F)}},L=n("../editor").Editor;n("../config").defineOptions(L.prototype,"editor",{enableBasicAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:o),this.commands.addCommand(p.startCommand)):this.commands.removeCommand(p.startCommand)},value:!1},enableLiveAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:o),this.commands.on("afterExec",I)):this.commands.off("afterExec",I)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(R){R?(this.commands.addCommand(d),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(d),this.off("changeMode",m))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){t&&(t.exports=n)})}()}(ip)),ip.exports}g1();var sp={exports:{}},ap;function m1(){return ap||(ap=1,function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,r,f){f.exports=`
|
1225
|
+
|
1226
|
+
/* ------------------------------------------------------------------------------------------
|
1227
|
+
* Editor Search Form
|
1228
|
+
* --------------------------------------------------------------------------------------- */
|
1229
|
+
.ace_search {
|
1230
|
+
background-color: #ddd;
|
1231
|
+
color: #666;
|
1232
|
+
border: 1px solid #cbcbcb;
|
1233
|
+
border-top: 0 none;
|
1234
|
+
overflow: hidden;
|
1235
|
+
margin: 0;
|
1236
|
+
padding: 4px 6px 0 4px;
|
1237
|
+
position: absolute;
|
1238
|
+
top: 0;
|
1239
|
+
z-index: 99;
|
1240
|
+
white-space: normal;
|
1241
|
+
}
|
1242
|
+
.ace_search.left {
|
1243
|
+
border-left: 0 none;
|
1244
|
+
border-radius: 0px 0px 5px 0px;
|
1245
|
+
left: 0;
|
1246
|
+
}
|
1247
|
+
.ace_search.right {
|
1248
|
+
border-radius: 0px 0px 0px 5px;
|
1249
|
+
border-right: 0 none;
|
1250
|
+
right: 0;
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
.ace_search_form, .ace_replace_form {
|
1254
|
+
margin: 0 20px 4px 0;
|
1255
|
+
overflow: hidden;
|
1256
|
+
line-height: 1.9;
|
1257
|
+
}
|
1258
|
+
.ace_replace_form {
|
1259
|
+
margin-right: 0;
|
1260
|
+
}
|
1261
|
+
.ace_search_form.ace_nomatch {
|
1262
|
+
outline: 1px solid red;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
.ace_search_field {
|
1266
|
+
border-radius: 3px 0 0 3px;
|
1267
|
+
background-color: white;
|
1268
|
+
color: black;
|
1269
|
+
border: 1px solid #cbcbcb;
|
1270
|
+
border-right: 0 none;
|
1271
|
+
outline: 0;
|
1272
|
+
padding: 0;
|
1273
|
+
font-size: inherit;
|
1274
|
+
margin: 0;
|
1275
|
+
line-height: inherit;
|
1276
|
+
padding: 0 6px;
|
1277
|
+
min-width: 17em;
|
1278
|
+
vertical-align: top;
|
1279
|
+
min-height: 1.8em;
|
1280
|
+
box-sizing: content-box;
|
1281
|
+
}
|
1282
|
+
.ace_searchbtn {
|
1283
|
+
border: 1px solid #cbcbcb;
|
1284
|
+
line-height: inherit;
|
1285
|
+
display: inline-block;
|
1286
|
+
padding: 0 6px;
|
1287
|
+
background: #fff;
|
1288
|
+
border-right: 0 none;
|
1289
|
+
border-left: 1px solid #dcdcdc;
|
1290
|
+
cursor: pointer;
|
1291
|
+
margin: 0;
|
1292
|
+
position: relative;
|
1293
|
+
color: #666;
|
1294
|
+
}
|
1295
|
+
.ace_searchbtn:last-child {
|
1296
|
+
border-radius: 0 3px 3px 0;
|
1297
|
+
border-right: 1px solid #cbcbcb;
|
1298
|
+
}
|
1299
|
+
.ace_searchbtn:disabled {
|
1300
|
+
background: none;
|
1301
|
+
cursor: default;
|
1302
|
+
}
|
1303
|
+
.ace_searchbtn:hover {
|
1304
|
+
background-color: #eef1f6;
|
1305
|
+
}
|
1306
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1307
|
+
padding: 0px 0.7em
|
1308
|
+
}
|
1309
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1310
|
+
content: "";
|
1311
|
+
border: solid 2px #888;
|
1312
|
+
width: 0.5em;
|
1313
|
+
height: 0.5em;
|
1314
|
+
border-width: 2px 0 0 2px;
|
1315
|
+
display:inline-block;
|
1316
|
+
transform: rotate(-45deg);
|
1317
|
+
}
|
1318
|
+
.ace_searchbtn.next:after {
|
1319
|
+
border-width: 0 2px 2px 0 ;
|
1320
|
+
}
|
1321
|
+
.ace_searchbtn_close {
|
1322
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1323
|
+
border-radius: 50%;
|
1324
|
+
border: 0 none;
|
1325
|
+
color: #656565;
|
1326
|
+
cursor: pointer;
|
1327
|
+
font: 16px/16px Arial;
|
1328
|
+
padding: 0;
|
1329
|
+
height: 14px;
|
1330
|
+
width: 14px;
|
1331
|
+
top: 9px;
|
1332
|
+
right: 7px;
|
1333
|
+
position: absolute;
|
1334
|
+
}
|
1335
|
+
.ace_searchbtn_close:hover {
|
1336
|
+
background-color: #656565;
|
1337
|
+
background-position: 50% 100%;
|
1338
|
+
color: white;
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
.ace_button {
|
1342
|
+
margin-left: 2px;
|
1343
|
+
cursor: pointer;
|
1344
|
+
-webkit-user-select: none;
|
1345
|
+
-moz-user-select: none;
|
1346
|
+
-o-user-select: none;
|
1347
|
+
-ms-user-select: none;
|
1348
|
+
user-select: none;
|
1349
|
+
overflow: hidden;
|
1350
|
+
opacity: 0.7;
|
1351
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1352
|
+
padding: 1px;
|
1353
|
+
box-sizing: border-box!important;
|
1354
|
+
color: black;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
.ace_button:hover {
|
1358
|
+
background-color: #eee;
|
1359
|
+
opacity:1;
|
1360
|
+
}
|
1361
|
+
.ace_button:active {
|
1362
|
+
background-color: #ddd;
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
.ace_button.checked {
|
1366
|
+
border-color: #3399ff;
|
1367
|
+
opacity:1;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
.ace_search_options{
|
1371
|
+
margin-bottom: 3px;
|
1372
|
+
text-align: right;
|
1373
|
+
-webkit-user-select: none;
|
1374
|
+
-moz-user-select: none;
|
1375
|
+
-o-user-select: none;
|
1376
|
+
-ms-user-select: none;
|
1377
|
+
user-select: none;
|
1378
|
+
clear: both;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
.ace_search_counter {
|
1382
|
+
float: left;
|
1383
|
+
font-family: arial;
|
1384
|
+
padding: 0 8px;
|
1385
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,r,f){var h=n("../lib/dom"),p=n("../lib/lang"),b=n("../lib/event"),u=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,s=n("../lib/keys"),a=n("../config").nls,c=999;h.importCssString(u,"ace_searchbox",!1);var l=function(){function m(w,x,I){this.activeInput,this.element=h.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),h.importCssString(u,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function(T){T.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(I){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(I)}),b.addListener(w,"click",function(I){var T=I.target||I.srcElement,_=T.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),b.stopPropagation(I)}),b.addCommandKeyListener(w,function(I,T,_){var C=s.keyCodeToString(_),L=x.$searchBarKb.findKeyCommand(T,C);L&&L.exec&&(L.exec(x),b.stopEvent(I))}),this.$onChange=p.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){h.setCssClass(this.replaceOption,"checked",this.searchRange),h.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",h.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),h.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),h.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,I){var T=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:I,range:this.searchRange}),_=!T&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,I=x.unicode,T=0,_=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,`
|
1386
|
+
`),w.session.doc.$autoNewLine=`
|
1387
|
+
`);var L=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(L-=w.session.doc.positionToIndex(this.searchRange.start));for(var R=x.lastIndex=0,F;(F=x.exec(C))&&(T++,R=F.index,R<=L&&_++,!(T>c||!F[0]&&(x.lastIndex=R+=p.skipEmptyMatch(C,R,I),R>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[_,T>c?c+"+":T])},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;h.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=p.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),o=new g;o.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()}}),o.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 d=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=d,r.SearchBox=l,r.Search=function(m,w){var x=m.searchBox||new l(m);x.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(sp)),sp.exports}m1();var v1=Object.defineProperty,y1=(t,e,n)=>e in t?v1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e,n)=>y1(t,typeof e!="symbol"?e+"":e,n);function lp(t,e){return function(){return t.apply(e,arguments)}}const{toString:b1}=Object.prototype,{getPrototypeOf:su}=Object,yl=(t=>e=>{const n=b1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oi=t=>(t=t.toLowerCase(),e=>yl(e)===t),bl=t=>e=>typeof e===t,{isArray:Vs}=Array,Ta=bl("undefined");function w1(t){return t!==null&&!Ta(t)&&t.constructor!==null&&!Ta(t.constructor)&&ti(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const cp=Oi("ArrayBuffer");function x1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&cp(t.buffer),e}const C1=bl("string"),ti=bl("function"),up=bl("number"),wl=t=>t!==null&&typeof t=="object",_1=t=>t===!0||t===!1,xl=t=>{if(yl(t)!=="object")return!1;const e=su(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},k1=Oi("Date"),A1=Oi("File"),S1=Oi("Blob"),T1=Oi("FileList"),$1=t=>wl(t)&&ti(t.pipe),M1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ti(t.append)&&((e=yl(t))==="formdata"||e==="object"&&ti(t.toString)&&t.toString()==="[object FormData]"))},I1=Oi("URLSearchParams"),[E1,L1,R1,O1]=["ReadableStream","Request","Response","Headers"].map(Oi),D1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $a(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),Vs(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const h=n?Object.getOwnPropertyNames(t):Object.keys(t),p=h.length;let b;for(r=0;r<p;r++)b=h[r],e.call(null,t[b],b,t)}}function hp(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dp=t=>!Ta(t)&&t!==cs;function au(){const{caseless:t}=dp(this)&&this||{},e={},n=(r,f)=>{const h=t&&hp(e,f)||f;xl(e[h])&&xl(r)?e[h]=au(e[h],r):xl(r)?e[h]=au({},r):Vs(r)?e[h]=r.slice():e[h]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&$a(arguments[r],n);return e}const N1=(t,e,n,{allOwnKeys:r}={})=>($a(e,(f,h)=>{n&&ti(f)?t[h]=lp(f,n):t[h]=f},{allOwnKeys:r}),t),F1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),P1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},W1=(t,e,n,r)=>{let f,h,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),h=f.length;h-- >0;)p=f[h],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&su(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},B1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},j1=t=>{if(!t)return null;if(Vs(t))return t;let e=t.length;if(!up(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},z1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&su(Uint8Array)),H1=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},U1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},V1=Oi("HTMLFormElement"),q1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),fp=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),K1=Oi("RegExp"),pp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$a(n,(f,h)=>{let p;(p=e(f,h,t))!==!1&&(r[h]=p||f)}),Object.defineProperties(t,r)},G1=t=>{pp(t,(e,n)=>{if(ti(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ti(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Y1=(t,e)=>{const n={},r=f=>{f.forEach(h=>{n[h]=!0})};return Vs(t)?r(t):r(String(t).split(e)),n},X1=()=>{},Q1=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Z1(t){return!!(t&&ti(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const J1=t=>{const e=new Array(10),n=(r,f)=>{if(wl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const h=Vs(r)?[]:{};return $a(r,(p,b)=>{const u=n(p,f+1);!Ta(u)&&(h[b]=u)}),e[f]=void 0,h}}return r};return n(t,0)},ex=Oi("AsyncFunction"),tx=t=>t&&(wl(t)||ti(t))&&ti(t.then)&&ti(t.catch),gp=((t,e)=>t?setImmediate:e?((n,r)=>(cs.addEventListener("message",({source:f,data:h})=>{f===cs&&h===n&&r.length&&r.shift()()},!1),f=>{r.push(f),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ti(cs.postMessage)),nx=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||gp,Se={isArray:Vs,isArrayBuffer:cp,isBuffer:w1,isFormData:M1,isArrayBufferView:x1,isString:C1,isNumber:up,isBoolean:_1,isObject:wl,isPlainObject:xl,isReadableStream:E1,isRequest:L1,isResponse:R1,isHeaders:O1,isUndefined:Ta,isDate:k1,isFile:A1,isBlob:S1,isRegExp:K1,isFunction:ti,isStream:$1,isURLSearchParams:I1,isTypedArray:z1,isFileList:T1,forEach:$a,merge:au,extend:N1,trim:D1,stripBOM:F1,inherits:P1,toFlatObject:W1,kindOf:yl,kindOfTest:Oi,endsWith:B1,toArray:j1,forEachEntry:H1,matchAll:U1,isHTMLForm:V1,hasOwnProperty:fp,hasOwnProp:fp,reduceDescriptors:pp,freezeMethods:G1,toObjectSet:Y1,toCamelCase:q1,noop:X1,toFiniteNumber:Q1,findKey:hp,global:cs,isContextDefined:dp,isSpecCompliantForm:Z1,toJSONObject:J1,isAsyncFn:ex,isThenable:tx,setImmediate:gp,asap:nx};function Lt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Se.inherits(Lt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const mp=Lt.prototype,vp={};["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(t=>{vp[t]={value:t}}),Object.defineProperties(Lt,vp),Object.defineProperty(mp,"isAxiosError",{value:!0}),Lt.from=(t,e,n,r,f,h)=>{const p=Object.create(mp);return Se.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,h&&Object.assign(p,h),p};const rx=null;function lu(t){return Se.isPlainObject(t)||Se.isArray(t)}function yp(t){return Se.endsWith(t,"[]")?t.slice(0,-2):t}function bp(t,e,n){return t?t.concat(e).map(function(r,f){return r=yp(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function ix(t){return Se.isArray(t)&&!t.some(lu)}const ox=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function Cl(t,e,n){if(!Se.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Se.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,h=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function u(l){if(l===null)return"";if(Se.isDate(l))return l.toISOString();if(!b&&Se.isBlob(l))throw new Lt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(l)||Se.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,d){let m=l;if(l&&!d&&typeof l=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Se.isArray(l)&&ix(l)||(Se.isFileList(l)||Se.endsWith(o,"[]"))&&(m=Se.toArray(l)))return o=yp(o),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(p===!0?bp([o],x,h):p===null?o:o+"[]",u(w))}),!1}return lu(l)?!0:(e.append(bp(d,o,h),u(l)),!1)}const s=[],a=Object.assign(ox,{defaultVisitor:g,convertValue:u,isVisitable:lu});function c(l,o){if(!Se.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Se.forEach(l,function(d,m){(!(Se.isUndefined(d)||d===null)&&f.call(e,d,Se.isString(m)?m.trim():m,o,a))===!0&&c(d,o?o.concat(m):[m])}),s.pop()}}if(!Se.isObject(t))throw new TypeError("data must be an object");return c(t),e}function wp(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function cu(t,e){this._pairs=[],t&&Cl(t,this,e)}const xp=cu.prototype;xp.append=function(t,e){this._pairs.push([t,e])},xp.toString=function(t){const e=t?function(n){return t.call(this,n,wp)}:wp;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function sx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cp(t,e,n){if(!e)return t;const r=n&&n.encode||sx;Se.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let h;if(f?h=f(e,n):h=Se.isURLSearchParams(e)?e.toString():new cu(e,n).toString(r),h){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+h}return t}class _p{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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(n){n!==null&&e(n)})}}const kp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ax=typeof URLSearchParams<"u"?URLSearchParams:cu,lx=typeof FormData<"u"?FormData:null,cx=typeof Blob<"u"?Blob:null,ux={isBrowser:!0,classes:{URLSearchParams:ax,FormData:lx,Blob:cx},protocols:["http","https","file","blob","url","data"]},uu=typeof window<"u"&&typeof document<"u",hu=typeof navigator=="object"&&navigator||void 0,hx=uu&&(!hu||["ReactNative","NativeScript","NS"].indexOf(hu.product)<0),dx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fx=uu&&window.location.href||"http://localhost",px=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uu,hasStandardBrowserEnv:hx,hasStandardBrowserWebWorkerEnv:dx,navigator:hu,origin:fx},Symbol.toStringTag,{value:"Module"})),Ar={...px,...ux};function gx(t,e){return Cl(t,new Ar.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,h){return Ar.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)}},e))}function mx(t){return Se.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function vx(t){const e={},n=Object.keys(t);let r;const f=n.length;let h;for(r=0;r<f;r++)h=n[r],e[h]=t[h];return e}function Ap(t){function e(n,r,f,h){let p=n[h++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),u=h>=n.length;return p=!p&&Se.isArray(f)?f.length:p,u?(Se.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Se.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],h)&&Se.isArray(f[p])&&(f[p]=vx(f[p])),!b)}if(Se.isFormData(t)&&Se.isFunction(t.entries)){const n={};return Se.forEachEntry(t,(r,f)=>{e(mx(r),f,n,0)}),n}return null}function yx(t,e,n){if(Se.isString(t))try{return(e||JSON.parse)(t),Se.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ma={transitional:kp,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Se.isObject(t);if(f&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return r?JSON.stringify(Ap(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t)||Se.isReadableStream(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return gx(t,this.formSerializer).toString();if((h=Se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Cl(h?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),yx(t)):t}],transformResponse:[function(t){const e=this.transitional||Ma.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(t)||Se.isReadableStream(t))return t;if(t&&Se.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(h){if(f)throw h.name==="SyntaxError"?Lt.from(h,Lt.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ar.classes.FormData,Blob:Ar.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],t=>{Ma.headers[t]={}});const bx=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"]),wx=t=>{const e={};let n,r,f;return t&&t.split(`
|
1388
|
+
`).forEach(function(h){f=h.indexOf(":"),n=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim(),!(!n||e[n]&&bx[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Sp=Symbol("internals");function Ia(t){return t&&String(t).trim().toLowerCase()}function _l(t){return t===!1||t==null?t:Se.isArray(t)?t.map(_l):String(t)}function xx(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Cx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function du(t,e,n,r,f){if(Se.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function _x(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function kx(t,e){const n=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,h,p){return this[r].call(this,e,f,h,p)},configurable:!0})})}let Vr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function f(p,b,u){const g=Ia(b);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||u===!0||u===void 0&&r[s]!==!1)&&(r[s||b]=_l(p))}const h=(p,b)=>Se.forEach(p,(u,g)=>f(u,g,b));if(Se.isPlainObject(t)||t instanceof this.constructor)h(t,e);else if(Se.isString(t)&&(t=t.trim())&&!Cx(t))h(wx(t),e);else if(Se.isHeaders(t))for(const[p,b]of t.entries())f(b,p,n);else t!=null&&f(e,t,n);return this}get(t,e){if(t=Ia(t),t){const n=Se.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return xx(r);if(Se.isFunction(e))return e.call(this,r,n);if(Se.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ia(t),t){const n=Se.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||du(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function f(h){if(h=Ia(h),h){const p=Se.findKey(n,h);p&&(!e||du(n,n[p],p,e))&&(delete n[p],r=!0)}}return Se.isArray(t)?t.forEach(f):f(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const f=e[n];(!t||du(this,this[f],f,t,!0))&&(delete this[f],r=!0)}return r}normalize(t){const e=this,n={};return Se.forEach(this,(r,f)=>{const h=Se.findKey(n,f);if(h){e[h]=_l(r),delete e[f];return}const p=t?_x(f):String(f).trim();p!==f&&delete e[f],e[p]=_l(r),n[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Se.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&Se.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
1389
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Sp]=this[Sp]={accessors:{}}).accessors,n=this.prototype;function r(f){const h=Ia(f);e[h]||(kx(n,f),e[h]=!0)}return Se.isArray(t)?t.forEach(r):r(t),this}};Vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Vr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Se.freezeMethods(Vr);function fu(t,e){const n=this||Ma,r=e||n,f=Vr.from(r.headers);let h=r.data;return Se.forEach(t,function(p){h=p.call(n,h,f.normalize(),e?e.status:void 0)}),f.normalize(),h}function Tp(t){return!!(t&&t.__CANCEL__)}function qs(t,e,n){Lt.call(this,t??"canceled",Lt.ERR_CANCELED,e,n),this.name="CanceledError"}Se.inherits(qs,Lt,{__CANCEL__:!0});function $p(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ax(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Sx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,h=0,p;return e=e!==void 0?e:1e3,function(b){const u=Date.now(),g=r[h];p||(p=u),n[f]=b,r[f]=u;let s=h,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===h&&(h=(h+1)%t),u-p<e)return;const c=g&&u-g;return c?Math.round(a*1e3/c):void 0}}function Tx(t,e){let n=0,r=1e3/e,f,h;const p=(b,u=Date.now())=>{n=u,f=null,h&&(clearTimeout(h),h=null),t.apply(null,b)};return[(...b)=>{const u=Date.now(),g=u-n;g>=r?p(b,u):(f=b,h||(h=setTimeout(()=>{h=null,p(f)},r-g)))},()=>f&&p(f)]}const kl=(t,e,n=3)=>{let r=0;const f=Sx(50,250);return Tx(h=>{const p=h.loaded,b=h.lengthComputable?h.total:void 0,u=p-r,g=f(u),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:u,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:h,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Mp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ip=t=>(...e)=>Se.asap(()=>t(...e)),$x=Ar.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Ar.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Ar.origin),Ar.navigator&&/(msie|trident)/i.test(Ar.navigator.userAgent)):()=>!0,Mx=Ar.hasStandardBrowserEnv?{write(t,e,n,r,f,h){const p=[t+"="+encodeURIComponent(e)];Se.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&p.push("path="+r),Se.isString(f)&&p.push("domain="+f),h===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ix(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ex(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ep(t,e,n){let r=!Ix(e);return t&&(r||n==!1)?Ex(t,e):e}const Lp=t=>t instanceof Vr?{...t}:t;function us(t,e){e=e||{};const n={};function r(g,s,a,c){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:c},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function f(g,s,a,c){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function h(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function p(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const u={url:h,method:h,data:h,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Lp(g),Lp(s),a,!0)};return Se.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=u[g]||f,a=s(t[g],e[g],g);Se.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Rp=t=>{const e=us({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:h,headers:p,auth:b}=e;e.headers=p=Vr.from(p),e.url=Cp(Ep(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let u;if(Se.isFormData(n)){if(Ar.hasStandardBrowserEnv||Ar.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((u=p.getContentType())!==!1){const[g,...s]=u?u.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Ar.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&$x(e.url))){const g=f&&h&&Mx.read(h);g&&p.set(f,g)}return e},Lx=typeof XMLHttpRequest<"u",Rx=Lx&&function(t){return new Promise(function(e,n){const r=Rp(t);let f=r.data;const h=Vr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:u}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function m(){if(!d)return;const x=Vr.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),I={data:!p||p==="text"||p==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:x,config:t,request:d};$p(function(T){e(T),o()},function(T){n(T),o()},I),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(n(new Lt("Request aborted",Lt.ECONNABORTED,t,d)),d=null)},d.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||kp;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Lt(x,I.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,d)),d=null},f===void 0&&h.setContentType(null),"setRequestHeader"in d&&Se.forEach(h.toJSON(),function(x,I){d.setRequestHeader(I,x)}),Se.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),p&&p!=="json"&&(d.responseType=r.responseType),u&&([a,l]=kl(u,!0),d.addEventListener("progress",a)),b&&d.upload&&([s,c]=kl(b),d.upload.addEventListener("progress",s),d.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{d&&(n(!x||x.type?new qs(null,t,d):x),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Ax(r.url);if(w&&Ar.protocols.indexOf(w)===-1){n(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,t));return}d.send(f||null)})},Ox=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const h=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Lt?s:new qs(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,h(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(h):g.removeEventListener("abort",h)}),t=null)};t.forEach(g=>g.addEventListener("abort",h));const{signal:u}=r;return u.unsubscribe=()=>Se.asap(b),u}},Dx=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},Nx=async function*(t,e){for await(const n of Fx(t))yield*Dx(n,e)},Fx=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Op=(t,e,n,r)=>{const f=Nx(t,e);let h=0,p,b=u=>{p||(p=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:g,value:s}=await f.next();if(g){b(),u.close();return}let a=s.byteLength;if(n){let c=h+=a;n(c)}u.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(u){return b(u),f.return()}},{highWaterMark:2})},Al=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Dp=Al&&typeof ReadableStream=="function",Px=Al&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Np=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Wx=Dp&&Np(()=>{let t=!1;const e=new Request(Ar.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Fp=64*1024,pu=Dp&&Np(()=>Se.isReadableStream(new Response("").body)),Sl={stream:pu&&(t=>t.body)};Al&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Sl[e]&&(Sl[e]=Se.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const Bx=async t=>{if(t==null)return 0;if(Se.isBlob(t))return t.size;if(Se.isSpecCompliantForm(t))return(await new Request(Ar.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(t)||Se.isArrayBuffer(t))return t.byteLength;if(Se.isURLSearchParams(t)&&(t=t+""),Se.isString(t))return(await Px(t)).byteLength},jx=async(t,e)=>Se.toFiniteNumber(t.getContentLength())??Bx(e),zx=Al&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:h,timeout:p,onDownloadProgress:b,onUploadProgress:u,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Rp(t);g=g?(g+"").toLowerCase():"text";let l=Ox([f,h&&h.toAbortSignal()],p),o;const d=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(u&&Wx&&n!=="get"&&n!=="head"&&(m=await jx(s,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[L,R]=Mp(m,kl(Ip(u)));r=Op(_.body,Fp,L,R)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const I=pu&&(g==="stream"||g==="response");if(pu&&(b||I&&d)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=x[F]});const C=Se.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Mp(C,kl(Ip(b),!0))||[];x=new Response(Op(x.body,Fp,L,()=>{R&&R(),d&&d()}),_)}g=g||"text";let T=await Sl[Se.findKey(Sl,g)||"text"](x,t);return!I&&d&&d(),await new Promise((_,C)=>{$p(_,C,{data:T,headers:Vr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw d&&d(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,t,o),{cause:w.cause||w}):Lt.from(w,w&&w.code,t,o)}}),gu={http:rx,xhr:Rx,fetch:zx};Se.forEach(gu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Pp=t=>`- ${t}`,Hx=t=>Se.isFunction(t)||t===null||t===!1,Wp={getAdapter:t=>{t=Se.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let h=0;h<e;h++){n=t[h];let p;if(r=n,!Hx(n)&&(r=gu[(p=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+h]=r}if(!r){const h=Object.entries(f).map(([b,u])=>`adapter ${b} `+(u===!1?"is not supported by the environment":"is not available in the build"));let p=e?h.length>1?`since :
|
1390
|
+
`+h.map(Pp).join(`
|
1391
|
+
`):" "+Pp(h[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:gu};function mu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qs(null,t)}function Bp(t){return mu(t),t.headers=Vr.from(t.headers),t.data=fu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wp.getAdapter(t.adapter||Ma.adapter)(t).then(function(e){return mu(t),e.data=fu.call(t,t.transformResponse,e),e.headers=Vr.from(e.headers),e},function(e){return Tp(e)||(mu(t),e&&e.response&&(e.response.data=fu.call(t,t.transformResponse,e.response),e.response.headers=Vr.from(e.response.headers))),Promise.reject(e)})}const jp="1.8.4",Tl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Tl[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const zp={};Tl.transitional=function(t,e,n){function r(f,h){return"[Axios v"+jp+"] Transitional option '"+f+"'"+h+(n?". "+n:"")}return(f,h,p)=>{if(t===!1)throw new Lt(r(h," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!zp[h]&&(zp[h]=!0,console.warn(r(h," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,h,p):!0}},Tl.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Ux(t,e,n){if(typeof t!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const h=r[f],p=e[h];if(p){const b=t[h],u=b===void 0||p(b,h,t);if(u!==!0)throw new Lt("option "+h+" must be "+u,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+h,Lt.ERR_BAD_OPTION)}}const $l={assertOptions:Ux,validators:Tl},Qi=$l.validators;let hs=class{constructor(t){this.defaults=t,this.interceptors={request:new _p,response:new _p}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const f=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?f&&!String(n.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
1392
|
+
`+f):n.stack=f}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=us(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:f}=e;n!==void 0&&$l.assertOptions(n,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),r!=null&&(Se.isFunction(r)?e.paramsSerializer={serialize:r}:$l.assertOptions(r,{encode:Qi.function,serialize:Qi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),$l.assertOptions(e,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let h=f&&Se.merge(f.common,f[e.method]);f&&Se.forEach(["delete","get","head","post","put","patch","common"],l=>{delete f[l]}),e.headers=Vr.concat(h,f);const p=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,p.unshift(l.fulfilled,l.rejected))});const u=[];this.interceptors.response.forEach(function(l){u.push(l.fulfilled,l.rejected)});let g,s=0,a;if(!b){const l=[Bp.bind(this),void 0];for(l.unshift.apply(l,p),l.push.apply(l,u),a=l.length,g=Promise.resolve(e);s<a;)g=g.then(l[s++],l[s++]);return g}a=p.length;let c=e;for(s=0;s<a;){const l=p[s++],o=p[s++];try{c=l(c)}catch(d){o.call(this,d);break}}try{g=Bp.call(this,c)}catch(l){return Promise.reject(l)}for(s=0,a=u.length;s<a;)g=g.then(u[s++],u[s++]);return g}getUri(t){t=us(this.defaults,t);const e=Ep(t.baseURL,t.url,t.allowAbsoluteUrls);return Cp(e,t.params,t.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(e,n){return this.request(us(n||{},{method:t,url:e,data:(n||{}).data}))}}),Se.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,h){return this.request(us(h||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}hs.prototype[t]=e(),hs.prototype[t+"Form"]=e(!0)});let Vx=class qb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](f);r._listeners=null}),this.promise.then=f=>{let h;const p=new Promise(b=>{r.subscribe(b),h=b}).then(f);return p.cancel=function(){r.unsubscribe(h)},p},e(function(f,h,p){r.reason||(r.reason=new qs(f,h,p),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new qb(function(n){e=n}),cancel:e}}};function qx(t){return function(e){return t.apply(null,e)}}function Kx(t){return Se.isObject(t)&&t.isAxiosError===!0}const vu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vu).forEach(([t,e])=>{vu[e]=t});function Hp(t){const e=new hs(t),n=lp(hs.prototype.request,e);return Se.extend(n,hs.prototype,e,{allOwnKeys:!0}),Se.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Hp(us(t,r))},n}const Vn=Hp(Ma);Vn.Axios=hs,Vn.CanceledError=qs,Vn.CancelToken=Vx,Vn.isCancel=Tp,Vn.VERSION=jp,Vn.toFormData=Cl,Vn.AxiosError=Lt,Vn.Cancel=Vn.CanceledError,Vn.all=function(t){return Promise.all(t)},Vn.spread=qx,Vn.isAxiosError=Kx,Vn.mergeConfig=us,Vn.AxiosHeaders=Vr,Vn.formToJSON=t=>Ap(Se.isHTMLForm(t)?new FormData(t):t),Vn.getAdapter=Wp.getAdapter,Vn.HttpStatusCode=vu,Vn.default=Vn;const{Axios:qD,AxiosError:KD,CanceledError:GD,isCancel:YD,CancelToken:XD,VERSION:QD,all:ZD,Cancel:JD,isAxiosError:eN,spread:tN,toFormData:nN,AxiosHeaders:rN,HttpStatusCode:iN,formToJSON:oN,getAdapter:sN,mergeConfig:aN}=Vn,yu=Vn.create({baseURL:location.origin,timeout:6e4,params:{}});yu.interceptors.response.use(t=>t,t=>{var e,n,r,f,h,p,b,u,g,s,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let c=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(c+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(c+=`${t.response.config.data} `),(h=(f=t.response)==null?void 0:f.data)!=null&&h.message?c+=`${t.response.data.message}`:(b=(p=t.response)==null?void 0:p.data)!=null&&b.exception?c+=`${t.response.data.exception}`:(s=(g=(u=t.response)==null?void 0:u.data)==null?void 0:g.error)!=null&&s.message?(t.response.data.error.class&&(c+=`${t.response.data.error.class} `),c+=`${t.response.data.error.message}`):c+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:c}),t}else throw t});const Ml=async function(t,e,{data:n,params:r={},headers:f,noAuth:h=!1,noScope:p=!1,onUploadProgress:b=!1}={}){if(!h){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),yu({method:t,url:e,data:n,params:r,headers:f,onUploadProgress:b})},bu={Accept:"application/json"},Up={...bu,"Content-Type":"application/json"},Gx=sr("O",{get:function(t,{params:e,headers:n=bu,noScope:r,noAuth:f,onUploadProgress:h}={}){return Ml("get",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:h})},put:function(t,{data:e,params:n,headers:r=Up,noScope:f,noAuth:h,onUploadProgress:p}={}){return Ml("put",t,{data:e,params:n,headers:r,noScope:f,noAuth:h,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Up,noScope:f,noAuth:h,onUploadProgress:p}={}){return Ml("post",t,{data:e,params:n,headers:r,noScope:f,noAuth:h,onUploadProgress:p})},delete:function(t,{params:e,headers:n=bu,noScope:r,noAuth:f,onUploadProgress:h}={}){return Ml("delete",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:h})}});let Il=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,f=n.length;r<f;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(f=>e!==f)}}});class Ea extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class wu extends Ea{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Yx extends Ea{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Di extends Ea{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class Xx extends Di{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Vp(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class Qx{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,n){if(!this._info)return this._info={id:e,info:n},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((n,{id:r,info:f})=>(n[r]=f,n),{})}}const ds=Symbol("state");class qp{constructor(e={}){this.emitter=Il(),this.params=Object.freeze(e),this.presence=new Qx(this),this.initialConnect=!0,this[ds]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Vp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ds]}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[ds]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ds]="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[ds]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ds]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ds]="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,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}emit(e,...n){return this.emitter.emit(e,...n)}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,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(f=>f()),e()})),r.push(this.on("close",f=>{r.forEach(h=>h()),n(f||new Ea("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Zx{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 n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.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 n,r={promise:new Promise(h=>{n=h}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},f=this._pendingTop;return this._pendings.push(r),f&&await f.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 n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class Jx{constructor(){this.queue=[]}async acquire(e,n){n==="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 eC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new Jx),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let f=this._subscriptions[e]=new Zx(e);return f.remoteId=this._localToRemote[e],f.subscriber=n,f.unsubscriber=r,f.gvl=this.glv,f}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class tC{constructor(e={}){this.subscriptions=new eC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let f=this._remoteToLocal[e];if(!f){this._pendingMessages.push([e,n,r]);return}let h=this.subscriptions.get(f);h&&h.channels.forEach(p=>{p.receive(n,r)})}notify(e,n,r){let f=this._remoteToLocal[e];if(!f)return;let h=this.subscriptions.get(f);h&&h.channels.forEach(p=>p.emit(n,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 n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Kp={debug:0,info:1,warn:2,error:3};class Gp{constructor(e){this.level=e||"warn"}log(e,n,r){Kp[e]<Kp[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class La extends Gp{writeLogEntry(){}}class nC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let rC=0;class Yp{constructor(e={}){let{logger:n}=e;this.logger=n||new La,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let f=Vp(r);if(this.pendingUnsubscriptions[f]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,f),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let h=this.subscribeRetryInterval;return new Promise((p,b)=>{let u=++rC;this.pendingSubscriptions[f]={resolve:p,reject:b,id:u},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(u,f,h)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(delete this.pendingSubscriptions[n],f.reject(new Yx(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},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,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f,reason:h,reconnect:p}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(n==="disconnect"){let b=new Di(h);this.reset(b),p===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new wu)):this.logger.error("subscription not found",{type:n,identifier:r})}if(f)return{identifier:r,message:f};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Xp=()=>Date.now()/1e3|0;class iC extends Yp{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Xp()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f}=e;if(n==="disconnect"||n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Xp()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),e.restored){let h=e.restored_ids||Object.keys(this.subscriptionStreams);for(let p of h)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(h)}return this.cable.connected(this.sessionId)}if(n==="presence"){let h=f.type;if(h==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(f))}else if(h==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:f}}if(f){let h=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:f,meta:h}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){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,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let f=this.presenceInfo[e];return f&&(n.presence=f),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let f of this.subscriptionStreams[e]){let h=this.streamsPositions[f];h&&(r=!0,n[f]=h)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,f){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:f},{stream:n,epoch:r,offset:f}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,f)=>{this.pendingPresence[e]={resolve:r,reject:f},this.cable.send({command:"presence",identifier:e,data:n})})}}class oC extends Ea{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class xu extends qp{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}vl(xu,"identifier","__ghost__");const sC="$pubsub";class Cu extends qp{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}vl(Cu,"identifier",sC);const fs=Symbol("state");let aC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:f,hubOptions:h,performFailures:p,transportConfigurator:b}){this.emitter=Il(),this.transport=t,this.encoder=n,this.logger=r||new La,this.protocol=e,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new tC(h||{}),this[fs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,f===!1&&this.connect().catch(()=>{})}get state(){return this[fs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[fs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[fs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Di("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[fs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Di("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Di(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[fs]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof Di?t:new Di(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[fs]="closed";let n=e||new Di("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:f,message:h,meta:p}=n;r?this.hub.notify(f,r,h):this.hub.transmit(f,h,p)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new Cu({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Cu({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=xu),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.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 f=await t.acquire("subscribed");if(f.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),f.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),f.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),f.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),f.release();return}let h={identifier:e,params:n};this.logger.debug("subscribing",h);try{let p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...h,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof wu&&this.logger.warn("rejected",h),p instanceof Di){this.logger.debug("disconnected during subscription; will retry on connect",h),f.release();return}this.logger.error("failed to subscribe",{error:p,...h})}t.close(p),this.hub.unsubscribe(r)}f.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(f){f&&(f instanceof Di?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:f}):this.logger.error("unsubscribe failed",{id:e,error:f}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new oC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let f=r.remoteId,h={id:f,action:e,payload:n};this.logger.debug("perform",h);try{let p=await this.protocol.perform(f,e,n);return p&&this.logger.debug("perform result",{message:p,request:h}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:h}),p}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(f=>f()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(f=>f()),e(r)}))}),this._pendingConnect)}};const lC={maxMissingPings:2,maxReconnectAttempts:1/0},Ks=()=>Date.now(),Qp=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:f}=e;return n=n||2,r===void 0&&(r=.5),h=>{let p=t*n**h,b=p*n,u=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return u=u*(1+g),f&&f<u&&(u=f),u}};let Zp=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},lC,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 La,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Ks()}watch(t){this.target=t,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(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Ks(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Ks(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Ks(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Ks()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=Ks()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Xx))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class cC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Il(),this.unbind=[],this.logger=n.logger||new La}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.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,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});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 uC{constructor(e,n={}){this.url=e;let r=n.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=Il();let{format:f,subprotocol:h,authStrategy:p}=n;this.format=f||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=h}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((n,r)=>{let f=[];f.push(this.once("open",()=>{f.forEach(h=>h()),n()})),f.push(this.once("close",()=>{f.forEach(h=>h()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let f=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(f)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(f=>f.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,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});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 n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},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 Jp={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function hC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Jp,e);let{protocol:n,websocketImplementation:r,websocketFormat:f,websocketOptions:h,websocketAuthStrategy:p,fallbacks:b,logLevel:u,logger:g,transport:s,encoder:a,lazy:c,monitor:l,pingInterval:o,reconnectStrategy:d,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:I,historyTimestamp:T,protocolOptions:_,concurrentSubscribes:C,performFailures:L,transportConfigurator:R,auth:F}=e;if(g=g||new La(u),typeof n=="string"){x=x||n;let P=n.substring(0,n.lastIndexOf("-")),O=n.substring(n.lastIndexOf("-")+1);if(_=_||{},P==="actioncable-v1")n=new Yp({logger:g,..._});else if(P==="actioncable-v1-ext")n=new iC({logger:g,historyTimestamp:T,..._});else throw Error(`Protocol is not supported yet: ${n}`);if(O==="json")a=a||new nC,f=f||"text";else if(O==="msgpack"){if(f="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(f=f||"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: ${n}`)}if(!n)throw Error("Protocol must be specified");s=s||new uC(t,{websocketImplementation:r,websocketOptions:h,subprotocol:x,authStrategy:p,format:f}),b&&(s=new cC([s,...b],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),d=d||Qp(o),l!==!1&&(l=l||new Zp({pingInterval:o,reconnectStrategy:d,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let E={concurrentSubscribes:C},H=new aC({protocol:n,transport:s,encoder:a,logger:g,lazy:c,hubOptions:E,performFailures:L,transportConfigurator:R});return l&&(l.watch(H),H.monitor=l),I&&dC(H,async()=>{try{await I(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function dC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class fC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class pC extends xu{constructor(e,n,r){super(e,n),this.subscription=new fC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:f})=>this.subscription.notify("connected",{reconnected:f})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",f=>this.subscription.notify("received",f)),this.on("close",f=>{f&&f instanceof wu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class gC{constructor(e){this.cable=e}create(e,n){let r,f;typeof e=="object"?(r=e.channel,delete e.channel,f=e):(r=e,f={});let h=new pC(r,f,n);return h.subscription.notify("initialized"),this.cable.subscribe(h),h.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class mC{constructor(e){this.cable=e,this.subscriptions=new gC(e)}}class vC extends Gp{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class yC extends Zp{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")},n=f=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:f})},r=()=>this.disconnect(new Di("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!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 bC=["cable","action-cable"],wC="/cable",El=(t,e)=>{for(let n of bC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},eg=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,xC=()=>{if(typeof document<"u"&&document.head){let t=El(document,"url");if(t)return eg(t)}return eg(wC)},CC=()=>{if(typeof document<"u"&&document.head){let t=El(document,"history-timestamp");if(t)return t|0}},_C=()=>{if(typeof document<"u"&&document.head)return El(document,"token")},kC=()=>{if(typeof document<"u"&&document.head)return El(document,"token-param")};function AC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||xC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=CC());let n=_C();if(n){let g=kC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},Jp,e);let{logLevel:r,logger:f,pingInterval:h,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:u}=e;return f=e.logger=e.logger||new vC(r),p=e.reconnectStrategy=e.reconnectStrategy||Qp(h),e.monitor!==!1&&(e.monitor=e.monitor||new yC({pingInterval:h,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:u,logger:f})),hC(t,e)}function SC(t,e){let n=AC(t,e);return new mC(n)}class TC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},f={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(h=>{if(h&&OpenC3Auth.setTokens(),this._cable==null){let p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=SC(p)}return this._cable.subscriptions.create({channel:e,...f},r)})}recordPing(){}}sr("D",TC);class $C{constructor(e,n,r="",f=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=f}}sr("b",$C);function _u(t){return MC.test(t)}const MC=/^-?[0-9]+$/;function tg(t){return IC.test(t)}const IC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ng(t,e){const n=Number.parseFloat(t),r=String(n),f=rg(t),h=rg(r);return!!(f===h||(e==null?void 0:e.approx)===!0&&!_u(t)&&h.length>=14&&f.startsWith(h.substring(0,14)))}let Ra=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function EC(t){if(ng(t,{approx:!1}))return;if(_u(t))return Ra.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Ra.underflow:Ra.truncate_float:Ra.overflow}function rg(t){return t.replace(LC,"").replace(OC,"").replace(DC,"").replace(RC,"")}const LC=/[eE][+-]?\d+$/,RC=/^-?(0*)?/,OC=/\./,DC=/0+$/;class NC{constructor(e){if(vl(this,"isLosslessNumber",!0),!tg(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=EC(this.value);if(e===void 0||e===Ra.truncate_float)return Number.parseFloat(this.value);if(_u(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 FC(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function PC(t){return new NC(t)}function WC(t,e){return ku({"":t},"",t,e)}function ku(t,e,n,r){return Array.isArray(n)?r.call(t,e,jC(n,r)):n&&typeof n=="object"&&!FC(n)?r.call(t,e,BC(n,r)):r.call(t,e,n)}function BC(t,e){for(const n of Object.keys(t)){const r=ku(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function jC(t,e){for(let n=0;n<t.length;n++)t[n]=ku(t,String(n),t[n],e);return t}function zC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:PC,r=0;const f=b();return o(f),m(),e?WC(f,e):f;function h(){if(t.charCodeAt(r)===GC){r++,g();const S={};let A=!0;for(;r<t.length&&t.charCodeAt(r)!==og;){A?A=!1:(c(),g());const D=r,B=s();if(B===void 0){I();return}g(),l();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(S,B)&&!Au(U,S[B])&&T(B,D+1),S[B]=U}return t.charCodeAt(r)!==og&&_(),r++,S}}function p(){if(t.charCodeAt(r)===YC){r++,g();const S=[];let A=!0;for(;r<t.length&&t.charCodeAt(r)!==sg;){A?A=!1:c();const D=b();d(D),S.push(D)}return t.charCodeAt(r)!==sg&&C(),r++,S}}function b(){g();const S=s()??a()??h()??p()??u("true",!0)??u("false",!1)??u("null",null);return g(),S}function u(S,A){if(t.slice(r,r+S.length)===S)return r+=S.length,A}function g(){for(;HC(t.charCodeAt(r));)r++}function s(){if(t.charCodeAt(r)===Su){r++;let S="";for(;r<t.length&&t.charCodeAt(r)!==Su;){if(t.charCodeAt(r)===KC){const A=t[r+1],D=qC[A];D!==void 0?(S+=D,r++):A==="u"?Ll(t.charCodeAt(r+2))&&Ll(t.charCodeAt(r+3))&&Ll(t.charCodeAt(r+4))&&Ll(t.charCodeAt(r+5))?(S+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):E(r):R(r)}else VC(t.charCodeAt(r))?S+=t[r]:L(t[r]);r++}return x(),r++,S}}function a(){const S=r;if(t.charCodeAt(r)===ag&&(r++,w(S)),t.charCodeAt(r)===Tu)r++;else if(UC(t.charCodeAt(r)))for(r++;Rl(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===r_)for(r++,w(S);Rl(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===l_||t.charCodeAt(r)===a_)for(r++,(t.charCodeAt(r)===ag||t.charCodeAt(r)===e_)&&r++,w(S);Rl(t.charCodeAt(r));)r++;if(r>S)return n(t.slice(S,r))}function c(){if(t.charCodeAt(r)!==n_)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(t.charCodeAt(r)!==i_)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function d(S){if(S===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(S){if(!Rl(t.charCodeAt(r))){const A=t.slice(S,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function x(){if(t.charCodeAt(r)!==Su)throw new SyntaxError(`End of string '"' expected ${O()}`)}function I(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(S,A){throw new SyntaxError(`Duplicate key '${S}' encountered at position ${A}`)}function _(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function L(S){throw new SyntaxError(`Invalid character '${S}' ${H()}`)}function R(S){const A=t.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function E(S){const A=t.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function HC(t){return t===XC||t===QC||t===ZC||t===JC}function Ll(t){return t>=Tu&&t<=$u||t>=o_&&t<=c_||t>=s_&&t<=u_}function Rl(t){return t>=Tu&&t<=$u}function UC(t){return t>=t_&&t<=$u}function VC(t){return t>=32&&t<=1114111}function Au(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Au(n,e[r])):ig(t)&&ig(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Au(t[n],e[n])):!1}function ig(t){return typeof t=="object"&&t!==null}const qC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1393
|
+
`,r:"\r",t:" "},KC=92,GC=123,og=125,YC=91,sg=93,XC=32,QC=10,ZC=9,JC=13,Su=34,e_=43,ag=45,Tu=48,t_=49,$u=57,n_=44,r_=46,i_=58,o_=65,s_=97,a_=69,l_=101,c_=70,u_=102;function lg(t,e,n,r){return f(t);function f(u,g){if(Array.isArray(r)){const s=r.find(a=>a.test(u));if(s){const a=s.stringify(u);if(typeof a!="string"||!tg(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 u=="boolean"||typeof u=="number"||typeof u=="string"||u===null||u instanceof Date||u instanceof Boolean||u instanceof Number||u instanceof String)return JSON.stringify(u);if(u!=null&&u.isLosslessNumber||typeof u=="bigint")return u.toString();if(Array.isArray(u))return h(u);if(u&&typeof u=="object")return p(u)}function h(u,g){if(u.length===0)return"[]";let s="[";for(let a=0;a<u.length;a++){const c=u[a];typeof c<"u"&&typeof c!="function"?s+=f(c):s+="null",a<u.length-1&&(s+=",")}return s+="]",s}function p(u,g){if(typeof u.toJSON=="function")return lg(u.toJSON(),e,n,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(u);if(s.length===0)return"{}";let a=!0,c="{";for(const l of s){const o=u[l];if(b(l,o)){a?a=!1:c+=",";const d=JSON.stringify(l);c+=`${d}:`,c+=f(o)}}return c+="}",c}function b(u,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function h_(t){return ng(t)?parseFloat(t):BigInt(t)}class d_{constructor(){vl(this,"id",1)}async exec(e,n,r={},f={},h=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,f.manual=!0,(await yu.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...f},timeout:h,transformRequest:[(p,b)=>lg(p)],transformResponse:[p=>zC(p,void 0,h_)]})).data.result}catch(p){let b=new Error;throw p.response?(b.name=p.response.data.error.data.class,b.message=p.response.data.error.data.message,b.object=p.response.data.error):p.request?(b.name="Request error",b.message="Request error, no response received"):b.name="Unknown error",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,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,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,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}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,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}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,n,r,f=30){const h=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:f});if(h!=null){let p=h.length,b=null;for(let u=0;u<p;u++)b=this.decode_openc3_type(h[u][1]),b!==null&&(h[u][1]=b)}return h}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let f={stale_time:n};r!==null&&(f.cache_timeout=r);const h=await this.exec("get_tlm_values",[e],f,{},1e4);let p=h[0].length,b=null;for(let u=0;u<p;u++)b=this.decode_openc3_type(h[0][u]),b!==null&&(h[0][u]=b);return h}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,f="CONVERTED"){let h=null;if(n===void 0)h=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))h=await this.exec("tlm",[e],{type:n});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else h=await this.exec("tlm",[e,n,r],{type:f});let p=this.decode_openc3_type(h);return p!==null&&(h=p),h}async inject_tlm(e,n,r=null,f="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:f})}set_tlm(e,n,r,f){return this.exec("set_tlm",[e,n,r],{type:f})}override_tlm(e,n,r,f){return this.exec("override_tlm",[e,n,r],{type:f})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,f){return this.exec("normalize_tlm",[e,n,r],{type:f})}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,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,f="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,f])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,f,h){let p=null;for(let b in f)Object.prototype.hasOwnProperty.call(f,b)&&(p=this.encode_openc3_type(f[b]),p!==null&&(f[b]=p));return this.exec(e,[n,r,f],{},h)}get_cmd_hazardous(e,n,r,f={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},f):this._cmd("get_cmd_hazardous",e,n,r,f)}cmd(e,n,r,f={}){return n===void 0?this.exec("cmd",e,{},f):this._cmd("cmd",e,n,r,f)}cmd_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_range_check",e,{},f):this._cmd("cmd_no_range_check",e,n,r,f)}cmd_raw(e,n,r,f={}){return n===void 0?this.exec("cmd_raw",e,{},f):this._cmd("cmd_raw",e,n,r,f)}cmd_raw_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},f):this._cmd("cmd_raw_no_range_check",e,n,r,f)}cmd_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},f):this._cmd("cmd_no_hazardous_check",e,n,r,f)}cmd_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_no_checks",e,{},f):this._cmd("cmd_no_checks",e,n,r,f)}cmd_raw_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},f):this._cmd("cmd_raw_no_hazardous_check",e,n,r,f)}cmd_raw_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},f):this._cmd("cmd_raw_no_checks",e,n,r,f)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),f=new Uint8Array(r);return Array.from(f).map(h=>h.toString(16).padStart(2,"0")).join("")}}}sr("F",d_);var cg={exports:{}},ug;function f_(){return ug||(ug=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,f){function h(g,s){function a(F,E,H){if(!(F.length<E)){var P=F.slice(0,E),O=F.slice(E),S=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,B=0;if(A&&!A[2]&&(D=E-A[1].length,B=E),S&&!S[2]&&(D||(D=E),B=E+S[1].length),D)return{start:D,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if(S&&S[2])return D=E+S[2].length,{start:D,end:D+S[3].length}}}for(var c=s.column||g.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),d=Math.max(s.startRow,s.endRow),m=g.session;o<=d;){var w=m.getLine(o);if(w.length>c){var x=a(w,c,5);if(x){var I=/^\s*/.exec(w)[0];m.replace(new b(o,x.start,o,x.end),`
|
1394
|
+
`+I)}d++}else if(l&&/\S/.test(w)&&o!=d){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var _=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),L=_+" "+C,x=a(L,c,5);if(x&&x.start>_.length||L.length<c){var R=new b(o,_.length,o+1,T.length-C.length);m.replace(R," "),o--,d--}else _.length<w.length&&m.remove(new b(o,_.length,o,w.length))}}o++}}function p(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var c=s.session.$undoManager.$lastDelta;h(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),c!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=n("../range").Range,u=n("../editor").Editor;n("../config").defineOptions(u.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=h}),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(n,r,f){function h(y){return{row:y.line,column:y.ch}}function p(y){return new Ne(y.row,y.column)}function b(y,$,k){if($.line===k.line&&$.ch>=k.ch-1){var N=y.getLine($.line),W=N.charCodeAt($.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:$,end:k}}function u(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),je.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Uo),L(y),je.on(y.getInputField(),"paste",s(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",Uo),je.off(y.getInputField(),"paste",s(y)),y.state.vim=null,gr&&clearTimeout(gr)}function s(y){var $=y.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(y.setCursor(ye(y.getCursor(),0,1)),zn.enterInsertMode(y,{},$))}),$.onPasteFn}function a(y,$){return $>=y.firstLine()&&$<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function o(y){return pa.test(y)}function d(y){return ln.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,$){for(var k=0;k<$.length;k++)if($[k]==y)return!0;return!1}function I(y,$,k,N,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Gt[y]={type:k,defaultValue:$,callback:W},N)for(var j=0;j<N.length;j++)Gt[N[j]]=Gt[y];$&&T(y,$)}function T(y,$,k,N){var W=Gt[y];N=N||{};var j=N.scope;if(!W)return new Error("Unknown option: "+y);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+y+"="+$);$!==!1&&($=!0)}W.callback?(j!=="local"&&W.callback($,void 0),j!=="global"&&k&&W.callback($,k)):(j!=="local"&&(W.value=W.type=="boolean"?!!$:$),j!=="global"&&k&&(k.state.vim.options[y]={value:$}))}function _(y,$,k){var N=Gt[y];k=k||{};var W=k.scope;if(!N)return new Error("Unknown option: "+y);if(N.callback){var j=$&&N.callback(void 0,$);return W!=="global"&&j!==void 0?j:W!=="local"?N.callback():void 0}var j=W!=="global"&&$&&$.state.vim.options[y];return(j||W!=="local"&&N||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Bn()}function L(y){return y.state.vim||(y.state.vim={inputState:new S,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function R(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:_i(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Gt){var $=Gt[y];$.value=$.defaultValue}}function F(y){function $(Y){typeof Y=="string"?Sn.value=Y:Sn=null}if(y[0]=="<"){var k=y.toLowerCase().slice(1,-1),N=k.split("-");if(k=N.pop()||"",k=="lt")y="<";else if(k=="space")y=" ";else if(k=="cr")y=`
|
1395
|
+
`;else if(ki[k]){var W=Sn.value,j={key:ki[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};Sn.onKeyDown&&Sn.onKeyDown(j,Sn.value,$),Sn&&Sn.onKeyUp&&Sn.onKeyUp(j,Sn.value,$);return}}if(y==`
|
1396
|
+
`){var q=Sn;Sn=null,q.onClose&&q.onClose(q.value)}else Sn.value=(Sn.value||"")+y}function E(y,$,k){var N=pn;if(k){if(Pr.indexOf(k)!=-1)return;Pr.push(k),pn=k.noremap!=0}try{for(var W=L(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec($);){var Y=q[0],Q=W.insertMode;if(Sn){F(Y);continue}var re=kt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ve=se.split("-");if(se=ve.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1397
|
+
`;else{if(ki.hasOwnProperty(se)){Y=ki[se],qo(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Pr.pop(),pn=Pr.length?N:!1,!Pr.length&&Sn){var Ce=Sn;Sn=null,Er(y,Ce)}}}function H(y,$){var k=y.key;if(!Wr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=rr[k]||k;var N="";if(y.ctrlKey&&(N+="C-"),y.altKey&&(N+="A-"),y.metaKey&&(N+="M-"),je.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(N=N.slice(2)),(N||k.length>1)&&y.shiftKey&&(N+="S-"),$&&!$.expectLiteralNext&&k.length==1){if(Qn.keymap&&k in Qn.keymap)(Qn.remapCtrl!=0||!N)&&(k=Qn.keymap[k]);else if(k.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return N+=k,N.length>1&&(N="<"+N+">"),N}}function P(y,$){Qn.string!==y&&(Qn=O(y)),Qn.remapCtrl=$}function O(y){function $(N){return N.split(/\\?(.)/).filter(Boolean)}var k={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(N){if(N){var W=N.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var j=$(W[1]),q=$(W[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)k[j[Y]]=q[Y]}else if(W.length==1){var Q=$(N);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:y}):{keymap:k,string:""}}function S(){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,$){y.state.vim.inputState=new S,y.state.vim.expectLiteralNext=!1,je.signal(y,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function B(y,$,k){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!k}function U(y,$){var k=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");k[y]=$,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 te(y,$){Xr[y]=$}function he(y,$){for(var k=[],N=0;N<$;N++)k.push(y);return k}function ne(y,$){Xo[y]=$}function ae(y,$){zn[y]=$}function ce(y,$,k){var N=y.state.vim,W=N.insertMode||N.visualMode,j=Math.min(Math.max(y.firstLine(),$.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==j&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(j,Q)}function ue(y){var $={};for(var k in y)y.hasOwnProperty(k)&&($[k]=y[k]);return $}function ye(y,$,k){return typeof $=="object"&&(k=$.ch,$=$.line),new Ne(y.line+$,y.ch+k)}function Ae(y,$,k,N){N.operator&&(k="operatorPending");for(var W,j=[],q=[],Y=pn?$.length-Co:0,Q=Y;Q<$.length;Q++){var re=$[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||N.operator&&re.type=="action"||!(W=$e(y,re.keys))||(W=="partial"&&j.push(re),W=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(y,$){var k=$.slice(-11)=="<character>",N=$.slice(-10)=="<register>";if(k||N){var W=$.length-(k?11:10),j=y.slice(0,W),q=$.slice(0,W);return j==q&&y.length>W?"full":q.indexOf(j)==0?"partial":!1}return y==$?"full":$.indexOf(y)==0?"partial":!1}function Ie(y){var $=/^.*(<[^>]+>)$/.exec(y),k=$?$[1]:y.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
1398
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ze(y,$,k){return function(){for(var N=0;N<k;N++)$(y)}}function Xe(y){return new Ne(y.line,y.ch)}function gt(y,$){return y.ch==$.ch&&y.line==$.line}function at(y,$){return y.line<$.line?!0:y.line==$.line&&y.ch<$.ch}function mt(y,$){return arguments.length>2&&($=mt.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?y:$}function sn(y,$){return arguments.length>2&&($=sn.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?$:y}function bn(y,$,k){var N=at(y,$),W=at($,k);return N&&W}function Jt(y,$){return y.getLine($).length}function wr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function wn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Fn(y,$,k){var N=Jt(y,$),W=new Array(k-N+1).join(" ");y.setCursor(new Ne($,N)),y.replaceRange(W,y.getCursor())}function Pn(y,$){var k=[],N=y.listSelections(),W=Xe(y.clipPos($)),j=!gt($,W),q=y.getCursor("head"),Y=Ct(N,q),Q=gt(N[Y].head,N[Y].anchor),re=N.length-1,se=re-Y>Y?re:0,ve=N[se].anchor,Ce=Math.min(ve.line,W.line),ge=Math.max(ve.line,W.line),be=ve.ch,Oe=W.ch,Re=N[se].head.ch-be,Ge=Oe-be;Re>0&&Ge<=0?(be++,j||Oe--):Re<0&&Ge>=0?(be--,Q||Oe++):Re<0&&Ge==-1&&(be--,Oe++);for(var ht=Ce;ht<=ge;ht++){var tt={anchor:new Ne(ht,be),head:new Ne(ht,Oe)};k.push(tt)}return y.setSelections(k),$.ch=Oe,ve.ch=be,ve}function nr(y,$,k){for(var N=[],W=0;W<k;W++){var j=ye($,W,0);N.push({anchor:j,head:j})}y.setSelections(N,0)}function Ct(y,$,k){for(var N=0;N<y.length;N++){var W=gt(y[N].anchor,$),j=gt(y[N].head,$);if(W||j)return N}return-1}function Ke(y,$){var k=$.lastSelection,N=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],Q=at(q.anchor,q.head)?q.anchor:q.head,re=at(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var j=y.getCursor(),q=y.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(j.line+re,j.ch+Q);for(var se=[],ve=j.line;ve<q.line;ve++){var Ce=new Ne(ve,j.ch),ge=new Ne(ve,q.ch),be={anchor:Ce,head:ge};se.push(be)}y.setSelections(se)}else{var Oe=k.anchorMark.find(),Re=k.headMark.find(),Ge=Re.line-Oe.line,ht=Re.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ht+q.ch},k.visualLine&&(j=new Ne(j.line,0),q=new Ne(q.line,Jt(y,q.line))),y.setSelection(j,q)}return[j,q]};return $.visualMode?N():W()}function _e(y,$){var k=$.sel.anchor,N=$.sel.head;$.lastPastedText&&(N=y.posFromIndex(y.indexFromPos(k)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:y.setBookmark(k),headMark:y.setBookmark(N),anchor:Xe(k),head:Xe(N),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function Ve(y,$,k,N){var W=y.state.vim.sel,j=N?$:W.head,q=N?$:W.anchor,Y;return at(k,$)&&(Y=k,k=$,$=Y),at(j,q)?(j=mt($,j),q=sn(q,k)):(q=mt($,q),j=sn(j,k),j=ye(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new Ne(j.line-1,Jt(y,j.line-1)))),[q,j]}function Je(y,$,W){var N=y.state.vim;$=$||N.sel;var W=W||N.visualLine?"line":N.visualBlock?"block":"char",j=vt(y,$,W);y.setSelections(j.ranges,j.primary)}function vt(y,$,k,N){var W=Xe($.head),j=Xe($.anchor);if(k=="char"){var q=!N&&!at($.head,$.anchor)?1:0,Y=at($.head,$.anchor)?1:0;return W=ye($.head,0,q),j=ye($.anchor,0,Y),{ranges:[{anchor:j,head:W}],primary:0}}if(k=="line"){if(at($.head,$.anchor))W.ch=0,j.ch=Jt(y,j.line);else{j.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Jt(y,W.line)}return{ranges:[{anchor:j,head:W}],primary:0}}if(k=="block"){var re=Math.min(j.line,W.line),se=j.ch,ve=Math.max(j.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var ge=ve-re+1,be=W.line==re?0:ge-1,Oe=[],Re=0;Re<ge;Re++)Oe.push({anchor:new Ne(re+Re,se),head:new Ne(re+Re,Ce)});return{ranges:Oe,primary:be}}}function Tt(y){var $=y.getCursor("head");return y.getSelection().length==1&&($=mt($,y.getCursor("anchor"))),$}function St(y,$){var k=y.state.vim;$!==!1&&y.setCursor(ce(y,k.sel.head)),_e(y,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||je.signal(y,"vim-mode-change",{mode:"normal"})}function Pt(y,$,k){var N=y.getRange($,k);if(/\n\s*$/.test(N)){var W=N.split(`
|
1399
|
+
`);W.pop();for(var j,j=W.pop();W.length>0&&j&&m(j);j=W.pop())k.line--,k.ch=0;j?(k.line--,k.ch=Jt(y,k.line)):k.ch=0}}function Nt(y,$,k){$.ch=0,k.ch=0,k.line++}function pt(y){if(!y)return 0;var $=y.search(/\S/);return $==-1?y.length:$}function _t(y,$,k){var N=$.inclusive,W=$.innerWord,j=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=k||Tt(y),re=y.getLine(Q.line),se=re,ve=Q.line,Ce=ve,ge=Q.ch,be,Oe=q?_o[0]:Ci[0];if(W&&/\s/.test(re.charAt(ge)))Oe=function(_n){return/\s/.test(_n)};else{for(;!Oe(re.charAt(ge));)if(ge++,ge>=re.length){if(!Y)return null;ge--,be=po(y,Q,!0,j,!0);break}j?Oe=Ci[0]:(Oe=_o[0],Oe(re.charAt(ge))||(Oe=_o[1]))}for(var Re=ge,Ge=ge;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,be)Re=be.to,Ce=be.line,se=y.getLine(Ce),!se&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(N){var ht=Re,tt=Q.ch<=Ge&&/\s/.test(re.charAt(Q.ch));if(!tt)for(;/\s/.test(se.charAt(Re))&&Re<se.length;)Re++;if(ht==Re||tt){for(var st=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!tt&&(Ge=st)}}return{start:new Ne(ve,Ge),end:new Ne(Ce,Re)}}function $n(y,$,k){var N=$;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:N,end:N};var W=je.findMatchingTag(y,$)||je.findEnclosingTag(y,$);return!W||!W.open||!W.close?{start:N,end:N}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function $r(y,$,k){gt($,k)||He.jumpList.add(y,$,k)}function Kr(y,$){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=$.forward,He.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Bi(y,$,k,N){var W=Xe(y.getCursor()),j=k?1:-1,q=k?y.lineCount():-1,Y=W.ch,Q=W.line,re=y.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:N,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[N],forward:k,depth:0,curMoveThrough:!1},ve=ci[N];if(!ve)return W;var Ce=ui[ve].init,ge=ui[ve].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=j,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=j,se.lineText=y.getLine(Q)||"",j>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}ge(se)&&(W.line=Q,W.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function po(y,$,k,N,W){var j=$.line,q=$.ch,Y=y.getLine(j),Q=k?1:-1,re=N?Ci:_o;if(W&&Y==""){if(j+=Q,Y=y.getLine(j),!a(y,j))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ve=se,Ce=se;q!=se;){for(var ge=!1,be=0;be<re.length&&!ge;++be)if(re[be](Y.charAt(q))){for(ve=q;q!=se&&re[be](Y.charAt(q));)q+=Q;if(Ce=q,ge=ve!=Ce,ve==$.ch&&j==$.line&&Ce==ve+Q)continue;return{from:Math.min(ve,Ce+1),to:Math.max(ve,Ce),line:j}}ge||(q+=Q)}if(j+=Q,!a(y,j))return null;Y=y.getLine(j),q=Q>0?0:Y.length}}function xr(y,$,k,N,W,j){var q=Xe($),Y=[];(N&&!W||!N&&W)&&k++;for(var Q=!N||!W,re=0;re<k;re++){var se=po(y,$,N,j,Q);if(!se){var ve=Jt(y,y.lastLine());Y.push(N?{line:y.lastLine(),from:ve,to:ve}:{line:0,from:0,to:0});break}Y.push(se),$=new Ne(se.line,N?se.to-1:se.from)}var Ce=Y.length!=k,ge=Y[0],be=Y.pop();return N&&!W?(!Ce&&(ge.from!=q.ch||ge.line!=q.line)&&(be=Y.pop()),new Ne(be.line,be.from)):N&&W?new Ne(be.line,be.to-1):!N&&W?(!Ce&&(ge.to!=q.ch||ge.line!=q.line)&&(be=Y.pop()),new Ne(be.line,be.to)):new Ne(be.line,be.from)}function go(y,$,k,N,W){var j=$,q=new Ne(j.line+k.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,W||(N.lastHPos=1/0,N.lastHSPos=y.charCoords(Y,"div").left),q}function Wo(y,$,k,N,W){for(var j=W||y.getCursor(),q=j.ch,Y,Q=0;Q<$;Q++){var re=y.getLine(j.line);if(Y=Xa(q,re,N,k),Y==-1)return null;q=Y}return new Ne(y.getCursor().line,Y)}function Ya(y,$){var k=y.getCursor().line;return ce(y,new Ne(k,$-1))}function si(y,$,k,N){!x(k,ao)&&!nn.test(k)||($.marks[k]&&$.marks[k].clear(),$.marks[k]=y.setBookmark(N))}function Xa(y,$,k,N,W){var j;return N?(j=$.indexOf(k,y+1),j!=-1):(j=$.lastIndexOf(k,y-1),j!=-1),j}function _s(y,$,k,N,W){function j(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ht,tt){return tt?j(Ge)!=j(Ge+ht):!j(Ge)&&j(Ge+ht)}function Y(Ge){N=N>0?1:-1;var ht=y.ace.session.getFoldLine(Ge);ht&&Ge+N>ht.start.row&&Ge+N<ht.end.row&&(N=(N>0?ht.end.row:ht.start.row)-Ge)}var Q=$.line,re=y.firstLine(),se=y.lastLine(),ve,Ce,ge=Q;if(N){for(;re<=ge&&ge<=se&&k>0;)Y(ge),q(ge,N)&&k--,ge+=N;return new Ne(ge,0)}var be=y.state.vim;if(be.visualLine&&q(Q,1,!0)){var Oe=be.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Re=j(Q);for(ge=Q;ge<=se&&k;ge++)q(ge,1,!0)&&(!W||j(ge)!=Re)&&k--;for(Ce=new Ne(ge,0),ge>se&&!Re?Re=!0:W=!1,ge=Q;ge>re&&!((!W||j(ge)==Re||ge==Q)&&q(ge,-1,!0));ge--);return ve=new Ne(ge,0),{start:ve,end:Ce}}function aa(y,$,k,N,W){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ve,Ce){var ge=re.getLine(se),be={line:ge,ln:se,pos:ve,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!W)return{ln:be.ln,pos:be.pos+1};for(j(be);be.line!==null&&m(be.line[be.pos]);)Oe=be.pos,j(be);return{ln:be.ln,pos:Oe+1}}j(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,se,ve,Ce){var ge=re.getLine(se),be={line:ge,ln:se,pos:ve,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return W?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};j(be)}return be.line=ge,W&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};k>0;)N<0?Q=Y(y,Q.ln,Q.pos,N):Q=q(y,Q.ln,Q.pos,N),k--;return new Ne(Q.ln,Q.pos)}function ji(y,$,k,N){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 j(Q,re,se,ve){var Re=Q.getLine(re),Ce=Re==="",ge={line:Re,ln:re,pos:se,dir:ve},be={ln:ge.ln,pos:ge.pos},Oe=ge.line==="";for(W(Q,ge);ge.line!==null;){if(be.ln=ge.ln,be.pos=ge.pos,ge.line===""&&!Oe)return{ln:ge.ln,pos:ge.pos};if(Ce&&ge.line!==""&&!m(ge.line[ge.pos]))return{ln:ge.ln,pos:ge.pos};w(ge.line[ge.pos])&&!Ce&&(ge.pos===ge.line.length-1||m(ge.line[ge.pos+1]))&&(Ce=!0),W(Q,ge)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ge=Re.length-1;Ge>=0;--Ge)if(!m(Re[Ge])){be.pos=Ge;break}return be}function q(Q,re,se,ve){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ve},ge={ln:Ce.ln,pos:null},be=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!be)return ge.pos!==null?ge:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||ge.pos===null||Ce.ln===ge.ln&&Ce.pos+1===ge.pos))return ge;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(be=!1,ge={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(ge.ln);ge.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){ge.pos=Re;break}return ge}for(var Y={ln:$.line,pos:$.ch};k>0;)N<0?Y=q(y,Y.ln,Y.pos,N):Y=j(y,Y.ln,Y.pos,N),k--;return new Ne(Y.ln,Y.pos)}function Yn(y,$,k,N){var W=$,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=y.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(j=y.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var ve=j;j=q,q=ve}return N?q.ch+=1:j.ch+=1,{start:j,end:q}}function Mr(y,$,k,N){var W=Xe($),j=y.getLine(W.line),q=j.split(""),Y,Q,re,se,ve=q.indexOf(k);if(W.ch<ve)W.ch=ve;else if(ve<W.ch&&q[W.ch]==k){var Ce=/string/.test(y.getTokenTypeAt(ye($,0,1))),ge=/string/.test(y.getTokenTypeAt($)),be=Ce&&!ge;be||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(N&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function zi(){}function Rn(y){var $=y.state.vim;return $.searchState_||($.searchState_=new zi)}function Ir(y){return Hi(y,"/")}function no(y){return ks(y,"/")}function Hi(y,$){var k=ks(y,$)||[];if(!k.length)return[];var N=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&N.push(y.substring(k[W]+1,k[W+1]));return N}}function ks(y,$){$||($="/");for(var k=!1,N=[],W=0;W<y.length;W++){var j=y.charAt(W);!k&&j==$&&N.push(W),k=!k&&j=="\\"}return N}function la(y){for(var $="|(){",k="}",N=!1,W=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",Q=Y&&$.indexOf(Y)!=-1;N?((q!=="\\"||!Q)&&W.push(q),N=!1):q==="\\"?(N=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Qa(y){for(var $=!1,k=[],N=-1;N<y.length;N++){var W=y.charAt(N)||"",j=y.charAt(N+1)||"";Ai[W+j]?(k.push(Ai[W+j]),N++):$?(k.push(W),$=!1):W==="\\"?($=!0,o(j)||j==="$"?k.push("$"):j!=="/"&&j!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),j==="/"&&k.push("\\"))}return k.join("")}function Za(y){for(var $=new je.StringStream(y),k=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)k.push($.next());var N=!1;for(var W in pr)if($.match(W,!0)){N=!0,k.push(pr[W]);break}N||k.push($.next())}return k.join("")}function Ui(y,$,k){var N=He.registerController.getRegister("/");if(N.setText(y),y instanceof RegExp)return y;var W=no(y),j,q;if(!W.length)j=y;else{j=y.substring(0,W[0]);var Y=y.substring(W[0]);q=Y.indexOf("i")!=-1}if(!j)return null;_("pcre")||(j=la(j)),k&&($=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,$||q?"im":"m");return Q}function ai(y){typeof y=="string"&&(y=document.createElement(y));for(var $,k=1;k<arguments.length;k++)if($=arguments[k])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)y.appendChild($);else for(var N in $)Object.prototype.hasOwnProperty.call($,N)&&(N[0]==="$"?y.style[N.slice(1)]=$[N]:y.setAttribute(N,$[N]));return y}function Kt(y,$){var k=ai("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);y.openNotification?y.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ca(y,$){return ai("div",{$display:"flex"},ai("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,ai("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ai("span",{$color:"#888"},$))}function Er(y,$){if(Pr.length){$.value||($.value=""),Sn=$;return}var k=ca($.prefix,$.desc);if(y.openDialog)y.openDialog(k,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var N="";typeof $.prefix!="string"&&$.prefix&&(N+=$.prefix.textContent),$.desc&&(N+=" "+$.desc),$.onClose(prompt(N,""))}}function Xn(y,$){if(y instanceof RegExp&&$ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],N=0;N<k.length;N++){var W=k[N];if(y[W]!==$[W])return!1}return!0}return!1}function xn(y,$,k,N){if($){var W=Rn(y),j=Ui($,!!k,!!N);if(j)return bi(y,j),Xn(j,W.getQuery())||W.setQuery(j),j}}function Wn(y){if(y.source.charAt(0)=="^")var $=!0;return{token:function(k){if($&&!k.sol()){k.skipToEnd();return}var N=k.match(y,!1);if(N)return N[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!y.exec(k.next()+N[0]))?(k.next(),null):(k.match(y),"searching");for(;!k.eol()&&(k.next(),!k.match(y,!1)););},query:y}}function bi(y,$){clearTimeout(gr);var k=Rn(y);k.highlightTimeout=gr,gr=setTimeout(function(){if(y.state.vim){var N=Rn(y);N.highlightTimeout=null;var W=N.getOverlay();(!W||$!=W.query)&&(W&&y.removeOverlay(W),W=Wn($),y.addOverlay(W),y.showMatchesOnScrollbar&&(N.getScrollbarAnnotate()&&N.getScrollbarAnnotate().clear(),N.setScrollbarAnnotate(y.showMatchesOnScrollbar($))),N.setOverlay(W))}},50)}function Lr(y,$,k,N){return N===void 0&&(N=1),y.operation(function(){for(var W=y.getCursor(),j=y.getSearchCursor(k,W),q=0;q<N;q++){var Y=j.find($);if(q==0&&Y&>(j.from(),W)){var Q=$?j.from():j.to();Y=j.find($),Y&&!Y[0]&>(j.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=j.find($))}if(!Y&&(j=y.getSearchCursor(k,$?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!j.find($)))return}return j.from()})}function wi(y,$,k,N,W){return N===void 0&&(N=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(k,j),Y=q.find(!$);!W.visualMode&&Y&>(q.from(),j)&&q.find(!$);for(var Q=0;Q<N;Q++)if(Y=q.find($),!Y&&(q=y.getSearchCursor(k,$?new Ne(y.lastLine()):new Ne(y.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function Bo(y){var $=Rn(y);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),y.removeOverlay(Rn(y).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function As(y,$,k){return typeof y!="number"&&(y=y.line),$ instanceof Array?x(y,$):typeof k=="number"?y>=$&&y<=k:y==$}function ro(y){var $=y.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Gr(y,$,k){if(k=="'"||k=="`")return He.jumpList.find(y,-1)||new Ne(0,0);if(k==".")return mo(y);var N=$.marks[k];return N&&N.find()}function mo(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var $=y.doc.history.done,k=$.length;k--;)if($[k].changes)return Xe($[k].changes[0].to)}function jo(y,$,k,N,W,j,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)se(),Ce();ge()})}function se(){var tt=y.getRange(j.from(),j.to()),st=tt.replace(q,Y),_n=j.to().line;j.replace(st),Ge=j.to().line,W+=Ge-_n,ht=Ge<_n}function ve(){var tt=Re&&Xe(j.to()),st=j.findNext();return st&&!st[0]&&tt&>(j.from(),tt)&&(st=j.findNext()),st}function Ce(){for(;ve()&&As(j.from(),N,W);)if(!(!k&&j.from().line==Ge&&!ht)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Re=j.from(),Oe=!1;return}Oe=!0}function ge(tt){if(tt&&tt(),y.focus(),Re){y.setCursor(Re);var st=y.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Re.ch}Q&&Q()}function be(tt,st,_n){je.e_stop(tt);var dt=H(tt);switch(dt){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Mn=Q;Q=void 0,y.operation(re),Q=Mn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ge(_n)}return Oe&&ge(_n),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ge,ht;if(Ce(),Oe){Kt(y,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}Er(y,{prefix:ai("span","replace with ",ai("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function Yr(y,$){var k=y.state.vim,N=He.macroModeState,W=He.registerController.getRegister("."),j=N.isPlaying,q=N.lastInsertModeChanges;j||(y.off("change",vo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,je.off(y.getInputField(),"keydown",Ms)),!j&&k.insertModeRepeat>1&&(ua(y,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,$||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("")),je.signal(y,"vim-mode-change",{mode:"normal"}),N.isRecording&&hr(N)}function zo(y){On.unshift(y)}function Ss(y,$,k,N,W){var j={keys:y,type:$};j[$]=k,j[$+"Args"]=N;for(var q in W)j[q]=W[q];zo(j)}function Ts(y,$,k,N){var W=He.registerController.getRegister(N);if(N==":"){W.keyBuffer[0]&&_r.processCommand(y,W.keyBuffer[0]),k.isPlaying=!1;return}var j=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var Q=j[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),kt.handleKey(y,se,"macro"),$.insertMode){var ve=W.insertModeChanges[q++].changes;He.macroModeState.lastInsertModeChanges.changes=ve,Ko(y,ve,1),Yr(y)}k.isPlaying=!1}function Ho(y,$){if(!y.isPlaying){var k=y.latestRegister,N=He.registerController.getRegister(k);N&&N.pushText($)}}function hr(y){if(!y.isPlaying){var $=y.latestRegister,k=He.registerController.getRegister($);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(y.lastInsertModeChanges)}}function $s(y,$){if(!y.isPlaying){var k=y.latestRegister,N=He.registerController.getRegister(k);N&&N.pushSearchQuery&&N.pushSearchQuery($)}}function vo(y,$){var k=He.macroModeState,N=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=y.state.vim;$;){if(N.expectCursorActivityForChange=!0,N.ignoreCount>1)N.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var j=y.listSelections().length;j>1&&(N.ignoreCount=j);var q=$.text.join(`
|
1400
|
+
`);if(N.maybeReset&&(N.changes=[],N.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))N.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&&(N.changes.push([q,re]),q="")}}q&&N.changes.push(q)}}$=$.next}}function Uo(y){var $=y.state.vim;if($.insertMode){var k=He.macroModeState;if(k.isPlaying)return;var N=k.lastInsertModeChanges;N.expectCursorActivityForChange?N.expectCursorActivityForChange=!1:(N.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||Vo(y,$)}function Vo(y,$,k){var N=y.getCursor("anchor"),W=y.getCursor("head");if($.visualMode&&!y.somethingSelected()?St(y,!1):!$.visualMode&&!$.insertMode&&y.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,je.signal(y,"vim-mode-change",{mode:"visual"})),$.visualMode){var j=at(W,N)?0:-1,q=at(W,N)?-1:0;W=ye(W,0,j),N=ye(N,0,q),$.sel={anchor:N,head:W},si(y,$,"<",mt(W,N)),si(y,$,">",sn(W,N))}else!$.insertMode&&!k&&($.lastHPos=y.getCursor().ch)}function io(y,$){this.keyName=y,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function Ms(y){var $=He.macroModeState,k=$.lastInsertModeChanges,N=je.keyName?je.keyName(y):y.key;N&&(N.indexOf("Delete")!=-1||N.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new io(N,y)))}function ua(y,$,k,N){function W(){Y?jn.processAction(y,$,$.lastEditActionCommand):jn.evalInput(y,$)}function j(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ve=q.lastInsertModeChanges;Ko(y,ve.changes,se)}}var q=He.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),j(1);else N||W(),j(k);$.inputState=Q,$.insertMode&&!N&&Yr(y),q.isPlaying=!1}function qo(y,$){je.lookupKey($,"vim-insert",function(k){return typeof k=="string"?je.commands[k](y):k(y),!0})}function Ko(y,$,k){var N=y.getCursor("head"),W=He.macroModeState.lastInsertModeChanges.visualBlock;W&&(nr(y,N,W+1),k=y.listSelections().length,y.setCursor(N));for(var j=0;j<k;j++){W&&y.setCursor(ye(N,j,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof io)qo(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ye(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}W&&y.setCursor(ye(N,0,1))}function Is(y,$,k,N){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Rr[$]||$;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||$.length>1)&&k.shiftKey&&(W+="S-"),N&&!N.expectLiteralNext&&$.length==1){if(Qn.keymap&&$ in Qn.keymap)(Qn.remapCtrl!==!1||!W)&&($=Qn.keymap[$]);else if($.charCodeAt(0)>255){var j=k.code&&k.code.slice(-1)||"";k.shiftKey||(j=j.toLowerCase()),j&&($=j)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function Go(y){var $=new y.constructor;return Object.keys(y).forEach(function(k){if(k!="insertEnd"){var N=y[k];Array.isArray(N)?N=N.slice():N&&typeof N=="object"&&N.constructor!=Object&&(N=Go(N)),$[k]=N}}),y.sel&&($.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),$}function yo(y,$,k){var N=!1,W=kt.maybeInitVimState_(y),j=W.visualBlock||W.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)N=kt.handleKey(y,$,k);else{var Y=Go(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var se=y.ace.selection;y.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ve=y.getCursor("head"),Ce=y.getCursor("anchor"),ge=at(ve,Ce)?0:-1,be=at(ve,Ce)?-1:0;ve=ye(ve,0,ge),Ce=ye(Ce,0,be),y.state.vim.sel.head=ve,y.state.vim.sel.anchor=Ce,N=hi(y,$,k),se.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=Go(Y)),re++}),y.curOp.cursorActivity&&!N&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return N&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&Vo(y,W,!0),N}function xi(y,$){$.off("beforeEndOperation",xi);var k=$.state.cm.vimCmd;k&&$.execCommand(k.exec?k:k.name,k.args),$.curOp=$.prevOp}var dr=n("../range").Range,oo=n("../lib/event_emitter").EventEmitter,Vi=n("../lib/dom"),ha=n("../lib/oop"),Ja=n("../lib/keys"),bo=n("../lib/event"),qi=n("../search").Search,wo=n("../lib/useragent"),Yo=n("../search_highlight").SearchHighlight,xo=n("../commands/multi_select_commands"),da=n("../mode/text").Mode.prototype.tokenRe,so=n("../ext/hardwrap").hardWrap;n("../multi_select");var je=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)};je.Pos=function(y,$){if(!(this instanceof Ne))return new Ne(y,$);this.line=y,this.ch=$},je.defineOption=function(y,$,k){},je.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
|
1401
|
+
`)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=bo.stopEvent,je.keyName=function(y){var $=Ja[y.keyCode]||y.key||"";return $.length==1&&($=$.toUpperCase()),$=bo.getModifierString(y).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+$,$},je.keyMap.default=function(y){return function($){var k=$.ace.commands.commandKeyBinding[y.toLowerCase()];return k&&$.ace.execCommand(k)!==!1}},je.lookupKey=function y($,k,N){k||(k="default"),typeof k=="string"&&(k=je.keyMap[k]||je.keyMap.default);var W=typeof k=="function"?k($):k[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&N(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return y($,k.fallthrough,N);for(var j=0;j<k.fallthrough.length;j++){var q=y($,k.fallthrough[j],N);if(q)return q}}},je.findMatchingTag=function(y,$){return y.findMatchingTag($)},je.findEnclosingTag=function(y,$){},je.signal=function(y,$,k){return y._signal($,k)},je.on=bo.addListener,je.off=bo.removeListener,je.isWordChar=function(y){return y<""?/^\w$/.test(y):(da.lastIndex=0,da.test(y))},(function(){ha.implement(je.prototype,oo),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(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var N={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=N:W.lastChange=W.change=N,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(xo.keyboardHandler)},this.operation=function(k,N){if(!N&&this.curOp||N&&this.curOp&&this.curOp.force)return k();if((N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=N;var q=k();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(),!j.cursorActivity&&!j.lastChange&&W&&(this.ace.prevOp=W)),(N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,N,W){var j=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,N)}},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(k,N){typeof k=="object"&&(N=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:N}),this.ace.selection.moveTo(k,N),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var N=this.ace.selection,W=k=="anchor"?N.isEmpty()?N.lead:N.anchor:k=="head"||!k?N.lead:N.getRange()[k];return p(W)},this.listSelections=function(k){var N=this.ace.multiSelect.rangeList.ranges;return!N.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:N.map(function(W){return{anchor:this.clipPos(p(W.cursor==W.end?W.start:W.end)),head:this.clipPos(p(W.cursor))}},this)},this.setSelections=function(k,N){var W=this.ace.multiSelect,j=k.map(function(re){var se=h(re.anchor),ve=h(re.head),Ce=dr.comparePoints(se,ve)<0?new dr.fromPoints(se,ve):new dr.fromPoints(ve,se);return Ce.cursor=dr.comparePoints(Ce.start,ve)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}N?j[N]&&j.push(j.splice(N,1)[0]):j=j.reverse(),W.toSingleRange(j[0].clone());for(var q=this.ace.session,Y=0;Y<j.length;Y++){var Q=q.$clipRangeToDocument(j[Y]);W.addRange(Q)}},this.setSelection=function(k,N,W){var j=this.ace.selection;j.moveTo(k.line,k.ch),j.selectTo(N.line,N.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var N=this.ace.session.$clipPositionToDocument(k.line,k.ch);return p(N)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var N=k.action=="insert",W=k.start,j=k.end,q=(j.row-W.row)*(N?1:-1),Y=(j.column-W.column)*(N?1:-1);N&&(j=W);for(var Q in this.marks){var re=this.marks[Q],se=dr.comparePoints(re,W);if(!(se<0)){if(se===0&&N)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ve=N?se:dr.comparePoints(re,j);if(ve>0){re.row+=q,re.column+=re.row==j.row?Y:0;continue}!N&&ve<=0&&(re.row=W.row,re.column=W.column,ve===0&&(re.bias=1))}}};var y=function(k,N,W,j){this.cm=k,this.id=N,this.row=W,this.column=j,k.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return p(this)},this.setBookmark=function(k,N){var W=new y(this,this.$uid++,k.line,k.ch);return(!N||!N.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,N){if(N=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,N,W,j){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;N*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);j!=null&&(Q.column=j),Q.row+=N,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 p(re)}debugger},this.charCoords=function(k,N){if(N=="div"||!N){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(N=="local"){var j=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,N){var W=this.ace.renderer;if(N=="local"){var j=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(j,q);return p(Y)}if(N=="div")throw"not implemented"},this.getSearchCursor=function(k,N,W){var j=!1,q=!1;k instanceof RegExp&&!k.global&&(j=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
1402
|
+
`,q=!1);var Y=new qi;N.ch==null&&(N.ch=Number.MAX_VALUE);var Q={row:N.line,column:N.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ve){Y.setOptions({needle:k,caseSensitive:j,wrap:!1,backwards:ve,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&p(se.start)},to:function(){return se&&p(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(k,N){var W=this.ace.renderer,j=W.layerConfig,q=j.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,N!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(N,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,N){if(k){var W=this.ace.renderer,j={top:0,bottom:N};W.scrollCursorIntoView(h(k),W.lineHeight*2/W.$size.scrollerHeight,j)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,N){return this.ace.session.getTextRange(new dr(k.line,k.ch,N.line,N.ch))},this.replaceRange=function(k,N,W){W||(W=N);var j=new dr(N.line,N.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,k)},this.replaceSelection=this.replaceSelections=function(k){var N=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),N?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var j=W.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],N?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,N){switch(this.state[k]=N,k){case"indentWithTabs":k=$[k],N=!N;break;case"keyMap":this.state.$keyMap=N;return;default:k=$[k]}k&&this.ace.setOption(k,N)},this.getOption=function(k){var N,W=$[k];switch(W&&(N=this.ace.getOption(W)),k){case"indentWithTabs":return k=$[k],!N;case"keyMap":return this.state.$keyMap||"vim"}return W?N:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var N=new Yo(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(N);N.id=W.id,N.session=this.ace.session,N.destroy=function(q){N.session.off("change",N.updateOnChange),N.session.off("changeEditor",N.destroy),N.session.removeMarker(N.id),N.session=null},N.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?N.cache[Y]=void 0:N.cache.splice(Y,N.cache.length)},N.session.on("changeEditor",N.destroy),N.session.on("change",N.updateOnChange)}var j=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=N,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,N=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:N.maxHeight,width:N.width,clientHeight:N.height,clientWidth:N.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var N=this.ace.session.getTokenAt(k.line,k.ch);return N&&/comment|string/.test(N.type)?"string":""},this.findMatchingBracket=function(k){var N=this.ace.session.findMatchingBracket(h(k));return{to:N&&p(N)}},this.findMatchingTag=function(k){var N=this.ace.session.getMatchingTags(h(k));if(N)return{open:{from:p(N.openTag.start),to:p(N.openTag.end)},close:{from:p(N.closeTag.start),to:p(N.closeTag.end)}}},this.indentLine=function(k,N){N===!0?this.ace.session.indentRows(k,k," "):N===!1&&this.ace.session.outdentRows(new dr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(h(k))},this.posFromIndex=function(k){return p(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,N,W,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(N==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),h(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&j.bracketRegex&&j.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:p(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(je.commands.hasOwnProperty(k))return je.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var N=this.$lineHandleChanges;if(!N)return null;for(var W=k.row,j=0;j<N.length;j++){var q=N[j];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(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return p(k.$lastDelta.end)}}).call(je.prototype);var fa=je.StringStream=function(y,$){this.pos=this.start=0,this.string=y,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};fa.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 $=this.string.charAt(this.pos);if(typeof y=="string")var k=$==y;else var k=$&&(y.test?y.test($):y($));if(k)return++this.pos,$},eatWhile:function(y){for(var $=this.pos;this.eat(y););return this.pos>$},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 $=this.string.indexOf(y,this.pos);if($>-1)return this.pos=$,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,$,k){if(typeof y!="string"){var N=this.string.slice(this.pos).match(y);return N&&N.index>0?null:(N&&$!==!1&&(this.pos+=N[0].length),N)}var W=function(q){return k?q.toLowerCase():q},j=this.string.substr(this.pos,y.length);if(W(j)==W(y))return $!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,$){this.lineStart+=y;try{return $()}finally{this.lineStart-=y}}},je.defineExtension=function(y,$){je.prototype[y]=$},Vi.importCssString(`.normal-mode .ace_cursor{
|
1403
|
+
border: none;
|
1404
|
+
background-color: rgba(255,0,0,0.5);
|
1405
|
+
}
|
1406
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1407
|
+
background-color: transparent;
|
1408
|
+
border: 1px solid red;
|
1409
|
+
opacity: 0.7
|
1410
|
+
}
|
1411
|
+
.ace_dialog {
|
1412
|
+
position: absolute;
|
1413
|
+
left: 0; right: 0;
|
1414
|
+
background: inherit;
|
1415
|
+
z-index: 15;
|
1416
|
+
padding: .1em .8em;
|
1417
|
+
overflow: hidden;
|
1418
|
+
color: inherit;
|
1419
|
+
}
|
1420
|
+
.ace_dialog-top {
|
1421
|
+
border-bottom: 1px solid #444;
|
1422
|
+
top: 0;
|
1423
|
+
}
|
1424
|
+
.ace_dialog-bottom {
|
1425
|
+
border-top: 1px solid #444;
|
1426
|
+
bottom: 0;
|
1427
|
+
}
|
1428
|
+
.ace_dialog input {
|
1429
|
+
border: none;
|
1430
|
+
outline: none;
|
1431
|
+
background: transparent;
|
1432
|
+
width: 20em;
|
1433
|
+
color: inherit;
|
1434
|
+
font-family: monospace;
|
1435
|
+
}`,"vimMode",!1),function(){function y(k,N,W){var j=k.ace.container,q;return q=j.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof N=="string"?q.innerHTML=N:q.appendChild(N),q}function $(k,N){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=N}je.defineExtension("openDialog",function(k,N,W){function j(ve){if(typeof ve=="string")re.value=ve;else{if(Y||ve&&ve.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var q=y(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&je.on(re,"input",function(ve){W.onInput(ve,re.value,j)}),W.onKeyUp&&je.on(re,"keyup",function(ve){W.onKeyUp(ve,re.value,j)}),je.on(re,"keydown",function(ve){W&&W.onKeyDown&&W.onKeyDown(ve,re.value,j)||(ve.keyCode==13&&N(re.value),(ve.keyCode==27||W.closeOnEnter!==!1&&ve.keyCode==13)&&(je.e_stop(ve),j()))}),W.closeOnBlur!==!1&&je.on(re,"blur",j),re.focus()):(se=q.getElementsByTagName("button")[0])&&(je.on(se,"click",function(){j(),Q.focus()}),W.closeOnBlur!==!1&&je.on(se,"blur",j),se.focus()),j}}),je.defineExtension("openNotification",function(k,N){function W(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){$(this,W);var j=y(this,k,N&&N.bottom),q=!1,Y,Q=N&&typeof N.duration<"u"?N.duration:5e3;return je.on(j,"click",function(re){je.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=je.Pos,On=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Co=On.length,li=[{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"}],Qn=O(""),pa=/[\d]/,_o=[je.isWordChar,function(y){return y&&!je.isWordChar(y)&&!/\s/.test(y)}],Ci=[function(y){return/\S/.test(y)}],ao=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};I("filetype",void 0,"string",["ft"],function(y,$){if($!==void 0){if(y===void 0){var k=$.getOption("mode");return k=="null"?"":k}var k=y==""?"null":y;$.setOption("mode",k)}}),I("textwidth",80,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var k=$.getOption("textwidth");return k}var N=Math.round(y);N>1&&$.setOption("textwidth",N)}});var _i=function(){function y(Q,re,se){function ve(Oe){var Re=++W%N,Ge=Y[Re];Ge&&Ge.clear(),Y[Re]=Q.setBookmark(Oe)}var Ce=W%N,ge=Y[Ce];if(ge){var be=ge.find();be&&!gt(be,re)&&ve(re)}else ve(re);ve(se),j=W,q=W-N+1,q<0&&(q=0)}function $(Q,re){W+=re,W>j?W=j:W<q&&(W=q);var se=Y[(N+W)%N];if(se&&!se.find()){var ve=re>0?1:-1,Ce,ge=Q.getCursor();do if(W+=ve,se=Y[(N+W)%N],se&&(Ce=se.find())&&!gt(ge,Ce))break;while(W<j&&W>q)}return se}function k(Q,re){var se=W,ve=$(Q,re);return W=se,ve&&ve.find()}var N=100,W=-1,j=0,q=0,Y=new Array(N);return{cachedCursor:void 0,add:y,find:k,move:$}},Bn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,$){var k=He.registerController.getRegister($);if(k){if(k.clear(),this.latestRegister=$,y.openDialog){var N=ai("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=y.openDialog(N,null,{bottom:!0})}this.isRecording=!0}}};var He,Cn,kt={enterVimMode:u,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:io,map:function(y,$,k){_r.map(y,$,k)},unmap:function(y,$){return _r.unmap(y,$)},noremap:function(y,$,k){_r.map(y,$,k,!0)},mapclear:function(y){var $=On.length,k=Co,N=On.slice(0,$-k);if(On=On.slice($-k),y)for(var W=N.length-1;W>=0;W--){var j=N[W];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in j)Q[re]=j[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:_,defineOption:I,defineEx:function(y,$,k){if(!$)$=y;else if(y.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+y+'", command not registered');Es[y]=k,_r.commandMap_[$]={name:y,shortName:$,type:"api"}},handleKey:function(y,$,k){var N=this.findKey(y,$,k);if(typeof N=="function")return N()},multiSelectHandleKey:yo,findKey:function(y,$,k){function N(){var re=He.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),A(y),!0;k!="mapping"&&Ho(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)St(y);else{if(!Y.insertMode)return;Yr(y)}return A(y),!0}}function j(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ve=jn.matchCommand(re,On,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ve.type=="none")return A(y),!1;if(ve.type=="partial"){if(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),Cn&&window.clearTimeout(Cn),Cn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(y)},_("insertModeEscKeysTimeout")),se){var ge=y.listSelections();(!Ce||Ce.removed.length!=ge.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var be=0;be<ge.length;be++){var Oe=mt(ge[be].anchor,ge[be].head),Re=sn(ge[be].anchor,ge[be].head),Ge=y.getRange(Oe,y.state.overwrite?ye(Re,0,1):Re);Ce.removed[be]=(Ce.removed[be]||"")+Ge}}return!se}if(Y.expectLiteralNext=!1,Cn&&window.clearTimeout(Cn),ve.command&&Ce){for(var ge=y.listSelections(),be=0;be<ge.length;be++){var ht=ge[be].head;y.replaceRange(Ce.removed[be]||"",ye(ht,0,-Ce.inserted.length),ht,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||A(y),ve.command}function q(){if(N()||W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return A(y),!1;var ve=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var ge=jn.matchCommand(Ce,On,Y.inputState,ve);return ge.type=="none"?(A(y),!1):ge.type=="partial"?(ge.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ge.type=="clear"?(A(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),ge.command)}var Y=L(y),Q;return Y.insertMode?Q=j():Q=q(),Q===!1?!Y.insertMode&&$.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"?E(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),kt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,$){_r.processCommand(y,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:Ss,_mapCommand:zo,defineRegister:U,exitVisualMode:St,exitInsertMode:Yr},Pr=[],pn=!1,Sn,rr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Wr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},ki={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(rr)).forEach(function(y){ki[(rr[y]||"").toLowerCase()]=ki[y.toLowerCase()]=y}),I("langmap",void 0,"string",["lmap"],function(y,$){if(y===void 0)return Qn.string;P(y)}),S.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},S.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,$,k){this.keyBuffer=[y||""],this.linewise=!!$,this.blockwise=!!k},pushText:function(y,$){$&&(this.linewise||this.keyBuffer.push(`
|
1436
|
+
`),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Bn(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,$,k,N,W){if(y!=="_"){N&&k.charAt(k.length-1)!==`
|
1437
|
+
`&&(k+=`
|
1438
|
+
`);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch($){case"yank":this.registers[0]=new B(k,N,W);break;case"delete":case"change":k.indexOf(`
|
1439
|
+
`)==-1?this.registers["-"]=new B(k,N):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,N))}this.unnamedRegister.setText(k,N,W);return}var q=d(y);q?j.pushText(k,N):j.setText(k,N,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(j.toString(),N)}},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,$){var k=this.historyBuffer,N=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+N;$?W>=0:W<k.length;W+=N)for(var j=k[W],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=W,j;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return y},pushInput:function(y){var $=this.historyBuffer.indexOf(y);$>-1&&this.historyBuffer.splice($,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,$,k,N){var W=Ae(y,$,N,k);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 j,q=0;q<W.full.length;q++){var Y=W.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Q=Ie(y);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(y,$,k){switch($.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(y,$,k);break;case"operator":this.processOperator(y,$,k);break;case"operatorMotion":this.processOperatorMotion(y,$,k);break;case"action":this.processAction(y,$,k);break;case"search":this.processSearch(y,$,k);break;case"ex":case"keyToEx":this.processEx(y,$,k);break}},processMotion:function(y,$,k){$.inputState.motion=k.motion,$.inputState.motionArgs=ue(k.motionArgs),this.evalInput(y,$)},processOperator:function(y,$,k){var N=$.inputState;if(N.operator){if(N.operator==k.operator){N.motion="expandToLine",N.motionArgs={linewise:!0},this.evalInput(y,$);return}A(y)}N.operator=k.operator,N.operatorArgs=ue(k.operatorArgs),k.keys.length>1&&(N.operatorShortcut=k.keys),k.exitVisualBlock&&($.visualBlock=!1,Je(y)),$.visualMode&&this.evalInput(y,$)},processOperatorMotion:function(y,$,k){var N=$.visualMode,W=ue(k.operatorMotionArgs);W&&N&&W.visualLine&&($.visualLine=!0),this.processOperator(y,$,k),N||this.processMotion(y,$,k)},processAction:function(y,$,k){var N=$.inputState,W=N.getRepeat(),j=!!W,q=ue(k.actionArgs)||{};N.selectedCharacter&&(q.selectedCharacter=N.selectedCharacter),k.operator&&this.processOperator(y,$,k),k.motion&&this.processMotion(y,$,k),(k.motion||k.operator)&&this.evalInput(y,$),q.repeat=W||1,q.repeatIsExplicit=j,q.registerName=N.registerName,A(y),$.lastMotion=null,k.isEdit&&this.recordLastEdit($,N,k),zn[k.action](y,q,$)},processSearch:function(y,$,k){function N(Re,Ge,ht){He.searchHistoryController.pushInput(Re),He.searchHistoryController.reset();try{xn(y,Re,Ge,ht)}catch{Kt(y,"Invalid regex: "+Re),A(y);return}jn.processMotion(y,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Re){N(Re,!0,!0);var Ge=He.macroModeState;Ge.isRecording&&$s(Ge,Re)}function j(Re,Ge,ht){var tt=H(Re),st,_n;tt=="<Up>"||tt=="<Down>"?(st=tt=="<Up>",_n=Re.target?Re.target.selectionEnd:0,Ge=He.searchHistoryController.nextMatch(Ge,st)||"",ht(Ge),_n&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(_n,Re.target.value.length))):tt&&tt!="<Left>"&&tt!="<Right>"&&He.searchHistoryController.reset();var dt;try{dt=xn(y,Ge,!0,!0)}catch{}dt?y.scrollIntoView(Lr(y,!Y,dt),30):(Bo(y),y.scrollTo(ve.left,ve.top))}function q(Re,Ge,ht){var tt=H(Re);tt=="<Esc>"||tt=="<C-c>"||tt=="<C-[>"||tt=="<BS>"&&Ge==""?(He.searchHistoryController.pushInput(Ge),He.searchHistoryController.reset(),xn(y,se),Bo(y),y.scrollTo(ve.left,ve.top),je.e_stop(Re),A(y),ht(),y.focus()):tt=="<Up>"||tt=="<Down>"?je.e_stop(Re):tt=="<C-u>"&&(je.e_stop(Re),ht(""))}if(y.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;Rn(y).setReversed(!Y);var re=Y?"/":"?",se=Rn(y).getQuery(),ve=y.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=He.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();N(Oe,!0,!1)}else Er(y,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var ge=_t(y,{noSymbol:!0}),be=!0;if(ge||(ge=_t(y,{noSymbol:!1}),be=!1),!ge){Kt(y,"No word under cursor"),A(y);return}var Oe=y.getLine(ge.start.line).substring(ge.start.ch,ge.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=wn(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(ge.start),N(Oe,!0,!1)}}},processEx:function(y,$,k){function N(j){He.exCommandHistoryController.pushInput(j),He.exCommandHistoryController.reset(),_r.processCommand(y,j),y.state.vim&&A(y)}function W(j,q,Y){var Q=H(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(He.exCommandHistoryController.pushInput(q),He.exCommandHistoryController.reset(),je.e_stop(j),A(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,q=He.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(se,j.target.value.length))):Q=="<C-u>"?(je.e_stop(j),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}k.type=="keyToEx"?_r.processCommand(y,k.exArgs.input):$.visualMode?Er(y,{onClose:N,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):Er(y,{onClose:N,prefix:":",onKeyDown:W})},evalInput:function(y,$){var k=$.inputState,N=k.motion,W=k.motionArgs||{},j=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=$.sel,re=Xe($.visualMode?ce(y,Q.head):y.getCursor("head")),se=Xe($.visualMode?ce(y,Q.anchor):y.getCursor("anchor")),ve=Xe(re),Ce=Xe(se),ge,be,Oe;if(j&&this.recordLastEdit($,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(y),N){var Re=Xr[N](y,re,W,$,k);if($.lastMotion=Xr[N],!Re)return;if(W.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=He.jumpList,ht=Ge.cachedCursor;ht?($r(y,ht,Re),delete Ge.cachedCursor):$r(y,re,Re)}Re instanceof Array?(be=Re[0],ge=Re[1]):ge=Re,ge||(ge=Xe(re)),$.visualMode?((!$.visualBlock||ge.ch!==1/0)&&(ge=ce(y,ge,ve)),be&&(be=ce(y,be)),be=be||Ce,Q.anchor=be,Q.head=ge,Je(y),si(y,$,"<",at(be,ge)?be:ge),si(y,$,">",at(be,ge)?ge:be)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ge=ce(y,ge,ve),y.setCursor(ge.line,ge.ch))}if(j){if(q.lastSel){be=Ce;var tt=q.lastSel,st=Math.abs(tt.head.line-tt.anchor.line),_n=Math.abs(tt.head.ch-tt.anchor.ch);tt.visualLine?ge=new Ne(Ce.line+st,Ce.ch):tt.visualBlock?ge=new Ne(Ce.line+st,Ce.ch+_n):tt.head.line==tt.anchor.line?ge=new Ne(Ce.line,Ce.ch+_n):ge=new Ne(Ce.line+st,Ce.ch),$.visualMode=!0,$.visualLine=tt.visualLine,$.visualBlock=tt.visualBlock,Q=$.sel={anchor:be,head:ge},Je(y)}else $.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var dt,Mn,$t,Ot,ir;if($.visualMode){dt=mt(Q.head,Q.anchor),Mn=sn(Q.head,Q.anchor),$t=$.visualLine||q.linewise,Ot=$.visualBlock?"block":$t?"line":"char";var mr=b(y,dt,Mn);if(ir=vt(y,{anchor:mr.start,head:mr.end},Ot),$t){var In=ir.ranges;if(Ot=="block")for(var V=0;V<In.length;V++)In[V].head.ch=Jt(y,In[V].head.line);else Ot=="line"&&(In[0].head=new Ne(In[0].head.line+1,0))}}else{if(dt=Xe(be||Ce),Mn=Xe(ge||ve),at(Mn,dt)){var X=dt;dt=Mn,Mn=X}$t=W.linewise||q.linewise,$t?Nt(y,dt,Mn):W.forward&&Pt(y,dt,Mn),Ot="char";var ie=!W.inclusive||$t,mr=b(y,dt,Mn);ir=vt(y,{anchor:mr.start,head:mr.end},Ot,ie)}y.setSelections(ir.ranges,ir.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=$t;var oe=Xo[j](y,q,ir.ranges,Ce,ge);$.visualMode&&St(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,$,k){var N=He.macroModeState;N.isPlaying||(y.lastEditInputState=$,y.lastEditActionCommand=k,N.lastInsertModeChanges.changes=[],N.lastInsertModeChanges.expectCursorActivityForChange=!1,N.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Xr={moveToTopLine:function(y,$,k){var N=ro(y).top+k.repeat-1;return new Ne(N,pt(y.getLine(N)))},moveToMiddleLine:function(y){var $=ro(y),k=Math.floor(($.top+$.bottom)*.5);return new Ne(k,pt(y.getLine(k)))},moveToBottomLine:function(y,$,k){var N=ro(y).bottom-k.repeat+1;return new Ne(N,pt(y.getLine(N)))},expandToLine:function(y,$,k){var N=$;return new Ne(N.line+k.repeat-1,1/0)},findNext:function(y,$,k){var N=Rn(y),W=N.getQuery();if(W){var j=!k.forward;return j=N.isReversed()?!j:j,bi(y,W),Lr(y,j,W,k.repeat)}},findAndSelectNextInclusive:function(y,$,k,N,W){var j=Rn(y),q=j.getQuery();if(q){var Y=!k.forward;Y=j.isReversed()?!Y:Y;var Q=wi(y,Y,q,k.repeat,N);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(N.visualMode){(N.visualLine||N.visualBlock)&&(N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ve=N.sel.anchor;if(ve)return j.isReversed()?k.forward?[ve,re]:[ve,se]:k.forward?[ve,se]:[ve,re]}else N.visualMode=!0,N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(y,$,k,N){var W=Gr(y,N,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:pt(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,$,k,N){if(N.visualBlock&&k.sameLine){var W=N.sel;return[ce(y,new Ne(W.anchor.line,W.head.ch)),ce(y,new Ne(W.head.line,W.anchor.ch))]}return[N.sel.head,N.sel.anchor]},jumpToMark:function(y,$,k,N){for(var W=$,j=0;j<k.repeat;j++){var q=W;for(var Y in N.marks)if(c(Y)){var Q=N.marks[Y].find(),re=k.forward?at(Q,q):at(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=gt(q,W),ve=k.forward?bn(q,Q,W):bn(W,Q,q);(se||ve)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,pt(y.getLine(W.line)))),W},moveByCharacters:function(y,$,k){var N=$,W=k.repeat,j=k.forward?N.ch+W:N.ch-W;return new Ne(N.line,j)},moveByLines:function(y,$,k,N){var W=$,j=W.ch;switch(N.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=N.lastHPos;break;default:N.lastHPos=j}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(y,$,k,N);if(Y>re&&W.line==re)return go(y,$,k,N,!0);var se=y.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(j=pt(y.getLine(Y)),N.lastHPos=j),N.lastHSPos=y.charCoords(new Ne(Y,j),"div").left,new Ne(Y,j)},moveByDisplayLines:function(y,$,k,N){var W=$;switch(N.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:N.lastHSPos=y.charCoords(W,"div").left}var j=k.repeat,Q=y.findPosV(W,k.forward?j:-j,"line",N.lastHSPos);if(Q.hitSide)if(k.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:N.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new Ne(y.firstLine(),0),"div");re.left=N.lastHSPos,Q=y.coordsChar(re,"div")}return N.lastHPos=Q.ch,Q},moveByPage:function(y,$,k){var N=$,W=k.repeat;return y.findPosV(N,k.forward?W:-W,"page")},moveByParagraph:function(y,$,k){var N=k.forward?1:-1;return _s(y,$,k.repeat,N)},moveBySentence:function(y,$,k){var N=k.forward?1:-1;return ji(y,$,k.repeat,N)},moveByScroll:function(y,$,k,N){var W=y.getScrollInfo(),j=null,q=k.repeat;q||(q=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords($,"local");if(k.repeat=q,j=Xr.moveByDisplayLines(y,$,k,N),!j)return null;var Q=y.charCoords(j,"local");return y.scrollTo(null,W.top+Q.top-Y.top),j},moveByWords:function(y,$,k){return xr(y,$,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(y,$,k){var N=k.repeat,W=Wo(y,N,k.forward,k.selectedCharacter,$),j=k.forward?-1:1;return Kr(j,k),W?(W.ch+=j,W):null},moveToCharacter:function(y,$,k){var N=k.repeat;return Kr(0,k),Wo(y,N,k.forward,k.selectedCharacter,$)||$},moveToSymbol:function(y,$,k){var N=k.repeat;return Bi(y,N,k.forward,k.selectedCharacter)||$},moveToColumn:function(y,$,k,N){var W=k.repeat;return N.lastHPos=W-1,N.lastHSPos=y.charCoords($,"div").left,Ya(y,W)},moveToEol:function(y,$,k,N){return go(y,$,k,N,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,$){var k=$;return new Ne(k.line,pt(y.getLine(k.line)))},moveToMatchedSymbol:function(y,$){for(var k=$,N=k.line,W=k.ch,j=y.getLine(N),q;W<j.length;W++)if(q=j.charAt(W),q&&l(q)){var Y=y.getTokenTypeAt(new Ne(N,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<j.length){var Q=/[<>]/.test(j[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new Ne(N,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(y,$){return new Ne($.line,0)},moveToLineOrEdgeOfDocument:function(y,$,k){var N=k.forward?y.lastLine():y.firstLine();return k.repeatIsExplicit&&(N=k.repeat-y.getOption("firstLineNumber")),new Ne(N,pt(y.getLine(N)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var $=y.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(y,$,k,N){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=Yn(y,$,q,Y),!Q){var se=y.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=Yn(y,se.from(),q,Y))}}else if(j[q])re=!0,Q=Mr(y,$,q,Y);else if(q==="W"||q==="w")for(var ve=k.repeat||1;ve-- >0;){var Ce=_t(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=_s(y,$,k.repeat,0,Y),k.linewise=!0,N.visualMode)N.visualLine||(N.visualLine=!0);else{var ge=N.inputState.operatorArgs;ge&&(ge.linewise=!0),Q.end.line--}else if(q==="t")Q=$n(y,$,Y);else if(q==="s"){var be=y.getLine($.line);$.ch>0&&w(be[$.ch])&&($.ch-=1);var Oe=aa(y,$,k.repeat,1,Y),Re=aa(y,$,k.repeat,-1,Y);m(y.getLine(Re.line)[Re.ch])&&m(y.getLine(Oe.line)[Oe.ch-1])&&(Re={line:Re.line,ch:Re.ch+1}),Q={start:Re,end:Oe}}return Q?y.state.vim.visualMode?Ve(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,$,k){var N=He.lastCharacterSearch,W=k.repeat,j=k.forward===N.forward,q=(N.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),k.inclusive=!!j;var Y=Wo(y,W,j,N.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),$)}},Xo={change:function(y,$,k){var N,W,j=y.state.vim,q=k[0].anchor,Y=k[0].head;if(j.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),W=y.getSelection(),y.replaceSelection(""),N=q;else{W=y.getSelection();var Q=he("",k.length);y.replaceSelections(Q),N=mt(k[0].head,k[0].anchor)}else{W=y.getRange(q,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ye(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}$.linewise&&(q=new Ne(q.line,pt(y.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),N=q}He.registerController.pushText($.registerName,"change",W,$.linewise,k.length>1),zn.enterInsertMode(y,{head:N},y.state.vim)},delete:function(y,$,k){var N,W,j=y.state.vim;if(j.visualBlock){W=y.getSelection();var q=he("",k.length);y.replaceSelections(q),N=mt(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[0].head;$.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,Jt(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),N=Y,$.linewise&&(N=Xr.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText($.registerName,"delete",W,$.linewise,j.visualBlock),ce(y,N)},indent:function(y,$,k){var N=y.state.vim,W=N.visualMode?$.repeat:1;if(N.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=k.length-1;Q>=0;Q--)if(Y=mt(k[Q].anchor,k[Q].head),$.indentRight)y.replaceRange(q.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),se=0,ve=0;ve<W;ve++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var ge=1;ge<q.length&&(Ce=re[Y.ch+se],Ce===" ");ge++)se++}}y.replaceRange("",Y,ye(Y,0,se))}return Y}if(y.indentMore)for(var ve=0;ve<W;ve++)$.indentRight?y.indentMore():y.indentLess();else{var be=k[0].anchor.line,Oe=N.visualBlock?k[k.length-1].anchor.line:k[0].head.line;$.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var ve=0;ve<W;ve++)y.indentLine(Q,$.indentRight)}return Xr.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},indentAuto:function(y,$,k){return y.execCommand("indentAuto"),Xr.moveToFirstNonWhiteSpaceCharacter(y,k[0].anchor)},hardWrap:function(y,$,k,N,W){if(y.hardWrap){var j=k[0].anchor.line,q=k[0].head.line;$.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&$.linewise&&Y--,$.keepCursor?N:new Ne(Y,0)}},changeCase:function(y,$,k,N,W){for(var j=y.getSelections(),q=[],Y=$.toLower,Q=0;Q<j.length;Q++){var re=j[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ve=0;ve<re.length;ve++){var Ce=re.charAt(ve);se+=d(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return y.replaceSelections(q),$.shouldMoveCursor?W:!y.state.vim.visualMode&&$.linewise&&k[0].anchor.line+1==k[0].head.line?Xr.moveToFirstNonWhiteSpaceCharacter(y,N):$.linewise?N:mt(k[0].anchor,k[0].head)},yank:function(y,$,k,N){var W=y.state.vim,j=y.getSelection(),q=W.visualMode?mt(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):N;return He.registerController.pushText($.registerName,"yank",j,$.linewise,W.visualBlock),q}},zn={jumpListWalk:function(y,$,k){if(!k.visualMode){var N=$.repeat,W=$.forward,j=He.jumpList,q=j.move(y,W?N:-N),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,$,k){if(!k.visualMode){var N=$.repeat||1,W=y.defaultTextHeight(),j=y.getScrollInfo().top,q=W*N,Y=$.forward?j+q:j-q,Q=Xe(y.getCursor()),re=y.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var se=Y+y.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,$){var k=y.getCursor().line,N=y.charCoords(new Ne(k,0),"local"),W=y.getScrollInfo().clientHeight,j=N.top;switch($.position){case"center":j=N.bottom-W/2;break;case"bottom":var q=new Ne(k,y.getLine(k).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-j;j=j-W+Q}y.scrollTo(null,j)},replayMacro:function(y,$,k){var N=$.selectedCharacter,W=$.repeat,j=He.macroModeState;for(N=="@"?N=j.latestRegister:j.latestRegister=N;W--;)Ts(y,k,j,N)},enterMacroRecordMode:function(y,$){var k=He.macroModeState,N=$.selectedCharacter;He.registerController.isValidRegister(N)&&k.enterMacroRecordMode(y,N)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,$,k){if(!y.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=$&&$.repeat||1;var N=$?$.insertAt:null,W=k.sel,j=$.head||y.getCursor("head"),q=y.listSelections().length;if(N=="eol")j=new Ne(j.line,Jt(y,j.line));else if(N=="bol")j=new Ne(j.line,0);else if(N=="charAfter"){var Y=b(y,j,ye(j,0,1));j=Y.end}else if(N=="firstNonBlank"){var Y=b(y,j,Xr.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(N=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=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?j=W.head:j=new Ne(W.anchor.line,0)}else if(N=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=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?j=ye(W.head,0,1):j=new Ne(W.anchor.line,0)}else if(N=="inplace"){if(k.visualMode)return}else N=="lastEdit"&&(j=mo(y)||j);y.setOption("disableInput",!1),$&&$.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",vo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=y.setBookmark(j,{insertLeft:!0}),je.on(y.getInputField(),"keydown",Ms)),k.visualMode&&St(y),nr(y,j,q)}},toggleVisualMode:function(y,$,k){var N=$.repeat,W=y.getCursor(),j;if(k.visualMode)k.visualLine^$.linewise||k.visualBlock^$.blockwise?(k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Je(y)):St(y);else{k.visualMode=!0,k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,j=ce(y,new Ne(W.line,W.ch+N-1));var q=b(y,W,j);k.sel={anchor:q.start,head:q.end},je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Je(y),si(y,k,"<",mt(W,j)),si(y,k,">",sn(W,j))}},reselectLastSelection:function(y,$,k){var N=k.lastSelection;if(k.visualMode&&_e(y,k),N){var W=N.anchorMark.find(),j=N.headMark.find();if(!W||!j)return;k.sel={anchor:W,head:j},k.visualMode=!0,k.visualLine=N.visualLine,k.visualBlock=N.visualBlock,Je(y),si(y,k,"<",mt(W,j)),si(y,k,">",sn(W,j)),je.signal(y,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(y,$,k){var N,W;if(k.visualMode){if(N=y.getCursor("anchor"),W=y.getCursor("head"),at(W,N)){var j=W;W=N,N=j}W.ch=Jt(y,W.line)-1}else{var q=Math.max($.repeat,2);N=y.getCursor(),W=ce(y,new Ne(N.line+q-1,1/0))}for(var Y=0,Q=N.line;Q<W.line;Q++){Y=Jt(y,N.line);var re="",se=0;if(!$.keepSpaces){var ve=y.getLine(N.line+1);se=ve.search(/\S/),se==-1?se=ve.length:re=" "}y.replaceRange(re,new Ne(N.line,Y),new Ne(N.line+1,se))}var Ce=ce(y,new Ne(N.line,Y));k.visualMode&&St(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,$,k){k.insertMode=!0;var N=Xe(y.getCursor());if(N.line===y.firstLine()&&!$.after)y.replaceRange(`
|
1440
|
+
`,new Ne(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{N.line=$.after?N.line:N.line-1,N.ch=Jt(y,N.line),y.setCursor(N);var W=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:$.repeat},k)},paste:function(y,$,k){var N=this,W=He.registerController.getRegister($.registerName),j=function(){var q=W.toString();N.continuePaste(y,$,k,q,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){N.continuePaste(y,$,k,q,W)},function(){j()}):j()},continuePaste:function(y,$,k,N,W){var j=Xe(y.getCursor());if(N){if($.matchIndent){var q=y.getOption("tabSize"),Y=function(In){var V=In.split(" ").length-1,X=In.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=N.replace(/\n$/,""),ve=N!==se,Ce=Y(N.match(/^\s*/)[0]),N=se.replace(/^\s*/gm,function(In){var V=re+(Y(In)-Ce);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});N+=ve?`
|
1441
|
+
`:""}if($.repeat>1)var N=Array($.repeat+1).join(N);var ge=W.linewise,be=W.blockwise;if(be){N=N.split(`
|
1442
|
+
`),ge&&N.pop();for(var Oe=0;Oe<N.length;Oe++)N[Oe]=N[Oe]==""?" ":N[Oe];j.ch+=$.after?1:0,j.ch=Math.min(Jt(y,j.line),j.ch)}else ge?k.visualMode?N=k.visualLine?N.slice(0,-1):`
|
1443
|
+
`+N.slice(0,N.length-1)+`
|
1444
|
+
`:$.after?(N=`
|
1445
|
+
`+N.slice(0,N.length-1),j.ch=Jt(y,j.line)):j.ch=0:j.ch+=$.after?1:0;var Re;if(k.visualMode){k.lastPastedText=N;var Ge,ht=Ke(y,k),tt=ht[0],st=ht[1],_n=y.getSelection(),dt=y.listSelections(),Mn=new Array(dt.length).join("1").split("1");k.lastSelection&&(Ge=k.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(_n),be?(y.replaceSelections(Mn),st=new Ne(tt.line+N.length-1,tt.ch),y.setCursor(tt),Pn(y,st),y.replaceSelections(N),Re=tt):k.visualBlock?(y.replaceSelections(Mn),y.setCursor(tt),y.replaceRange(N,tt,tt),Re=tt):(y.replaceRange(N,tt,st),Re=y.posFromIndex(y.indexFromPos(tt)+N.length-1)),Ge&&(k.lastSelection.headMark=y.setBookmark(Ge)),ge&&(Re.ch=0)}else if(be){y.setCursor(j);for(var Oe=0;Oe<N.length;Oe++){var $t=j.line+Oe;$t>y.lastLine()&&y.replaceRange(`
|
1446
|
+
`,new Ne($t,0));var Ot=Jt(y,$t);Ot<j.ch&&Fn(y,$t,j.ch)}y.setCursor(j),Pn(y,new Ne(j.line+N.length-1,j.ch)),y.replaceSelections(N),Re=j}else if(y.replaceRange(N,j),ge){var $t=$.after?j.line+1:j.line;Re=new Ne($t,pt(y.getLine($t)))}else Re=Xe(j),/\n/.test(N)||(Re.ch+=N.length-($.after?1:0));k.visualMode&&St(y,!1),y.setCursor(Re)}},undo:function(y,$){y.operation(function(){Ze(y,je.commands.undo,$.repeat)(),y.setCursor(ce(y,y.getCursor("start")))})},redo:function(y,$){Ze(y,je.commands.redo,$.repeat)()},setRegister:function(y,$,k){k.inputState.registerName=$.selectedCharacter},insertRegister:function(y,$,k){var N=$.selectedCharacter,W=He.registerController.getRegister(N),j=W&&W.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,$,k){Yr(y,!0),k.insertModeReturn=!0,je.on(y,"vim-command-done",function N(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||zn.enterInsertMode(y,{},k)),je.off(y,"vim-command-done",N))})},setMark:function(y,$,k){var N=$.selectedCharacter;si(y,k,N,y.getCursor())},replace:function(y,$,k){var N=$.selectedCharacter,W=y.getCursor(),j,q,Y=y.listSelections();if(k.visualMode)W=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(W.line);j=W.ch+$.repeat,j>Q.length&&(j=Q.length),q=new Ne(W.line,j)}var re=b(y,W,q);if(W=re.start,q=re.end,N==`
|
1447
|
+
`)k.visualMode||y.replaceRange("",W,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(y);else{var se=y.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/[^\n]/g,N),k.visualBlock){var ve=new Array(y.getOption("tabSize")+1).join(" ");se=y.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/\t/g,ve).replace(/[^\n]/g,N).split(`
|
1448
|
+
`),y.replaceSelections(se)}else y.replaceRange(se,W,q);k.visualMode?(W=at(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),St(y,!1)):y.setCursor(ye(q,0,-1))}},incrementNumberToken:function(y,$){for(var k=y.getCursor(),N=y.getLine(k.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,Q;(j=W.exec(N))!==null&&(q=j.index,Y=q+j[0].length,!(k.ch<Y)););if(!(!$.backtrack&&Y<=k.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ve=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ge=parseInt(j[1]+se,Ce)+ve*$.repeat;Q=ge.toString(Ce);var be=re?new Array(se.length-Q.length+1+j[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new Ne(k.line,q),Re=new Ne(k.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new Ne(k.line,q+Q.length-1))}},repeatLastEdit:function(y,$,k){var N=k.lastEditInputState;if(N){var W=$.repeat;W&&$.repeatIsExplicit?k.lastEditInputState.repeatOverride=W:W=k.lastEditInputState.repeatOverride||W,ua(y,k,W,!1)}},indent:function(y,$){y.indentLine(y.getCursor().line,$.indentRight)},exitInsertMode:Yr},ci={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ui={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 $=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,$}},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 $=y.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if($==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if($==="else"&&y.depth===0)return!0}return!1}}};I("pcre",!0,"boolean"),zi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Ai={"\\n":`
|
1449
|
+
`,"\\r":"\r","\\t":" "},pr={"\\/":"/","\\\\":"\\","\\n":`
|
1450
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},gr=0,Cr=function(){this.buildCommandMap_()};Cr.prototype={processCommand:function(y,$,k){var N=this;y.operation(function(){y.curOp.isVimOp=!0,N._processCommand(y,$,k)})},_processCommand:function(y,$,k){var N=y.state.vim,W=He.registerController.getRegister(":"),j=W.toString(),q=new je.StringStream($);W.setText($);var Y=k||{};Y.input=$;try{this.parseInput_(y,q,Y)}catch(se){throw Kt(y,se.toString()),se}N.visualMode&&St(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(j),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){E(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Kt(y,'Not an editor command ":'+$+'"');return}try{Es[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Kt(y,se.toString()),se}},parseInput_:function(y,$,k){if($.eatWhile(":"),$.eat("%")?(k.line=y.firstLine(),k.lineEnd=y.lastLine()):(k.line=this.parseLineSpec_(y,$),k.line!==void 0&&$.eat(",")&&(k.lineEnd=this.parseLineSpec_(y,$))),k.line==null)if(y.state.vim.visualMode){var N=Gr(y,y.state.vim,"<");k.selectionLine=N&&N.line,N=Gr(y,y.state.vim,">"),k.selectionLineEnd=N&&N.line}else k.selectionLine=y.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=$.match(/.*/)[0],k},parseLineSpec_:function(y,$){var k=$.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,y.getCursor().line);case"$":return this.parseLineSpecOffset_($,y.lastLine());case"'":var N=$.next(),W=Gr(y,y.state.vim,N);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,y.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(y,$){var k=y.match(/^([+-])?(\d+)/);if(k){var N=parseInt(k[2],10);k[1]=="-"?$-=N:$+=N}return $},parseCommandArgs_:function(y,$,k){if(!y.eol()){$.argString=y.match(/.*/)[0];var N=k.argDelimiter||/\s+/,W=wr($.argString).split(N);W.length&&W[0]&&($.args=W)}},matchCommand_:function(y){for(var $=y.length;$>0;$--){var k=y.substring(0,$);if(this.commandMap_[k]){var N=this.commandMap_[k];if(N.name.indexOf(y)===0)return N}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<li.length;y++){var $=li[y],k=$.shortName||$.name;this.commandMap_[k]=$}},map:function(y,$,k,N){if(y!=":"&&y.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var W=y.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:$,noremap:!!N};k&&(j.context=k),On.unshift(j)}},unmap:function(y,$){if(y!=":"&&y.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var k=y.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var N=y,W=0;W<On.length;W++)if(N==On[W].keys&&On[W].context===$)return On.splice(W,1),!0}};var Es={colorscheme:function(y,$){if(!$.args||$.args.length<1){Kt(y,y.getOption("theme"));return}y.setOption("theme",$.args[0])},map:function(y,$,k,N){var W=$.args;if(!W||W.length<2){y&&Kt(y,"Invalid mapping: "+$.input);return}_r.map(W[0],W[1],k,N)},imap:function(y,$){this.map(y,$,"insert")},nmap:function(y,$){this.map(y,$,"normal")},vmap:function(y,$){this.map(y,$,"visual")},omap:function(y,$){this.map(y,$,"operatorPending")},noremap:function(y,$){this.map(y,$,void 0,!0)},inoremap:function(y,$){this.map(y,$,"insert",!0)},nnoremap:function(y,$){this.map(y,$,"normal",!0)},vnoremap:function(y,$){this.map(y,$,"visual",!0)},onoremap:function(y,$){this.map(y,$,"operatorPending",!0)},unmap:function(y,$,k){var N=$.args;(!N||N.length<1||!_r.unmap(N[0],k))&&y&&Kt(y,"No such mapping: "+$.input)},mapclear:function(y,$){kt.mapclear()},imapclear:function(y,$){kt.mapclear("insert")},nmapclear:function(y,$){kt.mapclear("normal")},vmapclear:function(y,$){kt.mapclear("visual")},omapclear:function(y,$){kt.mapclear("operatorPending")},move:function(y,$){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(y,$){var k=$.args,N=$.setCfg||{};if(!k||k.length<1){y&&Kt(y,"Invalid mapping: "+$.input);return}var W=k[0].split("="),j=W[0],q=W[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Q=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Gt[j]&&Gt[j].type=="boolean";if(re&&(Q?q=!_(j,y,N):q==null&&(q=!0)),!re&&q===void 0||Y){var se=_(j,y,N);se instanceof Error?Kt(y,se.message):se===!0||se===!1?Kt(y," "+(se?"":"no")+j):Kt(y," "+j+"="+se)}else{var ve=T(j,q,y,N);ve instanceof Error&&Kt(y,ve.message)}},setlocal:function(y,$){$.setCfg={scope:"local"},this.set(y,$)},setglobal:function(y,$){$.setCfg={scope:"global"},this.set(y,$)},registers:function(y,$){var k=$.args,N=He.registerController.registers,W=`----------Registers----------
|
1451
|
+
|
1452
|
+
`;if(k){var j;k=k.join("");for(var q=0;q<k.length;q++)if(j=k.charAt(q),!!He.registerController.isValidRegister(j)){var Y=N[j]||new B;W+='"'+j+" "+Y.toString()+`
|
1453
|
+
`}}else for(var j in N){var Q=N[j].toString();Q.length&&(W+='"'+j+" "+Q+`
|
1454
|
+
`)}Kt(y,W)},sort:function(y,$){function k(){if($.argString){var $t=new je.StringStream($.argString);if($t.eat("!")&&(j=!0),$t.eol())return;if(!$t.eatSpace())return"Invalid arguments";var Ot=$t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ot&&!$t.eol())return"Invalid arguments";if(Ot[1]){q=Ot[1].indexOf("i")!=-1,Y=Ot[1].indexOf("u")!=-1;var ir=Ot[1].indexOf("d")!=-1||Ot[1].indexOf("n")!=-1&&1,mr=Ot[1].indexOf("x")!=-1&&1,In=Ot[1].indexOf("o")!=-1&&1;if(ir+mr+In>1)return"Invalid arguments";Q=ir&&"decimal"||mr&&"hex"||In&&"octal"}Ot[2]&&(re=new RegExp(Ot[2].substr(1,Ot[2].length-2),q?"i":""))}}function N($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}q&&($t=$t.toLowerCase(),Ot=Ot.toLowerCase());var mr=Q&&Re.exec($t),In=Q&&Re.exec(Ot);return mr?(mr=parseInt((mr[1]+mr[2]).toLowerCase(),Ge),In=parseInt((In[1]+In[2]).toLowerCase(),Ge),mr-In):$t<Ot?-1:1}function W($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}return q&&($t[0]=$t[0].toLowerCase(),Ot[0]=Ot[0].toLowerCase()),$t[0]<Ot[0]?-1:1}var j,q,Y,Q,re,se=k();if(se){Kt(y,se+": "+$.argString);return}var ve=$.line||y.firstLine(),Ce=$.lineEnd||$.line||y.lastLine();if(ve!=Ce){var ge=new Ne(ve,0),be=new Ne(Ce,Jt(y,Ce)),Oe=y.getRange(ge,be).split(`
|
1455
|
+
`),Re=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,ht=[],tt=[];if(Q||re)for(var st=0;st<Oe.length;st++){var _n=re?Oe[st].match(re):null;_n&&_n[0]!=""?ht.push(_n):!re&&Re.exec(Oe[st])?ht.push(Oe[st]):tt.push(Oe[st])}else tt=Oe;if(ht.sort(re?W:N),re)for(var st=0;st<ht.length;st++)ht[st]=ht[st].input;else Q||tt.sort(N);if(Oe=j?ht.concat(tt):tt.concat(ht),Y){var dt=Oe,Mn;Oe=[];for(var st=0;st<dt.length;st++)dt[st]!=Mn&&Oe.push(dt[st]),Mn=dt[st]}y.replaceRange(Oe.join(`
|
1456
|
+
`),ge,be)}},vglobal:function(y,$){this.global(y,$)},normal:function(y,$){var k=$.argString;if(k&&k[0]=="!"&&(k=k.slice(1),pn=!0),k=k.trimStart(),!k){Kt(y,"Argument is required.");return}var N=$.line;if(typeof N=="number")for(var W=isNaN($.lineEnd)?N:$.lineEnd,j=N;j<=W;j++)y.setCursor(j,0),E(y,$.argString.trimStart()),y.state.vim.insertMode&&Yr(y,!0);else E(y,$.argString.trimStart()),y.state.vim.insertMode&&Yr(y,!0)},global:function(y,$){var k=$.argString;if(!k){Kt(y,"Regular Expression missing from global");return}var N=$.commandName[0]==="v";k[0]==="!"&&$.commandName[0]==="g"&&(N=!0,k=k.slice(1));var W=$.line!==void 0?$.line:y.firstLine(),j=$.lineEnd||$.line||y.lastLine(),q=Ir(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{xn(y,Y,!0,!0)}catch{Kt(y,"Invalid regex: "+Y);return}for(var re=Rn(y).getQuery(),se=[],ve=W;ve<=j;ve++){var Ce=y.getLine(ve),ge=re.test(Ce);ge!==N&&se.push(Q?y.getLineHandle(ve):Ce)}if(!Q){Kt(y,se.join(`
|
1457
|
+
`));return}var be=0,Oe=function(){if(be<se.length){var Re=se[be++],Ge=y.getLineNumber(Re);if(Ge==null){Oe();return}var ht=Ge+1+Q;_r.processCommand(y,ht,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,$){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=$.argString,N=k?Hi(k,k[0]):[],W,j="",q,Y,Q,re=!1,se=!1;if(N.length)W=N[0],_("pcre")&&W!==""&&(W=new RegExp(W).source),j=N[1],j!==void 0&&(_("pcre")?j=Za(j.replace(/([^\\])&/g,"$1$$&")):j=Qa(j),He.lastSubstituteReplacePart=j),q=N[2]?N[2].split(" "):[];else if(k&&k.length){Kt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),_("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{xn(y,W,!0,!0)}catch{Kt(y,"Invalid regex: "+W);return}if(j=j||He.lastSubstituteReplacePart,j===void 0){Kt(y,"No previous substitute regular expression");return}var ve=Rn(y),Ce=ve.getQuery(),ge=$.line!==void 0?$.line:y.getCursor().line,be=$.lineEnd||ge;ge==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(ge=be,be=ge+Q-1);var Oe=ce(y,new Ne(ge,0)),Re=y.getSearchCursor(Ce,Oe);jo(y,re,se,ge,be,Re,Ce,j,$.callback)},startinsert:function(y,$){E(y,$.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(y){je.commands.save?je.commands.save(y):y.save&&y.save()},nohlsearch:function(y){Bo(y)},yank:function(y){var $=Xe(y.getCursor()),k=$.line,N=y.getLine(k);He.registerController.pushText("0","yank",N,!0,!0)},delete:function(y,$){var k=$.selectionLine,N=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;Xo.delete(y,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(N+1,0)}])},join:function(y,$){var k=$.selectionLine,N=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;y.setCursor(new Ne(k,0)),zn.joinLines(y,{repeat:N-k},y.state.vim)},delmarks:function(y,$){if(!$.argString||!wr($.argString)){Kt(y,"Argument required");return}for(var k=y.state.vim,N=new je.StringStream(wr($.argString));!N.eol();){N.eatSpace();var W=N.pos;if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(W));return}var j=N.next();if(N.match("-",!0)){if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(W));return}var q=j,Y=N.next();if(!(c(q)&&c(Y)||d(q)&&d(Y))){Kt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Kt(y,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete k.marks[ve]}}else delete k.marks[j]}}},_r=new Cr;I("insertModeEscKeysTimeout",200,"number"),je.Vim=kt;var Rr={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},hi=kt.handleKey.bind(kt);kt.handleKey=function(y,$,k){return y.operation(function(){return hi(y,$,k)},!0)},R(),r.CodeMirror=je;var di=kt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,$,k,N,W){var j=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=$.top,re=$.left;if(!j.insertMode){var se=N.cursor?dr.comparePoints(N.cursor,N.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),Vi.translate(y,re,Q),Vi.setStyle(y.style,"width",q+"px"),Vi.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var $=y.state.cm,k=di($);if(!k.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,$,k,N,W){var j=y.editor,q=j.state.cm,Y=di(q);if(N!=-1){if(Y.insertMode||($==-1?(k.charCodeAt(0)>255&&y.inputKey&&(k=y.inputKey,k&&y.inputHash==4&&(k=k.toUpperCase())),y.inputChar=k):$==4||$==0?y.inputKey==k&&y.inputHash==$&&y.inputChar?(k=y.inputChar,$=-1):(y.inputChar=null,y.inputKey=k,y.inputHash=$):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&$==0)return{command:"gotoleft"};if(k=="c"&&$==1&&!wo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){St(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Rn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&k.length>1){var se=Y.insertMode,ve=Is($,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=yo(q,ve,"user");return Y=di(q),Ce&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function $(){var N=di(k).insertMode;k.ace.renderer.setStyle("normal-mode",!N),y.textInput.setCommandMode(!N),y.renderer.$keepTextAreaAtCursor=N,y.renderer.$blockCursor=!N}y.state||(y.state={});var k=new je(y);y.state.cm=k,y.$vimModeHandler=this,u(k),di(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(di(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||($(),k._signal("changeStatus"))}),$(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(y){var $=y.state.cm;g($),$.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 $=y.state.cm,k=di($);if(k.insertMode)return"INSERT";var N="";return k.visualMode&&(N+="VISUAL",k.visualLine&&(N+=" LINE"),k.visualBlock&&(N+=" BLOCK")),k.status&&(N+=(N?" ":"")+k.status),N}},kt.defineOption({name:"wrap",set:function(y,$){$&&$.ace.setOption("wrap",y)},type:"boolean"},!1),kt.defineEx("write","w",function(){console.log(":write is not implemented")}),On.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),On.push({keys:"gq",type:"operator",operator:"hardWrap"}),kt.defineOperator("hardWrap",function(y,$,k,N,W){var j=k[0].anchor.line,q=k[0].head.line;return $.linewise&&q--,so(y.ace,{startRow:j,endRow:q}),Ne(q,0)}),I("textwidth",void 0,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var k=$.ace.getOption("printMarginColumn");return k}var N=Math.round(y);N>1&&$.ace.setOption("printMarginColumn",N)}}),zn.aceCommand=function(y,$,k){y.vimCmd=$,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",xi):xi(null,y.ace)},zn.fold=function(y,$,k){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},Co=On.length,r.handler.defaultKeymap=On,r.handler.actions=zn,r.Vim=kt}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(cg)),cg.exports}f_();var Ol={exports:{}};/**
|
1458
|
+
* @license
|
1459
|
+
* Lodash <https://lodash.com/>
|
1460
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1461
|
+
* Released under MIT license <https://lodash.com/license>
|
1462
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1463
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1464
|
+
*/var p_=Ol.exports,hg;function g_(){return hg||(hg=1,function(t,e){(function(){var n,r="4.17.21",f=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",a=1,c=2,l=4,o=1,d=2,m=1,w=2,x=4,I=8,T=16,_=32,C=64,L=128,R=256,F=512,E=30,H="...",P=800,O=16,S=1,A=2,D=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",L],["bind",m],["bindKey",w],["curry",I],["curryRight",T],["flip",F],["partial",_],["partialRight",C],["rearg",R]],ce="[object Arguments]",ue="[object Array]",ye="[object AsyncFunction]",Ae="[object Boolean]",$e="[object Date]",Ie="[object DOMException]",Ze="[object Error]",Xe="[object Function]",gt="[object GeneratorFunction]",at="[object Map]",mt="[object Number]",sn="[object Null]",bn="[object Object]",Jt="[object Promise]",wr="[object Proxy]",wn="[object RegExp]",Fn="[object Set]",Pn="[object String]",nr="[object Symbol]",Ct="[object Undefined]",Ke="[object WeakMap]",_e="[object WeakSet]",Ve="[object ArrayBuffer]",Je="[object DataView]",vt="[object Float32Array]",Tt="[object Float64Array]",St="[object Int8Array]",Pt="[object Int16Array]",Nt="[object Int32Array]",pt="[object Uint8Array]",_t="[object Uint8ClampedArray]",$n="[object Uint16Array]",$r="[object Uint32Array]",Kr=/\b__p \+= '';/g,Bi=/\b(__p \+=) '' \+/g,po=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,go=/[&<>"']/g,Wo=RegExp(xr.source),Ya=RegExp(go.source),si=/<%-([\s\S]+?)%>/g,Xa=/<%([\s\S]+?)%>/g,_s=/<%=([\s\S]+?)%>/g,aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,Yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,zi=RegExp(Mr.source),Rn=/^\s+/,Ir=/\s/,no=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hi=/\{\n\/\* \[wrapped with (.+)\] \*/,ks=/,? & /,la=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qa=/[()=,{}\[\]\/\s]/,Za=/\\(\\)?/g,Ui=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ai=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,ca=/^0b[01]+$/i,Er=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,xn=/^(?:0|[1-9]\d*)$/,Wn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bi=/($^)/,Lr=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",Bo="\\u0300-\\u036f",As="\\ufe20-\\ufe2f",ro="\\u20d0-\\u20ff",Gr=Bo+As+ro,mo="\\u2700-\\u27bf",jo="a-z\\xdf-\\xf6\\xf8-\\xff",Yr="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ss="\\u2000-\\u206f",Ts=" \\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",Ho="A-Z\\xc0-\\xd6\\xd8-\\xde",hr="\\ufe0e\\ufe0f",$s=Yr+zo+Ss+Ts,vo="['’]",Uo="["+wi+"]",Vo="["+$s+"]",io="["+Gr+"]",Ms="\\d+",ua="["+mo+"]",qo="["+jo+"]",Ko="[^"+wi+$s+Ms+mo+jo+Ho+"]",Is="\\ud83c[\\udffb-\\udfff]",Go="(?:"+io+"|"+Is+")",yo="[^"+wi+"]",xi="(?:\\ud83c[\\udde6-\\uddff]){2}",dr="[\\ud800-\\udbff][\\udc00-\\udfff]",oo="["+Ho+"]",Vi="\\u200d",ha="(?:"+qo+"|"+Ko+")",Ja="(?:"+oo+"|"+Ko+")",bo="(?:"+vo+"(?:d|ll|m|re|s|t|ve))?",qi="(?:"+vo+"(?:D|LL|M|RE|S|T|VE))?",wo=Go+"?",Yo="["+hr+"]?",xo="(?:"+Vi+"(?:"+[yo,xi,dr].join("|")+")"+Yo+wo+")*",da="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",so="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",je=Yo+wo+xo,fa="(?:"+[ua,xi,dr].join("|")+")"+je,Ne="(?:"+[yo+io+"?",io,xi,dr,Uo].join("|")+")",On=RegExp(vo,"g"),Co=RegExp(io,"g"),li=RegExp(Is+"(?="+Is+")|"+Ne+je,"g"),Qn=RegExp([oo+"?"+qo+"+"+bo+"(?="+[Vo,oo,"$"].join("|")+")",Ja+"+"+qi+"(?="+[Vo,oo+ha,"$"].join("|")+")",oo+"?"+ha+"+"+bo,oo+"+"+qi,so,da,Ms,fa].join("|"),"g"),pa=RegExp("["+Vi+wi+Gr+hr+"]"),_o=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ci=["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"],ao=-1,an={};an[vt]=an[Tt]=an[St]=an[Pt]=an[Nt]=an[pt]=an[_t]=an[$n]=an[$r]=!0,an[ce]=an[ue]=an[Ve]=an[Ae]=an[Je]=an[$e]=an[Ze]=an[Xe]=an[at]=an[mt]=an[bn]=an[wn]=an[Fn]=an[Pn]=an[Ke]=!1;var nn={};nn[ce]=nn[ue]=nn[Ve]=nn[Je]=nn[Ae]=nn[$e]=nn[vt]=nn[Tt]=nn[St]=nn[Pt]=nn[Nt]=nn[at]=nn[mt]=nn[bn]=nn[wn]=nn[Fn]=nn[Pn]=nn[nr]=nn[pt]=nn[_t]=nn[$n]=nn[$r]=!0,nn[Ze]=nn[Xe]=nn[Ke]=!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"},Gt={"&":"&","<":"<",">":">",'"':""","'":"'"},_i={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,Cn=parseInt,kt=typeof No=="object"&&No&&No.Object===Object&&No,Pr=typeof self=="object"&&self&&self.Object===Object&&self,pn=kt||Pr||Function("return this")(),Sn=e&&!e.nodeType&&e,rr=Sn&&!0&&t&&!t.nodeType&&t,Wr=rr&&rr.exports===Sn,ki=Wr&&kt.process,jn=function(){try{var fe=rr&&rr.require&&rr.require("util").types;return fe||ki&&ki.binding&&ki.binding("util")}catch{}}(),Xr=jn&&jn.isArrayBuffer,Xo=jn&&jn.isDate,zn=jn&&jn.isMap,ci=jn&&jn.isRegExp,ui=jn&&jn.isSet,Ai=jn&&jn.isTypedArray;function pr(fe,ke,xe){switch(xe.length){case 0:return fe.call(ke);case 1:return fe.call(ke,xe[0]);case 2:return fe.call(ke,xe[0],xe[1]);case 3:return fe.call(ke,xe[0],xe[1],xe[2])}return fe.apply(ke,xe)}function gr(fe,ke,xe,qe){for(var ft=-1,Dt=fe==null?0:fe.length;++ft<Dt;){var en=fe[ft];ke(qe,en,xe(en),fe)}return qe}function Cr(fe,ke){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe&&ke(fe[xe],xe,fe)!==!1;);return fe}function Es(fe,ke){for(var xe=fe==null?0:fe.length;xe--&&ke(fe[xe],xe,fe)!==!1;);return fe}function _r(fe,ke){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(!ke(fe[xe],xe,fe))return!1;return!0}function Rr(fe,ke){for(var xe=-1,qe=fe==null?0:fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];ke(en,xe,fe)&&(Dt[ft++]=en)}return Dt}function hi(fe,ke){var xe=fe==null?0:fe.length;return!!xe&&se(fe,ke,0)>-1}function di(fe,ke,xe){for(var qe=-1,ft=fe==null?0:fe.length;++qe<ft;)if(xe(ke,fe[qe]))return!0;return!1}function y(fe,ke){for(var xe=-1,qe=fe==null?0:fe.length,ft=Array(qe);++xe<qe;)ft[xe]=ke(fe[xe],xe,fe);return ft}function $(fe,ke){for(var xe=-1,qe=ke.length,ft=fe.length;++xe<qe;)fe[ft+xe]=ke[xe];return fe}function k(fe,ke,xe,qe){var ft=-1,Dt=fe==null?0:fe.length;for(qe&&Dt&&(xe=fe[++ft]);++ft<Dt;)xe=ke(xe,fe[ft],ft,fe);return xe}function N(fe,ke,xe,qe){var ft=fe==null?0:fe.length;for(qe&&ft&&(xe=fe[--ft]);ft--;)xe=ke(xe,fe[ft],ft,fe);return xe}function W(fe,ke){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(ke(fe[xe],xe,fe))return!0;return!1}var j=be("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(la)||[]}function Q(fe,ke,xe){var qe;return xe(fe,function(ft,Dt,en){if(ke(ft,Dt,en))return qe=Dt,!1}),qe}function re(fe,ke,xe,qe){for(var ft=fe.length,Dt=xe+(qe?1:-1);qe?Dt--:++Dt<ft;)if(ke(fe[Dt],Dt,fe))return Dt;return-1}function se(fe,ke,xe){return ke===ke?nt(fe,ke,xe):re(fe,Ce,xe)}function ve(fe,ke,xe,qe){for(var ft=xe-1,Dt=fe.length;++ft<Dt;)if(qe(fe[ft],ke))return ft;return-1}function Ce(fe){return fe!==fe}function ge(fe,ke){var xe=fe==null?0:fe.length;return xe?ht(fe,ke)/xe:Z}function be(fe){return function(ke){return ke==null?n:ke[fe]}}function Oe(fe){return function(ke){return fe==null?n:fe[ke]}}function Re(fe,ke,xe,qe,ft){return ft(fe,function(Dt,en,Wt){xe=qe?(qe=!1,Dt):ke(xe,Dt,en,Wt)}),xe}function Ge(fe,ke){var xe=fe.length;for(fe.sort(ke);xe--;)fe[xe]=fe[xe].value;return fe}function ht(fe,ke){for(var xe,qe=-1,ft=fe.length;++qe<ft;){var Dt=ke(fe[qe]);Dt!==n&&(xe=xe===n?Dt:xe+Dt)}return xe}function tt(fe,ke){for(var xe=-1,qe=Array(fe);++xe<fe;)qe[xe]=ke(xe);return qe}function st(fe,ke){return y(ke,function(xe){return[xe,fe[xe]]})}function _n(fe){return fe&&fe.slice(0,zt(fe)+1).replace(Rn,"")}function dt(fe){return function(ke){return fe(ke)}}function Mn(fe,ke){return y(ke,function(xe){return fe[xe]})}function $t(fe,ke){return fe.has(ke)}function Ot(fe,ke){for(var xe=-1,qe=fe.length;++xe<qe&&se(ke,fe[xe],0)>-1;);return xe}function ir(fe,ke){for(var xe=fe.length;xe--&&se(ke,fe[xe],0)>-1;);return xe}function mr(fe,ke){for(var xe=fe.length,qe=0;xe--;)fe[xe]===ke&&++qe;return qe}var In=Oe(ln),V=Oe(Gt);function X(fe){return"\\"+Bn[fe]}function ie(fe,ke){return fe==null?n:fe[ke]}function oe(fe){return pa.test(fe)}function pe(fe){return _o.test(fe)}function we(fe){for(var ke,xe=[];!(ke=fe.next()).done;)xe.push(ke.value);return xe}function Me(fe){var ke=-1,xe=Array(fe.size);return fe.forEach(function(qe,ft){xe[++ke]=[ft,qe]}),xe}function Be(fe,ke){return function(xe){return fe(ke(xe))}}function ze(fe,ke){for(var xe=-1,qe=fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];(en===ke||en===s)&&(fe[xe]=s,Dt[ft++]=xe)}return Dt}function Ye(fe){var ke=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++ke]=qe}),xe}function et(fe){var ke=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++ke]=[qe,qe]}),xe}function nt(fe,ke,xe){for(var qe=xe-1,ft=fe.length;++qe<ft;)if(fe[qe]===ke)return qe;return-1}function At(fe,ke,xe){for(var qe=xe+1;qe--;)if(fe[qe]===ke)return qe;return qe}function Ut(fe){return oe(fe)?ut(fe):j(fe)}function Mt(fe){return oe(fe)?vn(fe):q(fe)}function zt(fe){for(var ke=fe.length;ke--&&Ir.test(fe.charAt(ke)););return ke}var yt=Oe(_i);function ut(fe){for(var ke=li.lastIndex=0;li.test(fe);)++ke;return ke}function vn(fe){return fe.match(li)||[]}function En(fe){return fe.match(Qn)||[]}var or=function fe(ke){ke=ke==null?pn:Xt.defaults(pn.Object(),ke,Xt.pick(pn,Ci));var xe=ke.Array,qe=ke.Date,ft=ke.Error,Dt=ke.Function,en=ke.Math,Wt=ke.Object,Br=ke.RegExp,Si=ke.String,gn=ke.TypeError,vr=xe.prototype,ko=Dt.prototype,Hn=Wt.prototype,Ls=ke["__core-js_shared__"],vc=ko.toString,fn=Hn.hasOwnProperty,PI=0,r0=function(){var i=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),yc=Hn.toString,WI=vc.call(Wt),BI=pn._,jI=Br("^"+vc.call(fn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bc=Wr?ke.Buffer:n,Qo=ke.Symbol,wc=ke.Uint8Array,i0=bc?bc.allocUnsafe:n,xc=Be(Wt.getPrototypeOf,Wt),o0=Wt.create,s0=Hn.propertyIsEnumerable,Cc=vr.splice,a0=Qo?Qo.isConcatSpreadable:n,el=Qo?Qo.iterator:n,Rs=Qo?Qo.toStringTag:n,_c=function(){try{var i=Ps(Wt,"defineProperty");return i({},"",{}),i}catch{}}(),zI=ke.clearTimeout!==pn.clearTimeout&&ke.clearTimeout,HI=qe&&qe.now!==pn.Date.now&&qe.now,UI=ke.setTimeout!==pn.setTimeout&&ke.setTimeout,kc=en.ceil,Ac=en.floor,md=Wt.getOwnPropertySymbols,VI=bc?bc.isBuffer:n,l0=ke.isFinite,qI=vr.join,KI=Be(Wt.keys,Wt),fr=en.max,Or=en.min,GI=qe.now,YI=ke.parseInt,c0=en.random,XI=vr.reverse,vd=Ps(ke,"DataView"),tl=Ps(ke,"Map"),yd=Ps(ke,"Promise"),ga=Ps(ke,"Set"),nl=Ps(ke,"WeakMap"),rl=Ps(Wt,"create"),Sc=nl&&new nl,ma={},QI=Ws(vd),ZI=Ws(tl),JI=Ws(yd),eE=Ws(ga),tE=Ws(nl),Tc=Qo?Qo.prototype:n,il=Tc?Tc.valueOf:n,u0=Tc?Tc.toString:n;function J(i){if(Un(i)&&!Et(i)&&!(i instanceof Yt)){if(i instanceof Ti)return i;if(fn.call(i,"__wrapped__"))return hb(i)}return new Ti(i)}var va=function(){function i(){}return function(v){if(!Dn(v))return{};if(o0)return o0(v);i.prototype=v;var M=new i;return i.prototype=n,M}}();function $c(){}function Ti(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}J.templateSettings={escape:si,evaluate:Xa,interpolate:_s,variable:"",imports:{_:J}},J.prototype=$c.prototype,J.prototype.constructor=J,Ti.prototype=va($c.prototype),Ti.prototype.constructor=Ti;function Yt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function nE(){var i=new Yt(this.__wrapped__);return i.__actions__=Qr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qr(this.__views__),i}function rE(){if(this.__filtered__){var i=new Yt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function iE(){var i=this.__wrapped__.value(),v=this.__dir__,M=Et(i),z=v<0,G=M?i.length:0,ee=mL(0,G,this.__views__),le=ee.start,de=ee.end,me=de-le,Ee=z?de:le-1,Le=this.__iteratees__,Fe=Le.length,Qe=0,ct=Or(me,this.__takeCount__);if(!M||!z&&G==me&&ct==me)return O0(i,this.__actions__);var wt=[];e:for(;me--&&Qe<ct;){Ee+=v;for(var Bt=-1,xt=i[Ee];++Bt<Fe;){var Vt=Le[Bt],Qt=Vt.iteratee,gi=Vt.type,Hr=Qt(xt);if(gi==A)xt=Hr;else if(!Hr){if(gi==S)continue e;break e}}wt[Qe++]=xt}return wt}Yt.prototype=va($c.prototype),Yt.prototype.constructor=Yt;function Os(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function oE(){this.__data__=rl?rl(null):{},this.size=0}function sE(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function aE(i){var v=this.__data__;if(rl){var M=v[i];return M===u?n:M}return fn.call(v,i)?v[i]:n}function lE(i){var v=this.__data__;return rl?v[i]!==n:fn.call(v,i)}function cE(i,v){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=rl&&v===n?u:v,this}Os.prototype.clear=oE,Os.prototype.delete=sE,Os.prototype.get=aE,Os.prototype.has=lE,Os.prototype.set=cE;function Ao(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function uE(){this.__data__=[],this.size=0}function hE(i){var v=this.__data__,M=Mc(v,i);if(M<0)return!1;var z=v.length-1;return M==z?v.pop():Cc.call(v,M,1),--this.size,!0}function dE(i){var v=this.__data__,M=Mc(v,i);return M<0?n:v[M][1]}function fE(i){return Mc(this.__data__,i)>-1}function pE(i,v){var M=this.__data__,z=Mc(M,i);return z<0?(++this.size,M.push([i,v])):M[z][1]=v,this}Ao.prototype.clear=uE,Ao.prototype.delete=hE,Ao.prototype.get=dE,Ao.prototype.has=fE,Ao.prototype.set=pE;function So(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function gE(){this.size=0,this.__data__={hash:new Os,map:new(tl||Ao),string:new Os}}function mE(i){var v=jc(this,i).delete(i);return this.size-=v?1:0,v}function vE(i){return jc(this,i).get(i)}function yE(i){return jc(this,i).has(i)}function bE(i,v){var M=jc(this,i),z=M.size;return M.set(i,v),this.size+=M.size==z?0:1,this}So.prototype.clear=gE,So.prototype.delete=mE,So.prototype.get=vE,So.prototype.has=yE,So.prototype.set=bE;function Ds(i){var v=-1,M=i==null?0:i.length;for(this.__data__=new So;++v<M;)this.add(i[v])}function wE(i){return this.__data__.set(i,u),this}function xE(i){return this.__data__.has(i)}Ds.prototype.add=Ds.prototype.push=wE,Ds.prototype.has=xE;function Ki(i){var v=this.__data__=new Ao(i);this.size=v.size}function CE(){this.__data__=new Ao,this.size=0}function _E(i){var v=this.__data__,M=v.delete(i);return this.size=v.size,M}function kE(i){return this.__data__.get(i)}function AE(i){return this.__data__.has(i)}function SE(i,v){var M=this.__data__;if(M instanceof Ao){var z=M.__data__;if(!tl||z.length<f-1)return z.push([i,v]),this.size=++M.size,this;M=this.__data__=new So(z)}return M.set(i,v),this.size=M.size,this}Ki.prototype.clear=CE,Ki.prototype.delete=_E,Ki.prototype.get=kE,Ki.prototype.has=AE,Ki.prototype.set=SE;function h0(i,v){var M=Et(i),z=!M&&Bs(i),G=!M&&!z&&ns(i),ee=!M&&!z&&!G&&xa(i),le=M||z||G||ee,de=le?tt(i.length,Si):[],me=de.length;for(var Ee in i)(v||fn.call(i,Ee))&&!(le&&(Ee=="length"||G&&(Ee=="offset"||Ee=="parent")||ee&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Io(Ee,me)))&&de.push(Ee);return de}function d0(i){var v=i.length;return v?i[Md(0,v-1)]:n}function TE(i,v){return zc(Qr(i),Ns(v,0,i.length))}function $E(i){return zc(Qr(i))}function bd(i,v,M){(M!==n&&!Gi(i[v],M)||M===n&&!(v in i))&&To(i,v,M)}function ol(i,v,M){var z=i[v];(!(fn.call(i,v)&&Gi(z,M))||M===n&&!(v in i))&&To(i,v,M)}function Mc(i,v){for(var M=i.length;M--;)if(Gi(i[M][0],v))return M;return-1}function ME(i,v,M,z){return Zo(i,function(G,ee,le){v(z,G,M(G),le)}),z}function f0(i,v){return i&&co(v,yr(v),i)}function IE(i,v){return i&&co(v,Jr(v),i)}function To(i,v,M){v=="__proto__"&&_c?_c(i,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[v]=M}function wd(i,v){for(var M=-1,z=v.length,G=xe(z),ee=i==null;++M<z;)G[M]=ee?n:ef(i,v[M]);return G}function Ns(i,v,M){return i===i&&(M!==n&&(i=i<=M?i:M),v!==n&&(i=i>=v?i:v)),i}function $i(i,v,M,z,G,ee){var le,de=v&a,me=v&c,Ee=v&l;if(M&&(le=G?M(i,z,G,ee):M(i)),le!==n)return le;if(!Dn(i))return i;var Le=Et(i);if(Le){if(le=yL(i),!de)return Qr(i,le)}else{var Fe=Dr(i),Qe=Fe==Xe||Fe==gt;if(ns(i))return F0(i,de);if(Fe==bn||Fe==ce||Qe&&!G){if(le=me||Qe?{}:nb(i),!de)return me?aL(i,IE(le,i)):sL(i,f0(le,i))}else{if(!nn[Fe])return G?i:{};le=bL(i,Fe,de)}}ee||(ee=new Ki);var ct=ee.get(i);if(ct)return ct;ee.set(i,le),Eb(i)?i.forEach(function(xt){le.add($i(xt,v,M,xt,i,ee))}):Mb(i)&&i.forEach(function(xt,Vt){le.set(Vt,$i(xt,v,M,Vt,i,ee))});var wt=Ee?me?Bd:Wd:me?Jr:yr,Bt=Le?n:wt(i);return Cr(Bt||i,function(xt,Vt){Bt&&(Vt=xt,xt=i[Vt]),ol(le,Vt,$i(xt,v,M,Vt,i,ee))}),le}function EE(i){var v=yr(i);return function(M){return p0(M,i,v)}}function p0(i,v,M){var z=M.length;if(i==null)return!z;for(i=Wt(i);z--;){var G=M[z],ee=v[G],le=i[G];if(le===n&&!(G in i)||!ee(le))return!1}return!0}function g0(i,v,M){if(typeof i!="function")throw new gn(p);return dl(function(){i.apply(n,M)},v)}function sl(i,v,M,z){var G=-1,ee=hi,le=!0,de=i.length,me=[],Ee=v.length;if(!de)return me;M&&(v=y(v,dt(M))),z?(ee=di,le=!1):v.length>=f&&(ee=$t,le=!1,v=new Ds(v));e:for(;++G<de;){var Le=i[G],Fe=M==null?Le:M(Le);if(Le=z||Le!==0?Le:0,le&&Fe===Fe){for(var Qe=Ee;Qe--;)if(v[Qe]===Fe)continue e;me.push(Le)}else ee(v,Fe,z)||me.push(Le)}return me}var Zo=z0(lo),m0=z0(Cd,!0);function LE(i,v){var M=!0;return Zo(i,function(z,G,ee){return M=!!v(z,G,ee),M}),M}function Ic(i,v,M){for(var z=-1,G=i.length;++z<G;){var ee=i[z],le=v(ee);if(le!=null&&(de===n?le===le&&!pi(le):M(le,de)))var de=le,me=ee}return me}function RE(i,v,M,z){var G=i.length;for(M=Ft(M),M<0&&(M=-M>G?0:G+M),z=z===n||z>G?G:Ft(z),z<0&&(z+=G),z=M>z?0:Rb(z);M<z;)i[M++]=v;return i}function v0(i,v){var M=[];return Zo(i,function(z,G,ee){v(z,G,ee)&&M.push(z)}),M}function kr(i,v,M,z,G){var ee=-1,le=i.length;for(M||(M=xL),G||(G=[]);++ee<le;){var de=i[ee];v>0&&M(de)?v>1?kr(de,v-1,M,z,G):$(G,de):z||(G[G.length]=de)}return G}var xd=H0(),y0=H0(!0);function lo(i,v){return i&&xd(i,v,yr)}function Cd(i,v){return i&&y0(i,v,yr)}function Ec(i,v){return Rr(v,function(M){return Eo(i[M])})}function Fs(i,v){v=es(v,i);for(var M=0,z=v.length;i!=null&&M<z;)i=i[uo(v[M++])];return M&&M==z?i:n}function b0(i,v,M){var z=v(i);return Et(i)?z:$(z,M(i))}function jr(i){return i==null?i===n?Ct:sn:Rs&&Rs in Wt(i)?gL(i):$L(i)}function _d(i,v){return i>v}function OE(i,v){return i!=null&&fn.call(i,v)}function DE(i,v){return i!=null&&v in Wt(i)}function NE(i,v,M){return i>=Or(v,M)&&i<fr(v,M)}function kd(i,v,M){for(var z=M?di:hi,G=i[0].length,ee=i.length,le=ee,de=xe(ee),me=1/0,Ee=[];le--;){var Le=i[le];le&&v&&(Le=y(Le,dt(v))),me=Or(Le.length,me),de[le]=!M&&(v||G>=120&&Le.length>=120)?new Ds(le&&Le):n}Le=i[0];var Fe=-1,Qe=de[0];e:for(;++Fe<G&&Ee.length<me;){var ct=Le[Fe],wt=v?v(ct):ct;if(ct=M||ct!==0?ct:0,!(Qe?$t(Qe,wt):z(Ee,wt,M))){for(le=ee;--le;){var Bt=de[le];if(!(Bt?$t(Bt,wt):z(i[le],wt,M)))continue e}Qe&&Qe.push(wt),Ee.push(ct)}}return Ee}function FE(i,v,M,z){return lo(i,function(G,ee,le){v(z,M(G),ee,le)}),z}function al(i,v,M){v=es(v,i),i=sb(i,v);var z=i==null?i:i[uo(Ii(v))];return z==null?n:pr(z,i,M)}function w0(i){return Un(i)&&jr(i)==ce}function PE(i){return Un(i)&&jr(i)==Ve}function WE(i){return Un(i)&&jr(i)==$e}function ll(i,v,M,z,G){return i===v?!0:i==null||v==null||!Un(i)&&!Un(v)?i!==i&&v!==v:BE(i,v,M,z,ll,G)}function BE(i,v,M,z,G,ee){var le=Et(i),de=Et(v),me=le?ue:Dr(i),Ee=de?ue:Dr(v);me=me==ce?bn:me,Ee=Ee==ce?bn:Ee;var Le=me==bn,Fe=Ee==bn,Qe=me==Ee;if(Qe&&ns(i)){if(!ns(v))return!1;le=!0,Le=!1}if(Qe&&!Le)return ee||(ee=new Ki),le||xa(i)?J0(i,v,M,z,G,ee):fL(i,v,me,M,z,G,ee);if(!(M&o)){var ct=Le&&fn.call(i,"__wrapped__"),wt=Fe&&fn.call(v,"__wrapped__");if(ct||wt){var Bt=ct?i.value():i,xt=wt?v.value():v;return ee||(ee=new Ki),G(Bt,xt,M,z,ee)}}return Qe?(ee||(ee=new Ki),pL(i,v,M,z,G,ee)):!1}function jE(i){return Un(i)&&Dr(i)==at}function Ad(i,v,M,z){var G=M.length,ee=G,le=!z;if(i==null)return!ee;for(i=Wt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var me=de[0],Ee=i[me],Le=de[1];if(le&&de[2]){if(Ee===n&&!(me in i))return!1}else{var Fe=new Ki;if(z)var Qe=z(Ee,Le,me,i,v,Fe);if(!(Qe===n?ll(Le,Ee,o|d,z,Fe):Qe))return!1}}return!0}function x0(i){if(!Dn(i)||_L(i))return!1;var v=Eo(i)?jI:Er;return v.test(Ws(i))}function zE(i){return Un(i)&&jr(i)==wn}function HE(i){return Un(i)&&Dr(i)==Fn}function UE(i){return Un(i)&&Gc(i.length)&&!!an[jr(i)]}function C0(i){return typeof i=="function"?i:i==null?ei:typeof i=="object"?Et(i)?A0(i[0],i[1]):k0(i):Ub(i)}function Sd(i){if(!hl(i))return KI(i);var v=[];for(var M in Wt(i))fn.call(i,M)&&M!="constructor"&&v.push(M);return v}function VE(i){if(!Dn(i))return TL(i);var v=hl(i),M=[];for(var z in i)z=="constructor"&&(v||!fn.call(i,z))||M.push(z);return M}function Td(i,v){return i<v}function _0(i,v){var M=-1,z=Zr(i)?xe(i.length):[];return Zo(i,function(G,ee,le){z[++M]=v(G,ee,le)}),z}function k0(i){var v=zd(i);return v.length==1&&v[0][2]?ib(v[0][0],v[0][1]):function(M){return M===i||Ad(M,i,v)}}function A0(i,v){return Ud(i)&&rb(v)?ib(uo(i),v):function(M){var z=ef(M,i);return z===n&&z===v?tf(M,i):ll(v,z,o|d)}}function Lc(i,v,M,z,G){i!==v&&xd(v,function(ee,le){if(G||(G=new Ki),Dn(ee))qE(i,v,le,M,Lc,z,G);else{var de=z?z(qd(i,le),ee,le+"",i,v,G):n;de===n&&(de=ee),bd(i,le,de)}},Jr)}function qE(i,v,M,z,G,ee,le){var de=qd(i,M),me=qd(v,M),Ee=le.get(me);if(Ee){bd(i,M,Ee);return}var Le=ee?ee(de,me,M+"",i,v,le):n,Fe=Le===n;if(Fe){var Qe=Et(me),ct=!Qe&&ns(me),wt=!Qe&&!ct&&xa(me);Le=me,Qe||ct||wt?Et(de)?Le=de:Zn(de)?Le=Qr(de):ct?(Fe=!1,Le=F0(me,!0)):wt?(Fe=!1,Le=P0(me,!0)):Le=[]:fl(me)||Bs(me)?(Le=de,Bs(de)?Le=Ob(de):(!Dn(de)||Eo(de))&&(Le=nb(me))):Fe=!1}Fe&&(le.set(me,Le),G(Le,me,z,ee,le),le.delete(me)),bd(i,M,Le)}function S0(i,v){var M=i.length;if(M)return v+=v<0?M:0,Io(v,M)?i[v]:n}function T0(i,v,M){v.length?v=y(v,function(ee){return Et(ee)?function(le){return Fs(le,ee.length===1?ee[0]:ee)}:ee}):v=[ei];var z=-1;v=y(v,dt(bt()));var G=_0(i,function(ee,le,de){var me=y(v,function(Ee){return Ee(ee)});return{criteria:me,index:++z,value:ee}});return Ge(G,function(ee,le){return oL(ee,le,M)})}function KE(i,v){return $0(i,v,function(M,z){return tf(i,z)})}function $0(i,v,M){for(var z=-1,G=v.length,ee={};++z<G;){var le=v[z],de=Fs(i,le);M(de,le)&&cl(ee,es(le,i),de)}return ee}function GE(i){return function(v){return Fs(v,i)}}function $d(i,v,M,z){var G=z?ve:se,ee=-1,le=v.length,de=i;for(i===v&&(v=Qr(v)),M&&(de=y(i,dt(M)));++ee<le;)for(var me=0,Ee=v[ee],Le=M?M(Ee):Ee;(me=G(de,Le,me,z))>-1;)de!==i&&Cc.call(de,me,1),Cc.call(i,me,1);return i}function M0(i,v){for(var M=i?v.length:0,z=M-1;M--;){var G=v[M];if(M==z||G!==ee){var ee=G;Io(G)?Cc.call(i,G,1):Ld(i,G)}}return i}function Md(i,v){return i+Ac(c0()*(v-i+1))}function YE(i,v,M,z){for(var G=-1,ee=fr(kc((v-i)/(M||1)),0),le=xe(ee);ee--;)le[z?ee:++G]=i,i+=M;return le}function Id(i,v){var M="";if(!i||v<1||v>U)return M;do v%2&&(M+=i),v=Ac(v/2),v&&(i+=i);while(v);return M}function Ht(i,v){return Kd(ob(i,v,ei),i+"")}function XE(i){return d0(Ca(i))}function QE(i,v){var M=Ca(i);return zc(M,Ns(v,0,M.length))}function cl(i,v,M,z){if(!Dn(i))return i;v=es(v,i);for(var G=-1,ee=v.length,le=ee-1,de=i;de!=null&&++G<ee;){var me=uo(v[G]),Ee=M;if(me==="__proto__"||me==="constructor"||me==="prototype")return i;if(G!=le){var Le=de[me];Ee=z?z(Le,me,de):n,Ee===n&&(Ee=Dn(Le)?Le:Io(v[G+1])?[]:{})}ol(de,me,Ee),de=de[me]}return i}var I0=Sc?function(i,v){return Sc.set(i,v),i}:ei,ZE=_c?function(i,v){return _c(i,"toString",{configurable:!0,enumerable:!1,value:rf(v),writable:!0})}:ei;function JE(i){return zc(Ca(i))}function Mi(i,v,M){var z=-1,G=i.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var ee=xe(G);++z<G;)ee[z]=i[z+v];return ee}function eL(i,v){var M;return Zo(i,function(z,G,ee){return M=v(z,G,ee),!M}),!!M}function Rc(i,v,M){var z=0,G=i==null?z:i.length;if(typeof v=="number"&&v===v&&G<=ne){for(;z<G;){var ee=z+G>>>1,le=i[ee];le!==null&&!pi(le)&&(M?le<=v:le<v)?z=ee+1:G=ee}return G}return Ed(i,v,ei,M)}function Ed(i,v,M,z){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;v=M(v);for(var le=v!==v,de=v===null,me=pi(v),Ee=v===n;G<ee;){var Le=Ac((G+ee)/2),Fe=M(i[Le]),Qe=Fe!==n,ct=Fe===null,wt=Fe===Fe,Bt=pi(Fe);if(le)var xt=z||wt;else Ee?xt=wt&&(z||Qe):de?xt=wt&&Qe&&(z||!ct):me?xt=wt&&Qe&&!ct&&(z||!Bt):ct||Bt?xt=!1:xt=z?Fe<=v:Fe<v;xt?G=Le+1:ee=Le}return Or(ee,he)}function E0(i,v){for(var M=-1,z=i.length,G=0,ee=[];++M<z;){var le=i[M],de=v?v(le):le;if(!M||!Gi(de,me)){var me=de;ee[G++]=le===0?0:le}}return ee}function L0(i){return typeof i=="number"?i:pi(i)?Z:+i}function fi(i){if(typeof i=="string")return i;if(Et(i))return y(i,fi)+"";if(pi(i))return u0?u0.call(i):"";var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function Jo(i,v,M){var z=-1,G=hi,ee=i.length,le=!0,de=[],me=de;if(M)le=!1,G=di;else if(ee>=f){var Ee=v?null:hL(i);if(Ee)return Ye(Ee);le=!1,G=$t,me=new Ds}else me=v?[]:de;e:for(;++z<ee;){var Le=i[z],Fe=v?v(Le):Le;if(Le=M||Le!==0?Le:0,le&&Fe===Fe){for(var Qe=me.length;Qe--;)if(me[Qe]===Fe)continue e;v&&me.push(Fe),de.push(Le)}else G(me,Fe,M)||(me!==de&&me.push(Fe),de.push(Le))}return de}function Ld(i,v){return v=es(v,i),i=sb(i,v),i==null||delete i[uo(Ii(v))]}function R0(i,v,M,z){return cl(i,v,M(Fs(i,v)),z)}function Oc(i,v,M,z){for(var G=i.length,ee=z?G:-1;(z?ee--:++ee<G)&&v(i[ee],ee,i););return M?Mi(i,z?0:ee,z?ee+1:G):Mi(i,z?ee+1:0,z?G:ee)}function O0(i,v){var M=i;return M instanceof Yt&&(M=M.value()),k(v,function(z,G){return G.func.apply(G.thisArg,$([z],G.args))},M)}function Rd(i,v,M){var z=i.length;if(z<2)return z?Jo(i[0]):[];for(var G=-1,ee=xe(z);++G<z;)for(var le=i[G],de=-1;++de<z;)de!=G&&(ee[G]=sl(ee[G]||le,i[de],v,M));return Jo(kr(ee,1),v,M)}function D0(i,v,M){for(var z=-1,G=i.length,ee=v.length,le={};++z<G;){var de=z<ee?v[z]:n;M(le,i[z],de)}return le}function Od(i){return Zn(i)?i:[]}function Dd(i){return typeof i=="function"?i:ei}function es(i,v){return Et(i)?i:Ud(i,v)?[i]:ub(un(i))}var tL=Ht;function ts(i,v,M){var z=i.length;return M=M===n?z:M,!v&&M>=z?i:Mi(i,v,M)}var N0=zI||function(i){return pn.clearTimeout(i)};function F0(i,v){if(v)return i.slice();var M=i.length,z=i0?i0(M):new i.constructor(M);return i.copy(z),z}function Nd(i){var v=new i.constructor(i.byteLength);return new wc(v).set(new wc(i)),v}function nL(i,v){var M=v?Nd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function rL(i){var v=new i.constructor(i.source,ai.exec(i));return v.lastIndex=i.lastIndex,v}function iL(i){return il?Wt(il.call(i)):{}}function P0(i,v){var M=v?Nd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function W0(i,v){if(i!==v){var M=i!==n,z=i===null,G=i===i,ee=pi(i),le=v!==n,de=v===null,me=v===v,Ee=pi(v);if(!de&&!Ee&&!ee&&i>v||ee&&le&&me&&!de&&!Ee||z&&le&&me||!M&&me||!G)return 1;if(!z&&!ee&&!Ee&&i<v||Ee&&M&&G&&!z&&!ee||de&&M&&G||!le&&G||!me)return-1}return 0}function oL(i,v,M){for(var z=-1,G=i.criteria,ee=v.criteria,le=G.length,de=M.length;++z<le;){var me=W0(G[z],ee[z]);if(me){if(z>=de)return me;var Ee=M[z];return me*(Ee=="desc"?-1:1)}}return i.index-v.index}function B0(i,v,M,z){for(var G=-1,ee=i.length,le=M.length,de=-1,me=v.length,Ee=fr(ee-le,0),Le=xe(me+Ee),Fe=!z;++de<me;)Le[de]=v[de];for(;++G<le;)(Fe||G<ee)&&(Le[M[G]]=i[G]);for(;Ee--;)Le[de++]=i[G++];return Le}function j0(i,v,M,z){for(var G=-1,ee=i.length,le=-1,de=M.length,me=-1,Ee=v.length,Le=fr(ee-de,0),Fe=xe(Le+Ee),Qe=!z;++G<Le;)Fe[G]=i[G];for(var ct=G;++me<Ee;)Fe[ct+me]=v[me];for(;++le<de;)(Qe||G<ee)&&(Fe[ct+M[le]]=i[G++]);return Fe}function Qr(i,v){var M=-1,z=i.length;for(v||(v=xe(z));++M<z;)v[M]=i[M];return v}function co(i,v,M,z){var G=!M;M||(M={});for(var ee=-1,le=v.length;++ee<le;){var de=v[ee],me=z?z(M[de],i[de],de,M,i):n;me===n&&(me=i[de]),G?To(M,de,me):ol(M,de,me)}return M}function sL(i,v){return co(i,Hd(i),v)}function aL(i,v){return co(i,eb(i),v)}function Dc(i,v){return function(M,z){var G=Et(M)?gr:ME,ee=v?v():{};return G(M,i,bt(z,2),ee)}}function ya(i){return Ht(function(v,M){var z=-1,G=M.length,ee=G>1?M[G-1]:n,le=G>2?M[2]:n;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):n,le&&zr(M[0],M[1],le)&&(ee=G<3?n:ee,G=1),v=Wt(v);++z<G;){var de=M[z];de&&i(v,de,z,ee)}return v})}function z0(i,v){return function(M,z){if(M==null)return M;if(!Zr(M))return i(M,z);for(var G=M.length,ee=v?G:-1,le=Wt(M);(v?ee--:++ee<G)&&z(le[ee],ee,le)!==!1;);return M}}function H0(i){return function(v,M,z){for(var G=-1,ee=Wt(v),le=z(v),de=le.length;de--;){var me=le[i?de:++G];if(M(ee[me],me,ee)===!1)break}return v}}function lL(i,v,M){var z=v&m,G=ul(i);function ee(){var le=this&&this!==pn&&this instanceof ee?G:i;return le.apply(z?M:this,arguments)}return ee}function U0(i){return function(v){v=un(v);var M=oe(v)?Mt(v):n,z=M?M[0]:v.charAt(0),G=M?ts(M,1).join(""):v.slice(1);return z[i]()+G}}function ba(i){return function(v){return k(zb(jb(v).replace(On,"")),i,"")}}function ul(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=va(i.prototype),z=i.apply(M,v);return Dn(z)?z:M}}function cL(i,v,M){var z=ul(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,me=wa(G);de--;)le[de]=arguments[de];var Ee=ee<3&&le[0]!==me&&le[ee-1]!==me?[]:ze(le,me);if(ee-=Ee.length,ee<M)return Y0(i,v,Nc,G.placeholder,n,le,Ee,n,n,M-ee);var Le=this&&this!==pn&&this instanceof G?z:i;return pr(Le,this,le)}return G}function V0(i){return function(v,M,z){var G=Wt(v);if(!Zr(v)){var ee=bt(M,3);v=yr(v),M=function(de){return ee(G[de],de,G)}}var le=i(v,M,z);return le>-1?G[ee?v[le]:le]:n}}function q0(i){return Mo(function(v){var M=v.length,z=M,G=Ti.prototype.thru;for(i&&v.reverse();z--;){var ee=v[z];if(typeof ee!="function")throw new gn(p);if(G&&!le&&Bc(ee)=="wrapper")var le=new Ti([],!0)}for(z=le?z:M;++z<M;){ee=v[z];var de=Bc(ee),me=de=="wrapper"?jd(ee):n;me&&Vd(me[0])&&me[1]==(L|I|_|R)&&!me[4].length&&me[9]==1?le=le[Bc(me[0])].apply(le,me[3]):le=ee.length==1&&Vd(ee)?le[de]():le.thru(ee)}return function(){var Ee=arguments,Le=Ee[0];if(le&&Ee.length==1&&Et(Le))return le.plant(Le).value();for(var Fe=0,Qe=M?v[Fe].apply(this,Ee):Le;++Fe<M;)Qe=v[Fe].call(this,Qe);return Qe}})}function Nc(i,v,M,z,G,ee,le,de,me,Ee){var Le=v&L,Fe=v&m,Qe=v&w,ct=v&(I|T),wt=v&F,Bt=Qe?n:ul(i);function xt(){for(var Vt=arguments.length,Qt=xe(Vt),gi=Vt;gi--;)Qt[gi]=arguments[gi];if(ct)var Hr=wa(xt),mi=mr(Qt,Hr);if(z&&(Qt=B0(Qt,z,G,ct)),ee&&(Qt=j0(Qt,ee,le,ct)),Vt-=mi,ct&&Vt<Ee){var Jn=ze(Qt,Hr);return Y0(i,v,Nc,xt.placeholder,M,Qt,Jn,de,me,Ee-Vt)}var Yi=Fe?M:this,Ro=Qe?Yi[i]:i;return Vt=Qt.length,de?Qt=ML(Qt,de):wt&&Vt>1&&Qt.reverse(),Le&&me<Vt&&(Qt.length=me),this&&this!==pn&&this instanceof xt&&(Ro=Bt||ul(Ro)),Ro.apply(Yi,Qt)}return xt}function K0(i,v){return function(M,z){return FE(M,i,v(z),{})}}function Fc(i,v){return function(M,z){var G;if(M===n&&z===n)return v;if(M!==n&&(G=M),z!==n){if(G===n)return z;typeof M=="string"||typeof z=="string"?(M=fi(M),z=fi(z)):(M=L0(M),z=L0(z)),G=i(M,z)}return G}}function Fd(i){return Mo(function(v){return v=y(v,dt(bt())),Ht(function(M){var z=this;return i(v,function(G){return pr(G,z,M)})})})}function Pc(i,v){v=v===n?" ":fi(v);var M=v.length;if(M<2)return M?Id(v,i):v;var z=Id(v,kc(i/Ut(v)));return oe(v)?ts(Mt(z),0,i).join(""):z.slice(0,i)}function uL(i,v,M,z){var G=v&m,ee=ul(i);function le(){for(var de=-1,me=arguments.length,Ee=-1,Le=z.length,Fe=xe(Le+me),Qe=this&&this!==pn&&this instanceof le?ee:i;++Ee<Le;)Fe[Ee]=z[Ee];for(;me--;)Fe[Ee++]=arguments[++de];return pr(Qe,G?M:this,Fe)}return le}function G0(i){return function(v,M,z){return z&&typeof z!="number"&&zr(v,M,z)&&(M=z=n),v=Lo(v),M===n?(M=v,v=0):M=Lo(M),z=z===n?v<M?1:-1:Lo(z),YE(v,M,z,i)}}function Wc(i){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Ei(v),M=Ei(M)),i(v,M)}}function Y0(i,v,M,z,G,ee,le,de,me,Ee){var Le=v&I,Fe=Le?le:n,Qe=Le?n:le,ct=Le?ee:n,wt=Le?n:ee;v|=Le?_:C,v&=~(Le?C:_),v&x||(v&=-4);var Bt=[i,v,G,ct,Fe,wt,Qe,de,me,Ee],xt=M.apply(n,Bt);return Vd(i)&&ab(xt,Bt),xt.placeholder=z,lb(xt,i,v)}function Pd(i){var v=en[i];return function(M,z){if(M=Ei(M),z=z==null?0:Or(Ft(z),292),z&&l0(M)){var G=(un(M)+"e").split("e"),ee=v(G[0]+"e"+(+G[1]+z));return G=(un(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-z))}return v(M)}}var hL=ga&&1/Ye(new ga([,-0]))[1]==B?function(i){return new ga(i)}:af;function X0(i){return function(v){var M=Dr(v);return M==at?Me(v):M==Fn?et(v):st(v,i(v))}}function $o(i,v,M,z,G,ee,le,de){var me=v&w;if(!me&&typeof i!="function")throw new gn(p);var Ee=z?z.length:0;if(Ee||(v&=-97,z=G=n),le=le===n?le:fr(Ft(le),0),de=de===n?de:Ft(de),Ee-=G?G.length:0,v&C){var Le=z,Fe=G;z=G=n}var Qe=me?n:jd(i),ct=[i,v,M,z,G,Le,Fe,ee,le,de];if(Qe&&SL(ct,Qe),i=ct[0],v=ct[1],M=ct[2],z=ct[3],G=ct[4],de=ct[9]=ct[9]===n?me?0:i.length:fr(ct[9]-Ee,0),!de&&v&(I|T)&&(v&=-25),!v||v==m)var wt=lL(i,v,M);else v==I||v==T?wt=cL(i,v,de):(v==_||v==(m|_))&&!G.length?wt=uL(i,v,M,z):wt=Nc.apply(n,ct);var Bt=Qe?I0:ab;return lb(Bt(wt,ct),i,v)}function Q0(i,v,M,z){return i===n||Gi(i,Hn[M])&&!fn.call(z,M)?v:i}function Z0(i,v,M,z,G,ee){return Dn(i)&&Dn(v)&&(ee.set(v,i),Lc(i,v,n,Z0,ee),ee.delete(v)),i}function dL(i){return fl(i)?n:i}function J0(i,v,M,z,G,ee){var le=M&o,de=i.length,me=v.length;if(de!=me&&!(le&&me>de))return!1;var Ee=ee.get(i),Le=ee.get(v);if(Ee&&Le)return Ee==v&&Le==i;var Fe=-1,Qe=!0,ct=M&d?new Ds:n;for(ee.set(i,v),ee.set(v,i);++Fe<de;){var wt=i[Fe],Bt=v[Fe];if(z)var xt=le?z(Bt,wt,Fe,v,i,ee):z(wt,Bt,Fe,i,v,ee);if(xt!==n){if(xt)continue;Qe=!1;break}if(ct){if(!W(v,function(Vt,Qt){if(!$t(ct,Qt)&&(wt===Vt||G(wt,Vt,M,z,ee)))return ct.push(Qt)})){Qe=!1;break}}else if(!(wt===Bt||G(wt,Bt,M,z,ee))){Qe=!1;break}}return ee.delete(i),ee.delete(v),Qe}function fL(i,v,M,z,G,ee,le){switch(M){case Je:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Ve:return!(i.byteLength!=v.byteLength||!ee(new wc(i),new wc(v)));case Ae:case $e:case mt:return Gi(+i,+v);case Ze:return i.name==v.name&&i.message==v.message;case wn:case Pn:return i==v+"";case at:var de=Me;case Fn:var me=z&o;if(de||(de=Ye),i.size!=v.size&&!me)return!1;var Ee=le.get(i);if(Ee)return Ee==v;z|=d,le.set(i,v);var Le=J0(de(i),de(v),z,G,ee,le);return le.delete(i),Le;case nr:if(il)return il.call(i)==il.call(v)}return!1}function pL(i,v,M,z,G,ee){var le=M&o,de=Wd(i),me=de.length,Ee=Wd(v),Le=Ee.length;if(me!=Le&&!le)return!1;for(var Fe=me;Fe--;){var Qe=de[Fe];if(!(le?Qe in v:fn.call(v,Qe)))return!1}var ct=ee.get(i),wt=ee.get(v);if(ct&&wt)return ct==v&&wt==i;var Bt=!0;ee.set(i,v),ee.set(v,i);for(var xt=le;++Fe<me;){Qe=de[Fe];var Vt=i[Qe],Qt=v[Qe];if(z)var gi=le?z(Qt,Vt,Qe,v,i,ee):z(Vt,Qt,Qe,i,v,ee);if(!(gi===n?Vt===Qt||G(Vt,Qt,M,z,ee):gi)){Bt=!1;break}xt||(xt=Qe=="constructor")}if(Bt&&!xt){var Hr=i.constructor,mi=v.constructor;Hr!=mi&&"constructor"in i&&"constructor"in v&&!(typeof Hr=="function"&&Hr instanceof Hr&&typeof mi=="function"&&mi instanceof mi)&&(Bt=!1)}return ee.delete(i),ee.delete(v),Bt}function Mo(i){return Kd(ob(i,n,pb),i+"")}function Wd(i){return b0(i,yr,Hd)}function Bd(i){return b0(i,Jr,eb)}var jd=Sc?function(i){return Sc.get(i)}:af;function Bc(i){for(var v=i.name+"",M=ma[v],z=fn.call(ma,v)?M.length:0;z--;){var G=M[z],ee=G.func;if(ee==null||ee==i)return G.name}return v}function wa(i){var v=fn.call(J,"placeholder")?J:i;return v.placeholder}function bt(){var i=J.iteratee||of;return i=i===of?C0:i,arguments.length?i(arguments[0],arguments[1]):i}function jc(i,v){var M=i.__data__;return CL(v)?M[typeof v=="string"?"string":"hash"]:M.map}function zd(i){for(var v=yr(i),M=v.length;M--;){var z=v[M],G=i[z];v[M]=[z,G,rb(G)]}return v}function Ps(i,v){var M=ie(i,v);return x0(M)?M:n}function gL(i){var v=fn.call(i,Rs),M=i[Rs];try{i[Rs]=n;var z=!0}catch{}var G=yc.call(i);return z&&(v?i[Rs]=M:delete i[Rs]),G}var Hd=md?function(i){return i==null?[]:(i=Wt(i),Rr(md(i),function(v){return s0.call(i,v)}))}:lf,eb=md?function(i){for(var v=[];i;)$(v,Hd(i)),i=xc(i);return v}:lf,Dr=jr;(vd&&Dr(new vd(new ArrayBuffer(1)))!=Je||tl&&Dr(new tl)!=at||yd&&Dr(yd.resolve())!=Jt||ga&&Dr(new ga)!=Fn||nl&&Dr(new nl)!=Ke)&&(Dr=function(i){var v=jr(i),M=v==bn?i.constructor:n,z=M?Ws(M):"";if(z)switch(z){case QI:return Je;case ZI:return at;case JI:return Jt;case eE:return Fn;case tE:return Ke}return v});function mL(i,v,M){for(var z=-1,G=M.length;++z<G;){var ee=M[z],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":v-=le;break;case"take":v=Or(v,i+le);break;case"takeRight":i=fr(i,v-le);break}}return{start:i,end:v}}function vL(i){var v=i.match(Hi);return v?v[1].split(ks):[]}function tb(i,v,M){v=es(v,i);for(var z=-1,G=v.length,ee=!1;++z<G;){var le=uo(v[z]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++z!=G?ee:(G=i==null?0:i.length,!!G&&Gc(G)&&Io(le,G)&&(Et(i)||Bs(i)))}function yL(i){var v=i.length,M=new i.constructor(v);return v&&typeof i[0]=="string"&&fn.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function nb(i){return typeof i.constructor=="function"&&!hl(i)?va(xc(i)):{}}function bL(i,v,M){var z=i.constructor;switch(v){case Ve:return Nd(i);case Ae:case $e:return new z(+i);case Je:return nL(i,M);case vt:case Tt:case St:case Pt:case Nt:case pt:case _t:case $n:case $r:return P0(i,M);case at:return new z;case mt:case Pn:return new z(i);case wn:return rL(i);case Fn:return new z;case nr:return iL(i)}}function wL(i,v){var M=v.length;if(!M)return i;var z=M-1;return v[z]=(M>1?"& ":"")+v[z],v=v.join(M>2?", ":" "),i.replace(no,`{
|
1465
|
+
/* [wrapped with `+v+`] */
|
1466
|
+
`)}function xL(i){return Et(i)||Bs(i)||!!(a0&&i&&i[a0])}function Io(i,v){var M=typeof i;return v=v??U,!!v&&(M=="number"||M!="symbol"&&xn.test(i))&&i>-1&&i%1==0&&i<v}function zr(i,v,M){if(!Dn(M))return!1;var z=typeof v;return(z=="number"?Zr(M)&&Io(v,M.length):z=="string"&&v in M)?Gi(M[v],i):!1}function Ud(i,v){if(Et(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||pi(i)?!0:ji.test(i)||!aa.test(i)||v!=null&&i in Wt(v)}function CL(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function Vd(i){var v=Bc(i),M=J[v];if(typeof M!="function"||!(v in Yt.prototype))return!1;if(i===M)return!0;var z=jd(M);return!!z&&i===z[0]}function _L(i){return!!r0&&r0 in i}var kL=Ls?Eo:cf;function hl(i){var v=i&&i.constructor,M=typeof v=="function"&&v.prototype||Hn;return i===M}function rb(i){return i===i&&!Dn(i)}function ib(i,v){return function(M){return M==null?!1:M[i]===v&&(v!==n||i in Wt(M))}}function AL(i){var v=qc(i,function(z){return M.size===g&&M.clear(),z}),M=v.cache;return v}function SL(i,v){var M=i[1],z=v[1],G=M|z,ee=G<(m|w|L),le=z==L&&M==I||z==L&&M==R&&i[7].length<=v[8]||z==(L|R)&&v[7].length<=v[8]&&M==I;if(!(ee||le))return i;z&m&&(i[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var me=i[3];i[3]=me?B0(me,de,v[4]):de,i[4]=me?ze(i[3],s):v[4]}return de=v[5],de&&(me=i[5],i[5]=me?j0(me,de,v[6]):de,i[6]=me?ze(i[5],s):v[6]),de=v[7],de&&(i[7]=de),z&L&&(i[8]=i[8]==null?v[8]:Or(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=G,i}function TL(i){var v=[];if(i!=null)for(var M in Wt(i))v.push(M);return v}function $L(i){return yc.call(i)}function ob(i,v,M){return v=fr(v===n?i.length-1:v,0),function(){for(var z=arguments,G=-1,ee=fr(z.length-v,0),le=xe(ee);++G<ee;)le[G]=z[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=z[G];return de[v]=M(le),pr(i,this,de)}}function sb(i,v){return v.length<2?i:Fs(i,Mi(v,0,-1))}function ML(i,v){for(var M=i.length,z=Or(v.length,M),G=Qr(i);z--;){var ee=v[z];i[z]=Io(ee,M)?G[ee]:n}return i}function qd(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var ab=cb(I0),dl=UI||function(i,v){return pn.setTimeout(i,v)},Kd=cb(ZE);function lb(i,v,M){var z=v+"";return Kd(i,wL(z,IL(vL(z),M)))}function cb(i){var v=0,M=0;return function(){var z=GI(),G=O-(z-M);if(M=z,G>0){if(++v>=P)return arguments[0]}else v=0;return i.apply(n,arguments)}}function zc(i,v){var M=-1,z=i.length,G=z-1;for(v=v===n?z:v;++M<v;){var ee=Md(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=v,i}var ub=AL(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Yn,function(M,z,G,ee){v.push(G?ee.replace(Za,"$1"):z||M)}),v});function uo(i){if(typeof i=="string"||pi(i))return i;var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function Ws(i){if(i!=null){try{return vc.call(i)}catch{}try{return i+""}catch{}}return""}function IL(i,v){return Cr(ae,function(M){var z="_."+M[0];v&M[1]&&!hi(i,z)&&i.push(z)}),i.sort()}function hb(i){if(i instanceof Yt)return i.clone();var v=new Ti(i.__wrapped__,i.__chain__);return v.__actions__=Qr(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function EL(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=fr(Ft(v),0);var z=i==null?0:i.length;if(!z||v<1)return[];for(var G=0,ee=0,le=xe(kc(z/v));G<z;)le[ee++]=Mi(i,G,G+=v);return le}function LL(i){for(var v=-1,M=i==null?0:i.length,z=0,G=[];++v<M;){var ee=i[v];ee&&(G[z++]=ee)}return G}function RL(){var i=arguments.length;if(!i)return[];for(var v=xe(i-1),M=arguments[0],z=i;z--;)v[z-1]=arguments[z];return $(Et(M)?Qr(M):[M],kr(v,1))}var OL=Ht(function(i,v){return Zn(i)?sl(i,kr(v,1,Zn,!0)):[]}),DL=Ht(function(i,v){var M=Ii(v);return Zn(M)&&(M=n),Zn(i)?sl(i,kr(v,1,Zn,!0),bt(M,2)):[]}),NL=Ht(function(i,v){var M=Ii(v);return Zn(M)&&(M=n),Zn(i)?sl(i,kr(v,1,Zn,!0),n,M):[]});function FL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),Mi(i,v<0?0:v,z)):[]}function PL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,0,v<0?0:v)):[]}function WL(i,v){return i&&i.length?Oc(i,bt(v,3),!0,!0):[]}function BL(i,v){return i&&i.length?Oc(i,bt(v,3),!0):[]}function jL(i,v,M,z){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&zr(i,v,M)&&(M=0,z=G),RE(i,v,M,z)):[]}function db(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=fr(z+G,0)),re(i,bt(v,3),G)}function fb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z-1;return M!==n&&(G=Ft(M),G=M<0?fr(z+G,0):Or(G,z-1)),re(i,bt(v,3),G,!0)}function pb(i){var v=i==null?0:i.length;return v?kr(i,1):[]}function zL(i){var v=i==null?0:i.length;return v?kr(i,B):[]}function HL(i,v){var M=i==null?0:i.length;return M?(v=v===n?1:Ft(v),kr(i,v)):[]}function UL(i){for(var v=-1,M=i==null?0:i.length,z={};++v<M;){var G=i[v];z[G[0]]=G[1]}return z}function gb(i){return i&&i.length?i[0]:n}function VL(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=fr(z+G,0)),se(i,v,G)}function qL(i){var v=i==null?0:i.length;return v?Mi(i,0,-1):[]}var KL=Ht(function(i){var v=y(i,Od);return v.length&&v[0]===i[0]?kd(v):[]}),GL=Ht(function(i){var v=Ii(i),M=y(i,Od);return v===Ii(M)?v=n:M.pop(),M.length&&M[0]===i[0]?kd(M,bt(v,2)):[]}),YL=Ht(function(i){var v=Ii(i),M=y(i,Od);return v=typeof v=="function"?v:n,v&&M.pop(),M.length&&M[0]===i[0]?kd(M,n,v):[]});function XL(i,v){return i==null?"":qI.call(i,v)}function Ii(i){var v=i==null?0:i.length;return v?i[v-1]:n}function QL(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z;return M!==n&&(G=Ft(M),G=G<0?fr(z+G,0):Or(G,z-1)),v===v?At(i,v,G):re(i,Ce,G,!0)}function ZL(i,v){return i&&i.length?S0(i,Ft(v)):n}var JL=Ht(mb);function mb(i,v){return i&&i.length&&v&&v.length?$d(i,v):i}function eR(i,v,M){return i&&i.length&&v&&v.length?$d(i,v,bt(M,2)):i}function tR(i,v,M){return i&&i.length&&v&&v.length?$d(i,v,n,M):i}var nR=Mo(function(i,v){var M=i==null?0:i.length,z=wd(i,v);return M0(i,y(v,function(G){return Io(G,M)?+G:G}).sort(W0)),z});function rR(i,v){var M=[];if(!(i&&i.length))return M;var z=-1,G=[],ee=i.length;for(v=bt(v,3);++z<ee;){var le=i[z];v(le,z,i)&&(M.push(le),G.push(z))}return M0(i,G),M}function Gd(i){return i==null?i:XI.call(i)}function iR(i,v,M){var z=i==null?0:i.length;return z?(M&&typeof M!="number"&&zr(i,v,M)?(v=0,M=z):(v=v==null?0:Ft(v),M=M===n?z:Ft(M)),Mi(i,v,M)):[]}function oR(i,v){return Rc(i,v)}function sR(i,v,M){return Ed(i,v,bt(M,2))}function aR(i,v){var M=i==null?0:i.length;if(M){var z=Rc(i,v);if(z<M&&Gi(i[z],v))return z}return-1}function lR(i,v){return Rc(i,v,!0)}function cR(i,v,M){return Ed(i,v,bt(M,2),!0)}function uR(i,v){var M=i==null?0:i.length;if(M){var z=Rc(i,v,!0)-1;if(Gi(i[z],v))return z}return-1}function hR(i){return i&&i.length?E0(i):[]}function dR(i,v){return i&&i.length?E0(i,bt(v,2)):[]}function fR(i){var v=i==null?0:i.length;return v?Mi(i,1,v):[]}function pR(i,v,M){return i&&i.length?(v=M||v===n?1:Ft(v),Mi(i,0,v<0?0:v)):[]}function gR(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,v<0?0:v,z)):[]}function mR(i,v){return i&&i.length?Oc(i,bt(v,3),!1,!0):[]}function vR(i,v){return i&&i.length?Oc(i,bt(v,3)):[]}var yR=Ht(function(i){return Jo(kr(i,1,Zn,!0))}),bR=Ht(function(i){var v=Ii(i);return Zn(v)&&(v=n),Jo(kr(i,1,Zn,!0),bt(v,2))}),wR=Ht(function(i){var v=Ii(i);return v=typeof v=="function"?v:n,Jo(kr(i,1,Zn,!0),n,v)});function xR(i){return i&&i.length?Jo(i):[]}function CR(i,v){return i&&i.length?Jo(i,bt(v,2)):[]}function _R(i,v){return v=typeof v=="function"?v:n,i&&i.length?Jo(i,n,v):[]}function Yd(i){if(!(i&&i.length))return[];var v=0;return i=Rr(i,function(M){if(Zn(M))return v=fr(M.length,v),!0}),tt(v,function(M){return y(i,be(M))})}function vb(i,v){if(!(i&&i.length))return[];var M=Yd(i);return v==null?M:y(M,function(z){return pr(v,n,z)})}var kR=Ht(function(i,v){return Zn(i)?sl(i,v):[]}),AR=Ht(function(i){return Rd(Rr(i,Zn))}),SR=Ht(function(i){var v=Ii(i);return Zn(v)&&(v=n),Rd(Rr(i,Zn),bt(v,2))}),TR=Ht(function(i){var v=Ii(i);return v=typeof v=="function"?v:n,Rd(Rr(i,Zn),n,v)}),$R=Ht(Yd);function MR(i,v){return D0(i||[],v||[],ol)}function IR(i,v){return D0(i||[],v||[],cl)}var ER=Ht(function(i){var v=i.length,M=v>1?i[v-1]:n;return M=typeof M=="function"?(i.pop(),M):n,vb(i,M)});function yb(i){var v=J(i);return v.__chain__=!0,v}function LR(i,v){return v(i),i}function Hc(i,v){return v(i)}var RR=Mo(function(i){var v=i.length,M=v?i[0]:0,z=this.__wrapped__,G=function(ee){return wd(ee,i)};return v>1||this.__actions__.length||!(z instanceof Yt)||!Io(M)?this.thru(G):(z=z.slice(M,+M+(v?1:0)),z.__actions__.push({func:Hc,args:[G],thisArg:n}),new Ti(z,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(n),ee}))});function OR(){return yb(this)}function DR(){return new Ti(this.value(),this.__chain__)}function NR(){this.__values__===n&&(this.__values__=Lb(this.value()));var i=this.__index__>=this.__values__.length,v=i?n:this.__values__[this.__index__++];return{done:i,value:v}}function FR(){return this}function PR(i){for(var v,M=this;M instanceof $c;){var z=hb(M);z.__index__=0,z.__values__=n,v?G.__wrapped__=z:v=z;var G=z;M=M.__wrapped__}return G.__wrapped__=i,v}function WR(){var i=this.__wrapped__;if(i instanceof Yt){var v=i;return this.__actions__.length&&(v=new Yt(this)),v=v.reverse(),v.__actions__.push({func:Hc,args:[Gd],thisArg:n}),new Ti(v,this.__chain__)}return this.thru(Gd)}function BR(){return O0(this.__wrapped__,this.__actions__)}var jR=Dc(function(i,v,M){fn.call(i,M)?++i[M]:To(i,M,1)});function zR(i,v,M){var z=Et(i)?_r:LE;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}function HR(i,v){var M=Et(i)?Rr:v0;return M(i,bt(v,3))}var UR=V0(db),VR=V0(fb);function qR(i,v){return kr(Uc(i,v),1)}function KR(i,v){return kr(Uc(i,v),B)}function GR(i,v,M){return M=M===n?1:Ft(M),kr(Uc(i,v),M)}function bb(i,v){var M=Et(i)?Cr:Zo;return M(i,bt(v,3))}function wb(i,v){var M=Et(i)?Es:m0;return M(i,bt(v,3))}var YR=Dc(function(i,v,M){fn.call(i,M)?i[M].push(v):To(i,M,[v])});function XR(i,v,M,z){i=Zr(i)?i:Ca(i),M=M&&!z?Ft(M):0;var G=i.length;return M<0&&(M=fr(G+M,0)),Yc(i)?M<=G&&i.indexOf(v,M)>-1:!!G&&se(i,v,M)>-1}var QR=Ht(function(i,v,M){var z=-1,G=typeof v=="function",ee=Zr(i)?xe(i.length):[];return Zo(i,function(le){ee[++z]=G?pr(v,le,M):al(le,v,M)}),ee}),ZR=Dc(function(i,v,M){To(i,M,v)});function Uc(i,v){var M=Et(i)?y:_0;return M(i,bt(v,3))}function JR(i,v,M,z){return i==null?[]:(Et(v)||(v=v==null?[]:[v]),M=z?n:M,Et(M)||(M=M==null?[]:[M]),T0(i,v,M))}var e2=Dc(function(i,v,M){i[M?0:1].push(v)},function(){return[[],[]]});function t2(i,v,M){var z=Et(i)?k:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,Zo)}function n2(i,v,M){var z=Et(i)?N:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,m0)}function r2(i,v){var M=Et(i)?Rr:v0;return M(i,Kc(bt(v,3)))}function i2(i){var v=Et(i)?d0:XE;return v(i)}function o2(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=Ft(v);var z=Et(i)?TE:QE;return z(i,v)}function s2(i){var v=Et(i)?$E:JE;return v(i)}function a2(i){if(i==null)return 0;if(Zr(i))return Yc(i)?Ut(i):i.length;var v=Dr(i);return v==at||v==Fn?i.size:Sd(i).length}function l2(i,v,M){var z=Et(i)?W:eL;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}var c2=Ht(function(i,v){if(i==null)return[];var M=v.length;return M>1&&zr(i,v[0],v[1])?v=[]:M>2&&zr(v[0],v[1],v[2])&&(v=[v[0]]),T0(i,kr(v,1),[])}),Vc=HI||function(){return pn.Date.now()};function u2(i,v){if(typeof v!="function")throw new gn(p);return i=Ft(i),function(){if(--i<1)return v.apply(this,arguments)}}function xb(i,v,M){return v=M?n:v,v=i&&v==null?i.length:v,$o(i,L,n,n,n,n,v)}function Cb(i,v){var M;if(typeof v!="function")throw new gn(p);return i=Ft(i),function(){return--i>0&&(M=v.apply(this,arguments)),i<=1&&(v=n),M}}var Xd=Ht(function(i,v,M){var z=m;if(M.length){var G=ze(M,wa(Xd));z|=_}return $o(i,z,v,M,G)}),_b=Ht(function(i,v,M){var z=m|w;if(M.length){var G=ze(M,wa(_b));z|=_}return $o(v,z,i,M,G)});function kb(i,v,M){v=M?n:v;var z=$o(i,I,n,n,n,n,n,v);return z.placeholder=kb.placeholder,z}function Ab(i,v,M){v=M?n:v;var z=$o(i,T,n,n,n,n,n,v);return z.placeholder=Ab.placeholder,z}function Sb(i,v,M){var z,G,ee,le,de,me,Ee=0,Le=!1,Fe=!1,Qe=!0;if(typeof i!="function")throw new gn(p);v=Ei(v)||0,Dn(M)&&(Le=!!M.leading,Fe="maxWait"in M,ee=Fe?fr(Ei(M.maxWait)||0,v):ee,Qe="trailing"in M?!!M.trailing:Qe);function ct(Jn){var Yi=z,Ro=G;return z=G=n,Ee=Jn,le=i.apply(Ro,Yi),le}function wt(Jn){return Ee=Jn,de=dl(Vt,v),Le?ct(Jn):le}function Bt(Jn){var Yi=Jn-me,Ro=Jn-Ee,Vb=v-Yi;return Fe?Or(Vb,ee-Ro):Vb}function xt(Jn){var Yi=Jn-me,Ro=Jn-Ee;return me===n||Yi>=v||Yi<0||Fe&&Ro>=ee}function Vt(){var Jn=Vc();if(xt(Jn))return Qt(Jn);de=dl(Vt,Bt(Jn))}function Qt(Jn){return de=n,Qe&&z?ct(Jn):(z=G=n,le)}function gi(){de!==n&&N0(de),Ee=0,z=me=G=de=n}function Hr(){return de===n?le:Qt(Vc())}function mi(){var Jn=Vc(),Yi=xt(Jn);if(z=arguments,G=this,me=Jn,Yi){if(de===n)return wt(me);if(Fe)return N0(de),de=dl(Vt,v),ct(me)}return de===n&&(de=dl(Vt,v)),le}return mi.cancel=gi,mi.flush=Hr,mi}var h2=Ht(function(i,v){return g0(i,1,v)}),d2=Ht(function(i,v,M){return g0(i,Ei(v)||0,M)});function f2(i){return $o(i,F)}function qc(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new gn(p);var M=function(){var z=arguments,G=v?v.apply(this,z):z[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,z);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(qc.Cache||So),M}qc.Cache=So;function Kc(i){if(typeof i!="function")throw new gn(p);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function p2(i){return Cb(2,i)}var g2=tL(function(i,v){v=v.length==1&&Et(v[0])?y(v[0],dt(bt())):y(kr(v,1),dt(bt()));var M=v.length;return Ht(function(z){for(var G=-1,ee=Or(z.length,M);++G<ee;)z[G]=v[G].call(this,z[G]);return pr(i,this,z)})}),Qd=Ht(function(i,v){var M=ze(v,wa(Qd));return $o(i,_,n,v,M)}),Tb=Ht(function(i,v){var M=ze(v,wa(Tb));return $o(i,C,n,v,M)}),m2=Mo(function(i,v){return $o(i,R,n,n,n,v)});function v2(i,v){if(typeof i!="function")throw new gn(p);return v=v===n?v:Ft(v),Ht(i,v)}function y2(i,v){if(typeof i!="function")throw new gn(p);return v=v==null?0:fr(Ft(v),0),Ht(function(M){var z=M[v],G=ts(M,0,v);return z&&$(G,z),pr(i,this,G)})}function b2(i,v,M){var z=!0,G=!0;if(typeof i!="function")throw new gn(p);return Dn(M)&&(z="leading"in M?!!M.leading:z,G="trailing"in M?!!M.trailing:G),Sb(i,v,{leading:z,maxWait:v,trailing:G})}function w2(i){return xb(i,1)}function x2(i,v){return Qd(Dd(v),i)}function C2(){if(!arguments.length)return[];var i=arguments[0];return Et(i)?i:[i]}function _2(i){return $i(i,l)}function k2(i,v){return v=typeof v=="function"?v:n,$i(i,l,v)}function A2(i){return $i(i,a|l)}function S2(i,v){return v=typeof v=="function"?v:n,$i(i,a|l,v)}function T2(i,v){return v==null||p0(i,v,yr(v))}function Gi(i,v){return i===v||i!==i&&v!==v}var $2=Wc(_d),M2=Wc(function(i,v){return i>=v}),Bs=w0(function(){return arguments}())?w0:function(i){return Un(i)&&fn.call(i,"callee")&&!s0.call(i,"callee")},Et=xe.isArray,I2=Xr?dt(Xr):PE;function Zr(i){return i!=null&&Gc(i.length)&&!Eo(i)}function Zn(i){return Un(i)&&Zr(i)}function E2(i){return i===!0||i===!1||Un(i)&&jr(i)==Ae}var ns=VI||cf,L2=Xo?dt(Xo):WE;function R2(i){return Un(i)&&i.nodeType===1&&!fl(i)}function O2(i){if(i==null)return!0;if(Zr(i)&&(Et(i)||typeof i=="string"||typeof i.splice=="function"||ns(i)||xa(i)||Bs(i)))return!i.length;var v=Dr(i);if(v==at||v==Fn)return!i.size;if(hl(i))return!Sd(i).length;for(var M in i)if(fn.call(i,M))return!1;return!0}function D2(i,v){return ll(i,v)}function N2(i,v,M){M=typeof M=="function"?M:n;var z=M?M(i,v):n;return z===n?ll(i,v,n,M):!!z}function Zd(i){if(!Un(i))return!1;var v=jr(i);return v==Ze||v==Ie||typeof i.message=="string"&&typeof i.name=="string"&&!fl(i)}function F2(i){return typeof i=="number"&&l0(i)}function Eo(i){if(!Dn(i))return!1;var v=jr(i);return v==Xe||v==gt||v==ye||v==wr}function $b(i){return typeof i=="number"&&i==Ft(i)}function Gc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Dn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Un(i){return i!=null&&typeof i=="object"}var Mb=zn?dt(zn):jE;function P2(i,v){return i===v||Ad(i,v,zd(v))}function W2(i,v,M){return M=typeof M=="function"?M:n,Ad(i,v,zd(v),M)}function B2(i){return Ib(i)&&i!=+i}function j2(i){if(kL(i))throw new ft(h);return x0(i)}function z2(i){return i===null}function H2(i){return i==null}function Ib(i){return typeof i=="number"||Un(i)&&jr(i)==mt}function fl(i){if(!Un(i)||jr(i)!=bn)return!1;var v=xc(i);if(v===null)return!0;var M=fn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&vc.call(M)==WI}var Jd=ci?dt(ci):zE;function U2(i){return $b(i)&&i>=-9007199254740991&&i<=U}var Eb=ui?dt(ui):HE;function Yc(i){return typeof i=="string"||!Et(i)&&Un(i)&&jr(i)==Pn}function pi(i){return typeof i=="symbol"||Un(i)&&jr(i)==nr}var xa=Ai?dt(Ai):UE;function V2(i){return i===n}function q2(i){return Un(i)&&Dr(i)==Ke}function K2(i){return Un(i)&&jr(i)==_e}var G2=Wc(Td),Y2=Wc(function(i,v){return i<=v});function Lb(i){if(!i)return[];if(Zr(i))return Yc(i)?Mt(i):Qr(i);if(el&&i[el])return we(i[el]());var v=Dr(i),M=v==at?Me:v==Fn?Ye:Ca;return M(i)}function Lo(i){if(!i)return i===0?i:0;if(i=Ei(i),i===B||i===-1/0){var v=i<0?-1:1;return v*K}return i===i?i:0}function Ft(i){var v=Lo(i),M=v%1;return v===v?M?v-M:v:0}function Rb(i){return i?Ns(Ft(i),0,te):0}function Ei(i){if(typeof i=="number")return i;if(pi(i))return Z;if(Dn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Dn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=_n(i);var M=ca.test(i);return M||Xn.test(i)?Cn(i.slice(2),M?2:8):Kt.test(i)?Z:+i}function Ob(i){return co(i,Jr(i))}function X2(i){return i?Ns(Ft(i),-9007199254740991,U):i===0?i:0}function un(i){return i==null?"":fi(i)}var Q2=ya(function(i,v){if(hl(v)||Zr(v)){co(v,yr(v),i);return}for(var M in v)fn.call(v,M)&&ol(i,M,v[M])}),Db=ya(function(i,v){co(v,Jr(v),i)}),Xc=ya(function(i,v,M,z){co(v,Jr(v),i,z)}),Z2=ya(function(i,v,M,z){co(v,yr(v),i,z)}),J2=Mo(wd);function eO(i,v){var M=va(i);return v==null?M:f0(M,v)}var tO=Ht(function(i,v){i=Wt(i);var M=-1,z=v.length,G=z>2?v[2]:n;for(G&&zr(v[0],v[1],G)&&(z=1);++M<z;)for(var ee=v[M],le=Jr(ee),de=-1,me=le.length;++de<me;){var Ee=le[de],Le=i[Ee];(Le===n||Gi(Le,Hn[Ee])&&!fn.call(i,Ee))&&(i[Ee]=ee[Ee])}return i}),nO=Ht(function(i){return i.push(n,Z0),pr(Nb,n,i)});function rO(i,v){return Q(i,bt(v,3),lo)}function iO(i,v){return Q(i,bt(v,3),Cd)}function oO(i,v){return i==null?i:xd(i,bt(v,3),Jr)}function sO(i,v){return i==null?i:y0(i,bt(v,3),Jr)}function aO(i,v){return i&&lo(i,bt(v,3))}function lO(i,v){return i&&Cd(i,bt(v,3))}function cO(i){return i==null?[]:Ec(i,yr(i))}function uO(i){return i==null?[]:Ec(i,Jr(i))}function ef(i,v,M){var z=i==null?n:Fs(i,v);return z===n?M:z}function hO(i,v){return i!=null&&tb(i,v,OE)}function tf(i,v){return i!=null&&tb(i,v,DE)}var dO=K0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=yc.call(v)),i[v]=M},rf(ei)),fO=K0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=yc.call(v)),fn.call(i,v)?i[v].push(M):i[v]=[M]},bt),pO=Ht(al);function yr(i){return Zr(i)?h0(i):Sd(i)}function Jr(i){return Zr(i)?h0(i,!0):VE(i)}function gO(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,v(z,G,ee),z)}),M}function mO(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,G,v(z,G,ee))}),M}var vO=ya(function(i,v,M){Lc(i,v,M)}),Nb=ya(function(i,v,M,z){Lc(i,v,M,z)}),yO=Mo(function(i,v){var M={};if(i==null)return M;var z=!1;v=y(v,function(ee){return ee=es(ee,i),z||(z=ee.length>1),ee}),co(i,Bd(i),M),z&&(M=$i(M,a|c|l,dL));for(var G=v.length;G--;)Ld(M,v[G]);return M});function bO(i,v){return Fb(i,Kc(bt(v)))}var wO=Mo(function(i,v){return i==null?{}:KE(i,v)});function Fb(i,v){if(i==null)return{};var M=y(Bd(i),function(z){return[z]});return v=bt(v),$0(i,M,function(z,G){return v(z,G[0])})}function xO(i,v,M){v=es(v,i);var z=-1,G=v.length;for(G||(G=1,i=n);++z<G;){var ee=i==null?n:i[uo(v[z])];ee===n&&(z=G,ee=M),i=Eo(ee)?ee.call(i):ee}return i}function CO(i,v,M){return i==null?i:cl(i,v,M)}function _O(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:cl(i,v,M,z)}var Pb=X0(yr),Wb=X0(Jr);function kO(i,v,M){var z=Et(i),G=z||ns(i)||xa(i);if(v=bt(v,4),M==null){var ee=i&&i.constructor;G?M=z?new ee:[]:Dn(i)?M=Eo(ee)?va(xc(i)):{}:M={}}return(G?Cr:lo)(i,function(le,de,me){return v(M,le,de,me)}),M}function AO(i,v){return i==null?!0:Ld(i,v)}function SO(i,v,M){return i==null?i:R0(i,v,Dd(M))}function TO(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:R0(i,v,Dd(M),z)}function Ca(i){return i==null?[]:Mn(i,yr(i))}function $O(i){return i==null?[]:Mn(i,Jr(i))}function MO(i,v,M){return M===n&&(M=v,v=n),M!==n&&(M=Ei(M),M=M===M?M:0),v!==n&&(v=Ei(v),v=v===v?v:0),Ns(Ei(i),v,M)}function IO(i,v,M){return v=Lo(v),M===n?(M=v,v=0):M=Lo(M),i=Ei(i),NE(i,v,M)}function EO(i,v,M){if(M&&typeof M!="boolean"&&zr(i,v,M)&&(v=M=n),M===n&&(typeof v=="boolean"?(M=v,v=n):typeof i=="boolean"&&(M=i,i=n)),i===n&&v===n?(i=0,v=1):(i=Lo(i),v===n?(v=i,i=0):v=Lo(v)),i>v){var z=i;i=v,v=z}if(M||i%1||v%1){var G=c0();return Or(i+G*(v-i+He("1e-"+((G+"").length-1))),v)}return Md(i,v)}var LO=ba(function(i,v,M){return v=v.toLowerCase(),i+(M?Bb(v):v)});function Bb(i){return nf(un(i).toLowerCase())}function jb(i){return i=un(i),i&&i.replace(Wn,In).replace(Co,"")}function RO(i,v,M){i=un(i),v=fi(v);var z=i.length;M=M===n?z:Ns(Ft(M),0,z);var G=M;return M-=v.length,M>=0&&i.slice(M,G)==v}function OO(i){return i=un(i),i&&Ya.test(i)?i.replace(go,V):i}function DO(i){return i=un(i),i&&zi.test(i)?i.replace(Mr,"\\$&"):i}var NO=ba(function(i,v,M){return i+(M?"-":"")+v.toLowerCase()}),FO=ba(function(i,v,M){return i+(M?" ":"")+v.toLowerCase()}),PO=U0("toLowerCase");function WO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;if(!v||z>=v)return i;var G=(v-z)/2;return Pc(Ac(G),M)+i+Pc(kc(G),M)}function BO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?i+Pc(v-z,M):i}function jO(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?Pc(v-z,M)+i:i}function zO(i,v,M){return M||v==null?v=0:v&&(v=+v),YI(un(i).replace(Rn,""),v||0)}function HO(i,v,M){return(M?zr(i,v,M):v===n)?v=1:v=Ft(v),Id(un(i),v)}function UO(){var i=arguments,v=un(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var VO=ba(function(i,v,M){return i+(M?"_":"")+v.toLowerCase()});function qO(i,v,M){return M&&typeof M!="number"&&zr(i,v,M)&&(v=M=n),M=M===n?te:M>>>0,M?(i=un(i),i&&(typeof v=="string"||v!=null&&!Jd(v))&&(v=fi(v),!v&&oe(i))?ts(Mt(i),0,M):i.split(v,M)):[]}var KO=ba(function(i,v,M){return i+(M?" ":"")+nf(v)});function GO(i,v,M){return i=un(i),M=M==null?0:Ns(Ft(M),0,i.length),v=fi(v),i.slice(M,M+v.length)==v}function YO(i,v,M){var z=J.templateSettings;M&&zr(i,v,M)&&(v=n),i=un(i),v=Xc({},v,z,Q0);var G=Xc({},v.imports,z.imports,Q0),ee=yr(G),le=Mn(G,ee),de,me,Ee=0,Le=v.interpolate||bi,Fe="__p += '",Qe=Br((v.escape||bi).source+"|"+Le.source+"|"+(Le===_s?Ui:bi).source+"|"+(v.evaluate||bi).source+"|$","g"),ct="//# sourceURL="+(fn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ao+"]")+`
|
1467
|
+
`;i.replace(Qe,function(xt,Vt,Qt,gi,Hr,mi){return Qt||(Qt=gi),Fe+=i.slice(Ee,mi).replace(Lr,X),Vt&&(de=!0,Fe+=`' +
|
1468
|
+
__e(`+Vt+`) +
|
1469
|
+
'`),Hr&&(me=!0,Fe+=`';
|
1470
|
+
`+Hr+`;
|
1471
|
+
__p += '`),Qt&&(Fe+=`' +
|
1472
|
+
((__t = (`+Qt+`)) == null ? '' : __t) +
|
1473
|
+
'`),Ee=mi+xt.length,xt}),Fe+=`';
|
1474
|
+
`;var wt=fn.call(v,"variable")&&v.variable;if(!wt)Fe=`with (obj) {
|
1475
|
+
`+Fe+`
|
1476
|
+
}
|
1477
|
+
`;else if(Qa.test(wt))throw new ft(b);Fe=(me?Fe.replace(Kr,""):Fe).replace(Bi,"$1").replace(po,"$1;"),Fe="function("+(wt||"obj")+`) {
|
1478
|
+
`+(wt?"":`obj || (obj = {});
|
1479
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
1480
|
+
function print() { __p += __j.call(arguments, '') }
|
1481
|
+
`:`;
|
1482
|
+
`)+Fe+`return __p
|
1483
|
+
}`;var Bt=Hb(function(){return Dt(ee,ct+"return "+Fe).apply(n,le)});if(Bt.source=Fe,Zd(Bt))throw Bt;return Bt}function XO(i){return un(i).toLowerCase()}function QO(i){return un(i).toUpperCase()}function ZO(i,v,M){if(i=un(i),i&&(M||v===n))return _n(i);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Mt(v),ee=Ot(z,G),le=ir(z,G)+1;return ts(z,ee,le).join("")}function JO(i,v,M){if(i=un(i),i&&(M||v===n))return i.slice(0,zt(i)+1);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=ir(z,Mt(v))+1;return ts(z,0,G).join("")}function eD(i,v,M){if(i=un(i),i&&(M||v===n))return i.replace(Rn,"");if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Ot(z,Mt(v));return ts(z,G).join("")}function tD(i,v){var M=E,z=H;if(Dn(v)){var G="separator"in v?v.separator:G;M="length"in v?Ft(v.length):M,z="omission"in v?fi(v.omission):z}i=un(i);var ee=i.length;if(oe(i)){var le=Mt(i);ee=le.length}if(M>=ee)return i;var de=M-Ut(z);if(de<1)return z;var me=le?ts(le,0,de).join(""):i.slice(0,de);if(G===n)return me+z;if(le&&(de+=me.length-de),Jd(G)){if(i.slice(de).search(G)){var Ee,Le=me;for(G.global||(G=Br(G.source,un(ai.exec(G))+"g")),G.lastIndex=0;Ee=G.exec(Le);)var Fe=Ee.index;me=me.slice(0,Fe===n?de:Fe)}}else if(i.indexOf(fi(G),de)!=de){var Qe=me.lastIndexOf(G);Qe>-1&&(me=me.slice(0,Qe))}return me+z}function nD(i){return i=un(i),i&&Wo.test(i)?i.replace(xr,yt):i}var rD=ba(function(i,v,M){return i+(M?" ":"")+v.toUpperCase()}),nf=U0("toUpperCase");function zb(i,v,M){return i=un(i),v=M?n:v,v===n?pe(i)?En(i):Y(i):i.match(v)||[]}var Hb=Ht(function(i,v){try{return pr(i,n,v)}catch(M){return Zd(M)?M:new ft(M)}}),iD=Mo(function(i,v){return Cr(v,function(M){M=uo(M),To(i,M,Xd(i[M],i))}),i});function oD(i){var v=i==null?0:i.length,M=bt();return i=v?y(i,function(z){if(typeof z[1]!="function")throw new gn(p);return[M(z[0]),z[1]]}):[],Ht(function(z){for(var G=-1;++G<v;){var ee=i[G];if(pr(ee[0],this,z))return pr(ee[1],this,z)}})}function sD(i){return EE($i(i,a))}function rf(i){return function(){return i}}function aD(i,v){return i==null||i!==i?v:i}var lD=q0(),cD=q0(!0);function ei(i){return i}function of(i){return C0(typeof i=="function"?i:$i(i,a))}function uD(i){return k0($i(i,a))}function hD(i,v){return A0(i,$i(v,a))}var dD=Ht(function(i,v){return function(M){return al(M,i,v)}}),fD=Ht(function(i,v){return function(M){return al(i,M,v)}});function sf(i,v,M){var z=yr(v),G=Ec(v,z);M==null&&!(Dn(v)&&(G.length||!z.length))&&(M=v,v=i,i=this,G=Ec(v,yr(v)));var ee=!(Dn(M)&&"chain"in M)||!!M.chain,le=Eo(i);return Cr(G,function(de){var me=v[de];i[de]=me,le&&(i.prototype[de]=function(){var Ee=this.__chain__;if(ee||Ee){var Le=i(this.__wrapped__),Fe=Le.__actions__=Qr(this.__actions__);return Fe.push({func:me,args:arguments,thisArg:i}),Le.__chain__=Ee,Le}return me.apply(i,$([this.value()],arguments))})}),i}function pD(){return pn._===this&&(pn._=BI),this}function af(){}function gD(i){return i=Ft(i),Ht(function(v){return S0(v,i)})}var mD=Fd(y),vD=Fd(_r),yD=Fd(W);function Ub(i){return Ud(i)?be(uo(i)):GE(i)}function bD(i){return function(v){return i==null?n:Fs(i,v)}}var wD=G0(),xD=G0(!0);function lf(){return[]}function cf(){return!1}function CD(){return{}}function _D(){return""}function kD(){return!0}function AD(i,v){if(i=Ft(i),i<1||i>U)return[];var M=te,z=Or(i,te);v=bt(v),i-=te;for(var G=tt(z,v);++M<i;)v(M);return G}function SD(i){return Et(i)?y(i,uo):pi(i)?[i]:Qr(ub(un(i)))}function TD(i){var v=++PI;return un(i)+v}var $D=Fc(function(i,v){return i+v},0),MD=Pd("ceil"),ID=Fc(function(i,v){return i/v},1),ED=Pd("floor");function LD(i){return i&&i.length?Ic(i,ei,_d):n}function RD(i,v){return i&&i.length?Ic(i,bt(v,2),_d):n}function OD(i){return ge(i,ei)}function DD(i,v){return ge(i,bt(v,2))}function ND(i){return i&&i.length?Ic(i,ei,Td):n}function FD(i,v){return i&&i.length?Ic(i,bt(v,2),Td):n}var PD=Fc(function(i,v){return i*v},1),WD=Pd("round"),BD=Fc(function(i,v){return i-v},0);function jD(i){return i&&i.length?ht(i,ei):0}function zD(i,v){return i&&i.length?ht(i,bt(v,2)):0}return J.after=u2,J.ary=xb,J.assign=Q2,J.assignIn=Db,J.assignInWith=Xc,J.assignWith=Z2,J.at=J2,J.before=Cb,J.bind=Xd,J.bindAll=iD,J.bindKey=_b,J.castArray=C2,J.chain=yb,J.chunk=EL,J.compact=LL,J.concat=RL,J.cond=oD,J.conforms=sD,J.constant=rf,J.countBy=jR,J.create=eO,J.curry=kb,J.curryRight=Ab,J.debounce=Sb,J.defaults=tO,J.defaultsDeep=nO,J.defer=h2,J.delay=d2,J.difference=OL,J.differenceBy=DL,J.differenceWith=NL,J.drop=FL,J.dropRight=PL,J.dropRightWhile=WL,J.dropWhile=BL,J.fill=jL,J.filter=HR,J.flatMap=qR,J.flatMapDeep=KR,J.flatMapDepth=GR,J.flatten=pb,J.flattenDeep=zL,J.flattenDepth=HL,J.flip=f2,J.flow=lD,J.flowRight=cD,J.fromPairs=UL,J.functions=cO,J.functionsIn=uO,J.groupBy=YR,J.initial=qL,J.intersection=KL,J.intersectionBy=GL,J.intersectionWith=YL,J.invert=dO,J.invertBy=fO,J.invokeMap=QR,J.iteratee=of,J.keyBy=ZR,J.keys=yr,J.keysIn=Jr,J.map=Uc,J.mapKeys=gO,J.mapValues=mO,J.matches=uD,J.matchesProperty=hD,J.memoize=qc,J.merge=vO,J.mergeWith=Nb,J.method=dD,J.methodOf=fD,J.mixin=sf,J.negate=Kc,J.nthArg=gD,J.omit=yO,J.omitBy=bO,J.once=p2,J.orderBy=JR,J.over=mD,J.overArgs=g2,J.overEvery=vD,J.overSome=yD,J.partial=Qd,J.partialRight=Tb,J.partition=e2,J.pick=wO,J.pickBy=Fb,J.property=Ub,J.propertyOf=bD,J.pull=JL,J.pullAll=mb,J.pullAllBy=eR,J.pullAllWith=tR,J.pullAt=nR,J.range=wD,J.rangeRight=xD,J.rearg=m2,J.reject=r2,J.remove=rR,J.rest=v2,J.reverse=Gd,J.sampleSize=o2,J.set=CO,J.setWith=_O,J.shuffle=s2,J.slice=iR,J.sortBy=c2,J.sortedUniq=hR,J.sortedUniqBy=dR,J.split=qO,J.spread=y2,J.tail=fR,J.take=pR,J.takeRight=gR,J.takeRightWhile=mR,J.takeWhile=vR,J.tap=LR,J.throttle=b2,J.thru=Hc,J.toArray=Lb,J.toPairs=Pb,J.toPairsIn=Wb,J.toPath=SD,J.toPlainObject=Ob,J.transform=kO,J.unary=w2,J.union=yR,J.unionBy=bR,J.unionWith=wR,J.uniq=xR,J.uniqBy=CR,J.uniqWith=_R,J.unset=AO,J.unzip=Yd,J.unzipWith=vb,J.update=SO,J.updateWith=TO,J.values=Ca,J.valuesIn=$O,J.without=kR,J.words=zb,J.wrap=x2,J.xor=AR,J.xorBy=SR,J.xorWith=TR,J.zip=$R,J.zipObject=MR,J.zipObjectDeep=IR,J.zipWith=ER,J.entries=Pb,J.entriesIn=Wb,J.extend=Db,J.extendWith=Xc,sf(J,J),J.add=$D,J.attempt=Hb,J.camelCase=LO,J.capitalize=Bb,J.ceil=MD,J.clamp=MO,J.clone=_2,J.cloneDeep=A2,J.cloneDeepWith=S2,J.cloneWith=k2,J.conformsTo=T2,J.deburr=jb,J.defaultTo=aD,J.divide=ID,J.endsWith=RO,J.eq=Gi,J.escape=OO,J.escapeRegExp=DO,J.every=zR,J.find=UR,J.findIndex=db,J.findKey=rO,J.findLast=VR,J.findLastIndex=fb,J.findLastKey=iO,J.floor=ED,J.forEach=bb,J.forEachRight=wb,J.forIn=oO,J.forInRight=sO,J.forOwn=aO,J.forOwnRight=lO,J.get=ef,J.gt=$2,J.gte=M2,J.has=hO,J.hasIn=tf,J.head=gb,J.identity=ei,J.includes=XR,J.indexOf=VL,J.inRange=IO,J.invoke=pO,J.isArguments=Bs,J.isArray=Et,J.isArrayBuffer=I2,J.isArrayLike=Zr,J.isArrayLikeObject=Zn,J.isBoolean=E2,J.isBuffer=ns,J.isDate=L2,J.isElement=R2,J.isEmpty=O2,J.isEqual=D2,J.isEqualWith=N2,J.isError=Zd,J.isFinite=F2,J.isFunction=Eo,J.isInteger=$b,J.isLength=Gc,J.isMap=Mb,J.isMatch=P2,J.isMatchWith=W2,J.isNaN=B2,J.isNative=j2,J.isNil=H2,J.isNull=z2,J.isNumber=Ib,J.isObject=Dn,J.isObjectLike=Un,J.isPlainObject=fl,J.isRegExp=Jd,J.isSafeInteger=U2,J.isSet=Eb,J.isString=Yc,J.isSymbol=pi,J.isTypedArray=xa,J.isUndefined=V2,J.isWeakMap=q2,J.isWeakSet=K2,J.join=XL,J.kebabCase=NO,J.last=Ii,J.lastIndexOf=QL,J.lowerCase=FO,J.lowerFirst=PO,J.lt=G2,J.lte=Y2,J.max=LD,J.maxBy=RD,J.mean=OD,J.meanBy=DD,J.min=ND,J.minBy=FD,J.stubArray=lf,J.stubFalse=cf,J.stubObject=CD,J.stubString=_D,J.stubTrue=kD,J.multiply=PD,J.nth=ZL,J.noConflict=pD,J.noop=af,J.now=Vc,J.pad=WO,J.padEnd=BO,J.padStart=jO,J.parseInt=zO,J.random=EO,J.reduce=t2,J.reduceRight=n2,J.repeat=HO,J.replace=UO,J.result=xO,J.round=WD,J.runInContext=fe,J.sample=i2,J.size=a2,J.snakeCase=VO,J.some=l2,J.sortedIndex=oR,J.sortedIndexBy=sR,J.sortedIndexOf=aR,J.sortedLastIndex=lR,J.sortedLastIndexBy=cR,J.sortedLastIndexOf=uR,J.startCase=KO,J.startsWith=GO,J.subtract=BD,J.sum=jD,J.sumBy=zD,J.template=YO,J.times=AD,J.toFinite=Lo,J.toInteger=Ft,J.toLength=Rb,J.toLower=XO,J.toNumber=Ei,J.toSafeInteger=X2,J.toString=un,J.toUpper=QO,J.trim=ZO,J.trimEnd=JO,J.trimStart=eD,J.truncate=tD,J.unescape=nD,J.uniqueId=TD,J.upperCase=rD,J.upperFirst=nf,J.each=bb,J.eachRight=wb,J.first=gb,sf(J,function(){var i={};return lo(J,function(v,M){fn.call(J.prototype,M)||(i[M]=v)}),i}(),{chain:!1}),J.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),Cr(["drop","take"],function(i,v){Yt.prototype[i]=function(M){M=M===n?1:fr(Ft(M),0);var z=this.__filtered__&&!v?new Yt(this):this.clone();return z.__filtered__?z.__takeCount__=Or(M,z.__takeCount__):z.__views__.push({size:Or(M,te),type:i+(z.__dir__<0?"Right":"")}),z},Yt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),Cr(["filter","map","takeWhile"],function(i,v){var M=v+1,z=M==S||M==D;Yt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:bt(G,3),type:M}),ee.__filtered__=ee.__filtered__||z,ee}}),Cr(["head","last"],function(i,v){var M="take"+(v?"Right":"");Yt.prototype[i]=function(){return this[M](1).value()[0]}}),Cr(["initial","tail"],function(i,v){var M="drop"+(v?"":"Right");Yt.prototype[i]=function(){return this.__filtered__?new Yt(this):this[M](1)}}),Yt.prototype.compact=function(){return this.filter(ei)},Yt.prototype.find=function(i){return this.filter(i).head()},Yt.prototype.findLast=function(i){return this.reverse().find(i)},Yt.prototype.invokeMap=Ht(function(i,v){return typeof i=="function"?new Yt(this):this.map(function(M){return al(M,i,v)})}),Yt.prototype.reject=function(i){return this.filter(Kc(bt(i)))},Yt.prototype.slice=function(i,v){i=Ft(i);var M=this;return M.__filtered__&&(i>0||v<0)?new Yt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),v!==n&&(v=Ft(v),M=v<0?M.dropRight(-v):M.take(v-i)),M)},Yt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Yt.prototype.toArray=function(){return this.take(te)},lo(Yt.prototype,function(i,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),z=/^(?:head|last)$/.test(v),G=J[z?"take"+(v=="last"?"Right":""):v],ee=z||/^find/.test(v);G&&(J.prototype[v]=function(){var le=this.__wrapped__,de=z?[1]:arguments,me=le instanceof Yt,Ee=de[0],Le=me||Et(le),Fe=function(Vt){var Qt=G.apply(J,$([Vt],de));return z&&Qe?Qt[0]:Qt};Le&&M&&typeof Ee=="function"&&Ee.length!=1&&(me=Le=!1);var Qe=this.__chain__,ct=!!this.__actions__.length,wt=ee&&!Qe,Bt=me&&!ct;if(!ee&&Le){le=Bt?le:new Yt(this);var xt=i.apply(le,de);return xt.__actions__.push({func:Hc,args:[Fe],thisArg:n}),new Ti(xt,Qe)}return wt&&Bt?i.apply(this,de):(xt=this.thru(Fe),wt?z?xt.value()[0]:xt.value():xt)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(i){var v=vr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",z=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(z&&!this.__chain__){var ee=this.value();return v.apply(Et(ee)?ee:[],G)}return this[M](function(le){return v.apply(Et(le)?le:[],G)})}}),lo(Yt.prototype,function(i,v){var M=J[v];if(M){var z=M.name+"";fn.call(ma,z)||(ma[z]=[]),ma[z].push({name:v,func:M})}}),ma[Nc(n,w).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=nE,Yt.prototype.reverse=rE,Yt.prototype.value=iE,J.prototype.at=RR,J.prototype.chain=OR,J.prototype.commit=DR,J.prototype.next=NR,J.prototype.plant=PR,J.prototype.reverse=WR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=BR,J.prototype.first=J.prototype.head,el&&(J.prototype[el]=FR),J},Xt=or();rr?((rr.exports=Xt)._=Xt,Sn._=Xt):pn._=Xt}).call(p_)}(Ol,Ol.exports)),Ol.exports}var m_=g_();sr("e",ml(m_)).debounce(function(){this.rebuildDisplayText()},300);var dg={exports:{}},fg;function v_(){return fg||(fg=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(dg)),dg.exports}v_();const y_=!0,lr="u-",b_="uplot",w_=lr+"hz",x_=lr+"vt",C_=lr+"title",__=lr+"wrap",k_=lr+"under",A_=lr+"over",S_=lr+"axis",ps=lr+"off",T_=lr+"select",$_=lr+"cursor-x",M_=lr+"cursor-y",I_=lr+"cursor-pt",E_=lr+"legend",L_=lr+"live",R_=lr+"inline",O_=lr+"series",D_=lr+"marker",pg=lr+"label",N_=lr+"value",Oa="width",Da="height",Na="top",gg="bottom",Gs="left",Mu="right",Iu="#000",mg=Iu+"0",Eu="mousemove",vg="mousedown",Lu="mouseup",yg="mouseenter",bg="mouseleave",wg="dblclick",F_="resize",P_="scroll",xg="change",Dl="dppxchange",Ru="--",Ys=typeof window<"u",Ou=Ys?document:null,Xs=Ys?window:null,W_=Ys?navigator:null;let rn,Nl;function Du(){let t=devicePixelRatio;rn!=t&&(rn=t,Nl&&Pu(xg,Nl,Du),Nl=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),gs(xg,Nl,Du),Xs.dispatchEvent(new CustomEvent(Dl)))}function ni(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Nu(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function An(t,e,n){t.style[e]=n+"px"}function Ni(t,e,n,r){let f=Ou.createElement(t);return e!=null&&ni(f,e),n!=null&&n.insertBefore(f,r),f}function vi(t,e){return Ni("div",t,e)}const Cg=new WeakMap;function Zi(t,e,n,r,f){let h="translate("+e+"px,"+n+"px)",p=Cg.get(t);h!=p&&(t.style.transform=h,Cg.set(t,h),e<0||n<0||e>r||n>f?ni(t,ps):Nu(t,ps))}const _g=new WeakMap;function kg(t,e,n){let r=e+n,f=_g.get(t);r!=f&&(_g.set(t,r),t.style.background=e,t.style.borderColor=n)}const Ag=new WeakMap;function Sg(t,e,n,r){let f=e+""+n,h=Ag.get(t);f!=h&&(Ag.set(t,f),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const Fu={passive:!0},B_={...Fu,capture:!0};function gs(t,e,n,r){e.addEventListener(t,n,r?B_:Fu)}function Pu(t,e,n,r){e.removeEventListener(t,n,Fu)}Ys&&Du();function Fi(t,e,n,r){let f;n=n||0,r=r||e.length-1;let h=r<=2147483647;for(;r-n>1;)f=h?n+r>>1:ii((n+r)/2),e[f]<t?n=f:r=f;return t-e[n]<=e[r]-t?n:r}function Tg(t){return(e,n,r)=>{let f=-1,h=-1;for(let p=n;p<=r;p++)if(t(e[p])){f=p;break}for(let p=r;p>=n;p--)if(t(e[p])){h=p;break}return[f,h]}}const $g=t=>t!=null,Mg=t=>t!=null&&t>0,Fl=Tg($g),j_=Tg(Mg);function z_(t,e,n,r=0,f=!1){let h=f?j_:Fl,p=f?Mg:$g;[e,n]=h(t,e,n);let b=t[e],u=t[e];if(e>-1)if(r==1)b=t[e],u=t[n];else if(r==-1)b=t[n],u=t[e];else for(let g=e;g<=n;g++){let s=t[g];p(s)&&(s<b?b=s:s>u&&(u=s))}return[b??br,u??-1/0]}function Pl(t,e,n,r){let f=Lg(t),h=Lg(e);t==e&&(f==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?ho:Rg,b=f==1?ii:yi,u=h==1?yi:ii,g=b(p(cr(t))),s=u(p(cr(e))),a=Qs(n,g),c=Qs(n,s);return n==10&&(g<0&&(a=mn(a,-g)),s<0&&(c=mn(c,-s))),r||n==2?(t=a*f,e=c*h):(t=Bg(t,a),e=jl(e,c)),[t,e]}function Wu(t,e,n,r){let f=Pl(t,e,n,r);return t==0&&(f[0]=0),e==0&&(f[1]=0),f}const Bu=.1,Ig={mode:3,pad:Bu},Fa={pad:0,soft:null,mode:0},H_={min:Fa,max:Fa};function Wl(t,e,n,r){return zl(n)?Eg(t,e,n):(Fa.pad=n,Fa.soft=r?0:null,Fa.mode=r?3:0,Eg(t,e,H_))}function tn(t,e){return t??e}function U_(t,e,n){for(e=tn(e,0),n=tn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function Eg(t,e,n){let r=n.min,f=n.max,h=tn(r.pad,0),p=tn(f.pad,0),b=tn(r.hard,-1/0),u=tn(f.hard,br),g=tn(r.soft,br),s=tn(f.soft,-1/0),a=tn(r.mode,0),c=tn(f.mode,0),l=e-t,o=ho(l),d=Nr(cr(t),cr(e)),m=ho(d),w=cr(m-o);(l<1e-24||w>10)&&(l=0,(t==0||e==0)&&(l=1e-24,a==2&&g!=br&&(h=0),c==2&&s!=-1/0&&(p=0)));let x=l||d||1e3,I=ho(x),T=Qs(10,ii(I)),_=x*(l==0?t==0?.1:1:h),C=mn(Bg(t-_,T/10),24),L=t>=g&&(a==1||a==3&&C<=g||a==2&&C>=g)?g:br,R=Nr(b,C<L&&t>=L?L:Pi(L,C)),F=x*(l==0?e==0?.1:1:p),E=mn(jl(e+F,T/10),24),H=e<=s&&(c==1||c==3&&E>=s||c==2&&E<=s)?s:-1/0,P=Pi(u,E>H&&e<=H?H:Nr(H,E));return R==P&&R==0&&(P=100),[R,P]}const V_=new Intl.NumberFormat(Ys?W_.language:"en-US"),ju=t=>V_.format(t),ri=Math,Bl=ri.PI,cr=ri.abs,ii=ri.floor,ur=ri.round,yi=ri.ceil,Pi=ri.min,Nr=ri.max,Qs=ri.pow,Lg=ri.sign,ho=ri.log10,Rg=ri.log2,q_=(t,e=1)=>ri.sinh(t)*e,zu=(t,e=1)=>ri.asinh(t/e),br=1/0;function Og(t){return(ho((t^t>>31)-(t>>31))|0)+1}function Hu(t,e,n){return Pi(Nr(t,e),n)}function Dg(t){return typeof t=="function"}function qt(t){return Dg(t)?t:()=>t}const K_=()=>{},Ng=t=>t,Fg=(t,e)=>e,G_=t=>null,Pg=t=>!0,Wg=(t,e)=>t==e,Y_=/\.\d*?(?=9{6,}|0{6,})/gm,ms=t=>{if(zg(t)||Fo.has(t))return t;const e=`${t}`,n=e.match(Y_);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[f,h]=e.split("e");return+`${ms(f)}e${h}`}return mn(t,r)};function vs(t,e){return ms(mn(ms(t/e))*e)}function jl(t,e){return ms(yi(ms(t/e))*e)}function Bg(t,e){return ms(ii(ms(t/e))*e)}function mn(t,e=0){if(zg(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return ur(r)/n}const Fo=new Map;function jg(t){return((""+t).split(".")[1]||"").length}function Pa(t,e,n,r){let f=[],h=r.map(jg);for(let p=e;p<n;p++){let b=cr(p),u=mn(Qs(t,p),b);for(let g=0;g<r.length;g++){let s=t==10?+`${r[g]}e${p}`:r[g]*u,a=(p>=0?0:b)+(p>=h[g]?0:h[g]),c=t==10?s:mn(s,a);f.push(c),Fo.set(c,a)}}return f}const Wa={},Uu=[],Zs=[null,null],Po=Array.isArray,zg=Number.isInteger,X_=t=>t===void 0;function Hg(t){return typeof t=="string"}function zl(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function Q_(t){return t!=null&&typeof t=="object"}const Z_=Object.getPrototypeOf(Uint8Array),Ug="__proto__";function Js(t,e=zl){let n;if(Po(t)){let r=t.find(f=>f!=null);if(Po(r)||e(r)){n=Array(t.length);for(let f=0;f<t.length;f++)n[f]=Js(t[f],e)}else n=t.slice()}else if(t instanceof Z_)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Ug&&(n[r]=Js(t[r],e))}else n=t;return n}function tr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let f in r)f!=Ug&&(zl(t[f])?tr(t[f],Js(r[f])):t[f]=Js(r[f]))}return t}const J_=0,ek=1,tk=2;function nk(t,e,n){for(let r=0,f,h=-1;r<e.length;r++){let p=e[r];if(p>h){for(f=p-1;f>=0&&t[f]==null;)t[f--]=null;for(f=p+1;f<n&&t[f]==null;)t[h=f++]=null}}}function rk(t,e){if(sk(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return ak(p[0])||(p=ok(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],u=b.length;for(let g=0;g<u;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],f=r[0].length,h=new Map;for(let p=0;p<f;p++)h.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],u=b[0];for(let g=1;g<b.length;g++){let s=b[g],a=Array(f).fill(void 0),c=e?e[p][g]:ek,l=[];for(let o=0;o<s.length;o++){let d=s[o],m=h.get(u[o]);d===null?c!=J_&&(a[m]=d,c==tk&&l.push(m)):a[m]=d}nk(a,l,f),r.push(a)}}return r}const ik=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function ok(t){let e=t[0],n=e.length,r=Array(n);for(let h=0;h<r.length;h++)r[h]=h;r.sort((h,p)=>e[h]-e[p]);let f=[];for(let h=0;h<t.length;h++){let p=t[h],b=Array(n);for(let u=0;u<n;u++)b[u]=p[r[u]];f.push(b)}return f}function sk(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let f=t[r][0];if(f.length!=n)return!1;if(f!=e){for(let h=0;h<n;h++)if(f[h]!=e[h])return!1}}return!0}function ak(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,f=n-1;for(;r<=f&&t[r]==null;)r++;for(;f>=r&&t[f]==null;)f--;if(f<=r)return!0;const h=Nr(1,ii((f-r+1)/e));for(let p=t[r],b=r+h;b<=f;b+=h){const u=t[b];if(u!=null){if(u<=p)return!1;p=u}}return!0}const Vg=["January","February","March","April","May","June","July","August","September","October","November","December"],qg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Kg(t){return t.slice(0,3)}const lk=qg.map(Kg),ck=Vg.map(Kg),uk={MMMM:Vg,MMM:ck,WWWW:qg,WWW:lk};function Ba(t){return(t<10?"0":"")+t}function hk(t){return(t<10?"00":t<100?"0":"")+t}const dk={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Ba(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ba(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ba(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ba(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ba(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>hk(t.getMilliseconds())};function Vu(t,e){e=e||uk;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(t);)n.push(f[0][0]=="{"?dk[f[1]]:f[0]);return h=>{let p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](h,e);return p}}const fk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function pk(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==fk?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Gg=t=>t%1==0,Hl=[1,2,2.5,5],gk=Pa(10,-32,0,Hl),Yg=Pa(10,0,32,Hl),mk=Yg.filter(Gg),ys=gk.concat(Yg),qu=`
|
1484
|
+
`,Xg="{YYYY}",Qg=qu+Xg,Zg="{M}/{D}",ja=qu+Zg,Ul=ja+"/{YY}",Jg="{aa}",vk="{h}:{mm}",ea=vk+Jg,em=qu+ea,tm=":{ss}",cn=null;function nm(t){let e=t*1e3,n=e*60,r=n*60,f=r*24,h=f*30,p=f*365,b=(t==1?Pa(10,0,3,Hl).filter(Gg):Pa(10,-3,0,Hl)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,f,f*2,f*3,f*4,f*5,f*6,f*7,f*8,f*9,f*10,f*15,h,h*2,h*3,h*4,h*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const u=[[p,Xg,cn,cn,cn,cn,cn,cn,1],[f*28,"{MMM}",Qg,cn,cn,cn,cn,cn,1],[f,Zg,Qg,cn,cn,cn,cn,cn,1],[r,"{h}"+Jg,Ul,cn,ja,cn,cn,cn,1],[n,ea,Ul,cn,ja,cn,cn,cn,1],[e,tm,Ul+" "+ea,cn,ja+" "+ea,cn,em,cn,1],[t,tm+".{fff}",Ul+" "+ea,cn,ja+" "+ea,cn,em,cn,1]];function g(s){return(a,c,l,o,d,m)=>{let w=[],x=d>=p,I=d>=h&&d<p,T=s(l),_=mn(T*t,3),C=Ku(T.getFullYear(),x?0:T.getMonth(),I||x?1:T.getDate()),L=mn(C*t,3);if(I||x){let R=I?d/h:0,F=x?d/p:0,E=_==L?_:mn(Ku(C.getFullYear()+F,C.getMonth()+R,1)*t,3),H=new Date(ur(E/t)),P=H.getFullYear(),O=H.getMonth();for(let S=0;E<=o;S++){let A=Ku(P+F*S,O+R*S,1),D=A-s(mn(A*t,3));E=mn((+A+D)*t,3),E<=o&&w.push(E)}}else{let R=d>=f?f:d,F=ii(l)-ii(_),E=L+F+jl(_-L,R);w.push(E);let H=s(E),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/r,O=d/r,S=a.axes[c]._space,A=m/S;for(;E=mn(E+d,t==1?0:3),!(E>o);)if(O>1){let D=ii(mn(P+O,6))%24,B=s(E).getHours()-D;B>1&&(B=-1),E-=B*r,P=(P+O)%24;let U=w[w.length-1];mn((E-U)/d,3)*A>=.7&&w.push(E)}else w.push(E)}return w}}return[b,u,g]}const[yk,bk,wk]=nm(1),[xk,Ck,_k]=nm(.001);Pa(2,-53,53,[1]);function rm(t,e){return t.map(n=>n.map((r,f)=>f==0||f==8||r==null?r:e(f==1||n[8]==0?r:n[1]+r)))}function im(t,e){return(n,r,f,h,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],u,g,s,a,c,l;return r.map(o=>{let d=t(o),m=d.getFullYear(),w=d.getMonth(),x=d.getDate(),I=d.getHours(),T=d.getMinutes(),_=d.getSeconds(),C=m!=u&&b[2]||w!=g&&b[3]||x!=s&&b[4]||I!=a&&b[5]||T!=c&&b[6]||_!=l&&b[7]||b[1];return u=m,g=w,s=x,a=I,c=T,l=_,C(d)})}}function kk(t,e){let n=Vu(e);return(r,f,h,p,b)=>f.map(u=>n(t(u)))}function Ku(t,e,n){return new Date(t,e,n)}function om(t,e){return e(t)}const Ak="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function sm(t,e){return(n,r,f,h)=>h==null?Ru:e(t(r))}function Sk(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function Tk(t,e){return t.series[e].fill(t,e)}const $k={show:!0,live:!0,isolate:!1,mount:K_,markers:{show:!0,width:2,stroke:Sk,fill:Tk,dash:"solid"},idx:null,idxs:null,values:[]};function Mk(t,e){let n=t.cursor.points,r=vi(),f=n.size(t,e);An(r,Oa,f),An(r,Da,f);let h=f/-2;An(r,"marginLeft",h),An(r,"marginTop",h);let p=n.width(t,e,f);return p&&An(r,"borderWidth",p),r}function Ik(t,e){let n=t.series[e].points;return n._fill||n._stroke}function Ek(t,e){let n=t.series[e].points;return n._stroke||n._fill}function Lk(t,e){return t.series[e].points.size}const Gu=[0,0];function Rk(t,e,n){return Gu[0]=e,Gu[1]=n,Gu}function Vl(t,e,n,r=!0){return f=>{f.button==0&&(!r||f.target==e)&&n(f)}}function Yu(t,e,n,r=!0){return f=>{(!r||f.target==e)&&n(f)}}const Ok={show:!0,x:!0,y:!0,lock:!1,move:Rk,points:{one:!1,show:Mk,size:Lk,width:0,stroke:Ek,fill:Ik},bind:{mousedown:Vl,mouseup:Vl,click:Vl,dblclick:Vl,mousemove:Yu,mouseleave:Yu,mouseenter:Yu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,f)=>r-f,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},am={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Xu=tr({},am,{filter:Fg}),lm=tr({},Xu,{size:10}),cm=tr({},am,{show:!1}),Qu='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"',um="bold "+Qu,hm=1.5,dm={show:!0,scale:"x",stroke:Iu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:um,side:2,grid:Xu,ticks:lm,border:cm,font:Qu,lineGap:hm,rotate:0},Dk="Value",Nk="Time",fm={show:!0,scale:"x",auto:!1,sorted:1,min:br,max:-1/0,idxs:[]};function Fk(t,e,n,r,f){return e.map(h=>h==null?"":ju(h))}function Pk(t,e,n,r,f,h,p){let b=[],u=Fo.get(f)||0;n=p?n:mn(jl(n,f),u);for(let g=n;g<=r;g=mn(g+f,u))b.push(Object.is(g,-0)?0:g);return b}function Zu(t,e,n,r,f,h,p){const b=[],u=t.scales[t.axes[e].scale].log,g=u==10?ho:Rg,s=ii(g(n));f=Qs(u,s),u==10&&(f=ys[Fi(f,ys)]);let a=n,c=f*u;u==10&&(c=ys[Fi(c,ys)]);do b.push(a),a=a+f,u==10&&!Fo.has(a)&&(a=mn(a,Fo.get(f))),a>=c&&(f=a,c=f*u,u==10&&(c=ys[Fi(c,ys)]));while(a<=r);return b}function Wk(t,e,n,r,f,h,p){let b=t.scales[t.axes[e].scale].asinh,u=r>b?Zu(t,e,Nr(b,n),r,f):[b],g=r>=0&&n<=0?[0]:[];return(n<-b?Zu(t,e,Nr(b,-r),-n,f):[b]).reverse().map(s=>-s).concat(g,u)}const pm=/./,Bk=/[12357]/,jk=/[125]/,gm=/1/,Ju=(t,e,n,r)=>t.map((f,h)=>e==4&&f==0||h%r==0&&n.test(f.toExponential()[f<0?1:0])?f:null);function zk(t,e,n,r,f){let h=t.axes[n],p=h.scale,b=t.scales[p],u=t.valToPos,g=h._space,s=u(10,p),a=u(9,p)-s>=g?pm:u(7,p)-s>=g?Bk:u(5,p)-s>=g?jk:gm;if(a==gm){let c=cr(u(1,p)-s);if(c<g)return Ju(e.slice().reverse(),b.distr,a,yi(g/c)).reverse()}return Ju(e,b.distr,a,1)}function Hk(t,e,n,r,f){let h=t.axes[n],p=h.scale,b=h._space,u=t.valToPos,g=cr(u(1,p)-u(2,p));return g<b?Ju(e.slice().reverse(),3,pm,yi(b/g)).reverse():e}function Uk(t,e,n,r){return r==null?Ru:e==null?"":ju(e)}const mm={show:!0,scale:"y",stroke:Iu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:um,side:3,grid:Xu,ticks:lm,border:cm,font:Qu,lineGap:hm,rotate:0};function Vk(t,e){let n=3+(t||1)*2;return mn(n*e,3)}function qk(t,e){let{scale:n,idxs:r}=t.series[0],f=t._data[0],h=t.valToPos(f[r[0]],n,!0),p=t.valToPos(f[r[1]],n,!0),b=cr(p-h),u=t.series[e],g=b/(u.points.space*rn);return r[1]-r[0]<=g}const vm={scale:null,auto:!0,sorted:0,min:br,max:-1/0},ym=(t,e,n,r,f)=>f,bm={show:!0,auto:!0,sorted:0,gaps:ym,alpha:1,facets:[tr({},vm,{scale:"x"}),tr({},vm,{scale:"y"})]},wm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ym,alpha:1,points:{show:qk,filter:null},values:null,min:br,max:-1/0,idxs:[],path:null,clip:null};function Kk(t,e,n,r,f){return n/10}const xm={time:y_,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Gk=tr({},xm,{time:!1,ori:1}),Cm={};function _m(t,e){let n=Cm[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(f=>f!=r)},pub(r,f,h,p,b,u,g){for(let s=0;s<n.plots.length;s++)n.plots[s]!=f&&n.plots[s].pub(r,f,h,p,b,u,g)}},t!=null&&(Cm[t]=n)),n}const ta=1,eh=2;function bs(t,e,n){const r=t.mode,f=t.series[e],h=r==2?t._data[e]:t._data,p=t.scales,b=t.bbox;let u=h[0],g=r==2?h[1]:h[e],s=r==2?p[f.facets[0].scale]:p[t.series[0].scale],a=r==2?p[f.facets[1].scale]:p[f.scale],c=b.left,l=b.top,o=b.width,d=b.height,m=t.valToPosH,w=t.valToPosV;return s.ori==0?n(f,u,g,s,a,m,w,c,l,o,d,Kl,na,Yl,Sm,$m):n(f,u,g,s,a,w,m,l,c,d,o,Gl,ra,rh,Tm,Mm)}function th(t,e){let n=0,r=0,f=tn(t.bands,Uu);for(let h=0;h<f.length;h++){let p=f[h];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function Yk(t,e,n,r,f){let h=t.mode,p=t.series[e],b=h==2?p.facets[1].scale:p.scale,u=t.scales[b];return f==-1?u.min:f==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function fo(t,e,n,r,f,h){return bs(t,e,(p,b,u,g,s,a,c,l,o,d,m)=>{let w=p.pxRound;const x=g.dir*(g.ori==0?1:-1),I=g.ori==0?na:ra;let T,_;x==1?(T=n,_=r):(T=r,_=n);let C=w(a(b[T],g,d,l)),L=w(c(u[T],s,m,o)),R=w(a(b[_],g,d,l)),F=w(c(h==1?s.max:s.min,s,m,o)),E=new Path2D(f);return I(E,R,F),I(E,C,F),I(E,C,L),E})}function ql(t,e,n,r,f,h){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Yl:rh;let u=n;for(let a=0;a<t.length;a++){let c=t[a];if(c[1]>c[0]){let l=c[0]-u;l>0&&b(p,u,r,l,r+h),u=c[1]}}let g=n+f-u,s=10;g>0&&b(p,u,r-s/2,g,r+h+s)}return p}function Xk(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function nh(t,e,n,r,f,h,p){let b=[],u=t.length;for(let g=f==1?n:r;g>=n&&g<=r;g+=f)if(e[g]===null){let s=g,a=g;if(f==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let c=h(t[s]),l=a==s?c:h(t[a]),o=s-f;c=p<=0&&o>=0&&o<u?h(t[o]):c;let d=a+f;l=p>=0&&d>=0&&d<u?h(t[d]):l,l>=c&&b.push([c,l])}return b}function km(t){return t==0?Ng:t==1?ur:e=>vs(e,t)}function Am(t){let e=t==0?Kl:Gl,n=t==0?(f,h,p,b,u,g)=>{f.arcTo(h,p,b,u,g)}:(f,h,p,b,u,g)=>{f.arcTo(p,h,u,b,g)},r=t==0?(f,h,p,b,u)=>{f.rect(h,p,b,u)}:(f,h,p,b,u)=>{f.rect(p,h,u,b)};return(f,h,p,b,u,g=0,s=0)=>{g==0&&s==0?r(f,h,p,b,u):(g=Pi(g,b/2,u/2),s=Pi(s,b/2,u/2),e(f,h+g,p),n(f,h+b,p,h+b,p+u,g),n(f,h+b,p+u,h,p+u,s),n(f,h,p+u,h,p,s),n(f,h,p,h+b,p,g),f.closePath())}}const Kl=(t,e,n)=>{t.moveTo(e,n)},Gl=(t,e,n)=>{t.moveTo(n,e)},na=(t,e,n)=>{t.lineTo(e,n)},ra=(t,e,n)=>{t.lineTo(n,e)},Yl=Am(0),rh=Am(1),Sm=(t,e,n,r,f,h)=>{t.arc(e,n,r,f,h)},Tm=(t,e,n,r,f,h)=>{t.arc(n,e,r,f,h)},$m=(t,e,n,r,f,h,p)=>{t.bezierCurveTo(e,n,r,f,h,p)},Mm=(t,e,n,r,f,h,p)=>{t.bezierCurveTo(n,e,f,r,p,h)};function Im(t){return(e,n,r,f,h)=>bs(e,n,(p,b,u,g,s,a,c,l,o,d,m)=>{let{pxRound:w,points:x}=p,I,T;g.ori==0?(I=Kl,T=Sm):(I=Gl,T=Tm);const _=mn(x.width*rn,3);let C=(x.size-x.width)/2*rn,L=mn(C*2,3),R=new Path2D,F=new Path2D,{left:E,top:H,width:P,height:O}=e.bbox;Yl(F,E-L,H-L,P+L*2,O+L*2);const S=A=>{if(u[A]!=null){let D=w(a(b[A],g,d,l)),B=w(c(u[A],s,m,o));I(R,D+C,B),T(R,D,B,C,0,Bl*2)}};if(h)h.forEach(S);else for(let A=r;A<=f;A++)S(A);return{stroke:_>0?R:null,fill:R,clip:F,flags:ta|eh}})}function Em(t){return(e,n,r,f,h,p)=>{r!=f&&(h!=r&&p!=r&&t(e,n,r),h!=f&&p!=f&&t(e,n,f),t(e,n,p))}}const Qk=Em(na),Zk=Em(ra);function Lm(t){const e=tn(t==null?void 0:t.alignGaps,0);return(n,r,f,h)=>bs(n,r,(p,b,u,g,s,a,c,l,o,d,m)=>{[f,h]=Fl(u,f,h);let w=p.pxRound,x=P=>w(a(P,g,d,l)),I=P=>w(c(P,s,m,o)),T,_;g.ori==0?(T=na,_=Qk):(T=ra,_=Zk);const C=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},R=L.stroke;let F=!1;if(h-f>=d*4){let P=he=>n.posToVal(he,g.key,!0),O=null,S=null,A,D,B,U=x(b[C==1?f:h]),K=x(b[f]),Z=x(b[h]),te=P(C==1?K+1:Z-1);for(let he=C==1?f:h;he>=f&&he<=h;he+=C){let ne=b[he],ae=(C==1?ne<te:ne>te)?U:x(ne),ce=u[he];ae==U?ce!=null?(D=ce,O==null?(T(R,ae,I(D)),A=O=S=D):D<O?O=D:D>S&&(S=D)):ce===null&&(F=!0):(O!=null&&_(R,U,I(O),I(S),I(A),I(D)),ce!=null?(D=ce,T(R,ae,I(D)),O=S=A=D):(O=S=null,ce===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=S&&B!=U&&_(R,U,I(O),I(S),I(A),I(D))}else for(let P=C==1?f:h;P>=f&&P<=h;P+=C){let O=u[P];O===null?F=!0:O!=null&&T(R,x(b[P]),I(O))}let[E,H]=th(n,r);if(p.fill!=null||E!=0){let P=L.fill=new Path2D(R),O=p.fillTo(n,r,p.min,p.max,E),S=I(O),A=x(b[f]),D=x(b[h]);C==-1&&([D,A]=[A,D]),T(P,D,S),T(P,A,S)}if(!p.spanGaps){let P=[];F&&P.push(...nh(b,u,f,h,C,x,e)),L.gaps=P=p.gaps(n,r,f,h,P),L.clip=ql(P,g.ori,l,o,d,m)}return H!=0&&(L.band=H==2?[fo(n,r,f,h,R,-1),fo(n,r,f,h,R,1)]:fo(n,r,f,h,R,H)),L})}function Jk(t){const e=tn(t.align,1),n=tn(t.ascDesc,!1),r=tn(t.alignGaps,0),f=tn(t.extend,!1);return(h,p,b,u)=>bs(h,p,(g,s,a,c,l,o,d,m,w,x,I)=>{[b,u]=Fl(a,b,u);let T=g.pxRound,{left:_,width:C}=h.bbox,L=Z=>T(o(Z,c,x,m)),R=Z=>T(d(Z,l,I,w)),F=c.ori==0?na:ra;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},H=E.stroke,P=c.dir*(c.ori==0?1:-1);let O=R(a[P==1?b:u]),S=L(s[P==1?b:u]),A=S,D=S;f&&e==-1&&(D=_,F(H,D,O)),F(H,S,O);for(let Z=P==1?b:u;Z>=b&&Z<=u;Z+=P){let te=a[Z];if(te==null)continue;let he=L(s[Z]),ne=R(te);e==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;f&&e==1&&(B=_+C,F(H,B,O));let[U,K]=th(h,p);if(g.fill!=null||U!=0){let Z=E.fill=new Path2D(H),te=g.fillTo(h,p,g.min,g.max,U),he=R(te);F(Z,B,he),F(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...nh(s,a,b,u,P,L,r));let te=g.width*rn/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),E.gaps=Z=g.gaps(h,p,b,u,Z),E.clip=ql(Z,c.ori,m,w,x,I)}return K!=0&&(E.band=K==2?[fo(h,p,b,u,H,-1),fo(h,p,b,u,H,1)]:fo(h,p,b,u,H,K)),E})}function Rm(t,e,n,r,f,h,p=br){if(t.length>1){let b=null;for(let u=0,g=1/0;u<t.length;u++)if(e[u]!==void 0){if(b!=null){let s=cr(t[u]-t[b]);s<g&&(g=s,p=cr(n(t[u],r,f,h)-n(t[b],r,f,h)))}b=u}}return p}function eA(t){t=t||Wa;const e=tn(t.size,[.6,br,1]),n=t.align||0,r=t.gap||0;let f=t.radius;f=f==null?[0,0]:typeof f=="number"?[f,0]:f;const h=qt(f),p=1-e[0],b=tn(e[1],br),u=tn(e[2],1),g=tn(t.disp,Wa),s=tn(t.each,l=>{}),{fill:a,stroke:c}=g;return(l,o,d,m)=>bs(l,o,(w,x,I,T,_,C,L,R,F,E,H)=>{let P=w.pxRound,O=n,S=r*rn,A=b*rn,D=u*rn,B,U;T.ori==0?[B,U]=h(l,o):[U,B]=h(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Yl:rh,te=T.ori==0?s:(Ke,_e,Ve,Je,vt,Tt,St)=>{s(Ke,_e,Ve,vt,Je,St,Tt)},he=tn(l.bands,Uu).find(Ke=>Ke.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ce=P(L(ae,_,H,F)),ue,ye,Ae,$e=E,Ie=P(w.width*rn),Ze=!1,Xe=null,gt=null,at=null,mt=null;a!=null&&(Ie==0||c!=null)&&(Ze=!0,Xe=a.values(l,o,d,m),gt=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&>.set(Ke,new Path2D)}),Ie>0&&(at=c.values(l,o,d,m),mt=new Map,new Set(at).forEach(Ke=>{Ke!=null&&mt.set(Ke,new Path2D)})));let{x0:sn,size:bn}=g;if(sn!=null&&bn!=null){O=1,x=sn.values(l,o,d,m),sn.unit==2&&(x=x.map(_e=>l.posToVal(R+_e*E,T.key,!0)));let Ke=bn.values(l,o,d,m);bn.unit==2?ye=Ke[0]*E:ye=C(Ke[0],T,E,R)-C(0,T,E,R),$e=Rm(x,I,C,T,E,R,$e),Ae=$e-ye+S}else $e=Rm(x,I,C,T,E,R,$e),Ae=$e*p+S,ye=$e-Ae;Ae<1&&(Ae=0),Ie>=ye/2&&(Ie=0),Ae<5&&(P=Ng);let Jt=Ae>0,wr=$e-Ae-(Jt?Ie:0);ye=P(Hu(wr,D,A)),ue=(O==0?ye/2:O==K?0:ye)-O*K*((O==0?S/2:0)+(Jt?Ie/2:0));const wn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Fn=Ze?null:new Path2D;let Pn=null;if(he!=null)Pn=l.data[he.series[1]];else{let{y0:Ke,y1:_e}=g;Ke!=null&&_e!=null&&(I=_e.values(l,o,d,m),Pn=Ke.values(l,o,d,m))}let nr=B*ye,Ct=U*ye;for(let Ke=K==1?d:m;Ke>=d&&Ke<=m;Ke+=K){let _e=I[Ke];if(_e==null)continue;if(Pn!=null){let pt=Pn[Ke]??0;if(_e-pt==0)continue;ce=L(pt,_,H,F)}let Ve=T.distr!=2||g!=null?x[Ke]:Ke,Je=C(Ve,T,E,R),vt=L(tn(_e,ae),_,H,F),Tt=P(Je-ue),St=P(Nr(vt,ce)),Pt=P(Pi(vt,ce)),Nt=St-Pt;if(_e!=null){let pt=_e<0?Ct:nr,_t=_e<0?nr:Ct;Ze?(Ie>0&&at[Ke]!=null&&Z(mt.get(at[Ke]),Tt,Pt+ii(Ie/2),ye,Nr(0,Nt-Ie),pt,_t),Xe[Ke]!=null&&Z(gt.get(Xe[Ke]),Tt,Pt+ii(Ie/2),ye,Nr(0,Nt-Ie),pt,_t)):Z(Fn,Tt,Pt+ii(Ie/2),ye,Nr(0,Nt-Ie),pt,_t),te(l,o,Ke,Tt-Ie/2,Pt,ye+Ie,Nt)}}return Ie>0?wn.stroke=Ze?mt:Fn:Ze||(wn._fill=w.width==0?w._fill:w._stroke??w._fill,wn.width=0),wn.fill=Ze?gt:Fn,wn})}function tA(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,f,h,p)=>bs(r,f,(b,u,g,s,a,c,l,o,d,m,w)=>{[h,p]=Fl(g,h,p);let x=b.pxRound,I=B=>x(c(B,s,m,o)),T=B=>x(l(B,a,w,d)),_,C,L;s.ori==0?(_=Kl,L=na,C=$m):(_=Gl,L=ra,C=Mm);const R=s.dir*(s.ori==0?1:-1);let F=I(u[R==1?h:p]),E=F,H=[],P=[];for(let B=R==1?h:p;B>=h&&B<=p;B+=R)if(g[B]!=null){let U=u[B],K=I(U);H.push(E=K),P.push(T(g[B]))}const O={stroke:t(H,P,_,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ta},S=O.stroke;let[A,D]=th(r,f);if(b.fill!=null||A!=0){let B=O.fill=new Path2D(S),U=b.fillTo(r,f,b.min,b.max,A),K=T(U);L(B,E,K),L(B,F,K)}if(!b.spanGaps){let B=[];B.push(...nh(u,g,h,p,R,I,n)),O.gaps=B=b.gaps(r,f,h,p,B),O.clip=ql(B,s.ori,o,d,m,w)}return D!=0&&(O.band=D==2?[fo(r,f,h,p,S,-1),fo(r,f,h,p,S,1)]:fo(r,f,h,p,S,D)),O})}function nA(t){return tA(rA,t)}function rA(t,e,n,r,f,h){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let u=Array(p),g=Array(p-1),s=Array(p-1),a=Array(p-1);for(let c=0;c<p-1;c++)s[c]=e[c+1]-e[c],a[c]=t[c+1]-t[c],g[c]=s[c]/a[c];u[0]=g[0];for(let c=1;c<p-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?u[c]=0:(u[c]=3*(a[c-1]+a[c])/((2*a[c]+a[c-1])/g[c-1]+(a[c]+2*a[c-1])/g[c]),isFinite(u[c])||(u[c]=0));u[p-1]=g[p-2];for(let c=0;c<p-1;c++)f(b,t[c]+a[c]/3,e[c]+u[c]*a[c]/3,t[c+1]-a[c]/3,e[c+1]-u[c+1]*a[c]/3,t[c+1],e[c+1])}return b}const ih=new Set;function Om(){for(let t of ih)t.syncRect(!0)}Ys&&(gs(F_,Xs,Om),gs(P_,Xs,Om,!0),gs(Dl,Xs,()=>{Sr.pxRatio=rn}));const iA=Lm(),oA=Im();function Dm(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((f,h)=>oh(f,h,e,n))}function sA(t,e){return t.map((n,r)=>r==0?{}:tr({},e,n))}function oh(t,e,n,r){return tr({},e==0?n:r,t)}function Nm(t,e,n){return e==null?Zs:[e,n]}const aA=Nm;function lA(t,e,n){return e==null?Zs:Wl(e,n,Bu,!0)}function Fm(t,e,n,r){return e==null?Zs:Pl(e,n,t.scales[r].log,!1)}const cA=Fm;function Pm(t,e,n,r){return e==null?Zs:Wu(e,n,t.scales[r].log,!1)}const uA=Pm;function hA(t,e,n,r,f){let h=Nr(Og(t),Og(e)),p=e-t,b=Fi(f/r*p,n);do{let u=n[b],g=r*u/p;if(g>=f&&h+(u<5?Fo.get(u):0)<=17)return[u,g]}while(++b<n.length);return[0,0]}function Wm(t){let e,n;return t=t.replace(/(\d+)px/,(r,f)=>(e=ur((n=+f)*rn))+"px"),[t,e,n]}function dA(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=mn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Sr(t,e,n){const r={mode:tn(t.mode,1)},f=r.mode;function h(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?1-pe:pe)}function p(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?pe:1-pe)}function b(V,X,ie,oe){return X.ori==0?h(V,X,ie,oe):p(V,X,ie,oe)}r.valToPosH=h,r.valToPosV=p;let u=!1;r.status=0;const g=r.root=vi(b_);if(t.id!=null&&(g.id=t.id),ni(g,t.class),t.title){let V=vi(C_,g);V.textContent=t.title}const s=Ni("canvas"),a=r.ctx=s.getContext("2d"),c=vi(__,g);gs("click",c,V=>{V.target===o&&(ln!=Ci||Gt!=ao)&&Bn.click(r,V)},!0);const l=r.under=vi(k_,c);c.appendChild(s);const o=r.over=vi(A_,c);t=Js(t);const d=+tn(t.pxAlign,1),m=km(d);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const w=t.ms||.001,x=r.series=f==1?Dm(t.series||[],fm,wm,!1):sA(t.series||[null],bm),I=r.axes=Dm(t.axes||[],dm,mm,!0),T=r.scales={},_=r.bands=t.bands||[];_.forEach(V=>{V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1)});const C=f==2?x[1].facets[0].scale:x[0].scale,L={axes:bo,series:ua},R=(t.drawOrder||["axes","series"]).map(V=>L[V]);function F(V){const X=V.distr==3?ie=>ho(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>zu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=V,Me=we-pe;return(oe-pe)/Me}}function E(V){let X=T[V];if(X==null){let ie=(t.scales||Wa)[V]||Wa;if(ie.from!=null){E(ie.from);let oe=tr({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=tr({},V==C?xm:Gk,ie),X.key=V;let oe=X.time,pe=X.range,we=Po(pe);if((V!=C||f==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?Ig:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?Ig:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&zl(pe))){let Me=pe;pe=(Be,ze,Ye)=>ze==null?Zs:Wl(ze,Ye,Me)}X.range=qt(pe||(oe?aA:V==C?X.distr==3?cA:X.distr==4?uA:Nm:X.distr==3?Fm:X.distr==4?Pm:lA)),X.auto=qt(we?!1:X.auto),X.clamp=qt(X.clamp||Kk),X._min=X._max=null,X.valToPct=F(X)}}}E("x"),E("y"),f==1&&x.forEach(V=>{E(V.scale)}),I.forEach(V=>{E(V.scale)});for(let V in t.scales)E(V);const H=T[C],P=H.distr;let O,S;H.ori==0?(ni(g,w_),O=h,S=p):(ni(g,x_),O=p,S=h);const A={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(ur(V/w))),B=t.fmtDate||Vu,U=w==1?wk(D):_k(D),K=im(D,rm(w==1?bk:Ck,B)),Z=sm(D,om(Ak,B)),te=[],he=r.legend=tr({},$k,t.legend),ne=r.cursor=tr({},Ok,{drag:{y:f==2}},t.cursor),ae=he.show,ce=ne.show,ue=he.markers;he.idxs=te,ue.width=qt(ue.width),ue.dash=qt(ue.dash),ue.stroke=qt(ue.stroke),ue.fill=qt(ue.fill);let ye,Ae,$e,Ie=[],Ze=[],Xe,gt=!1,at={};if(he.live){const V=x[1]?x[1].values:null;gt=V!=null,Xe=gt?V(r,1,0):{_:0};for(let X in Xe)at[X]=Ru}if(ae)if(ye=Ni("table",E_,g),$e=Ni("tbody",null,ye),he.mount(r,ye),gt){Ae=Ni("thead",null,ye,$e);let V=Ni("tr",null,Ae);Ni("th",null,V);for(var mt in Xe)Ni("th",pg,V).textContent=mt}else ni(ye,R_),he.live&&ni(ye,L_);const sn={show:!0},bn={show:!1};function Jt(V,X){if(X==0&&(gt||!he.live||f==2))return Zs;let ie=[],oe=Ni("tr",O_,$e,$e.childNodes[X]);ni(oe,V.class),V.show||ni(oe,ps);let pe=Ni("th",null,oe);if(ue.show){let Be=vi(D_,pe);if(X>0){let ze=ue.width(r,X);ze&&(Be.style.border=ze+"px "+ue.dash(r,X)+" "+ue.stroke(r,X)),Be.style.background=ue.fill(r,X)}}let we=vi(pg,pe);V.label instanceof HTMLElement?we.appendChild(V.label):we.textContent=V.label,X>0&&(ue.show||(we.style.color=V.width>0?ue.stroke(r,X):ue.fill(r,X)),wn("click",pe,Be=>{if(ne._lock)return;ji(Be);let ze=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=he.isolate){let Ye=x.some((et,nt)=>nt>0&&nt!=ze&&et.show);x.forEach((et,nt)=>{nt>0&&Wr(nt,Ye?nt==ze?sn:bn:sn,!0,dt.setSeries)})}else Wr(ze,{show:!V.show},!0,dt.setSeries)},!1),zi&&wn(yg,pe,Be=>{ne._lock||(ji(Be),Wr(x.indexOf(V),Ai,!0,dt.setSeries))},!1));for(var Me in Xe){let Be=Ni("td",N_,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const wr=new Map;function wn(V,X,ie,oe=!0){const pe=wr.get(X)||{},we=ne.bind[V](r,X,ie,oe);we&&(gs(V,X,pe[V]=we),wr.set(X,pe))}function Fn(V,X,ie){const oe=wr.get(X)||{};for(let pe in oe)(V==null||pe==V)&&(Pu(pe,X,oe[pe]),delete oe[pe]);V==null&&wr.delete(X)}let Pn=0,nr=0,Ct=0,Ke=0,_e=0,Ve=0,Je=_e,vt=Ve,Tt=Ct,St=Ke,Pt=0,Nt=0,pt=0,_t=0;r.bbox={};let $n=!1,$r=!1,Kr=!1,Bi=!1,po=!1,xr=!1;function go(V,X,ie){(ie||V!=r.width||X!=r.height)&&Wo(V,X),qi(!1),Kr=!0,$r=!0,so()}function Wo(V,X){r.width=Pn=Ct=V,r.height=nr=Ke=X,_e=Ve=0,_s(),aa();let ie=r.bbox;Pt=ie.left=vs(_e*rn,.5),Nt=ie.top=vs(Ve*rn,.5),pt=ie.width=vs(Ct*rn,.5),_t=ie.height=vs(Ke*rn,.5)}const Ya=3;function si(){let V=!1,X=0;for(;!V;){X++;let ie=ha(X),oe=Ja(X);V=X==Ya||ie&&oe,V||(Wo(r.width,r.height),$r=!0)}}function Xa({width:V,height:X}){go(V,X)}r.setSize=Xa;function _s(){let V=!1,X=!1,ie=!1,oe=!1;I.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Be}=pe,ze=Me%2,Ye=pe.label!=null?pe.labelSize:0,et=Be+Ye;et>0&&(ze?(Ct-=et,Me==3?(_e+=et,oe=!0):ie=!0):(Ke-=et,Me==0?(Ve+=et,V=!0):X=!0))}}),Ui[0]=V,Ui[1]=ie,Ui[2]=X,Ui[3]=oe,Ct-=Er[1]+Er[3],_e+=Er[3],Ke-=Er[2]+Er[0],Ve+=Er[0]}function aa(){let V=_e+Ct,X=Ve+Ke,ie=_e,oe=Ve;function pe(we,Me){switch(we){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}I.forEach((we,Me)=>{if(we.show&&we._show){let Be=we.side;we._pos=pe(Be,we._size),we.label!=null&&(we._lpos=pe(Be,we.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=qt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(pe,we,Me,Be)=>{if(we==0)return Me;let ze=Me,Ye=ie(pe,we,Me,Be)??br,et=Ye>=0&&Ye<br,nt=H.ori==0?Ct:Ke,At=ne.left,Ut=e[0],Mt=e[we];if(X.has(Mt[Me])){ze=null;let zt=null,yt=null,ut;if(oe==0||oe==-1)for(ut=Me;zt==null&&ut-- >0;)X.has(Mt[ut])||(zt=ut);if(oe==0||oe==1)for(ut=Me;yt==null&&ut++<Mt.length;)X.has(Mt[ut])||(yt=ut);if(zt!=null||yt!=null)if(et){let vn=zt==null?-1/0:O(Ut[zt],H,nt,0),En=yt==null?1/0:O(Ut[yt],H,nt,0),or=At-vn,Xt=En-At;or<=Xt?or<=Ye&&(ze=zt):Xt<=Ye&&(ze=yt)}else ze=yt==null?zt:zt==null?yt:Me-zt<=yt-Me?zt:yt}else et&&cr(At-O(Ut[Me],H,nt,0))>Ye&&(ze=null);return ze}}const ji=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Yn=ne.points;Yn.show=qt(Yn.show),Yn.size=qt(Yn.size),Yn.stroke=qt(Yn.stroke),Yn.width=qt(Yn.width),Yn.fill=qt(Yn.fill);const Mr=r.focus=tr({},t.focus||{alpha:.3},ne.focus),zi=Mr.prox>=0,Rn=zi&&Yn.one;let Ir=[],no=[],Hi=[];function ks(V,X){let ie=Yn.show(r,X);if(ie instanceof HTMLElement)return ni(ie,I_),ni(ie,V.class),Zi(ie,-10,-10,Ct,Ke),o.insertBefore(ie,Ir[X]),ie}function la(V,X){if(f==1||X>0){let ie=f==1&&T[V.scale].time,oe=V.value;V.value=ie?Hg(oe)?sm(D,om(oe,B)):oe||Z:oe||Uk,V.label=V.label||(ie?Nk:Dk)}if(Rn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||iA||G_,V.fillTo=qt(V.fillTo||Yk),V.pxAlign=+tn(V.pxAlign,d),V.pxRound=km(V.pxAlign),V.stroke=qt(V.stroke||null),V.fill=qt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=Vk(Nr(1,V.width),1),oe=V.points=tr({},{size:ie,width:Nr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:oA,_stroke:null,_fill:null},V.points);oe.show=qt(oe.show),oe.filter=qt(oe.filter),oe.fill=qt(oe.fill),oe.stroke=qt(oe.stroke),oe.paths=qt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Jt(V,X);Ie.splice(X,0,ie[0]),Ze.splice(X,0,ie[1]),he.values.push(null)}if(ce){te.splice(X,0,null);let ie=null;Rn?X==0&&(ie=ks(V,X)):X>0&&(ie=ks(V,X)),Ir.splice(X,0,ie),no.splice(X,0,0),Hi.splice(X,0,0)}st("addSeries",X)}function Qa(V,X){X=X??x.length,V=f==1?oh(V,X,fm,wm):oh(V,X,{},bm),x.splice(X,0,V),la(x[X],X)}r.addSeries=Qa;function Za(V){if(x.splice(V,1),ae){he.values.splice(V,1),Ze.splice(V,1);let X=Ie.splice(V,1)[0];Fn(null,X.firstChild),X.remove()}ce&&(te.splice(V,1),Ir.splice(V,1)[0].remove(),no.splice(V,1),Hi.splice(V,1)),st("delSeries",V)}r.delSeries=Za;const Ui=[!1,!1,!1,!1];function ai(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=T[V.scale]);let pe=oe.time;V.size=qt(V.size),V.space=qt(V.space),V.rotate=qt(V.rotate),Po(V.incrs)&&V.incrs.forEach(Me=>{!Fo.has(Me)&&Fo.set(Me,jg(Me))}),V.incrs=qt(V.incrs||(oe.distr==2?mk:pe?w==1?yk:xk:ys)),V.splits=qt(V.splits||(pe&&oe.distr==1?U:oe.distr==3?Zu:oe.distr==4?Wk:Pk)),V.stroke=qt(V.stroke),V.grid.stroke=qt(V.grid.stroke),V.ticks.stroke=qt(V.ticks.stroke),V.border.stroke=qt(V.border.stroke);let we=V.values;V.values=Po(we)&&!Po(we[0])?qt(we):pe?Po(we)?im(D,rm(we,B)):Hg(we)?kk(D,we):we||K:we||Fk,V.filter=qt(V.filter||(oe.distr>=3&&oe.log==10?zk:oe.distr==3&&oe.log==2?Hk:Fg)),V.font=Wm(V.font),V.labelFont=Wm(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&&(Ui[X]=!0,V._el=vi(S_,c))}}function Kt(V,X,ie,oe){let[pe,we,Me,Be]=ie,ze=X%2,Ye=0;return ze==0&&(Be||we)&&(Ye=X==0&&!pe||X==2&&!Me?ur(dm.size/3):0),ze==1&&(pe||Me)&&(Ye=X==1&&!we||X==3&&!Be?ur(mm.size/2):0),Ye}const ca=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(V=>qt(tn(V,Kt))),Er=r._padding=ca.map((V,X)=>V(r,X,Ui,0));let Xn,xn=null,Wn=null;const bi=f==1?x[0].idxs:null;let Lr=null,wi=!1;function Bo(V,X){if(e=V??[],r.data=r._data=e,f==2){Xn=0;for(let ie=1;ie<x.length;ie++)Xn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Lr=e[0],Xn=Lr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Xn);for(let pe=0;pe<Xn;pe++)oe[pe]=pe}r._data=e=ie}if(qi(!0),st("setData"),P==2&&(Kr=!0),X!==!1){let ie=H;ie.auto(r,wi)?As():rr(C,ie.min,ie.max),Bi=Bi||ne.left>=0,xr=!0,so()}}r.setData=Bo;function As(){wi=!0;let V,X;f==1&&(Xn>0?(xn=bi[0]=0,Wn=bi[1]=Xn-1,V=e[0][xn],X=e[0][Wn],P==2?(V=xn,X=Wn):V==X&&(P==3?[V,X]=Pl(V,V,H.log,!1):P==4?[V,X]=Wu(V,V,H.log,!1):H.time?X=V+ur(86400/w):[V,X]=Wl(V,X,Bu,!0))):(xn=bi[0]=V=null,Wn=bi[1]=X=null)),rr(C,V,X)}let ro,Gr,mo,jo,Yr,zo,Ss,Ts,Ho,hr;function $s(V,X,ie,oe,pe,we){V??(V=mg),ie??(ie=Uu),oe??(oe="butt"),pe??(pe=mg),we??(we="round"),V!=ro&&(a.strokeStyle=ro=V),pe!=Gr&&(a.fillStyle=Gr=pe),X!=mo&&(a.lineWidth=mo=X),we!=Yr&&(a.lineJoin=Yr=we),oe!=zo&&(a.lineCap=zo=oe),ie!=jo&&a.setLineDash(jo=ie)}function vo(V,X,ie,oe){X!=Gr&&(a.fillStyle=Gr=X),V!=Ss&&(a.font=Ss=V),ie!=Ts&&(a.textAlign=Ts=ie),oe!=Ho&&(a.textBaseline=Ho=oe)}function Uo(V,X,ie,oe,pe=0){if(oe.length>0&&V.auto(r,wi)&&(X==null||X.min==null)){let we=tn(xn,0),Me=tn(Wn,oe.length-1),Be=ie.min==null?z_(oe,we,Me,pe,V.distr==3):[ie.min,ie.max];V.min=Pi(V.min,ie.min=Be[0]),V.max=Nr(V.max,ie.max=Be[1])}}const Vo={min:null,max:null};function io(){for(let oe in T){let pe=T[oe];A[oe]==null&&(pe.min==null||A[C]!=null&&pe.auto(r,wi))&&(A[oe]=Vo)}for(let oe in T){let pe=T[oe];A[oe]==null&&pe.from!=null&&A[pe.from]!=null&&(A[oe]=Vo)}A[C]!=null&&qi(!0);let V={};for(let oe in A){let pe=A[oe];if(pe!=null){let we=V[oe]=Js(T[oe],Q_);if(pe.min!=null)tr(we,pe);else if(oe!=C||f==2)if(Xn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=br,we.max=-1/0}}if(Xn>0){x.forEach((oe,pe)=>{if(f==1){let we=oe.scale,Me=A[we];if(Me==null)return;let Be=V[we];if(pe==0){let ze=Be.range(r,Be.min,Be.max,we);Be.min=ze[0],Be.max=ze[1],xn=Fi(Be.min,e[0]),Wn=Fi(Be.max,e[0]),Wn-xn>1&&(e[0][xn]<Be.min&&xn++,e[0][Wn]>Be.max&&Wn--),oe.min=Lr[xn],oe.max=Lr[Wn]}else oe.show&&oe.auto&&Uo(Be,Me,oe,e[pe],oe.sorted);oe.idxs[0]=xn,oe.idxs[1]=Wn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Be=we.scale,ze=Me.scale,[Ye,et]=e[pe],nt=V[Be],At=V[ze];nt!=null&&Uo(nt,A[Be],we,Ye,we.sorted),At!=null&&Uo(At,A[ze],Me,et,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let pe=V[oe],we=A[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==br?null:pe.min,pe.max==-1/0?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in V){let pe=V[oe];if(pe.from!=null){let we=V[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let pe=V[oe],we=T[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?ho(we.min):Me==4?zu(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?ho(we.max):Me==4?zu(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{f==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Kr=!0,st("setScale",oe);ce&&ne.left>=0&&(Bi=xr=!0)}for(let oe in A)A[oe]=null}function Ms(V){let X=Hu(xn-1,0,Xn-1),ie=Hu(Wn+1,0,Xn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Xn-1;)ie++;return[X,ie]}function ua(){if(Xn>0){let V=x.some(X=>X._focus)&&hr!=Mr.alpha;V&&(a.globalAlpha=hr=Mr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(qo(ie,!1),qo(ie,!0),X._paths==null)){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha);let pe=f==2?[0,e[ie][0].length-1]:Ms(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),hr!=oe&&(a.globalAlpha=hr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha),X._paths!=null&&Ko(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,xn,Wn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,xn,Wn,Me),Ko(ie,!0))}hr!=oe&&(a.globalAlpha=hr=oe),st("drawSeries",ie)}}),V&&(a.globalAlpha=hr=1)}}function qo(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Ko(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Be=ie._stroke,_fill:ze=ie._fill,_width:Ye=ie.width}=ie._paths;Ye=mn(Ye*rn,3);let et=null,nt=Ye%2/2;X&&ze==null&&(ze=Ye>0?"#fff":Be);let At=ie.pxAlign==1&&nt>0;if(At&&a.translate(nt,nt),!X){let Ut=Pt-Ye/2,Mt=Nt-Ye/2,zt=pt+Ye,yt=_t+Ye;et=new Path2D,et.rect(Ut,Mt,zt,yt)}X?yo(Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,we):Is(V,Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,et,we),At&&a.translate(-nt,-nt)}function Is(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et){let nt=!1;ze!=0&&_.forEach((At,Ut)=>{if(At.series[0]==V){let Mt=x[At.series[1]],zt=e[At.series[1]],yt=(Mt._paths||Wa).band;Po(yt)&&(yt=At.dir==1?yt[0]:yt[1]);let ut,vn=null;Mt.show&&yt&&U_(zt,xn,Wn)?(vn=At.fill(r,Ut)||we,ut=Mt._paths.clip):yt=null,yo(X,ie,oe,pe,vn,Me,Be,ze,Ye,et,ut,yt),nt=!0}}),nt||yo(X,ie,oe,pe,we,Me,Be,ze,Ye,et)}const Go=ta|eh;function yo(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et,nt){$s(V,X,ie,oe,pe),(ze||Ye||nt)&&(a.save(),ze&&a.clip(ze),Ye&&a.clip(Ye)),nt?(Be&Go)==Go?(a.clip(nt),et&&a.clip(et),dr(pe,Me),xi(V,we,X)):Be&eh?(dr(pe,Me),a.clip(nt),xi(V,we,X)):Be&ta&&(a.save(),a.clip(nt),et&&a.clip(et),dr(pe,Me),a.restore(),xi(V,we,X)):(dr(pe,Me),xi(V,we,X)),(ze||Ye||nt)&&a.restore()}function xi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{a.strokeStyle=ro=pe,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function dr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Gr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function oo(V,X,ie,oe){let pe=I[V],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,V,X,ie,oe),Be=pe._incrs=pe.incrs(r,V,X,ie,oe,Me);we=hA(X,ie,Be,oe,Me)}return pe._found=we}function Vi(V,X,ie,oe,pe,we,Me,Be,ze,Ye){let et=Me%2/2;d==1&&a.translate(et,et),$s(Be,Me,ze,Ye,Be),a.beginPath();let nt,At,Ut,Mt,zt=pe+(oe==0||oe==3?-we:we);ie==0?(At=pe,Mt=zt):(nt=pe,Ut=zt);for(let yt=0;yt<V.length;yt++)X[yt]!=null&&(ie==0?nt=Ut=V[yt]:At=Mt=V[yt],a.moveTo(nt,At),a.lineTo(Ut,Mt));a.stroke(),d==1&&a.translate(-et,-et)}function ha(V){let X=!0;return I.forEach((ie,oe)=>{if(!ie.show)return;let pe=T[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,qi(!1));return}else ie._show||(X=!1,ie._show=!0,qi(!1));let we=ie.side,Me=we%2,{min:Be,max:ze}=pe,[Ye,et]=oo(oe,Be,ze,Me==0?Ct:Ke);if(et==0)return;let nt=pe.distr==2,At=ie._splits=ie.splits(r,oe,Be,ze,Ye,et,nt),Ut=pe.distr==2?At.map(ut=>Lr[ut]):At,Mt=pe.distr==2?Lr[At[1]]-Lr[At[0]]:Ye,zt=ie._values=ie.values(r,ie.filter(r,Ut,oe,et,Mt),oe,et,Mt);ie._rotate=we==2?ie.rotate(r,zt,oe,et):0;let yt=ie._size;ie._size=yi(ie.size(r,zt,oe,V)),yt!=null&&ie._size!=yt&&(X=!1)}),X}function Ja(V){let X=!0;return ca.forEach((ie,oe)=>{let pe=ie(r,oe,Ui,V);pe!=Er[oe]&&(X=!1),Er[oe]=pe}),X}function bo(){for(let V=0;V<I.length;V++){let X=I[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,V),Be=ie==0||ie==3?-1:1,[ze,Ye]=X._found;if(X.label!=null){let gn=X.labelGap*Be,vr=ur((X._lpos+gn)*rn);vo(X.labelFont[0],Me,"center",ie==2?Na:gg),a.save(),oe==1?(pe=we=0,a.translate(vr,ur(Nt+_t/2)),a.rotate((ie==3?-Bl:Bl)/2)):(pe=ur(Pt+pt/2),we=vr);let ko=Dg(X.label)?X.label(r,V,ze,Ye):X.label;a.fillText(ko,pe,we),a.restore()}if(Ye==0)continue;let et=T[X.scale],nt=oe==0?pt:_t,At=oe==0?Pt:Nt,Ut=X._splits,Mt=et.distr==2?Ut.map(gn=>Lr[gn]):Ut,zt=et.distr==2?Lr[Ut[1]]-Lr[Ut[0]]:ze,yt=X.ticks,ut=X.border,vn=yt.show?yt.size:0,En=ur(vn*rn),or=ur((X.alignTo==2?X._size-vn-X.gap:X.gap)*rn),Xt=X._rotate*-Bl/180,fe=m(X._pos*rn),ke=(En+or)*Be,xe=fe+ke;we=oe==0?xe:0,pe=oe==1?xe:0;let qe=X.font[0],ft=X.align==1?Gs:X.align==2?Mu:Xt>0?Gs:Xt<0?Mu:oe==0?"center":ie==3?Mu:Gs,Dt=Xt||oe==1?"middle":ie==2?Na:gg;vo(qe,Me,ft,Dt);let en=X.font[1]*X.lineGap,Wt=Ut.map(gn=>m(b(gn,et,nt,At))),Br=X._values;for(let gn=0;gn<Br.length;gn++){let vr=Br[gn];if(vr!=null){oe==0?pe=Wt[gn]:we=Wt[gn],vr=""+vr;let ko=vr.indexOf(`
|
1485
|
+
`)==-1?[vr]:vr.split(/\n/gm);for(let Hn=0;Hn<ko.length;Hn++){let Ls=ko[Hn];Xt?(a.save(),a.translate(pe,we+Hn*en),a.rotate(Xt),a.fillText(Ls,0,0),a.restore()):a.fillText(Ls,pe,we+Hn*en)}}}yt.show&&Vi(Wt,yt.filter(r,Mt,V,Ye,zt),oe,ie,fe,En,mn(yt.width*rn,3),yt.stroke(r,V),yt.dash,yt.cap);let Si=X.grid;Si.show&&Vi(Wt,Si.filter(r,Mt,V,Ye,zt),oe,oe==0?2:1,oe==0?Nt:Pt,oe==0?_t:pt,mn(Si.width*rn,3),Si.stroke(r,V),Si.dash,Si.cap),ut.show&&Vi([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nt:Pt,oe==1?_t:pt,mn(ut.width*rn,3),ut.stroke(r,V),ut.dash,ut.cap)}st("drawAxes")}function qi(V){x.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(f==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let wo=!1,Yo=!1,xo=[];function da(){Yo=!1;for(let V=0;V<xo.length;V++)st(...xo[V]);xo.length=0}function so(){wo||(ik(fa),wo=!0)}function je(V,X=!1){wo=!0,Yo=X,V(r),fa(),X&&xo.length>0&&queueMicrotask(da)}r.batch=je;function fa(){if($n&&(io(),$n=!1),Kr&&(si(),Kr=!1),$r){if(An(l,Gs,_e),An(l,Na,Ve),An(l,Oa,Ct),An(l,Da,Ke),An(o,Gs,_e),An(o,Na,Ve),An(o,Oa,Ct),An(o,Da,Ke),An(c,Oa,Pn),An(c,Da,nr),s.width=ur(Pn*rn),s.height=ur(nr*rn),I.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:pe})=>{if(V!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;An(V,Me?"left":"top",oe-we),An(V,Me?"width":"height",ie),An(V,Me?"top":"left",Me?Ve:_e),An(V,Me?"height":"width",Me?Ke:Ct),Nu(V,ps)}else ni(V,ps)}),ro=Gr=mo=Yr=zo=Ss=Ts=Ho=jo=null,hr=1,W(!0),_e!=Je||Ve!=vt||Ct!=Tt||Ke!=St){qi(!1);let V=Ct/Tt,X=Ke/St;if(ce&&!Bi&&ne.left>=0){ne.left*=V,ne.top*=X,li&&Zi(li,ur(ne.left),0,Ct,Ke),Qn&&Zi(Qn,0,ur(ne.top),Ct,Ke);for(let ie=0;ie<Ir.length;ie++){let oe=Ir[ie];oe!=null&&(no[ie]*=V,Hi[ie]*=X,Zi(oe,yi(no[ie]),yi(Hi[ie]),Ct,Ke))}}if(kt.show&&!po&&kt.left>=0&&kt.width>0){kt.left*=V,kt.width*=V,kt.top*=X,kt.height*=X;for(let ie in Y)An(Pr,ie,kt[ie])}Je=_e,vt=Ve,Tt=Ct,St=Ke}st("setSize"),$r=!1}Pn>0&&nr>0&&(a.clearRect(0,0,s.width,s.height),st("drawClear"),R.forEach(V=>V()),st("draw")),kt.show&&po&&(pn(kt),po=!1),ce&&Bi&&(k(null,!0,!1),Bi=!1),he.show&&he.live&&xr&&(y(),xr=!1),u||(u=!0,r.status=1,st("ready")),wi=!1,wo=!1}r.redraw=(V,X)=>{Kr=X||!1,V!==!1?rr(C,H.min,H.max):so()};function Ne(V,X){let ie=T[V];if(ie.from==null){if(Xn==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(Xn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Xn>0&&(X.min=Fi(X.min,e[0]),X.max=Fi(X.max,e[0]),X.min==X.max&&X.max++),A[V]=X,$n=!0,so()}}r.setScale=Ne;let On,Co,li,Qn,pa,_o,Ci,ao,an,nn,ln,Gt,_i=!1;const Bn=ne.drag;let He=Bn.x,Cn=Bn.y;ce&&(ne.x&&(On=vi($_,o)),ne.y&&(Co=vi(M_,o)),H.ori==0?(li=On,Qn=Co):(li=Co,Qn=On),ln=ne.left,Gt=ne.top);const kt=r.select=tr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Pr=kt.show?vi(T_,kt.over?o:l):null;function pn(V,X){if(kt.show){for(let ie in V)kt[ie]=V[ie],ie in Y&&An(Pr,ie,V[ie]);X!==!1&&st("setSelect")}}r.setSelect=pn;function Sn(V){if(x[V].show)ae&&Nu(Ie[V],ps);else if(ae&&ni(Ie[V],ps),ce){let X=Rn?Ir[0]:Ir[V];X!=null&&Zi(X,-10,-10,Ct,Ke)}}function rr(V,X,ie){Ne(V,{min:X,max:ie})}function Wr(V,X,ie,oe){X.focus!=null&&pr(V),X.show!=null&&x.forEach((pe,we)=>{we>0&&(V==we||V==null)&&(pe.show=X.show,Sn(we),f==2?(rr(pe.facets[0].scale,null,null),rr(pe.facets[1].scale,null,null)):rr(pe.scale,null,null),so())}),ie!==!1&&st("setSeries",V,X),oe&&Ot("setSeries",r,V,X)}r.setSeries=Wr;function ki(V,X){tr(_[V],X)}function jn(V,X){V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1),X=X??_.length,_.splice(X,0,V)}function Xr(V){V==null?_.length=0:_.splice(V,1)}r.addBand=jn,r.setBand=ki,r.delBand=Xr;function Xo(V,X){x[V].alpha=X,ce&&Ir[V]!=null&&(Ir[V].style.opacity=X),ae&&Ie[V]&&(Ie[V].style.opacity=X)}let zn,ci,ui;const Ai={focus:!0};function pr(V){if(V!=ui){let X=V==null,ie=Mr.alpha!=1;x.forEach((oe,pe)=>{if(f==1||pe>0){let we=X||pe==0||pe==V;oe._focus=X?null:we,ie&&Xo(pe,we?1:Mr.alpha)}}),ui=V,ie&&so()}}ae&&zi&&wn(bg,ye,V=>{ne._lock||(ji(V),ui!=null&&Wr(null,Ai,!0,dt.setSeries))});function gr(V,X,ie){let oe=T[X];ie&&(V=V/rn-(oe.ori==1?Ve:_e));let pe=Ct;oe.ori==1&&(pe=Ke,V=pe-V),oe.dir==-1&&(V=pe-V);let we=oe._min,Me=oe._max,Be=V/pe,ze=we+(Me-we)*Be,Ye=oe.distr;return Ye==3?Qs(10,ze):Ye==4?q_(ze,oe.asinh):Ye==100?oe.bwd(ze):ze}function Cr(V,X){let ie=gr(V,C,X);return Fi(ie,e[0],xn,Wn)}r.valToIdx=V=>Fi(V,e[0]),r.posToIdx=Cr,r.posToVal=gr,r.valToPos=(V,X,ie)=>T[X].ori==0?h(V,T[X],ie?pt:Ct,ie?Pt:0):p(V,T[X],ie?_t:Ke,ie?Nt:0),r.setCursor=(V,X,ie)=>{ln=V.left,Gt=V.top,k(null,X,ie)};function Es(V,X){An(Pr,Gs,kt.left=V),An(Pr,Oa,kt.width=X)}function _r(V,X){An(Pr,Na,kt.top=V),An(Pr,Da,kt.height=X)}let Rr=H.ori==0?Es:_r,hi=H.ori==1?Es:_r;function di(){if(ae&&he.live)for(let V=f==2?1:0;V<x.length;V++){if(V==0&>)continue;let X=he.values[V],ie=0;for(let oe in X)Ze[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):X_(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||f==1&&!gt)&&$(ie,te[ie]);di()}xr=!1,X!==!1&&st("setLegend")}r.setLegend=y;function $(V,X){let ie=x[V],oe=V==0&&P==2?Lr:e[V],pe;gt?pe=ie.values(r,V,X)??at:(pe=ie.value(r,X==null?null:oe[X],V,X),pe=pe==null?at:{_:pe}),he.values[V]=pe}function k(V,X,ie){an=ln,nn=Gt,[ln,Gt]=ne.move(r,ln,Gt),ne.left=ln,ne.top=Gt,ce&&(li&&Zi(li,ur(ln),0,Ct,Ke),Qn&&Zi(Qn,0,ur(Gt),Ct,Ke));let oe,pe=xn>Wn;zn=br,ci=null;let we=H.ori==0?Ct:Ke,Me=H.ori==1?Ct:Ke;if(ln<0||Xn==0||pe){oe=ne.idx=null;for(let Be=0;Be<x.length;Be++){let ze=Ir[Be];ze!=null&&Zi(ze,-10,-10,Ct,Ke)}zi&&Wr(null,Ai,!0,V==null&&dt.setSeries),he.live&&(te.fill(oe),xr=!0)}else{let Be,ze,Ye;f==1&&(Be=H.ori==0?ln:Gt,ze=gr(Be,C),oe=ne.idx=Fi(ze,e[0],xn,Wn),Ye=O(e[0][oe],H,we,0));let et=-10,nt=-10,At=0,Ut=0,Mt=!0,zt="",yt="";for(let ut=f==2?1:0;ut<x.length;ut++){let vn=x[ut],En=te[ut],or=En==null?null:f==1?e[ut][En]:e[ut][1][En],Xt=ne.dataIdx(r,ut,oe,ze),fe=Xt==null?null:f==1?e[ut][Xt]:e[ut][1][Xt];if(xr=xr||fe!=or||Xt!=En,te[ut]=Xt,ut>0&&vn.show){let ke=Xt==null?-10:Xt==oe?Ye:O(f==1?e[0][Xt]:e[ut][0][Xt],H,we,0),xe=fe==null?-10:S(fe,f==1?T[vn.scale]:T[vn.facets[1].scale],Me,0);if(zi&&fe!=null){let qe=H.ori==1?ln:Gt,ft=cr(Mr.dist(r,ut,Xt,xe,qe));if(ft<zn){let Dt=Mr.bias;if(Dt!=0){let en=gr(qe,vn.scale),Wt=fe>=0?1:-1,Br=en>=0?1:-1;Br==Wt&&(Br==1?Dt==1?fe>=en:fe<=en:Dt==1?fe<=en:fe>=en)&&(zn=ft,ci=ut)}else zn=ft,ci=ut}}if(xr||Rn){let qe,ft;H.ori==0?(qe=ke,ft=xe):(qe=xe,ft=ke);let Dt,en,Wt,Br,Si,gn,vr=!0,ko=Yn.bbox;if(ko!=null){vr=!1;let Hn=ko(r,ut);Wt=Hn.left,Br=Hn.top,Dt=Hn.width,en=Hn.height}else Wt=qe,Br=ft,Dt=en=Yn.size(r,ut);if(gn=Yn.fill(r,ut),Si=Yn.stroke(r,ut),Rn)ut==ci&&zn<=Mr.prox&&(et=Wt,nt=Br,At=Dt,Ut=en,Mt=vr,zt=gn,yt=Si);else{let Hn=Ir[ut];Hn!=null&&(no[ut]=Wt,Hi[ut]=Br,Sg(Hn,Dt,en,vr),kg(Hn,gn,Si),Zi(Hn,yi(Wt),yi(Br),Ct,Ke))}}}}if(Rn){let ut=Mr.prox,vn=ui==null?zn<=ut:zn>ut||ci!=ui;if(xr||vn){let En=Ir[0];En!=null&&(no[0]=et,Hi[0]=nt,Sg(En,At,Ut,Mt),kg(En,zt,yt),Zi(En,yi(et),yi(nt),Ct,Ke))}}}if(kt.show&&_i)if(V!=null){let[Be,ze]=dt.scales,[Ye,et]=dt.match,[nt,At]=V.cursor.sync.scales,Ut=V.cursor.drag;if(He=Ut._x,Cn=Ut._y,He||Cn){let{left:Mt,top:zt,width:yt,height:ut}=V.select,vn=V.scales[nt].ori,En=V.posToVal,or,Xt,fe,ke,xe,qe=Be!=null&&Ye(Be,nt),ft=ze!=null&&et(ze,At);qe&&He?(vn==0?(or=Mt,Xt=yt):(or=zt,Xt=ut),fe=T[Be],ke=O(En(or,nt),fe,we,0),xe=O(En(or+Xt,nt),fe,we,0),Rr(Pi(ke,xe),cr(xe-ke))):Rr(0,we),ft&&Cn?(vn==1?(or=Mt,Xt=yt):(or=zt,Xt=ut),fe=T[ze],ke=S(En(or,At),fe,Me,0),xe=S(En(or+Xt,At),fe,Me,0),hi(Pi(ke,xe),cr(xe-ke))):hi(0,Me)}else Q()}else{let Be=cr(an-pa),ze=cr(nn-_o);if(H.ori==1){let At=Be;Be=ze,ze=At}He=Bn.x&&Be>=Bn.dist,Cn=Bn.y&&ze>=Bn.dist;let Ye=Bn.uni;Ye!=null?He&&Cn&&(He=Be>=Ye,Cn=ze>=Ye,!He&&!Cn&&(ze>Be?Cn=!0:He=!0)):Bn.x&&Bn.y&&(He||Cn)&&(He=Cn=!0);let et,nt;He&&(H.ori==0?(et=Ci,nt=ln):(et=ao,nt=Gt),Rr(Pi(et,nt),cr(nt-et)),Cn||hi(0,Me)),Cn&&(H.ori==1?(et=Ci,nt=ln):(et=ao,nt=Gt),hi(Pi(et,nt),cr(nt-et)),He||Rr(0,we)),!He&&!Cn&&(Rr(0,0),hi(0,0))}if(Bn._x=He,Bn._y=Cn,V==null){if(ie){if(Mn!=null){let[Be,ze]=dt.scales;dt.values[0]=Be!=null?gr(H.ori==0?ln:Gt,Be):null,dt.values[1]=ze!=null?gr(H.ori==1?ln:Gt,ze):null}Ot(Eu,r,ln,Gt,Ct,Ke,oe)}if(zi){let Be=ie&&dt.setSeries,ze=Mr.prox;ui==null?zn<=ze&&Wr(ci,Ai,!0,Be):zn>ze?Wr(null,Ai,!0,Be):ci!=ui&&Wr(ci,Ai,!0,Be)}}xr&&(he.idx=oe,y()),X!==!1&&st("setCursor")}let N=null;Object.defineProperty(r,"rect",{get(){return N==null&&W(!1),N}});function W(V=!1){V?N=null:(N=o.getBoundingClientRect(),st("syncRect",N))}function j(V,X,ie,oe,pe,we,Me){ne._lock||_i&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,pe,we,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,pe,we,Me,Be,ze){if(N==null&&W(!1),ji(V),V!=null)ie=V.clientX-N.left,oe=V.clientY-N.top;else{if(ie<0||oe<0){ln=-10,Gt=-10;return}let[Ye,et]=dt.scales,nt=X.cursor.sync,[At,Ut]=nt.values,[Mt,zt]=nt.scales,[yt,ut]=dt.match,vn=X.axes[0].side%2==1,En=H.ori==0?Ct:Ke,or=H.ori==1?Ct:Ke,Xt=vn?we:pe,fe=vn?pe:we,ke=vn?oe:ie,xe=vn?ie:oe;if(Mt!=null?ie=yt(Ye,Mt)?b(At,T[Ye],En,0):-10:ie=En*(ke/Xt),zt!=null?oe=ut(et,zt)?b(Ut,T[et],or,0):-10:oe=or*(xe/fe),H.ori==1){let qe=ie;ie=oe,oe=qe}}ze&&(X==null||X.cursor.event.type==Eu)&&((ie<=1||ie>=Ct-1)&&(ie=vs(ie,Ct)),(oe<=1||oe>=Ke-1)&&(oe=vs(oe,Ke))),Be?(pa=ie,_o=oe,[Ci,ao]=ne.move(r,ie,oe)):(ln=ie,Gt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){pn(Y,!1)}let re,se,ve,Ce;function ge(V,X,ie,oe,pe,we,Me){_i=!0,He=Cn=Bn._x=Bn._y=!1,q(V,X,ie,oe,pe,we,Me,!0,!1),V!=null&&(wn(Lu,Ou,be,!1),Ot(vg,r,Ci,ao,Ct,Ke,null));let{left:Be,top:ze,width:Ye,height:et}=kt;re=Be,se=ze,ve=Ye,Ce=et}function be(V,X,ie,oe,pe,we,Me){_i=Bn._x=Bn._y=!1,q(V,X,ie,oe,pe,we,Me,!1,!0);let{left:Be,top:ze,width:Ye,height:et}=kt,nt=Ye>0||et>0,At=re!=Be||se!=ze||ve!=Ye||Ce!=et;if(nt&&At&&pn(kt),Bn.setScale&&nt&&At){let Ut=Be,Mt=Ye,zt=ze,yt=et;if(H.ori==1&&(Ut=ze,Mt=et,zt=Be,yt=Ye),He&&rr(C,gr(Ut,C),gr(Ut+Mt,C)),Cn)for(let ut in T){let vn=T[ut];ut!=C&&vn.from==null&&vn.min!=br&&rr(ut,gr(zt+yt,ut),gr(zt,ut))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(Fn(Lu,Ou),Ot(Lu,r,ln,Gt,Ct,Ke,null))}function Oe(V,X,ie,oe,pe,we,Me){if(ne._lock)return;ji(V);let Be=_i;if(_i){let ze=!0,Ye=!0,et=10,nt,At;H.ori==0?(nt=He,At=Cn):(nt=Cn,At=He),nt&&At&&(ze=ln<=et||ln>=Ct-et,Ye=Gt<=et||Gt>=Ke-et),nt&&ze&&(ln=ln<Ci?0:Ct),At&&Ye&&(Gt=Gt<ao?0:Ke),k(null,!0,!0),_i=!1}ln=-10,Gt=-10,te.fill(null),k(null,!0,!0),Be&&(_i=Be)}function Re(V,X,ie,oe,pe,we,Me){ne._lock||(ji(V),As(),Q(),V!=null&&Ot(wg,r,ln,Gt,Ct,Ke,null))}function Ge(){I.forEach(dA),go(r.width,r.height,!0)}gs(Dl,Xs,Ge);const ht={};ht.mousedown=ge,ht.mousemove=j,ht.mouseup=be,ht.dblclick=Re,ht.setSeries=(V,X,ie,oe)=>{let pe=dt.match[2];ie=pe(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ce&&(wn(vg,o,ge),wn(Eu,o,j),wn(yg,o,V=>{ji(V),W(!1)}),wn(bg,o,Oe),wn(wg,o,Re),ih.add(r),r.syncRect=W);const tt=r.hooks=t.hooks||{};function st(V,X,ie){Yo?xo.push([V,X,ie]):V in tt&&tt[V].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)tt[X]=(tt[X]||[]).concat(V.hooks[X])});const _n=(V,X,ie)=>ie,dt=tr({key:null,setSeries:!1,filters:{pub:Pg,sub:Pg},scales:[C,x[1]?x[1].scale:null],match:[Wg,Wg,_n],values:[null,null]},ne.sync);dt.match.length==2&&dt.match.push(_n),ne.sync=dt;const Mn=dt.key,$t=_m(Mn);function Ot(V,X,ie,oe,pe,we,Me){dt.filters.pub(V,X,ie,oe,pe,we,Me)&&$t.pub(V,X,ie,oe,pe,we,Me)}$t.sub(r);function ir(V,X,ie,oe,pe,we,Me){dt.filters.sub(V,X,ie,oe,pe,we,Me)&&ht[V](null,X,ie,oe,pe,we,Me)}r.pub=ir;function mr(){$t.unsub(r),ih.delete(r),wr.clear(),Pu(Dl,Xs,Ge),g.remove(),ye==null||ye.remove(),st("destroy")}r.destroy=mr;function In(){st("init",t,e),Bo(e||t.data,!1),A[C]?Ne(C,A[C]):As(),po=kt.show&&(kt.width>0||kt.height>0),Bi=xr=!0,go(t.width,t.height)}return x.forEach(la),I.forEach(ai),n?n instanceof HTMLElement?(n.appendChild(g),In()):n(r,In):In(),r}Sr.assign=tr,Sr.fmtNum=ju,Sr.rangeNum=Wl,Sr.rangeLog=Pl,Sr.rangeAsinh=Wu,Sr.orient=bs,Sr.pxRatio=rn,Sr.join=rk,Sr.fmtDate=Vu,Sr.tzDate=pk,Sr.sync=_m;{Sr.addGap=Xk,Sr.clipGaps=ql;let t=Sr.paths={points:Im};t.linear=Lm,t.stepped=Jk,t.bars=eA,t.spline=nA}var Bm,jm;function fA(){return jm||(jm=1,Bm=function(t,e,n,r,f){var h,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(f===void 0)f=t.length-1;else if(f=f|0,f<r||f>=t.length)throw new RangeError("invalid upper bound");for(;r<=f;)if(h=r+(f-r>>>1),p=+n(t[h],e,h,t),p<0)r=h+1;else if(p>0)f=h-1;else return h;return~r}),Bm}var pA=fA();const cN=sr("B",ml(pA));var sh,zm;function gA(){if(zm)return sh;zm=1;function t(e,n,r){var f=-1,h=e.length;n<0&&(n=-n>h?0:h+n),r=r>h?h:r,r<0&&(r+=h),h=n>r?0:r-n>>>0,n>>>=0;for(var p=Array(h);++f<h;)p[f]=e[f+n];return p}return sh=t,sh}var ah,Hm;function mA(){if(Hm)return ah;Hm=1;var t=gA();function e(n,r,f){var h=n.length;return f=f===void 0?h:f,!r&&f>=h?n:t(n,r,f)}return ah=e,ah}var lh,Um;function Vm(){if(Um)return lh;Um=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,h="\\ufe0e\\ufe0f",p="\\u200d",b=RegExp("["+p+t+f+h+"]");function u(g){return b.test(g)}return lh=u,lh}var ch,qm;function vA(){if(qm)return ch;qm=1;function t(e){return e.split("")}return ch=t,ch}var uh,Km;function yA(){if(Km)return uh;Km=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,h="\\ufe0e\\ufe0f",p="["+t+"]",b="["+f+"]",u="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+u+")",s="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=g+"?",d="["+h+"]?",m="(?:"+l+"(?:"+[s,a,c].join("|")+")"+d+o+")*",w=d+o+m,x="(?:"+[s+b+"?",b,a,c,p].join("|")+")",I=RegExp(u+"(?="+u+")|"+x+w,"g");function T(_){return _.match(I)||[]}return uh=T,uh}var hh,Gm;function bA(){if(Gm)return hh;Gm=1;var t=vA(),e=Vm(),n=yA();function r(f){return e(f)?n(f):t(f)}return hh=r,hh}var dh,Ym;function wA(){if(Ym)return dh;Ym=1;var t=typeof No=="object"&&No&&No.Object===Object&&No;return dh=t,dh}var fh,Xm;function xA(){if(Xm)return fh;Xm=1;var t=wA(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return fh=n,fh}var ph,Qm;function gh(){if(Qm)return ph;Qm=1;var t=xA(),e=t.Symbol;return ph=e,ph}var mh,Zm;function CA(){if(Zm)return mh;Zm=1;function t(e,n){for(var r=-1,f=e==null?0:e.length,h=Array(f);++r<f;)h[r]=n(e[r],r,e);return h}return mh=t,mh}var vh,Jm;function _A(){if(Jm)return vh;Jm=1;var t=Array.isArray;return vh=t,vh}var yh,ev;function kA(){if(ev)return yh;ev=1;var t=gh(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,f=t?t.toStringTag:void 0;function h(p){var b=n.call(p,f),u=p[f];try{p[f]=void 0;var g=!0}catch{}var s=r.call(p);return g&&(b?p[f]=u:delete p[f]),s}return yh=h,yh}var bh,tv;function AA(){if(tv)return bh;tv=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return bh=n,bh}var wh,nv;function SA(){if(nv)return wh;nv=1;var t=gh(),e=kA(),n=AA(),r="[object Null]",f="[object Undefined]",h=t?t.toStringTag:void 0;function p(b){return b==null?b===void 0?f:r:h&&h in Object(b)?e(b):n(b)}return wh=p,wh}var xh,rv;function TA(){if(rv)return xh;rv=1;function t(e){return e!=null&&typeof e=="object"}return xh=t,xh}var Ch,iv;function $A(){if(iv)return Ch;iv=1;var t=SA(),e=TA(),n="[object Symbol]";function r(f){return typeof f=="symbol"||e(f)&&t(f)==n}return Ch=r,Ch}var _h,ov;function MA(){if(ov)return _h;ov=1;var t=gh(),e=CA(),n=_A(),r=$A(),f=t?t.prototype:void 0,h=f?f.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return h?h.call(b):"";var u=b+"";return u=="0"&&1/b==-1/0?"-0":u}return _h=p,_h}var kh,sv;function Xl(){if(sv)return kh;sv=1;var t=MA();function e(n){return n==null?"":t(n)}return kh=e,kh}var Ah,av;function IA(){if(av)return Ah;av=1;var t=mA(),e=Vm(),n=bA(),r=Xl();function f(h){return function(p){p=r(p);var b=e(p)?n(p):void 0,u=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return u[h]()+g}}return Ah=f,Ah}var Sh,lv;function cv(){if(lv)return Sh;lv=1;var t=IA(),e=t("toUpperCase");return Sh=e,Sh}var EA=cv();const LA=ml(EA);var Th,uv;function RA(){if(uv)return Th;uv=1;var t=Xl(),e=cv();function n(r){return e(t(r).toLowerCase())}return Th=n,Th}var $h,hv;function OA(){if(hv)return $h;hv=1;function t(e,n,r,f){var h=-1,p=e==null?0:e.length;for(f&&p&&(r=e[++h]);++h<p;)r=n(r,e[h],h,e);return r}return $h=t,$h}var Mh,dv;function DA(){if(dv)return Mh;dv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Mh=t,Mh}var Ih,fv;function NA(){if(fv)return Ih;fv=1;var t=DA(),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"},n=t(e);return Ih=n,Ih}var Eh,pv;function FA(){if(pv)return Eh;pv=1;var t=NA(),e=Xl(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",h="\\u20d0-\\u20ff",p=r+f+h,b="["+p+"]",u=RegExp(b,"g");function g(s){return s=e(s),s&&s.replace(n,t).replace(u,"")}return Eh=g,Eh}var Lh,gv;function PA(){if(gv)return Lh;gv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Lh=e,Lh}var Rh,mv;function WA(){if(mv)return Rh;mv=1;var t=/[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(n){return t.test(n)}return Rh=e,Rh}var Oh,vv;function BA(){if(vv)return Oh;vv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,h="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\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",c="\\ufe0e\\ufe0f",l=b+u+g+s,o="['’]",d="["+l+"]",m="["+f+"]",w="\\d+",x="["+h+"]",I="["+p+"]",T="[^"+t+l+w+h+p+a+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+_+")",L="[^"+t+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",H="\\u200d",P="(?:"+I+"|"+T+")",O="(?:"+E+"|"+T+")",S="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",B="["+c+"]?",U="(?:"+H+"(?:"+[L,R,F].join("|")+")"+B+D+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+D+U,he="(?:"+[x,R,F].join("|")+")"+te,ne=RegExp([E+"?"+I+"+"+S+"(?="+[d,E,"$"].join("|")+")",O+"+"+A+"(?="+[d,E+P,"$"].join("|")+")",E+"?"+P+"+"+S,E+"+"+A,Z,K,w,he].join("|"),"g");function ae(ce){return ce.match(ne)||[]}return Oh=ae,Oh}var Dh,yv;function jA(){if(yv)return Dh;yv=1;var t=PA(),e=WA(),n=Xl(),r=BA();function f(h,p,b){return h=n(h),p=b?void 0:p,p===void 0?e(h)?r(h):t(h):h.match(p)||[]}return Dh=f,Dh}var Nh,bv;function zA(){if(bv)return Nh;bv=1;var t=OA(),e=FA(),n=jA(),r="['’]",f=RegExp(r,"g");function h(p){return function(b){return t(n(e(b).replace(f,"")),p,"")}}return Nh=h,Nh}var Fh,wv;function HA(){if(wv)return Fh;wv=1;var t=RA(),e=zA(),n=e(function(r,f,h){return f=f.toLowerCase(),r+(h?t(f):f)});return Fh=n,Fh}var UA=HA();const VA=ml(UA),qA=Object.assign({"./ArrayWidget.vue":()=>it(()=>rt.import("./ArrayWidget-BbsN1dzF-45b3f0b1b85d0816b4d6.js"),void 0),"./ArrayplotWidget.vue":()=>it(()=>rt.import("./ArrayplotWidget-CCKEyYIx-c2e9f297af8994f10499.js"),void 0),"./BlockWidget.vue":()=>it(()=>rt.import("./BlockWidget-DlCHbqZX-d57a3ba05924d0dc73ce.js"),void 0),"./ButtonWidget.vue":()=>it(()=>rt.import("./ButtonWidget-CtfJzCBR-15be1cfe08491243621a.js"),void 0),"./CanvasWidget.vue":()=>it(()=>rt.import("./CanvasWidget-CqRlXc4r-79ff690f6ab0548bac3b.js"),void 0),"./CanvasdotWidget.vue":()=>it(()=>rt.import("./CanvasdotWidget--Xr_KsZs-5a996c74c5a7ef6bfffa.js"),void 0),"./CanvasimageWidget.vue":()=>it(()=>rt.import("./CanvasimageWidget-BPlj5QYK-d8e96ebe13755da5ca94.js"),void 0),"./CanvasimagevalueWidget.vue":()=>it(()=>rt.import("./CanvasimagevalueWidget-DVFGLt8f-382d16c4c919b192bb21.js"),void 0),"./CanvaslabelWidget.vue":()=>it(()=>rt.import("./CanvaslabelWidget-CYNqmyP0-d63731e0f2c639a94217.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>it(()=>rt.import("./CanvaslabelvalueWidget-B7yIDmsn-da8a435cddcb14c4220d.js"),void 0),"./CanvaslineWidget.vue":()=>it(()=>rt.import("./CanvaslineWidget-BICdxX0Q-e6d7b79766b82eb0aa5f.js"),void 0),"./CanvaslinevalueWidget.vue":()=>it(()=>rt.import("./CanvaslinevalueWidget-Cq-Ddh0P-dd25267d6fe776a0eb4d.js"),void 0),"./CheckbuttonWidget.vue":()=>it(()=>rt.import("./CheckbuttonWidget-B74AWeaW-e5eac04dabbe8e75a50f.js"),void 0),"./ComboboxWidget.vue":()=>it(()=>rt.import("./ComboboxWidget-CtyKbEWb-a3645988bb8f618c30b7.js"),void 0),"./DateWidget.vue":()=>it(()=>rt.import("./DateWidget-BEVSczU8-a8f6e93811962f188e0e.js"),void 0),"./DynamicWidget.vue":()=>it(()=>rt.import("./DynamicWidget-CfMtj7H8-5d1fe4151a3a13875e72.js"),void 0),"./FormatvalueWidget.vue":()=>it(()=>rt.import("./FormatvalueWidget-DN12xymS-a183974bad17bb7102f9.js"),void 0),"./HorizontalWidget.vue":()=>it(()=>rt.import("./HorizontalWidget-Cd_wl1b3-fba8f18453014a0565ad.js"),void 0),"./HorizontalboxWidget.vue":()=>it(()=>rt.import("./HorizontalboxWidget-BcMTFBU--324c3dc4fd5e49eab722.js"),void 0),"./HorizontallineWidget.vue":()=>it(()=>rt.import("./HorizontallineWidget-CXFqHclf-7ca376904e3068703325.js"),void 0),"./IframeWidget.vue":()=>it(()=>rt.import("./IframeWidget-BPerHCCa-3abc66888f871f2424e0.js"),void 0),"./ImageviewerWidget.vue":()=>it(()=>rt.import("./ImageviewerWidget-Cw_H_HmZ-abc4b56b182850c2b4b0.js"),void 0),"./LabelWidget.vue":()=>it(()=>rt.import("./LabelWidget-xrmcVeq8-894f83570ba8b552e75c.js"),void 0),"./LabelledWidget.vue":()=>it(()=>rt.import("./LabelledWidget-D48QoyMk-9c821f58c796d7ea4c9b.js"),void 0),"./LabelprogressbarWidget.vue":()=>it(()=>rt.import("./LabelprogressbarWidget-C_950t6g-5966ce8bbecbd42abbc8.js"),void 0),"./LabelsparklineWidget.vue":()=>it(()=>rt.import("./LabelsparklineWidget-0KXQyPoU-3930edb58cf690a58dd4.js"),void 0),"./LabelvalueWidget.vue":()=>it(()=>rt.import("./LabelvalueWidget-CQ06wWDK-330aee93b235b971e95c.js"),void 0),"./LabelvaluedescWidget.vue":()=>it(()=>rt.import("./LabelvaluedescWidget-Bo8zT01X-e92f203c5cc5204caebd.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitsbarWidget-BucTw8Yk-ef66fe7faa51e1c7fc96.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitscolumnWidget-Dflb1hNd-bb82c73da598c7e933c6.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>it(()=>rt.import("./LabelvaluerangebarWidget-D8cbfXFM-92fab7f5051516ce528f.js"),void 0),"./LedWidget.vue":()=>it(()=>rt.import("./LedWidget-qH_FthkK-a5e74d98a22307a883a8.js"),void 0),"./LimitsbarWidget.vue":()=>it(()=>rt.import("./LimitsbarWidget-B9lAB2RD-96157ffc116593888b48.js"),void 0),"./LimitscolorWidget.vue":()=>it(()=>rt.import("./LimitscolorWidget-c6Qa6su7-c2b237b1468b716361cd.js"),void 0),"./LimitscolumnWidget.vue":()=>it(()=>rt.import("./LimitscolumnWidget-CcLs_443-944fa38b9446f615b635.js"),void 0),"./LinegraphWidget.vue":()=>it(()=>rt.import("./LinegraphWidget-BSVYLFo1-27291b3efda84e682c36.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>it(()=>rt.import("./MatrixbycolumnsWidget-DXFpZTre-1ca1fd46ec81aa27bdea.js"),void 0),"./ProgressbarWidget.vue":()=>it(()=>rt.import("./ProgressbarWidget-iYGw8-Dc-d9aad79edecffa90902a.js"),void 0),"./RadiobuttonWidget.vue":()=>it(()=>rt.import("./RadiobuttonWidget-ytmoVZ3u-3b94c9dfedbb30542025.js"),void 0),"./RadiogroupWidget.vue":()=>it(()=>rt.import("./RadiogroupWidget-CusMBhKH-ee1c8dc1c59df58fd825.js"),void 0),"./RangebarWidget.vue":()=>it(()=>rt.import("./RangebarWidget-D_zGTtCa-7d82a5779754daf85f09.js"),void 0),"./RollupWidget.vue":()=>it(()=>rt.import("./RollupWidget-Dolsixyt-199f99293bbff747842b.js"),void 0),"./ScrollwindowWidget.vue":()=>it(()=>rt.import("./ScrollwindowWidget-DV2nZuNi-2918384639e5b480f5b0.js"),void 0),"./SignalWidget.vue":()=>it(()=>rt.import("./SignalWidget-d9-6h85k-e129c862ab2e2862b245.js"),void 0),"./SpacerWidget.vue":()=>it(()=>rt.import("./SpacerWidget-BH0p2OLi-b5ab05a35a2d859ed908.js"),void 0),"./SparklineWidget.vue":()=>it(()=>rt.import("./SparklineWidget-coxi9r2g-8feb089ce863bd78d520.js"),void 0),"./TabbookWidget.vue":()=>it(()=>rt.import("./TabbookWidget-B1XKplGH-73f77b706b86971b4ebc.js"),void 0),"./TextboxWidget.vue":()=>it(()=>rt.import("./TextboxWidget-C-_M2M4l-b9bef00f2cfe98fb3bf1.js"),void 0),"./TextfieldWidget.vue":()=>it(()=>rt.import("./TextfieldWidget-C08N4JE8-af5bb035574b2bdb1e55.js"),void 0),"./TimeWidget.vue":()=>it(()=>rt.import("./TimeWidget-DtwdEcFg-d89f9fbaa3072936e270.js"),void 0),"./TitleWidget.vue":()=>it(()=>rt.import("./TitleWidget-CT-aLcNb-f3785ae131a4a7667761.js"),void 0),"./ValueWidget.vue":()=>it(()=>rt.import("./ValueWidget-C6RanBj3-da5499cb68372d5227fc.js"),void 0),"./ValuelimitsbarWidget.vue":()=>it(()=>rt.import("./ValuelimitsbarWidget-B3bvjfxc-fad1586e079efff45c2c.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>it(()=>rt.import("./ValuelimitscolumnWidget-QvhI6EcE-b6e11e56e8ab9113b662.js"),void 0),"./ValuerangebarWidget.vue":()=>it(()=>rt.import("./ValuerangebarWidget-Dt3K9BnC-4cb31018f254cafc9a8a.js"),void 0),"./VerticalWidget.vue":()=>it(()=>rt.import("./VerticalWidget-BIIViZgI-bbb379db718beaa2bc28.js"),void 0),"./VerticalboxWidget.vue":()=>it(()=>rt.import("./VerticalboxWidget-DY72fLHW-69a1841223e1274653e7.js"),void 0)}),KA=Object.entries(qA).reduce((t,[e,n])=>{e=e.split("/").pop();const r=LA(VA(e.replace(/\.\w+$/,"")));return{...t,[r]:hf(n)}},{}),uN=sr("W",{components:KA}),xv="openc3-ace-vim-mode-enabled",Cv="ace/keyboard/vim",Ql=sr("X",{isVimModeEnabled(){return localStorage.getItem(xv)==="true"},setVimMode(t){localStorage.setItem(xv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(Cv),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t){this.isVimModeEnabled()?t.setKeyboardHandler(Cv):t.setKeyboardHandler(null)}}),GA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},YA={class:"app-title mr-2"};function XA(t,e,n,r,f,h){const p=Ue("v-col"),b=Ue("v-row"),u=Ue("v-icon"),g=Ue("v-btn"),s=Ue("v-divider"),a=Ue("v-list-item-title"),c=Ue("v-list-item"),l=Ue("v-list"),o=Ue("v-menu"),d=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return lt(),Zt(df,{to:"#openc3-menu"},[Pe(b,{"no-gutters":""},{default:De(()=>[Pe(p,{"align-self":"end"},{default:De(()=>[ar("span",YA,kn(n.title),1)]),_:1})]),_:1}),Pe(b,{dense:"",class:"flex-nowrap"},{default:De(()=>[(lt(!0),hn(Li,null,Xi(n.menus,(I,T)=>(lt(),Zt(o,{ref_for:!0,ref:"topmenu",key:T},{activator:De(({props:_})=>[Pe(g,_a({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button",text:I.label,"data-test":h.formatDT(`${n.title} ${I.label}`)}),{append:De(()=>[Pe(u,{class:"menu-button-icon"},{default:De(()=>e[0]||(e[0]=[jt(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:De(()=>[Pe(l,null,{default:De(()=>[(lt(!0),hn(Li,null,Xi(I.items,(_,C)=>(lt(),hn(Li,null,[_.divider?(lt(),Zt(s,{key:C+"-divider"})):_.subMenu&&_.subMenu.length>0?(lt(),hn("div",{key:C+"-submenu"},[(lt(),Zt(o,{"open-on-hover":"",location:"right",key:C},{activator:De(({props:L})=>[(lt(),Zt(c,_a({ref_for:!0},L,{disabled:_.disabled,key:C}),Qc({append:De(()=>[Pe(u,null,{default:De(()=>e[1]||(e[1]=[jt(" mdi-chevron-right ")])),_:1})]),default:De(()=>[!_.radio&&!_.checkbox?(lt(),Zt(a,{key:0,style:rs("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:De(()=>[jt(kn(_.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[_.icon?{name:"prepend",fn:De(()=>[Pe(u,{disabled:_.disabled},{default:De(()=>[jt(kn(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:De(()=>[Pe(l,null,{default:De(()=>[(lt(!0),hn(Li,null,Xi(_.subMenu,(L,R)=>(lt(),Zt(c,{key:R,"prepend-icon":L.icon,onClick:F=>h.subMenuClick(L)},{default:De(()=>[Pe(a,null,{default:De(()=>[jt(kn(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(lt(),Zt(w,{"model-value":_.value,"onUpdate:modelValue":_.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:De(()=>[(lt(!0),hn(Li,null,Xi(_.choices,(L,R)=>(lt(),Zt(c,{key:R+"-choice"},{default:De(()=>[Pe(m,{class:"list-action"},{default:De(()=>[Pe(d,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(lt(),Zt(c,{onClick:L=>_.command(_),disabled:_.disabled,"data-test":h.formatDT(`${n.title} ${I.label} ${_.label}`),key:C+"-list"},Qc({default:De(()=>[_.checkbox?(lt(),Zt(m,{key:0,class:"list-action"},{default:De(()=>[Pe(x,{modelValue:_.checked,"onUpdate:modelValue":L=>_.checked=L,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!_.radio&&!_.checkbox?(lt(),Zt(a,{key:1,style:rs("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:De(()=>[jt(kn(_.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[_.icon?{name:"prepend",fn:De(()=>[Pe(u,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const QA=Ri(GA,[["render",XA],["__scopeId","data-v-4d454b93"]]);function _v(t,e){return function(){return t.apply(e,arguments)}}const{toString:ZA}=Object.prototype,{getPrototypeOf:Ph}=Object,Zl=(t=>e=>{const n=ZA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wi=t=>(t=t.toLowerCase(),e=>Zl(e)===t),Jl=t=>e=>typeof e===t,{isArray:ia}=Array,za=Jl("undefined");function JA(t){return t!==null&&!za(t)&&t.constructor!==null&&!za(t.constructor)&&oi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const kv=Wi("ArrayBuffer");function eS(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&kv(t.buffer),e}const tS=Jl("string"),oi=Jl("function"),Av=Jl("number"),ec=t=>t!==null&&typeof t=="object",nS=t=>t===!0||t===!1,tc=t=>{if(Zl(t)!=="object")return!1;const e=Ph(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},rS=Wi("Date"),iS=Wi("File"),oS=Wi("Blob"),sS=Wi("FileList"),aS=t=>ec(t)&&oi(t.pipe),lS=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||oi(t.append)&&((e=Zl(t))==="formdata"||e==="object"&&oi(t.toString)&&t.toString()==="[object FormData]"))},cS=Wi("URLSearchParams"),[uS,hS,dS,fS]=["ReadableStream","Request","Response","Headers"].map(Wi),pS=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ha(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),ia(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const h=n?Object.getOwnPropertyNames(t):Object.keys(t),p=h.length;let b;for(r=0;r<p;r++)b=h[r],e.call(null,t[b],b,t)}}function Sv(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Tv=t=>!za(t)&&t!==ws;function Wh(){const{caseless:t}=Tv(this)&&this||{},e={},n=(r,f)=>{const h=t&&Sv(e,f)||f;tc(e[h])&&tc(r)?e[h]=Wh(e[h],r):tc(r)?e[h]=Wh({},r):ia(r)?e[h]=r.slice():e[h]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ha(arguments[r],n);return e}const gS=(t,e,n,{allOwnKeys:r}={})=>(Ha(e,(f,h)=>{n&&oi(f)?t[h]=_v(f,n):t[h]=f},{allOwnKeys:r}),t),mS=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),vS=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},yS=(t,e,n,r)=>{let f,h,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),h=f.length;h-- >0;)p=f[h],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Ph(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},bS=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},wS=t=>{if(!t)return null;if(ia(t))return t;let e=t.length;if(!Av(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},xS=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ph(Uint8Array)),CS=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},_S=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},kS=Wi("HTMLFormElement"),AS=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),$v=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),SS=Wi("RegExp"),Mv=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ha(n,(f,h)=>{let p;(p=e(f,h,t))!==!1&&(r[h]=p||f)}),Object.defineProperties(t,r)},TS=t=>{Mv(t,(e,n)=>{if(oi(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(oi(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$S=(t,e)=>{const n={},r=f=>{f.forEach(h=>{n[h]=!0})};return ia(t)?r(t):r(String(t).split(e)),n},MS=()=>{},IS=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ES(t){return!!(t&&oi(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const LS=t=>{const e=new Array(10),n=(r,f)=>{if(ec(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const h=ia(r)?[]:{};return Ha(r,(p,b)=>{const u=n(p,f+1);!za(u)&&(h[b]=u)}),e[f]=void 0,h}}return r};return n(t,0)},RS=Wi("AsyncFunction"),OS=t=>t&&(ec(t)||oi(t))&&oi(t.then)&&oi(t.catch),Iv=((t,e)=>t?setImmediate:e?((n,r)=>(ws.addEventListener("message",({source:f,data:h})=>{f===ws&&h===n&&r.length&&r.shift()()},!1),f=>{r.push(f),ws.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",oi(ws.postMessage)),DS=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||Iv,Te={isArray:ia,isArrayBuffer:kv,isBuffer:JA,isFormData:lS,isArrayBufferView:eS,isString:tS,isNumber:Av,isBoolean:nS,isObject:ec,isPlainObject:tc,isReadableStream:uS,isRequest:hS,isResponse:dS,isHeaders:fS,isUndefined:za,isDate:rS,isFile:iS,isBlob:oS,isRegExp:SS,isFunction:oi,isStream:aS,isURLSearchParams:cS,isTypedArray:xS,isFileList:sS,forEach:Ha,merge:Wh,extend:gS,trim:pS,stripBOM:mS,inherits:vS,toFlatObject:yS,kindOf:Zl,kindOfTest:Wi,endsWith:bS,toArray:wS,forEachEntry:CS,matchAll:_S,isHTMLForm:kS,hasOwnProperty:$v,hasOwnProp:$v,reduceDescriptors:Mv,freezeMethods:TS,toObjectSet:$S,toCamelCase:AS,noop:MS,toFiniteNumber:IS,findKey:Sv,global:ws,isContextDefined:Tv,isSpecCompliantForm:ES,toJSONObject:LS,isAsyncFn:RS,isThenable:OS,setImmediate:Iv,asap:DS};function Rt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Te.inherits(Rt,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:Te.toJSONObject(this.config),code:this.code,status:this.status}}});const Ev=Rt.prototype,Lv={};["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(t=>{Lv[t]={value:t}}),Object.defineProperties(Rt,Lv),Object.defineProperty(Ev,"isAxiosError",{value:!0}),Rt.from=(t,e,n,r,f,h)=>{const p=Object.create(Ev);return Te.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Rt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,h&&Object.assign(p,h),p};const NS=null;function Bh(t){return Te.isPlainObject(t)||Te.isArray(t)}function Rv(t){return Te.endsWith(t,"[]")?t.slice(0,-2):t}function Ov(t,e,n){return t?t.concat(e).map(function(r,f){return r=Rv(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function FS(t){return Te.isArray(t)&&!t.some(Bh)}const PS=Te.toFlatObject(Te,{},null,function(t){return/^is[A-Z]/.test(t)});function nc(t,e,n){if(!Te.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Te.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,h=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Te.isSpecCompliantForm(e);if(!Te.isFunction(f))throw new TypeError("visitor must be a function");function u(l){if(l===null)return"";if(Te.isDate(l))return l.toISOString();if(!b&&Te.isBlob(l))throw new Rt("Blob is not supported. Use a Buffer instead.");return Te.isArrayBuffer(l)||Te.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,d){let m=l;if(l&&!d&&typeof l=="object"){if(Te.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Te.isArray(l)&&FS(l)||(Te.isFileList(l)||Te.endsWith(o,"[]"))&&(m=Te.toArray(l)))return o=Rv(o),m.forEach(function(w,x){!(Te.isUndefined(w)||w===null)&&e.append(p===!0?Ov([o],x,h):p===null?o:o+"[]",u(w))}),!1}return Bh(l)?!0:(e.append(Ov(d,o,h),u(l)),!1)}const s=[],a=Object.assign(PS,{defaultVisitor:g,convertValue:u,isVisitable:Bh});function c(l,o){if(!Te.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Te.forEach(l,function(d,m){(!(Te.isUndefined(d)||d===null)&&f.call(e,d,Te.isString(m)?m.trim():m,o,a))===!0&&c(d,o?o.concat(m):[m])}),s.pop()}}if(!Te.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Dv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function jh(t,e){this._pairs=[],t&&nc(t,this,e)}const Nv=jh.prototype;Nv.append=function(t,e){this._pairs.push([t,e])},Nv.toString=function(t){const e=t?function(n){return t.call(this,n,Dv)}:Dv;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function WS(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fv(t,e,n){if(!e)return t;const r=n&&n.encode||WS;Te.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let h;if(f?h=f(e,n):h=Te.isURLSearchParams(e)?e.toString():new jh(e,n).toString(r),h){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+h}return t}let Pv=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){Te.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Wv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},BS=typeof URLSearchParams<"u"?URLSearchParams:jh,jS=typeof FormData<"u"?FormData:null,zS=typeof Blob<"u"?Blob:null,HS={isBrowser:!0,classes:{URLSearchParams:BS,FormData:jS,Blob:zS},protocols:["http","https","file","blob","url","data"]},zh=typeof window<"u"&&typeof document<"u",Hh=typeof navigator=="object"&&navigator||void 0,US=zh&&(!Hh||["ReactNative","NativeScript","NS"].indexOf(Hh.product)<0),VS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qS=zh&&window.location.href||"http://localhost",KS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zh,hasStandardBrowserEnv:US,hasStandardBrowserWebWorkerEnv:VS,navigator:Hh,origin:qS},Symbol.toStringTag,{value:"Module"})),Tr={...KS,...HS};function GS(t,e){return nc(t,new Tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,h){return Tr.isNode&&Te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)}},e))}function YS(t){return Te.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function XS(t){const e={},n=Object.keys(t);let r;const f=n.length;let h;for(r=0;r<f;r++)h=n[r],e[h]=t[h];return e}function Bv(t){function e(n,r,f,h){let p=n[h++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),u=h>=n.length;return p=!p&&Te.isArray(f)?f.length:p,u?(Te.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Te.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],h)&&Te.isArray(f[p])&&(f[p]=XS(f[p])),!b)}if(Te.isFormData(t)&&Te.isFunction(t.entries)){const n={};return Te.forEachEntry(t,(r,f)=>{e(YS(r),f,n,0)}),n}return null}function QS(t,e,n){if(Te.isString(t))try{return(e||JSON.parse)(t),Te.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ua={transitional:Wv,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Te.isObject(t);if(f&&Te.isHTMLForm(t)&&(t=new FormData(t)),Te.isFormData(t))return r?JSON.stringify(Bv(t)):t;if(Te.isArrayBuffer(t)||Te.isBuffer(t)||Te.isStream(t)||Te.isFile(t)||Te.isBlob(t)||Te.isReadableStream(t))return t;if(Te.isArrayBufferView(t))return t.buffer;if(Te.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return GS(t,this.formSerializer).toString();if((h=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return nc(h?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),QS(t)):t}],transformResponse:[function(t){const e=this.transitional||Ua.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Te.isResponse(t)||Te.isReadableStream(t))return t;if(t&&Te.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(h){if(f)throw h.name==="SyntaxError"?Rt.from(h,Rt.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],t=>{Ua.headers[t]={}});const ZS=Te.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"]),JS=t=>{const e={};let n,r,f;return t&&t.split(`
|
1486
|
+
`).forEach(function(h){f=h.indexOf(":"),n=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim(),!(!n||e[n]&&ZS[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},jv=Symbol("internals");function Va(t){return t&&String(t).trim().toLowerCase()}function rc(t){return t===!1||t==null?t:Te.isArray(t)?t.map(rc):String(t)}function eT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const tT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Uh(t,e,n,r,f){if(Te.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Te.isString(e)){if(Te.isString(r))return e.indexOf(r)!==-1;if(Te.isRegExp(r))return r.test(e)}}function nT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function rT(t,e){const n=Te.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,h,p){return this[r].call(this,e,f,h,p)},configurable:!0})})}let qr=class{constructor(e){e&&this.set(e)}set(e,n,r){const f=this;function h(b,u,g){const s=Va(u);if(!s)throw new Error("header name must be a non-empty string");const a=Te.findKey(f,s);(!a||f[a]===void 0||g===!0||g===void 0&&f[a]!==!1)&&(f[a||u]=rc(b))}const p=(b,u)=>Te.forEach(b,(g,s)=>h(g,s,u));if(Te.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Te.isString(e)&&(e=e.trim())&&!tT(e))p(JS(e),n);else if(Te.isHeaders(e))for(const[b,u]of e.entries())h(u,b,r);else e!=null&&h(n,e,r);return this}get(e,n){if(e=Va(e),e){const r=Te.findKey(this,e);if(r){const f=this[r];if(!n)return f;if(n===!0)return eT(f);if(Te.isFunction(n))return n.call(this,f,r);if(Te.isRegExp(n))return n.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Va(e),e){const r=Te.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Uh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let f=!1;function h(p){if(p=Va(p),p){const b=Te.findKey(r,p);b&&(!n||Uh(r,r[b],b,n))&&(delete r[b],f=!0)}}return Te.isArray(e)?e.forEach(h):h(e),f}clear(e){const n=Object.keys(this);let r=n.length,f=!1;for(;r--;){const h=n[r];(!e||Uh(this,this[h],h,e,!0))&&(delete this[h],f=!0)}return f}normalize(e){const n=this,r={};return Te.forEach(this,(f,h)=>{const p=Te.findKey(r,h);if(p){n[p]=rc(f),delete n[h];return}const b=e?nT(h):String(h).trim();b!==h&&delete n[h],n[b]=rc(f),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Te.forEach(this,(r,f)=>{r!=null&&r!==!1&&(n[f]=e&&Te.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
1487
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(f=>r.set(f)),r}static accessor(e){const n=(this[jv]=this[jv]={accessors:{}}).accessors,r=this.prototype;function f(h){const p=Va(h);n[p]||(rT(r,h),n[p]=!0)}return Te.isArray(e)?e.forEach(f):f(e),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(qr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Te.freezeMethods(qr);function Vh(t,e){const n=this||Ua,r=e||n,f=qr.from(r.headers);let h=r.data;return Te.forEach(t,function(p){h=p.call(n,h,f.normalize(),e?e.status:void 0)}),f.normalize(),h}function zv(t){return!!(t&&t.__CANCEL__)}function oa(t,e,n){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}Te.inherits(oa,Rt,{__CANCEL__:!0});function Hv(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function oT(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,h=0,p;return e=e!==void 0?e:1e3,function(b){const u=Date.now(),g=r[h];p||(p=u),n[f]=b,r[f]=u;let s=h,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===h&&(h=(h+1)%t),u-p<e)return;const c=g&&u-g;return c?Math.round(a*1e3/c):void 0}}function sT(t,e){let n=0,r=1e3/e,f,h;const p=(b,u=Date.now())=>{n=u,f=null,h&&(clearTimeout(h),h=null),t.apply(null,b)};return[(...b)=>{const u=Date.now(),g=u-n;g>=r?p(b,u):(f=b,h||(h=setTimeout(()=>{h=null,p(f)},r-g)))},()=>f&&p(f)]}const ic=(t,e,n=3)=>{let r=0;const f=oT(50,250);return sT(h=>{const p=h.loaded,b=h.lengthComputable?h.total:void 0,u=p-r,g=f(u),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:u,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:h,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Uv=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Vv=t=>(...e)=>Te.asap(()=>t(...e)),aT=Tr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Tr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,lT=Tr.hasStandardBrowserEnv?{write(t,e,n,r,f,h){const p=[t+"="+encodeURIComponent(e)];Te.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Te.isString(r)&&p.push("path="+r),Te.isString(f)&&p.push("domain="+f),h===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function uT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function qv(t,e,n){let r=!cT(e);return t&&(r||n==!1)?uT(t,e):e}const Kv=t=>t instanceof qr?{...t}:t;function xs(t,e){e=e||{};const n={};function r(g,s,a,c){return Te.isPlainObject(g)&&Te.isPlainObject(s)?Te.merge.call({caseless:c},g,s):Te.isPlainObject(s)?Te.merge({},s):Te.isArray(s)?s.slice():s}function f(g,s,a,c){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function h(g,s){if(!Te.isUndefined(s))return r(void 0,s)}function p(g,s){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const u={url:h,method:h,data:h,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Kv(g),Kv(s),a,!0)};return Te.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=u[g]||f,a=s(t[g],e[g],g);Te.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Gv=t=>{const e=xs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:h,headers:p,auth:b}=e;e.headers=p=qr.from(p),e.url=Fv(qv(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let u;if(Te.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((u=p.getContentType())!==!1){const[g,...s]=u?u.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Tr.hasStandardBrowserEnv&&(r&&Te.isFunction(r)&&(r=r(e)),r||r!==!1&&aT(e.url))){const g=f&&h&&lT.read(h);g&&p.set(f,g)}return e},hT=typeof XMLHttpRequest<"u",dT=hT&&function(t){return new Promise(function(e,n){const r=Gv(t);let f=r.data;const h=qr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:u}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function m(){if(!d)return;const x=qr.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),I={data:!p||p==="text"||p==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:x,config:t,request:d};Hv(function(T){e(T),o()},function(T){n(T),o()},I),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(n(new Rt("Request aborted",Rt.ECONNABORTED,t,d)),d=null)},d.onerror=function(){n(new Rt("Network Error",Rt.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Wv;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Rt(x,I.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,d)),d=null},f===void 0&&h.setContentType(null),"setRequestHeader"in d&&Te.forEach(h.toJSON(),function(x,I){d.setRequestHeader(I,x)}),Te.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),p&&p!=="json"&&(d.responseType=r.responseType),u&&([a,l]=ic(u,!0),d.addEventListener("progress",a)),b&&d.upload&&([s,c]=ic(b),d.upload.addEventListener("progress",s),d.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{d&&(n(!x||x.type?new oa(null,t,d):x),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=iT(r.url);if(w&&Tr.protocols.indexOf(w)===-1){n(new Rt("Unsupported protocol "+w+":",Rt.ERR_BAD_REQUEST,t));return}d.send(f||null)})},fT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const h=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Rt?s:new oa(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,h(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(h):g.removeEventListener("abort",h)}),t=null)};t.forEach(g=>g.addEventListener("abort",h));const{signal:u}=r;return u.unsubscribe=()=>Te.asap(b),u}},pT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},gT=async function*(t,e){for await(const n of mT(t))yield*pT(n,e)},mT=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Yv=(t,e,n,r)=>{const f=gT(t,e);let h=0,p,b=u=>{p||(p=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:g,value:s}=await f.next();if(g){b(),u.close();return}let a=s.byteLength;if(n){let c=h+=a;n(c)}u.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(u){return b(u),f.return()}},{highWaterMark:2})},oc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xv=oc&&typeof ReadableStream=="function",vT=oc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Qv=(t,...e)=>{try{return!!t(...e)}catch{return!1}},yT=Xv&&Qv(()=>{let t=!1;const e=new Request(Tr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Zv=64*1024,qh=Xv&&Qv(()=>Te.isReadableStream(new Response("").body)),sc={stream:qh&&(t=>t.body)};oc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!sc[e]&&(sc[e]=Te.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})})(new Response);const bT=async t=>{if(t==null)return 0;if(Te.isBlob(t))return t.size;if(Te.isSpecCompliantForm(t))return(await new Request(Tr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Te.isArrayBufferView(t)||Te.isArrayBuffer(t))return t.byteLength;if(Te.isURLSearchParams(t)&&(t=t+""),Te.isString(t))return(await vT(t)).byteLength},wT=async(t,e)=>Te.toFiniteNumber(t.getContentLength())??bT(e),xT=oc&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:h,timeout:p,onDownloadProgress:b,onUploadProgress:u,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Gv(t);g=g?(g+"").toLowerCase():"text";let l=fT([f,h&&h.toAbortSignal()],p),o;const d=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(u&&yT&&n!=="get"&&n!=="head"&&(m=await wT(s,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Te.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[L,R]=Uv(m,ic(Vv(u)));r=Yv(_.body,Zv,L,R)}}Te.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const I=qh&&(g==="stream"||g==="response");if(qh&&(b||I&&d)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=x[F]});const C=Te.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Uv(C,ic(Vv(b),!0))||[];x=new Response(Yv(x.body,Zv,L,()=>{R&&R(),d&&d()}),_)}g=g||"text";let T=await sc[Te.findKey(sc,g)||"text"](x,t);return!I&&d&&d(),await new Promise((_,C)=>{Hv(_,C,{data:T,headers:qr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw d&&d(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),Kh={http:NS,xhr:dT,fetch:xT};Te.forEach(Kh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jv=t=>`- ${t}`,CT=t=>Te.isFunction(t)||t===null||t===!1,ey={getAdapter:t=>{t=Te.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let h=0;h<e;h++){n=t[h];let p;if(r=n,!CT(n)&&(r=Kh[(p=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+h]=r}if(!r){const h=Object.entries(f).map(([b,u])=>`adapter ${b} `+(u===!1?"is not supported by the environment":"is not available in the build"));let p=e?h.length>1?`since :
|
1488
|
+
`+h.map(Jv).join(`
|
1489
|
+
`):" "+Jv(h[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Kh};function Gh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oa(null,t)}function ty(t){return Gh(t),t.headers=qr.from(t.headers),t.data=Vh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ey.getAdapter(t.adapter||Ua.adapter)(t).then(function(e){return Gh(t),e.data=Vh.call(t,t.transformResponse,e),e.headers=qr.from(e.headers),e},function(e){return zv(e)||(Gh(t),e&&e.response&&(e.response.data=Vh.call(t,t.transformResponse,e.response),e.response.headers=qr.from(e.response.headers))),Promise.reject(e)})}const ny="1.8.4",ac={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ac[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ry={};ac.transitional=function(t,e,n){function r(f,h){return"[Axios v"+ny+"] Transitional option '"+f+"'"+h+(n?". "+n:"")}return(f,h,p)=>{if(t===!1)throw new Rt(r(h," has been removed"+(e?" in "+e:"")),Rt.ERR_DEPRECATED);return e&&!ry[h]&&(ry[h]=!0,console.warn(r(h," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,h,p):!0}},ac.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function _T(t,e,n){if(typeof t!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const h=r[f],p=e[h];if(p){const b=t[h],u=b===void 0||p(b,h,t);if(u!==!0)throw new Rt("option "+h+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+h,Rt.ERR_BAD_OPTION)}}const lc={assertOptions:_T,validators:ac},Ji=lc.validators;let Cs=class{constructor(e){this.defaults=e,this.interceptors={request:new Pv,response:new Pv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const h=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?h&&!String(r.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1490
|
+
`+h):r.stack=h}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xs(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:h}=n;r!==void 0&&lc.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),f!=null&&(Te.isFunction(f)?n.paramsSerializer={serialize:f}:lc.assertOptions(f,{encode:Ji.function,serialize:Ji.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),lc.assertOptions(n,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=h&&Te.merge(h.common,h[n.method]);h&&Te.forEach(["delete","get","head","post","put","patch","common"],o=>{delete h[o]}),n.headers=qr.concat(p,h);const b=[];let u=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(u=u&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,a=0,c;if(!u){const o=[ty.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),c=o.length,s=Promise.resolve(n);a<c;)s=s.then(o[a++],o[a++]);return s}c=b.length;let l=n;for(a=0;a<c;){const o=b[a++],d=b[a++];try{l=o(l)}catch(m){d.call(this,m);break}}try{s=ty.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,c=g.length;a<c;)s=s.then(g[a++],g[a++]);return s}getUri(e){e=xs(this.defaults,e);const n=qv(e.baseURL,e.url,e.allowAbsoluteUrls);return Fv(n,e.params,e.paramsSerializer)}};Te.forEach(["delete","get","head","options"],function(t){Cs.prototype[t]=function(e,n){return this.request(xs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Te.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,h){return this.request(xs(h||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}Cs.prototype[t]=e(),Cs.prototype[t+"Form"]=e(!0)});let kT=class Kb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](f);r._listeners=null}),this.promise.then=f=>{let h;const p=new Promise(b=>{r.subscribe(b),h=b}).then(f);return p.cancel=function(){r.unsubscribe(h)},p},e(function(f,h,p){r.reason||(r.reason=new oa(f,h,p),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Kb(function(n){e=n}),cancel:e}}};function AT(t){return function(e){return t.apply(null,e)}}function ST(t){return Te.isObject(t)&&t.isAxiosError===!0}const Yh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yh).forEach(([t,e])=>{Yh[e]=t});function iy(t){const e=new Cs(t),n=_v(Cs.prototype.request,e);return Te.extend(n,Cs.prototype,e,{allOwnKeys:!0}),Te.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return iy(xs(t,r))},n}const qn=sr("E",iy(Ua));qn.Axios=Cs,qn.CanceledError=oa,qn.CancelToken=kT,qn.isCancel=zv,qn.VERSION=ny,qn.toFormData=nc,qn.AxiosError=Rt,qn.Cancel=qn.CanceledError,qn.all=function(t){return Promise.all(t)},qn.spread=AT,qn.isAxiosError=ST,qn.mergeConfig=xs,qn.AxiosHeaders=qr,qn.formToJSON=t=>Bv(Te.isHTMLForm(t)?new FormData(t):t),qn.getAdapter=ey.getAdapter,qn.HttpStatusCode=Yh,qn.default=qn;const{Axios:hN,AxiosError:dN,CanceledError:fN,isCancel:pN,CancelToken:gN,VERSION:mN,all:vN,Cancel:yN,isAxiosError:bN,spread:wN,toFormData:xN,AxiosHeaders:CN,HttpStatusCode:_N,formToJSON:kN,getAdapter:AN,mergeConfig:SN}=qn;function oy(){return Object.assign({},zs())}function TT(t,e,n){const r=Tn(t,void 0);return r.setTime(r.getTime()+e*pl),r}function $T(t,e){const n=()=>er(void 0,NaN),r=LT(t);let f;if(r.date){const u=RT(r.date,2);f=OT(u.restDateString,u.year)}if(!f||isNaN(+f))return n();const h=+f;let p=0,b;if(r.time&&(p=DT(r.time),isNaN(p)))return n();if(r.timezone){if(b=NT(r.timezone),isNaN(b))return n()}else{const u=new Date(h+p),g=Tn(0,void 0);return g.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),g.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),g}return Tn(h+p+b,void 0)}const cc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},MT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,IT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ET=/^([+-])(\d{2})(?::?(\d{2}))?$/;function LT(t){const e={},n=t.split(cc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],cc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(cc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const f=cc.timezone.exec(r);f?(e.time=r.replace(f[1],""),e.timezone=f[1]):e.time=r}return e}function RT(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const f=r[1]?parseInt(r[1]):null,h=r[2]?parseInt(r[2]):null;return{year:h===null?f:h*100,restDateString:t.slice((r[1]||r[2]).length)}}function OT(t,e){if(e===null)return new Date(NaN);const n=t.match(MT);if(!n)return new Date(NaN);const r=!!n[4],f=qa(n[1]),h=qa(n[2])-1,p=qa(n[3]),b=qa(n[4]),u=qa(n[5])-1;if(r)return jT(e,b,u)?FT(e,b,u):new Date(NaN);{const g=new Date(0);return!WT(e,h,p)||!BT(e,f)?new Date(NaN):(g.setUTCFullYear(e,h,Math.max(f,p)),g)}}function qa(t){return t?parseInt(t):1}function DT(t){const e=t.match(IT);if(!e)return NaN;const n=Xh(e[1]),r=Xh(e[2]),f=Xh(e[3]);return zT(n,r,f)?n*tu+r*pl+f*1e3:NaN}function Xh(t){return t&&parseFloat(t.replace(",","."))||0}function NT(t){if(t==="Z")return 0;const e=t.match(ET);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),f=e[3]&&parseInt(e[3])||0;return HT(r,f)?n*(r*tu+f*pl):NaN}function FT(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,h=(e-1)*7+n+1-f;return r.setUTCDate(r.getUTCDate()+h),r}const PT=[31,null,31,30,31,30,31,31,30,31,30,31];function sy(t){return t%400===0||t%4===0&&t%100!==0}function WT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(PT[e]||(sy(t)?29:28))}function BT(t,e){return e>=1&&e<=(sy(t)?366:365)}function jT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function zT(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function HT(t,e){return e>=0&&e<=59}function UT(t,e,n){return TT(t,-e)}function ay(t,e,n){const r=oy(),f=KT(t,n.timeZone,n.locale??r.locale);return"formatToParts"in f?VT(f,e):qT(f,e)}function VT(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function qT(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function KT(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function GT(t,e){const n=JT(e);return"formatToParts"in n?XT(n,t):QT(n,t)}const YT={year:0,month:1,day:2,hour:3,minute:4,second:5};function XT(t,e){try{const n=t.formatToParts(e),r=[];for(let f=0;f<n.length;f++){const h=YT[n[f].type];h!==void 0&&(r[h]=parseInt(n[f].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function QT(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);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 Qh={},ly=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")),ZT=ly==="06/25/2014, 00:00:00"||ly==="06/25/2014 00:00:00";function JT(t){return Qh[t]||(Qh[t]=ZT?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Qh[t]}function cy(t,e,n,r,f,h,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,f,h,p),b}const uy=36e5,e$=6e4,Zh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Jh(t,e,n){if(!t)return 0;let r=Zh.timezoneZ.exec(t);if(r)return 0;let f,h;if(r=Zh.timezoneHH.exec(t),r)return f=parseInt(r[1],10),hy(f)?-(f*uy):NaN;if(r=Zh.timezoneHHMM.exec(t),r){f=parseInt(r[2],10);const p=parseInt(r[3],10);return hy(f,p)?(h=Math.abs(f)*uy+p*e$,r[1]==="+"?-h:h):NaN}if(r$(t)){e=new Date(e||Date.now());const p=n?e:t$(e),b=ed(p,t);return-(n?b:n$(e,b,t))}return NaN}function t$(t){return cy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function ed(t,e){const n=GT(t,e),r=cy(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let f=t.getTime();const h=f%1e3;return f-=h>=0?h:1e3+h,r-f}function n$(t,e,n){let r=t.getTime()-e;const f=ed(new Date(r),n);if(e===f)return e;r-=f-e;const h=ed(new Date(r),n);return f===h?f:Math.max(f,h)}function hy(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const dy={};function r$(t){if(dy[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),dy[t]=!0,!0}catch{return!1}}const i$=60*1e3,o$={X:function(t,e,n){const r=td(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return fy(r);case"XXXX":case"XX":return sa(r);case"XXXXX":case"XXX":default:return sa(r,":")}},x:function(t,e,n){const r=td(n.timeZone,t);switch(e){case"x":return fy(r);case"xxxx":case"xx":return sa(r);case"xxxxx":case"xxx":default:return sa(r,":")}},O:function(t,e,n){const r=td(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+s$(r,":");case"OOOO":default:return"GMT"+sa(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return ay("short",t,n);case"zzzz":default:return ay("long",t,n)}}};function td(t,e){const n=t?Jh(t,e,!0)/i$:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function uc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function sa(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=uc(Math.floor(r/60),2),h=uc(Math.floor(r%60),2);return n+f+e+h}function fy(t,e){return t%60===0?(t>0?"-":"+")+uc(Math.abs(t)/60,2):sa(t,e)}function s$(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.floor(r/60),h=r%60;return h===0?n+String(f):n+String(f)+e+uc(h,2)}function py(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const a$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,nd=36e5,gy=6e4,l$=2,Fr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:a$};function my(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?l$:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=c$(t),{year:f,restDateString:h}=u$(r.date,n),p=h$(h,f);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let u=0,g;if(r.time&&(u=d$(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=Jh(r.timeZone||e.timeZone,new Date(b+u)),isNaN(g))return new Date(NaN)}else g=py(new Date(b+u)),g=py(new Date(b+u+g));return new Date(b+u+g)}else return new Date(NaN)}function c$(t){const e={};let n=Fr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Fr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const f=Fr.timeZone.exec(r);f?(e.time=r.replace(f[1],""),e.timeZone=f[1].trim()):e.time=r}return e}function u$(t,e){if(t){const n=Fr.YYY[e],r=Fr.YYYYY[e];let f=Fr.YYYY.exec(t)||r.exec(t);if(f){const h=f[1];return{year:parseInt(h,10),restDateString:t.slice(h.length)}}if(f=Fr.YY.exec(t)||n.exec(t),f){const h=f[1];return{year:parseInt(h,10)*100,restDateString:t.slice(h.length)}}}return{year:null}}function h$(t,e){if(e===null)return null;let n,r,f;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let h=Fr.MM.exec(t);if(h)return n=new Date(0),r=parseInt(h[1],10)-1,by(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(h=Fr.DDD.exec(t),h){n=new Date(0);const p=parseInt(h[1],10);return g$(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(h=Fr.MMDD.exec(t),h){n=new Date(0),r=parseInt(h[1],10)-1;const p=parseInt(h[2],10);return by(e,r,p)?(n.setUTCFullYear(e,r,p),n):new Date(NaN)}if(h=Fr.Www.exec(t),h)return f=parseInt(h[1],10)-1,wy(f)?vy(e,f):new Date(NaN);if(h=Fr.WwwD.exec(t),h){f=parseInt(h[1],10)-1;const p=parseInt(h[2],10)-1;return wy(f,p)?vy(e,f,p):new Date(NaN)}return null}function d$(t){let e,n,r=Fr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),rd(e)?e%24*nd:NaN;if(r=Fr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),rd(e,n)?e%24*nd+n*gy:NaN;if(r=Fr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return rd(e,n,f)?e%24*nd+n*gy+f*1e3:NaN}return null}function vy(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,h=e*7+n+1-f;return r.setUTCDate(r.getUTCDate()+h),r}const f$=[31,28,31,30,31,30,31,31,30,31,30,31],p$=[31,29,31,30,31,30,31,31,30,31,30,31];function yy(t){return t%400===0||t%4===0&&t%100!==0}function by(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=yy(t);if(r&&n>p$[e]||!r&&n>f$[e])return!1}return!0}function g$(t,e){if(e<1)return!1;const n=yy(t);return!(n&&e>366||!n&&e>365)}function wy(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function rd(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const m$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function v$(t,e,n={}){e=String(e);const r=e.match(m$);if(r){const f=my(n.originalDate||t,n);e=r.reduce(function(h,p){if(p[0]==="'")return h;const b=h.indexOf(p),u=h[b-1]==="'",g=h.replace(p,"'"+o$[p[0]](f,p,n)+"'");return u?g.substring(0,b-1)+g.substring(b+1):g},e)}return as(t,e,n)}function y$(t,e,n){t=my(t,n);const r=Jh(e,t,!0),f=new Date(t.getTime()-r),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}function id(t,e,n,r){return r={...r,timeZone:e,originalDate:t},v$(y$(t,e,{timeZone:r.timeZone}),n,r)}const od="yyyy-MM-dd",xy="HH:mm:ss.SSS",b$="HH:mm:ss",hc=`${od} ${xy}`,TN=sr("P",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return as(!e||e==="local"?UT(t,t.getTimezoneOffset()):t,hc)},formatDateTime(t,e){return!e||e==="local"?as(t,hc):id(t,e,hc)},formatDate:function(t,e){return!e||e==="local"?as(t,od):id(t,this.timeZone,od)},formatTime:function(t,e,n=xy){return!e||e==="local"?as(t,n):id(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,b$)},formatTimestamp(t,e){return this.formatDateTime($T(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var w$=Object.defineProperty,x$=(t,e,n)=>e in t?w$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>x$(t,typeof e!="symbol"?e+"":e,n);function sd(t,e,n){const r=Tn(t,n==null?void 0:n.in);return isNaN(e)?er((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function C$(t,e){const n=Tn(t,void 0).getDay();return n===0?7:n}function _$(t,e){const n=k$(e)?new e(0):er(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function k$(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const A$=10;let Cy=class{constructor(){ot(this,"subPriority",0)}validate(e,n){return!0}},S$=class extends Cy{constructor(e,n,r,f,h){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=f,h&&(this.subPriority=h)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}},T$=class extends Cy{constructor(e,n){super(),ot(this,"priority",A$),ot(this,"subPriority",-1),this.context=e||(r=>er(n,r))}set(e,n){return n.timestampIsSet?e:er(e,_$(e,this.context))}};class on{run(e,n,r,f){const h=this.parse(e,n,r,f);return h?{setter:new S$(h.value,this.validate,this.set,this.priority,this.subPriority),rest:h.rest}:null}validate(e,n,r){return!0}}class $$ extends on{constructor(){super(...arguments),ot(this,"priority",140),ot(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){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,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Kn={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}/},eo={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 Gn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Ln(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function to(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,f=n[2]?parseInt(n[2],10):0,h=n[3]?parseInt(n[3],10):0,p=n[5]?parseInt(n[5],10):0;return{value:r*(f*tu+h*pl+p*hw),rest:e.slice(n[0].length)}}function _y(t){return Ln(Kn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return Ln(Kn.singleDigit,e);case 2:return Ln(Kn.twoDigits,e);case 3:return Ln(Kn.threeDigits,e);case 4:return Ln(Kn.fourDigits,e);default:return Ln(new RegExp("^\\d{1,"+t+"}"),e)}}function ky(t,e){switch(t){case 1:return Ln(Kn.singleDigitSigned,e);case 2:return Ln(Kn.twoDigitsSigned,e);case 3:return Ln(Kn.threeDigitsSigned,e);case 4:return Ln(Kn.fourDigitsSigned,e);default:return Ln(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ad(t){switch(t){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 Ay(t,e){const n=e>0,r=n?e:1-e;let f;if(r<=50)f=t||100;else{const h=r+50,p=Math.trunc(h/100)*100,b=t>=h%100;f=t+p-(b?100:0)}return n?f:1-f}function Sy(t){return t%400===0||t%4===0&&t%100!==0}class M$ extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const f=h=>({year:h,isTwoDigitYear:n==="yy"});switch(n){case"y":return Gn(Nn(4,e),f);case"yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const f=e.getFullYear();if(r.isTwoDigitYear){const p=Ay(r.year,f);return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}const h=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(h,0,1),e.setHours(0,0,0,0),e}}class I$ extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,r){const f=h=>({year:h,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Gn(Nn(4,e),f);case"Yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,f){const h=ru(e,f);if(r.isTwoDigitYear){const b=Ay(r.year,h);return e.setFullYear(b,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}const p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}}let E$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return ky(n==="R"?4:n.length,e)}set(e,n,r){const f=er(e,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Hs(f)}},L$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return ky(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},R$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"Q":case"QQ":return Nn(n.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,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}};class O$ extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"q":case"qq":return Nn(n.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,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}let D$=class extends on{constructor(){super(...arguments),ot(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ot(this,"priority",110)}parse(e,n,r){const f=h=>h-1;switch(n){case"M":return Gn(Ln(Kn.month,e),f);case"MM":return Gn(Nn(2,e),f);case"Mo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);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,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},N$=class extends on{constructor(){super(...arguments),ot(this,"priority",110),ot(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,r){const f=h=>h-1;switch(n){case"L":return Gn(Ln(Kn.month,e),f);case"LL":return Gn(Nn(2,e),f);case"Lo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);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,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function F$(t,e,n){const r=Tn(t,n==null?void 0:n.in),f=Pf(r,n)-e;return r.setDate(r.getDate()-f*7),Tn(r,n==null?void 0:n.in)}let P$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,r){switch(n){case"w":return Ln(Kn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,f){return Oo(F$(e,r,f),f)}};function W$(t,e,n){const r=Tn(t,void 0),f=Ff(r)-e;return r.setDate(r.getDate()-f*7),r}let B$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,r){switch(n){case"I":return Ln(Kn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Hs(W$(e,r))}};const j$=[31,28,31,30,31,30,31,31,30,31,30,31],z$=[31,29,31,30,31,30,31,31,30,31,30,31];class H$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subPriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"d":return Ln(Kn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear(),f=Sy(r),h=e.getMonth();return f?n>=1&&n<=z$[h]:n>=1&&n<=j$[h]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}}let U$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subpriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,r){switch(n){case"D":case"DD":return Ln(Kn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear();return Sy(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}};function ld(t,e,n){var r,f,h,p;const b=zs(),u=(n==null?void 0:n.weekStartsOn)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.weekStartsOn)??b.weekStartsOn??((p=(h=b.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,g=Tn(t,n==null?void 0:n.in),s=g.getDay(),a=(e%7+7)%7,c=7-u,l=e<0||e>6?e-(s+c)%7:(a+c)%7-(s+c)%7;return sd(g,l,n)}let V$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){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,n){return n>=0&&n<=6}set(e,n,r,f){return e=ld(e,r,f),e.setHours(0,0,0,0),e}};class q$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,r,f){const h=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Gn(Nn(n.length,e),h);case"eo":return Gn(r.ordinalNumber(e,{unit:"day"}),h);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,n){return n>=0&&n<=6}set(e,n,r,f){return e=ld(e,r,f),e.setHours(0,0,0,0),e}}let K$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,r,f){const h=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Gn(Nn(n.length,e),h);case"co":return Gn(r.ordinalNumber(e,{unit:"day"}),h);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,n){return n>=0&&n<=6}set(e,n,r,f){return e=ld(e,r,f),e.setHours(0,0,0,0),e}};function G$(t,e,n){const r=Tn(t,void 0),f=C$(r),h=e-f;return sd(r,h,n)}class Y$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,r){const f=h=>h===0?7:h;switch(n){case"i":case"ii":return Nn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Gn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiii":return Gn(r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Gn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Gn(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"}),f)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=G$(e,r),e.setHours(0,0,0,0),e}}let X$=class extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ad(r),0,0,0),e}},Q$=class extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ad(r),0,0,0),e}};class Z$ extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ad(r),0,0,0),e}}class J$ extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return Ln(Kn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const f=e.getHours()>=12;return f&&r<12?e.setHours(r+12,0,0,0):!f&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class eM extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return Ln(Kn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}}let tM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return Ln(Kn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}};class nM extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return Ln(Kn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const f=r<=24?r%24:r;return e.setHours(f,0,0,0),e}}let rM=class extends on{constructor(){super(...arguments),ot(this,"priority",60),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return Ln(Kn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}},iM=class extends on{constructor(){super(...arguments),ot(this,"priority",50),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return Ln(Kn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}},oM=class extends on{constructor(){super(...arguments),ot(this,"priority",30),ot(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=f=>Math.trunc(f*Math.pow(10,-n.length+3));return Gn(Nn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}},sM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return to(eo.basicOptionalMinutes,e);case"XX":return to(eo.basic,e);case"XXXX":return to(eo.basicOptionalSeconds,e);case"XXXXX":return to(eo.extendedOptionalSeconds,e);case"XXX":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}},aM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return to(eo.basicOptionalMinutes,e);case"xx":return to(eo.basic,e);case"xxxx":return to(eo.basicOptionalSeconds,e);case"xxxxx":return to(eo.extendedOptionalSeconds,e);case"xxx":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}},lM=class extends on{constructor(){super(...arguments),ot(this,"priority",40),ot(this,"incompatibleTokens","*")}parse(e){return _y(e)}set(e,n,r){return[er(e,r*1e3),{timestampIsSet:!0}]}},cM=class extends on{constructor(){super(...arguments),ot(this,"priority",20),ot(this,"incompatibleTokens","*")}parse(e){return _y(e)}set(e,n,r){return[er(e,r),{timestampIsSet:!0}]}};const uM={G:new $$,y:new M$,Y:new I$,R:new E$,u:new L$,Q:new R$,q:new O$,M:new D$,L:new N$,w:new P$,I:new B$,d:new H$,D:new U$,E:new V$,e:new q$,c:new K$,i:new Y$,a:new X$,b:new Q$,B:new Z$,h:new J$,H:new eM,K:new tM,k:new nM,m:new rM,s:new iM,S:new oM,X:new sM,x:new aM,t:new lM,T:new cM},hM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fM=/^'([^]*?)'?$/,pM=/''/g,gM=/\S/,mM=/[a-zA-Z]/;function vM(t,e,n,r){var f,h,p,b;const u=()=>er(n,NaN),g=oy(),s=g.locale??Nf,a=g.firstWeekContainsDate??((h=(f=g.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,c=g.weekStartsOn??((b=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?u():Tn(n,void 0);const l={firstWeekContainsDate:a,weekStartsOn:c,locale:s},o=[new T$(void 0,n)],d=e.match(dM).map(T=>{const _=T[0];if(_ in iu){const C=iu[_];return C(T,s.formatLong)}return T}).join("").match(hM),m=[];for(let T of d){Vf(T)&&ou(T,e,t),Uf(T)&&ou(T,e,t);const _=T[0],C=uM[_];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const F=m.find(E=>L.includes(E.token)||E.token===_);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);m.push({token:_,fullToken:T});const R=C.run(t,T,s.match,l);if(!R)return u();o.push(R.setter),t=R.rest}else{if(_.match(mM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(T==="''"?T="'":_==="'"&&(T=yM(T)),t.indexOf(T)===0)t=t.slice(T.length);else return u()}}if(t.length>0&&gM.test(t))return u();const w=o.map(T=>T.priority).sort((T,_)=>_-T).filter((T,_,C)=>C.indexOf(T)===_).map(T=>o.filter(_=>_.priority===T).sort((_,C)=>C.subPriority-_.subPriority)).map(T=>T[0]);let x=Tn(n,void 0);if(isNaN(+x))return u();const I={};for(const T of w){if(!T.validate(x,l))return u();const _=T.set(x,I,l);Array.isArray(_)?(x=_[0],Object.assign(I,_[1])):x=_}return x}function yM(t){return t.match(fM)[1].replace(pM,"'")}const bM="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=",wM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return bM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=TM.indexOf(Ty[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,r=32*this.scaleFactor*e,f=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*f}px;`,`background-size: ${n}px ${r}px;`,`height: ${f}px;`,`width: ${f}px;`,`padding-top: ${t-1}px;`].join("")}}};function xM(t,e,n,r,f,h){return lt(),hn("div",{style:rs(h.iconStyle)},null,4)}const CM=Ri(wM,[["render",xM]]),_M={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function kM(t,e,n,r,f,h){const p=Ue("rux-icon");return lt(),Zt(p,{size:n.size,icon:n.icon,style:rs(h.colorStyle)},null,8,["size","icon","style"])}const AM=Ri(_M,[["render",kM],["__scopeId","data-v-9af48e85"]]),Ty={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"},cd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},SM=function(t){const e="#000000",n="#ffffff",r=cd[Ty[t]];if(r){const f=+`0x${r.slice(1,3)}`,h=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((f*299+h*587+p*114)/1e3>128)return e}return n},TM=Object.keys(cd),$M={astro:{component:t=>js(AM,{...t})},"astro-status":{component:t=>js(CM,{...t,status:t.icon})}},MM={extras:{component:t=>js(uw,{...t})}},$y="single-spa:app-change",IM={data(){return{show:!1}},created(){window.addEventListener($y,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=Af().length===0},150)},unmounted(){window.removeEventListener($y,this.handleAppChange)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED}}},EM={class:"mx-1"};function LM(t,e,n,r,f,h){const p=Ue("v-card-title"),b=Ue("v-card-text"),u=Ue("v-card");return f.show?(lt(),Zt(u,{key:0},{default:De(()=>[Pe(p,null,{default:De(()=>e[0]||(e[0]=[jt(" 404 Not Found ")])),_:1}),Pe(b,{class:"d-flex align-center mt-3"},{default:De(()=>[e[1]||(e[1]=jt(" The requested URL ")),ar("code",EM,kn(t.$route.fullPath),1),e[2]||(e[2]=jt(" was not routable. ")),e[3]||(e[3]=ar("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0)}const RM=Ri(IM,[["render",LM]]),OM={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const t=/\w+.gem/;return this.response.tree.filter(e=>t.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,qn.get(this.url).then(t=>{this.response=t.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(t){const e=document.createElement("a");e.href=t.url,e.setAttribute("download",t.name),e.click(),e.remove()}}},DM={class:"pa-3"},NM={class:"px-2"},FM={key:0,class:"mt-4"},PM={key:1,class:"mt-4"},WM={key:0},BM={key:1};function jM(t,e,n,r,f,h){const p=Ue("v-spacer"),b=Ue("v-toolbar"),u=Ue("v-row"),g=Ue("v-icon"),s=Ue("v-btn"),a=Ue("v-col"),c=Ue("v-list-item-title"),l=Ue("v-progress-circular"),o=Ue("v-tooltip"),d=Ue("v-list-item"),m=Ue("v-divider"),w=Ue("v-card-text"),x=Ue("v-card"),I=Ue("v-dialog");return lt(),Zt(I,{modelValue:h.show,"onUpdate:modelValue":e[0]||(e[0]=T=>h.show=T),width:"600"},{default:De(()=>[Pe(x,null,{default:De(()=>[Pe(b,{height:"24"},{default:De(()=>[Pe(p),e[1]||(e[1]=ar("span",null," Download Gems ",-1)),Pe(p)]),_:1}),Pe(w,null,{default:De(()=>[ar("div",DM,[Pe(u,{class:"my-2"},{default:De(()=>e[2]||(e[2]=[jt(" Select a download option ")])),_:1}),Pe(u,null,{default:De(()=>[Pe(a,null,{default:De(()=>[ar("div",NM,[Pe(s,{onClick:h.searchGithub,block:"","data-test":"searchGithub",color:"primary",disabled:f.disableSearch},{default:De(()=>[e[4]||(e[4]=jt(" Github ")),Pe(g,{end:"",theme:"dark"},{default:De(()=>e[3]||(e[3]=[jt(" mdi-github ")])),_:1})]),_:1},8,["onClick","disabled"])])]),_:1})]),_:1}),Pe(u,{class:"mt-5"},{default:De(()=>e[5]||(e[5]=[jt(" Community Gems ")])),_:1}),h.listData.length<1?(lt(),hn("div",FM,[Pe(u,{class:"mx-2"},{default:De(()=>e[6]||(e[6]=[ar("span",null," I’m sorry, Dave. No gems available.... ",-1)])),_:1})])):(lt(),hn("div",PM,[(lt(!0),hn(Li,null,Xi(h.listData,(T,_)=>(lt(),hn("div",{key:_},[Pe(d,null,{default:De(()=>[Pe(c,null,{default:De(()=>[jt(kn(T.name),1)]),_:2},1024),Pe(d,{icon:""},{default:De(()=>[f.activeDownload?(lt(),hn("div",WM,[Pe(l,{indeterminate:"",color:"primary"})])):(lt(),hn("div",BM,[Pe(o,{location:"top"},{activator:De(({props:C})=>[Pe(g,_a({ref_for:!0},C,{onClick:L=>h.downloadGem(T),disabled:f.activeDownload}),{default:De(()=>e[7]||(e[7]=[jt(" mdi-cloud-download ")])),_:2},1040,["onClick","disabled"])]),default:De(()=>[e[8]||(e[8]=ar("span",null,"Download Gem",-1))]),_:2},1024)]))]),_:2},1024)]),_:2},1024),_<h.listData.length-1?(lt(),Zt(m,{key:_})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const $N=sr("_",Ri(OM,[["render",jM]])),zM={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){for(const t of this.targets)Gx.get(`/openc3-api/targets/${t.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:t.name,files:e.data})})}};function HM(t,e,n,r,f,h){const p=Ue("v-spacer"),b=Ue("v-toolbar"),u=Ue("v-list-item-title"),g=Ue("v-list-item-subtitle"),s=Ue("v-list-item"),a=Ue("v-checkbox"),c=Ue("v-card-text"),l=Ue("v-btn"),o=Ue("v-card-actions"),d=Ue("v-card"),m=Ue("v-dialog");return lt(),Zt(m,{modelValue:h.show,"onUpdate:modelValue":e[3]||(e[3]=w=>h.show=w),width:"600"},{default:De(()=>[Pe(d,null,{default:De(()=>[Pe(b,{height:"24"},{default:De(()=>[Pe(p),e[4]||(e[4]=ar("span",null," Modified Plugin ",-1)),Pe(p)]),_:1}),Pe(c,{class:"pa-3"},{default:De(()=>[ar("div",null," Plugin "+kn(n.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(lt(!0),hn(Li,null,Xi(f.modifiedTargets,(w,x)=>(lt(),Zt(s,{lines:"two",key:x},{default:De(()=>[Pe(u,null,{default:De(()=>[jt(kn(w.name),1)]),_:2},1024),(lt(!0),hn(Li,null,Xi(w.files,(I,T)=>(lt(),Zt(g,{key:T},{default:De(()=>[jt(kn(I),1)]),_:2},1024))),128))]),_:2},1024))),128)),Pe(a,{modelValue:f.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>f.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),Pe(o,{class:"px-2"},{default:De(()=>[Pe(p),Pe(l,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{h.show=!1,t.$emit("cancel")})},{default:De(()=>e[5]||(e[5]=[jt(" Cancel ")])),_:1}),Pe(l,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{h.show=!1,t.$emit("submit",f.deleteModified)})},{default:De(()=>e[6]||(e[6]=[jt(" Confirm ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const MN=sr("w",Ri(zM,[["render",HM]])),ud=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>it(()=>rt.import("./PluginsTab-B64OvayB-be8b8a771af3d6802e37.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>it(()=>rt.import("./TargetsTab-BkBkXn9A-8425521e65f5456c008e.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>it(()=>rt.import("./InterfacesTab-B4glsR9Z-d5c7b16796e27515e044.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>it(()=>rt.import("./RoutersTab-Cs2dFVNA-aa50a4a447fca3f826bf.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>it(()=>rt.import("./MicroservicesTab-mCdS0v39-72fa5667b8c938eb27e1.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>it(()=>rt.import("./PackagesTab-SWcXumpK-e5ccc20003b13ccdbc6e.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>it(()=>rt.import("./ToolsTab-NveeVXz2-a2a58dfa69fac13c80e8.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>it(()=>rt.import("./RedisTab-CyPo6ADN-aa1a495b5fb6171666f5.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>it(()=>rt.import("./SecretsTab-DVyyyGlG-4344d670cf905ab60969.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>it(()=>rt.import("./SettingsTab-g29K6FyC-fc78aa7aefc9b0f48986.js"),void 0)}],UM={components:{TopBar:QA},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return ud.map(t=>({displayName:t.displayName,path:{name:t.name}}))}}};function VM(t,e,n,r,f,h){const p=Ue("top-bar"),b=Ue("v-tab"),u=Ue("v-tabs"),g=Ue("router-view"),s=Ue("v-card");return lt(),hn("div",null,[Pe(p,{title:f.title},null,8,["title"]),Pe(s,null,{default:De(()=>[Pe(u,{modelValue:f.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>f.curTab=a),"fixed-tabs":""},{default:De(()=>[(lt(!0),hn(Li,null,Xi(h.tabs,(a,c)=>(lt(),Zt(b,{key:c,to:a.path},{default:De(()=>[jt(kn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),Pe(g)]),_:1})])}const qM=Ri(UM,[["render",VM]]),We=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};We.Diff=function(t,e){this[0]=t,this[1]=e},We.Diff.prototype.length=2,We.Diff.prototype.toString=function(){return this[0]+","+this[1]},We.prototype.diff_main=function(t,e,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);let f=r;if(t==null||e==null)throw new Error("Null input. (diff_main)");if(t==e)return t?[new We.Diff(0,t)]:[];typeof n>"u"&&(n=!0);let h=n,p=this.diff_commonPrefix(t,e),b=t.substring(0,p);t=t.substring(p),e=e.substring(p),p=this.diff_commonSuffix(t,e);let u=t.substring(t.length-p);t=t.substring(0,t.length-p),e=e.substring(0,e.length-p);let g=this.diff_compute_(t,e,h,f);return b&&g.unshift(new We.Diff(0,b)),u&&g.push(new We.Diff(0,u)),this.diff_cleanupMerge(g),g},We.prototype.diff_compute_=function(t,e,n,r){let f;if(!t)return[new We.Diff(1,e)];if(!e)return[new We.Diff(-1,t)];let h=t.length>e.length?t:e,p=t.length>e.length?e:t,b=h.indexOf(p);return b!=-1?(f=[new We.Diff(1,h.substring(0,b)),new We.Diff(0,p),new We.Diff(1,h.substring(b+p.length))],t.length>e.length&&(f[0][0]=f[2][0]=-1),f):p.length==1?[new We.Diff(-1,t),new We.Diff(1,e)]:n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},We.prototype.diff_lineMode_=function(t,e,n){let r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;let f=r.lineArray,h=this.diff_main(t,e,!1,n);this.diff_charsToLines_(h,f),this.diff_cleanupSemantic(h),h.push(new We.Diff(0,""));let p=0,b=0,u=0,g="",s="";for(;p<h.length;){switch(h[p][0]){case 1:u++,s+=h[p][1];break;case-1:b++,g+=h[p][1];break;case 0:if(b>=1&&u>=1){h.splice(p-b-u,b+u),p=p-b-u;let a=this.diff_main(g,s,!1,n);for(let c=a.length-1;c>=0;c--)h.splice(p,0,a[c]);p=p+a.length}u=0,b=0,g="",s="";break}p++}return h.pop(),h},We.prototype.diff_bisect_=function(t,e,n){let r=t.length,f=e.length,h=Math.ceil((r+f)/2),p=h,b=2*h,u=new Array(b),g=new Array(b);for(let m=0;m<b;m++)u[m]=-1,g[m]=-1;u[p+1]=0,g[p+1]=0;let s=r-f,a=s%2!=0,c=0,l=0,o=0,d=0;for(let m=0;m<h&&!(new Date().getTime()>n);m++){for(let w=-m+c;w<=m-l;w+=2){let x=p+w,I;w==-m||w!=m&&u[x-1]<u[x+1]?I=u[x+1]:I=u[x-1]+1;let T=I-w;for(;I<r&&T<f&&t.charAt(I)==e.charAt(T);)I++,T++;if(u[x]=I,I>r)l+=2;else if(T>f)c+=2;else if(a){let _=p+s-w;if(_>=0&&_<b&&g[_]!=-1){let C=r-g[_];if(I>=C)return this.diff_bisectSplit_(t,e,I,T,n)}}}for(let w=-m+o;w<=m-d;w+=2){let x=p+w,I;w==-m||w!=m&&g[x-1]<g[x+1]?I=g[x+1]:I=g[x-1]+1;let T=I-w;for(;I<r&&T<f&&t.charAt(r-I-1)==e.charAt(f-T-1);)I++,T++;if(g[x]=I,I>r)d+=2;else if(T>f)o+=2;else if(!a){let _=p+s-w;if(_>=0&&_<b&&u[_]!=-1){let C=u[_],L=p+C-_;if(I=r-I,C>=I)return this.diff_bisectSplit_(t,e,C,L,n)}}}}return[new We.Diff(-1,t),new We.Diff(1,e)]},We.prototype.diff_bisectSplit_=function(t,e,n,r,f){let h=t.substring(0,n),p=e.substring(0,r),b=t.substring(n),u=e.substring(r),g=this.diff_main(h,p,!1,f),s=this.diff_main(b,u,!1,f);return g.concat(s)},We.prototype.diff_linesToChars_=function(t,e){let n=[],r={};n[0]="";function f(u){let g="",s=0,a=-1,c=n.length;for(;a<u.length-1;){a=u.indexOf(`
|
1491
|
+
`,s),a==-1&&(a=u.length-1);let l=u.substring(s,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):r[l]!==void 0)?g+=String.fromCharCode(r[l]):(c==h&&(l=u.substring(s),a=u.length),g+=String.fromCharCode(c),r[l]=c,n[c++]=l),s=a+1}return g}let h=4e4,p=f(t);h=65535;let b=f(e);return{chars1:p,chars2:b,lineArray:n}},We.prototype.diff_charsToLines_=function(t,e){for(let n=0;n<t.length;n++){let r=t[n][1],f=[];for(let h=0;h<r.length;h++)f[h]=e[r.charCodeAt(h)];t[n][1]=f.join("")}},We.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;let n=0,r=Math.min(t.length,e.length),f=r,h=0;for(;n<f;)t.substring(h,f)==e.substring(h,f)?(n=f,h=n):r=f,f=Math.floor((r-n)/2+n);return f},We.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;let n=0,r=Math.min(t.length,e.length),f=r,h=0;for(;n<f;)t.substring(t.length-f,t.length-h)==e.substring(e.length-f,e.length-h)?(n=f,h=n):r=f,f=Math.floor((r-n)/2+n);return f},We.prototype.diff_commonOverlap_=function(t,e){let n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));let f=Math.min(n,r);if(t==e)return f;let h=0,p=1;for(;;){let b=t.substring(f-p),u=e.indexOf(b);if(u==-1)return h;p+=u,(u==0||t.substring(f-p)==e.substring(0,p))&&(h=p,p++)}},We.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;let n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;let f=this;function h(o,d,m){let w=o.substring(m,m+Math.floor(o.length/4)),x=-1,I="",T,_,C,L;for(;(x=d.indexOf(w,x+1))!=-1;){let R=f.diff_commonPrefix(o.substring(m),d.substring(x)),F=f.diff_commonSuffix(o.substring(0,m),d.substring(0,x));I.length<F+R&&(I=d.substring(x-F,x)+d.substring(x,x+R),T=o.substring(0,m-F),_=o.substring(m+R),C=d.substring(0,x-F),L=d.substring(x+R))}return I.length*2>=o.length?[T,_,C,L,I]:null}let p=h(n,r,Math.ceil(n.length/4)),b=h(n,r,Math.ceil(n.length/2)),u;if(!p&&!b)return null;b?p?u=p[4].length>b[4].length?p:b:u=b:u=p;let g,s,a,c;t.length>e.length?(g=u[0],s=u[1],a=u[2],c=u[3]):(a=u[0],c=u[1],g=u[2],s=u[3]);let l=u[4];return[g,s,a,c,l]},We.prototype.diff_cleanupSemantic=function(t){let e=!1,n=[],r=0,f=null,h=0,p=0,b=0,u=0,g=0;for(;h<t.length;)t[h][0]==0?(n[r++]=h,p=u,b=g,u=0,g=0,f=t[h][1]):(t[h][0]==1?u+=t[h][1].length:g+=t[h][1].length,f&&f.length<=Math.max(p,b)&&f.length<=Math.max(u,g)&&(t.splice(n[r-1],0,new We.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,r--,h=r>0?n[r-1]:-1,p=0,b=0,u=0,g=0,f=null,e=!0)),h++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),h=1;h<t.length;){if(t[h-1][0]==-1&&t[h][0]==1){let s=t[h-1][1],a=t[h][1],c=this.diff_commonOverlap_(s,a),l=this.diff_commonOverlap_(a,s);c>=l?(c>=s.length/2||c>=a.length/2)&&(t.splice(h,0,new We.Diff(0,a.substring(0,c))),t[h-1][1]=s.substring(0,s.length-c),t[h+1][1]=a.substring(c),h++):(l>=s.length/2||l>=a.length/2)&&(t.splice(h,0,new We.Diff(0,s.substring(0,l))),t[h-1][0]=1,t[h-1][1]=a.substring(0,a.length-l),t[h+1][0]=-1,t[h+1][1]=s.substring(l),h++),h++}h++}},We.prototype.diff_cleanupSemanticLossless=function(t){function e(r,f){if(!r||!f)return 6;let h=r.charAt(r.length-1),p=f.charAt(0),b=h.match(We.nonAlphaNumericRegex_),u=p.match(We.nonAlphaNumericRegex_),g=b&&h.match(We.whitespaceRegex_),s=u&&p.match(We.whitespaceRegex_),a=g&&h.match(We.linebreakRegex_),c=s&&p.match(We.linebreakRegex_),l=a&&r.match(We.blanklineEndRegex_),o=c&&f.match(We.blanklineStartRegex_);return l||o?5:a||c?4:b&&!g&&s?3:g||s?2:b||u?1:0}let n=1;for(;n<t.length-1;){if(t[n-1][0]==0&&t[n+1][0]==0){let r=t[n-1][1],f=t[n][1],h=t[n+1][1],p=this.diff_commonSuffix(r,f);if(p){r[r.length-p]===`
|
1492
|
+
`&&(p-=1);let a=f.substring(f.length-p);r=r.substring(0,r.length-p),f=a+f.substring(0,f.length-p),h=a+h}let b=r,u=f,g=h,s=e(r,f)+e(f,h);for(;f.charAt(0)===h.charAt(0);){r+=f.charAt(0),f=f.substring(1)+h.charAt(0),h=h.substring(1);let a=e(r,f)+e(f,h);a>=s&&(s=a,b=r,u=f,g=h)}t[n-1][1]!=b&&(b?t[n-1][1]=b:(t.splice(n-1,1),n--),t[n][1]=u,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}},We.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,We.whitespaceRegex_=/\s/,We.linebreakRegex_=/[\r\n]/,We.blanklineEndRegex_=/\n\r?\n$/,We.blanklineStartRegex_=/^\r?\n\r?\n/,We.prototype.diff_cleanupEfficiency=function(t){let e=!1,n=[],r=0,f=null,h=0,p=!1,b=!1,u=!1,g=!1;for(;h<t.length;)t[h][0]==0?(t[h][1].length<this.Diff_EditCost&&(u||g)?(n[r++]=h,p=u,b=g,f=t[h][1]):(r=0,f=null),u=g=!1):(t[h][0]==-1?g=!0:u=!0,f&&(p&&b&&u&&g||f.length<this.Diff_EditCost/2&&p+b+u+g==3)&&(t.splice(n[r-1],0,new We.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,f=null,p&&b?(u=g=!0,r=0):(r--,h=r>0?n[r-1]:-1,u=g=!1),e=!0)),h++;e&&this.diff_cleanupMerge(t)},We.prototype.diff_cleanupMerge=function(t){t.push(new We.Diff(0,""));let e=0,n=0,r=0,f="",h="",p;for(;e<t.length;)switch(t[e][0]){case 1:r++,h+=t[e][1],e++;break;case-1:n++,f+=t[e][1],e++;break;case 0:n+r>1?(n!==0&&r!==0&&(p=this.diff_commonPrefix(h,f),p!==0&&(e-n-r>0&&t[e-n-r-1][0]==0?t[e-n-r-1][1]+=h.substring(0,p):(t.splice(0,0,new We.Diff(0,h.substring(0,p))),e++),h=h.substring(p),f=f.substring(p)),p=this.diff_commonSuffix(h,f),p!==0&&(t[e][1]=h.substring(h.length-p)+t[e][1],h=h.substring(0,h.length-p),f=f.substring(0,f.length-p))),e-=n+r,t.splice(e,n+r),f.length&&(t.splice(e,0,new We.Diff(-1,f)),e++),h.length&&(t.splice(e,0,new We.Diff(1,h)),e++),e++):e!==0&&t[e-1][0]==0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,r=0,n=0,f="",h="";break}t[t.length-1][1]===""&&t.pop();let b=!1;for(e=1;e<t.length-1;)t[e-1][0]==0&&t[e+1][0]==0&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)==t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),b=!0):t[e][1].substring(0,t[e+1][1].length)==t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),b=!0)),e++;b&&this.diff_cleanupMerge(t)},We.prototype.diff_cleanupSplitSurrogates=function(t){let e;for(let n=0;n<t.length;n++){let r=t[n],f=r[1][0],h=r[1][r[1].length-1];if(r[1].length===0){t.splice(n--,1);continue}if(h&&this.isHighSurrogate(h)&&(e=h,r[1]=r[1].slice(0,-1)),e&&f&&this.isHighSurrogate(e)&&this.isLowSurrogate(f)&&(r[1]=e+r[1]),r[1].length===0){t.splice(n--,1);continue}}return t},We.prototype.isHighSurrogate=function(t){let e=t.charCodeAt(0);return e>=55296&&e<=56319},We.prototype.isLowSurrogate=function(t){let e=t.charCodeAt(0);return e>=56320&&e<=57343},We.prototype.digit16=function(t){switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case"A":case"a":return 10;case"B":case"b":return 11;case"C":case"c":return 12;case"D":case"d":return 13;case"E":case"e":return 14;case"F":case"f":return 15;default:throw new Error("Invalid hex-code")}},We.prototype.decodeURI=function(t){try{return decodeURI(t)}catch{let e=0,n="";for(;e<t.length;){if(t[e]!=="%"){n+=t[e++];continue}let r=(this.digit16(t[e+1])<<4)+this.digit16(t[e+2]);if((r&128)===0){n+=String.fromCharCode(r),e+=3;continue}if(t[e+3]!=="%")throw new URIError("URI malformed");let f=(this.digit16(t[e+4])<<4)+this.digit16(t[e+5]);if((f&192)!==128)throw new URIError("URI malformed");if(f=f&63,(r&224)===192){n+=String.fromCharCode((r&31)<<6|f),e+=6;continue}if(t[e+6]!=="%")throw new URIError("URI malformed");let h=(this.digit16(t[e+7])<<4)+this.digit16(t[e+8]);if((h&192)!==128)throw new URIError("URI malformed");if(h=h&63,(r&240)===224){n+=String.fromCharCode((r&15)<<12|f<<6|h),e+=9;continue}if(t[e+9]!=="%")throw new URIError("URI malformed");let p=(this.digit16(t[e+10])<<4)+this.digit16(t[e+11]);if((p&192)!==128)throw new URIError("URI malformed");if(p=p&63,(r&248)===240){let b=(r&7)<<18|f<<12|h<<6|p;if(b>=65536&&b<=1114111){n+=String.fromCharCode((b&65535)>>>10&1023|55296),n+=String.fromCharCode(56320|b&65535&1023),e+=12;continue}}throw new URIError("URI malformed")}return n}},We.prototype.diff_xIndex=function(t,e){let n=0,r=0,f=0,h=0,p;for(p=0;p<t.length&&(t[p][0]!==1&&(n+=t[p][1].length),t[p][0]!==-1&&(r+=t[p][1].length),!(n>e));p++)f=n,h=r;return t.length!=p&&t[p][0]===-1?h:h+(e-f)},We.prototype.diff_prettyHtml=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[],n=/&/g,r=/</g,f=/>/g,h=/\n/g;for(let p=0;p<t.length;p++){let b=t[p][0],u=t[p][1].replace(n,"&").replace(r,"<").replace(f,">").replace(h,"¶<br>");switch(b){case 1:e[p]='<ins style="background:#e6ffe6;">'+u+"</ins>";break;case-1:e[p]='<del style="background:#ffe6e6;">'+u+"</del>";break;case 0:e[p]="<span>"+u+"</span>";break}}return e.join("")},We.prototype.diff_text1=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==1&&(e[n]=t[n][1]);return e.join("")},We.prototype.diff_text2=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==-1&&(e[n]=t[n][1]);return e.join("")},We.prototype.diff_levenshtein=function(t){let e=0,n=0,r=0;for(let f=0;f<t.length;f++){let h=t[f][0],p=t[f][1];switch(h){case 1:n+=p.length;break;case-1:r+=p.length;break;case 0:e+=Math.max(n,r),n=0,r=0;break}}return e+=Math.max(n,r),e},We.prototype.diff_toDelta=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[];for(let n=0;n<t.length;n++)switch(t[n][0]){case 1:e[n]="+"+encodeURI(t[n][1]);break;case-1:e[n]="-"+t[n][1].length;break;case 0:e[n]="="+t[n][1].length;break}return e.join(" ").replace(/%20/g," ")},We.prototype.diff_fromDelta=function(t,e){let n=0,r="",f=[],h=0,p=0,b=e.split(/\t/g);for(let u=0;u<b.length;u++){let g=b[u].substring(1);switch(b[u].charAt(0)){case"+":try{f[h++]=new We.Diff(1,this.decodeURI(g))}catch{throw new Error("Illegal escape in diff_fromDelta: "+g)}break;case"-":case"=":if(n=parseInt(g,10),isNaN(n)||n<0)throw new Error("Invalid number in diff_fromDelta: "+g);r=t.substring(p,p+=n),b[u].charAt(0)=="="?f[h++]=new We.Diff(0,r):f[h++]=new We.Diff(-1,r);break;default:if(b[u])throw new Error("Invalid diff operation in diff_fromDelta: "+b[u])}}if(p!=t.length)throw new Error("Delta length ("+p+") does not equal source text length ("+t.length+").");return f},We.prototype.match_main=function(t,e,n){if(t==null||e==null||n==null)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,t.length)),t==e?0:t.length?t.substring(n,n+e.length)==e?n:this.match_bitap_(t,e,n):-1},We.prototype.match_bitap_=function(t,e,n){if(e.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");let r=this.match_alphabet_(e),f=this;function h(l,o){let d=l/e.length,m=Math.abs(n-o);return f.Match_Distance?d+m/f.Match_Distance:m?1:d}let p=this.Match_Threshold,b=t.indexOf(e,n);b!=-1&&(p=Math.min(h(0,b),p),b=t.lastIndexOf(e,n+e.length),b!=-1&&(p=Math.min(h(0,b),p)));let u=1<<e.length-1;b=-1;let g,s,a=e.length+t.length,c;for(let l=0;l<e.length;l++){for(g=0,s=a;g<s;)h(l,n+s)<=p?g=s:a=s,s=Math.floor((a-g)/2+g);a=s;let o=Math.max(1,n-s+1),d=Math.min(n+s,t.length)+e.length,m=Array(d+2);m[d+1]=(1<<l)-1;for(let w=d;w>=o;w--){let x=r[t.charAt(w-1)];if(l===0?m[w]=(m[w+1]<<1|1)&x:m[w]=(m[w+1]<<1|1)&x|((c[w+1]|c[w])<<1|1)|c[w+1],m[w]&u){let I=h(l,w-1);if(I<=p)if(p=I,b=w-1,b>n)o=Math.max(1,2*n-b);else break}}if(h(l+1,n)>p)break;c=m}return b},We.prototype.match_alphabet_=function(t){let e={};for(let n=0;n<t.length;n++)e[t.charAt(n)]=0;for(let n=0;n<t.length;n++)e[t.charAt(n)]|=1<<t.length-n-1;return e},We.prototype.patch_addContext_=function(t,e){if(e.length==0)return;if(t.start2===null)throw Error("patch not initialized");let n=e.substring(t.start2,t.start2+t.length1),r=0;for(;e.indexOf(n)!=e.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=e.substring(t.start2-r,t.start2+t.length1+r);r+=this.Patch_Margin,t.start2-r>0&&We.prototype.isLowSurrogate(e[t.start2-r])&&r++;let f=e.substring(t.start2-r,t.start2);f&&t.diffs.unshift(new We.Diff(0,f)),t.start2+t.length1+r<e.length&&We.prototype.isHighSurrogate(e[t.start2+t.length1+r])&&r++;let h=e.substring(t.start2+t.length1,t.start2+t.length1+r);h&&t.diffs.push(new We.Diff(0,h)),t.start1-=f.length,t.start2-=f.length,t.length1+=f.length+h.length,t.length2+=f.length+h.length},We.prototype.patch_make=function(t,e,n){let r,f;if(typeof t=="string"&&typeof e=="string"&&typeof n>"u")r=t,f=this.diff_main(r,e,!0),f.length>2&&(this.diff_cleanupSemantic(f),this.diff_cleanupEfficiency(f));else if(t&&typeof t=="object"&&typeof e>"u"&&typeof n>"u")f=t,r=this.diff_text1(f);else if(typeof t=="string"&&e&&typeof e=="object"&&typeof n>"u")r=t,f=e;else if(typeof t=="string"&&typeof e=="string"&&n&&typeof n=="object")r=t,f=n;else throw new Error("Unknown call format to patch_make.");if(f.length===0)return[];f=this.diff_cleanupSplitSurrogates(f);let h=[],p=new We.patch_obj,b=0,u=0,g=0,s=r,a=r;for(let c=0;c<f.length;c++){let l=f[c][0],o=f[c][1];switch(!b&&l!==0&&(p.start1=u,p.start2=g),l){case 1:p.diffs[b++]=f[c],p.length2+=o.length,a=a.substring(0,g)+o+a.substring(g);break;case-1:p.length1+=o.length,p.diffs[b++]=f[c],a=a.substring(0,g)+a.substring(g+o.length);break;case 0:o.length<=2*this.Patch_Margin&&b&&f.length!=c+1?(p.diffs[b++]=f[c],p.length1+=o.length,p.length2+=o.length):o.length>=2*this.Patch_Margin&&b&&(this.patch_addContext_(p,s),h.push(p),p=new We.patch_obj,b=0,s=a,u=g);break}l!==1&&(u+=o.length),l!==-1&&(g+=o.length)}return b&&(this.patch_addContext_(p,s),h.push(p)),h},We.prototype.patch_deepCopy=function(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n],f=new We.patch_obj;f.diffs=[];for(let h=0;h<r.diffs.length;h++)f.diffs[h]=new We.Diff(r.diffs[h][0],r.diffs[h][1]);f.start1=r.start1,f.start2=r.start2,f.length1=r.length1,f.length2=r.length2,e[n]=f}return e},We.prototype.patch_apply=function(t,e){if(t.length==0)return[e,[]];t=this.patch_deepCopy(t);let n=this.patch_addPadding(t);e=n+e+n,this.patch_splitMax(t);let r=0,f=[];for(let h=0;h<t.length;h++){let p=t[h].start2+r,b=this.diff_text1(t[h].diffs),u,g=-1;if(b.length>this.Match_MaxBits?(u=this.match_main(e,b.substring(0,this.Match_MaxBits),p),u!=-1&&(g=this.match_main(e,b.substring(b.length-this.Match_MaxBits),p+b.length-this.Match_MaxBits),(g==-1||u>=g)&&(u=-1))):u=this.match_main(e,b,p),u==-1)f[h]=!1,r-=t[h].length2-t[h].length1;else{f[h]=!0,r=u-p;let s;if(g==-1?s=e.substring(u,u+b.length):s=e.substring(u,g+this.Match_MaxBits),b==s)e=e.substring(0,u)+this.diff_text2(t[h].diffs)+e.substring(u+b.length);else{let a=this.diff_main(b,s,!1);if(b.length>this.Match_MaxBits&&this.diff_levenshtein(a)/b.length>this.Patch_DeleteThreshold)f[h]=!1;else{this.diff_cleanupSemanticLossless(a);let c=0,l;for(let o=0;o<t[h].diffs.length;o++){let d=t[h].diffs[o];d[0]!==0&&(l=this.diff_xIndex(a,c)),d[0]===1?e=e.substring(0,u+l)+d[1]+e.substring(u+l):d[0]===-1&&(e=e.substring(0,u+l)+e.substring(u+this.diff_xIndex(a,c+d[1].length))),d[0]!==-1&&(c+=d[1].length)}}}}}return e=e.substring(n.length,e.length-n.length),[e,f]},We.prototype.patch_addPadding=function(t){let e=this.Patch_Margin,n="";for(let h=1;h<=e;h++)n+=String.fromCharCode(h);for(let h=0;h<t.length;h++)t[h].start1+=e,t[h].start2+=e;let r=t[0],f=r.diffs;if(f.length==0||f[0][0]!=0)f.unshift(new We.Diff(0,n)),r.start1-=e,r.start2-=e,r.length1+=e,r.length2+=e;else if(e>f[0][1].length){let h=e-f[0][1].length;f[0][1]=n.substring(f[0][1].length)+f[0][1],r.start1-=h,r.start2-=h,r.length1+=h,r.length2+=h}if(r=t[t.length-1],f=r.diffs,f.length==0||f[f.length-1][0]!=0)f.push(new We.Diff(0,n)),r.length1+=e,r.length2+=e;else if(e>f[f.length-1][1].length){let h=e-f[f.length-1][1].length;f[f.length-1][1]+=n.substring(0,h),r.length1+=h,r.length2+=h}return n},We.prototype.patch_splitMax=function(t){let e=this.Match_MaxBits;for(let n=0;n<t.length;n++){if(t[n].length1<=e)continue;let r=t[n];t.splice(n--,1);let f=r.start1,h=r.start2,p="";for(;r.diffs.length!==0;){let b=new We.patch_obj,u=!0;for(b.start1=f-p.length,b.start2=h-p.length,p!==""&&(b.length1=b.length2=p.length,b.diffs.push(new We.Diff(0,p)));r.diffs.length!==0&&b.length1<e-this.Patch_Margin;){let s=r.diffs[0][0],a=r.diffs[0][1];s===1?(b.length2+=a.length,h+=a.length,b.diffs.push(r.diffs.shift()),u=!1):s===-1&&b.diffs.length==1&&b.diffs[0][0]==0&&a.length>2*e?(b.length1+=a.length,f+=a.length,u=!1,b.diffs.push(new We.Diff(s,a)),r.diffs.shift()):(a=a.substring(0,e-b.length1-this.Patch_Margin),b.length1+=a.length,f+=a.length,s===0?(b.length2+=a.length,h+=a.length):u=!1,b.diffs.push(new We.Diff(s,a)),a==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(a.length))}p=this.diff_text2(b.diffs),p=p.substring(p.length-this.Patch_Margin);let g=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);g!==""&&(b.length1+=g.length,b.length2+=g.length,b.diffs.length!==0&&b.diffs[b.diffs.length-1][0]===0?b.diffs[b.diffs.length-1][1]+=g:b.diffs.push(new We.Diff(0,g))),u||t.splice(++n,0,b)}}},We.prototype.patch_toText=function(t){let e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e.join("")},We.prototype.patch_fromText=function(t){let e=[];if(!t)return e;let n=t.split(`
|
1493
|
+
`),r=0,f=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;for(;r<n.length;){let h=n[r].match(f);if(!h)throw new Error("Invalid patch string: "+n[r]);let p=new We.patch_obj;for(e.push(p),p.start1=parseInt(h[1],10),h[2]===""?(p.start1--,p.length1=1):h[2]=="0"?p.length1=0:(p.start1--,p.length1=parseInt(h[2],10)),p.start2=parseInt(h[3],10),h[4]===""?(p.start2--,p.length2=1):h[4]=="0"?p.length2=0:(p.start2--,p.length2=parseInt(h[4],10)),r++;r<n.length;){let b=n[r].charAt(0),u="";try{u=decodeURI(n[r].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+u)}if(b=="-")p.diffs.push(new We.Diff(-1,u));else if(b=="+")p.diffs.push(new We.Diff(1,u));else if(b==" ")p.diffs.push(new We.Diff(0,u));else{if(b=="@")break;if(b!=="")throw new Error('Invalid patch mode "'+b+'" in: '+u)}r++}}return e},We.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},We.patch_obj.prototype.toString=function(){let t,e;this.length1===0?t=this.start1+",0":this.length1==1?t=this.start1+1:t=this.start1+1+","+this.length1,this.length2===0?e=this.start2+",0":this.length2==1?e=this.start2+1:e=this.start2+1+","+this.length2;let n=["@@ -"+t+" +"+e+` @@
|
1494
|
+
`],r;We.prototype.diff_cleanupSplitSurrogates(this.diffs);for(let f=0;f<this.diffs.length;f++){switch(this.diffs[f][0]){case 1:r="+";break;case-1:r="-";break;case 0:r=" ";break}n[f+1]=r+encodeURI(this.diffs[f][1])+`
|
1495
|
+
`}return n.join("").replace(/%20/g," ")};function dc(t){return t&&typeof t=="object"&&!Array.isArray(t)&&t!==null}function hd(t,e){return dc(t)&&dc(e)&&Object.keys(e).forEach(n=>{n==="__proto__"||n==="constructor"||(dc(e[n])?((!t[n]||!dc(t[n]))&&(t[n]=e[n]),hd(t[n],e[n])):Object.assign(t,{[n]:e[n]}))}),t}function My(t,e,n=!1){let r=null,f=!0;return(...h)=>{const p=n&&f,b=()=>{t.apply(this,h),r=null};p&&(f=!1,b()),r||(r=setTimeout(b,e))}}function KM(t,e){let n;return(...r)=>{const f=this;clearTimeout(n),n=setTimeout(()=>t.apply(f,r),e)}}function Iy(t=""){return t.replace(/\r\n/g,`
|
1496
|
+
`)}function Ey(t,e,n,r){const f=n-t,h=t+f/2;return`M ${t} ${e} C ${h},${e} ${h},${r} ${n},${r}`}const yn={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 Ly(t,e){let{mode:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.mode!==null&&(n=t.options.left.mode),e===yn.EDITOR_RIGHT&&t.options.right.mode!==null&&(n=t.options.right.mode),n}function Ry(t,e){let{theme:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.theme!==null&&(n=t.options.left.theme),e===yn.EDITOR_RIGHT&&t.options.right.theme!==null&&(n=t.options.right.theme),n}function Oy(t,e){return t.ace.getSession().doc.getLine(e)}function GM(t){return document.getElementById(t.options.left.id).offsetHeight}function Dy(t){const e=document.createElement("div"),n={class:t.className,style:`top:${t.topOffset}px`,title:t.tooltip,"data-diff-index":t.diffIndex};for(const r in n)e.setAttribute(r,n[r]);return e.innerHTML=t.arrowContent,e}function dd(t,e){const n=Math.random().toString(36).substr(2,5),r=`js-${e}-${n}`,f=t.querySelector(`.${e}`);if(f)return f.id=f.id||r,f.id;const h=document.createElement("div");return t.appendChild(h),h.className=e,h.id=r,h.id}function Ny(t,e,n,r){const f=t==="document"?document:document.querySelector(t);f.addEventListener(e,h=>{const p=f.querySelectorAll(n),{target:b}=h;for(let u=0,g=p.length;u<g;u+=1){let s=b;const a=p[u];for(;s&&s!==f;)s===a&&r.call(a,h),s=s.parentNode}})}let fc;function YM(t){if(t.Range)return t.Range;const e=t.acequire||t.require;return e?e("ace/range"):!1}function pc(t={}){if(!(this instanceof pc))return new pc(t);const e=this,n=()=>window?window.ace:void 0;e.options=hd({ace:n(),mode:null,theme:null,element:null,diffGranularity:yn.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},t);const{ace:r}=e.options;if(!r){const f="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(f),new Error(f)}if(fc=YM(r),!fc){const f="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(f),new Error(f)}if(e.options.element===null){const f="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(f),new Error(f)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const f=`Can't find the specified element ${e.options.element}`;return console.error(f),new Error(f)}e.options.left.id=dd(e.el,"acediff__left"),e.options.classes.gutterID=dd(e.el,"acediff__gutter"),e.options.right.id=dd(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(Ly(e,yn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Ly(e,yn.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(Ry(e,yn.EDITOR_LEFT)),e.editors.right.ace.setTheme(Ry(e,yn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Iy(e.options.left.content),-1),e.editors.right.ace.setValue(Iy(e.options.right.content),-1),e.editors.editorHeight=GM(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,XM(e),eI(e),qy(e),e.diff()},1)}pc.prototype={setOptions(t){hd(this.options,t),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const t=new We,e=this.editors.left.ace.getSession().getValue(),n=this.editors.right.ace.getSession().getValue(),r=t.diff_main(n,e);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=Wy(this.editors.left),this.editors.right.lineLengths=Wy(this.editors.right);const f=[],h={left:0,right:0};r.forEach(p=>{const b=p[0];let u=p[1];u.length!==0&&(b===yn.DIFF_EQUAL?(h.left+=u.length,h.right+=u.length):b===yn.DIFF_DELETE?(f.push(Hy(this,yn.DIFF_DELETE,h.left,h.right,u)),h.right+=u.length):b===yn.DIFF_INSERT&&(f.push(Hy(this,yn.DIFF_INSERT,h.left,h.right,u)),h.left+=u.length))},this),this.diffs=rI(this,f),!(this.diffs.length>this.options.maxDiffs)&&(zy(this),Gy(this))},destroy(){const t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,n=e.cloneNode(!1),n.textContent=r,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML="",Fy()}};let Fy=()=>{};function XM(t){t.editors.left.ace.getSession().on("changeScrollTop",My(()=>{jy(t)},16)),t.editors.right.ace.getSession().on("changeScrollTop",My(()=>{jy(t)},16));const e=t.diff.bind(t);t.editors.left.ace.on("change",e),t.editors.right.ace.on("change",e),t.options.left.copyLinkEnabled&&Ny(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.newCodeConnectorLink}`,r=>{Py(t,r,yn.LTR)}),t.options.right.copyLinkEnabled&&Ny(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.deletedCodeConnectorLink}`,r=>{Py(t,r,yn.RTL)});const n=KM(()=>{t.editors.availableHeight=document.getElementById(t.options.left.id).offsetHeight,t.diff()},250);window.addEventListener("resize",n),Fy=()=>{window.removeEventListener("resize",n)}}function Py(t,e,n){const r=parseInt(e.target.getAttribute("data-diff-index"),10),f=t.diffs[r];let h,p,b,u,g,s;n===yn.LTR?(h=t.editors.left,p=t.editors.right,b=f.leftStartLine,u=f.leftEndLine,g=f.rightStartLine,s=f.rightEndLine):(h=t.editors.right,p=t.editors.left,b=f.rightStartLine,u=f.rightEndLine,g=f.leftStartLine,s=f.leftEndLine);let a="";for(let l=b;l<u;l+=1)a+=Oy(h,l),l===b&&a===""&&g!=0&&(a+=`
|
1497
|
+
`),l<h.ace.getSession().getLength()-1&&(a+=`
|
1498
|
+
`);const c=p.ace.getSession().getScrollTop();p.ace.getSession().replace(new fc(g,0,s,0),a),p.ace.getSession().setScrollTop(parseInt(c,10)),t.diff()}function Wy(t){const e=t.ace.getSession().doc.getAllLines(),n=[];return e.forEach(r=>{n.push(r.length+1)}),n}function By(t,e,n,r,f){const h=t.editors[e];r<n&&(r=n);const p=`${f} ${r>n?"lines":"targetOnly"}`;r>n&&(r-=1),h.markers.push(h.ace.session.addMarker(new fc(n,0,r,1),p,"fullLine"))}function jy(t){zy(t),Gy(t),JM(t)}function zy(t){t.editors.left.markers.forEach(e=>{t.editors.left.ace.getSession().removeMarker(e)},t),t.editors.right.markers.forEach(e=>{t.editors.right.ace.getSession().removeMarker(e)},t)}function QM(t,e,n,r,f){const h=t.editors.left.ace.getSession().getScrollTop(),p=t.editors.right.ace.getSession().getScrollTop();t.connectorYOffset=1;const b=-1,u=e*t.lineHeight-h+.5,g=t.gutterWidth+1,s=r*t.lineHeight-p+.5,a=-1,c=n*t.lineHeight-h+t.connectorYOffset+.5,l=t.gutterWidth+1,o=f*t.lineHeight-p+t.connectorYOffset+.5,d=Ey(b,u,g,s),m=Ey(l,o,a,c),w=`L${g},${s} ${l},${o}`,x=`L${a},${c} ${b},${u}`,I=`${d} ${w} ${m} ${x}`,T=document.createElementNS(yn.SVG_NS,"path");T.setAttribute("d",I),T.setAttribute("class",t.options.classes.connector),t.gutterSVG.appendChild(T)}function ZM(t,e,n){if(e.leftEndLine>e.leftStartLine&&t.options.left.copyLinkEnabled){const r=Dy({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled){const r=Dy({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent});t.copyLeftContainer.appendChild(r)}}function JM(t){const e=t.editors.left.ace.getSession().getScrollTop(),n=t.editors.right.ace.getSession().getScrollTop();t.copyRightContainer.style.cssText=`top: ${-e}px`,t.copyLeftContainer.style.cssText=`top: ${-n}px`}function Hy(t,e,n,r,f){let h={};if(e===yn.DIFF_INSERT){let p=Uy(t.editors.left,n,f),b=Vy(t.editors.right,r),u=Ka(t.editors.right,b);const g=Ka(t.editors.left,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&u>0&&p.startChar<g&&c++,h={leftStartLine:p.startLine,leftEndLine:p.endLine+1,rightStartLine:s,rightEndLine:s+c}}else{let p=Uy(t.editors.right,r,f),b=Vy(t.editors.left,n),u=Ka(t.editors.left,b);const g=Ka(t.editors.right,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&u>0&&p.startChar<g&&c++,h={leftStartLine:s,leftEndLine:s+c,rightStartLine:p.startLine,rightEndLine:p.endLine+1}}return h}function Uy(t,e,n){const r={startLine:0,startChar:0,endLine:0,endChar:0},f=e+n.length;let h=0,p=!1,b=!1;t.lineLengths.forEach((g,s)=>{h+=g,!p&&e<h&&(r.startLine=s,r.startChar=e-h+g,p=!0),!b&&f<=h&&(r.endLine=s,r.endChar=f-h+g,b=!0)}),r.startChar>0&&Ka(t,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const u=/\n$/.test(n);return r.startChar>0&&u&&r.endLine++,r}function Ka(t,e){return Oy(t,e).length}function Vy(t,e){const n=t.ace.getSession().doc.getAllLines();let r=0,f=0;for(let h=0;h<n.length;h+=1)if(f+=n[h].length+1,e<f){r=h;break}return f>t.ace.getSession().getValue().length&&(r+=1),r}function qy(t){t.gutterHeight=document.getElementById(t.options.classes.gutterID).clientHeight,t.gutterWidth=document.getElementById(t.options.classes.gutterID).clientWidth;const e=Ky(t,yn.EDITOR_LEFT),n=Ky(t,yn.EDITOR_RIGHT),r=Math.max(e,n,t.gutterHeight);t.gutterSVG=document.createElementNS(yn.SVG_NS,"svg"),t.gutterSVG.setAttribute("width",t.gutterWidth),t.gutterSVG.setAttribute("height",r),document.getElementById(t.options.classes.gutterID).appendChild(t.gutterSVG)}function Ky(t,e){return(e===yn.EDITOR_LEFT?t.editors.left:t.editors.right).ace.getSession().getLength()*t.lineHeight}function eI(t){t.copyRightContainer=document.createElement("div"),t.copyRightContainer.setAttribute("class",t.options.classes.copyRightContainer),t.copyLeftContainer=document.createElement("div"),t.copyLeftContainer.setAttribute("class",t.options.classes.copyLeftContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyRightContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyLeftContainer)}function tI(t){document.getElementById(t.options.classes.gutterID).removeChild(t.gutterSVG),qy(t)}function nI(t){t.copyLeftContainer.innerHTML="",t.copyRightContainer.innerHTML=""}function rI(t,e){const n=[];function r(h){return t.options.diffGranularity===yn.DIFF_GRANULARITY_SPECIFIC?h<1:h<=1}e.forEach((h,p)=>{if(p===0){n.push(h);return}let b=!1;for(let u=0;u<n.length;u+=1)if(r(Math.abs(h.leftStartLine-n[u].leftEndLine))&&r(Math.abs(h.rightStartLine-n[u].rightEndLine))){n[u].leftStartLine=Math.min(h.leftStartLine,n[u].leftStartLine),n[u].rightStartLine=Math.min(h.rightStartLine,n[u].rightStartLine),n[u].leftEndLine=Math.max(h.leftEndLine,n[u].leftEndLine),n[u].rightEndLine=Math.max(h.rightEndLine,n[u].rightEndLine),b=!0;break}b||n.push(h)});const f=[];return n.forEach(h=>{h.leftStartLine===h.leftEndLine&&h.rightStartLine===h.rightEndLine||f.push(h)}),f}function Gy(t){tI(t),nI(t),t.diffs.forEach((e,n)=>{t.options.showDiffs&&(By(t,yn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,t.options.classes.diff),By(t,yn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,t.options.classes.diff),t.options.showConnectors&&QM(t,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),ZM(t,e,n))},t)}const iI={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1},modelValue:Boolean},data(){return{tab:0,localVariables:[],localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},mounted(){const t=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ls.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new t),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(),Ql.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new pc({element:this.$refs.editor,mode:new t,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),Ql.applyVimModeIfEnabled(this.differ.getEditors().left),Ql.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},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())}}},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 t=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;t>5&&(t-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(t),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let t=ls.require("ace/lib/oop"),e=ls.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,n=["VARIABLE"],r=new RegExp(`(\\b${n.join("\\b|\\b")}\\b)`),f=function(){e.call(this);for(let s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};t.inherits(f,e);let h=ls.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,p=ls.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=ls.require("ace/mode/folding/ruby").FoldMode,u=function(){this.HighlightRules=f,this.$outdent=new h,this.$behaviour=new p,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},g=ls.require("ace/mode/ruby").Mode;return t.inherits(u,g),(function(){this.$id="ace/mode/openc3"}).call(u.prototype),u},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(t=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
1501
|
+
`))}).catch(t=>{})},emitSubmit(t){let e={name:this.pluginName,variables:ff(this.localVariables),plugin_txt_lines:t};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let r=n.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Ql.toggleVimMode(this.editor)}}},oI={style:{flex:"1"}},sI={class:"pa-3"},aI={ref:"editor",class:"editor"},lI={key:0};function cI(t,e,n,r,f,h){const p=Ue("v-card-title"),b=Ue("v-icon"),u=Ue("v-row"),g=Ue("v-tab"),s=Ue("v-tabs"),a=Ue("v-text-field"),c=Ue("v-col"),l=Ue("v-window-item"),o=Ue("v-list-item-title"),d=Ue("v-list-item"),m=Ue("v-divider"),w=Ue("v-list"),x=Ue("v-menu"),I=Ue("v-window"),T=Ue("v-btn"),_=Ue("v-spacer"),C=Ue("v-card-actions"),L=Ue("v-card-text"),R=Ue("v-card"),F=Ue("v-dialog");return lt(),Zt(F,{persistent:"",modelValue:h.show,"onUpdate:modelValue":e[5]||(e[5]=E=>h.show=E),width:"80vw"},{default:De(()=>[Pe(R,null,{default:De(()=>[Pe(L,null,{default:De(()=>[Pe(p,null,{default:De(()=>[jt(kn(n.pluginName),1)]),_:1}),n.existingPluginTxt!==null?(lt(),Zt(u,{key:0,class:"notice d-flex flex-row"},{default:De(()=>[Pe(b,{size:"x-large",start:"",color:"yellow"},{default:De(()=>e[6]||(e[6]=[jt(" mdi-alert-box ")])),_:1}),ar("div",oI," The existing plugin.txt is different from the "+kn(n.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+kn(n.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),Pe(u,{class:"pb-3 pr-3"},{default:De(()=>[Pe(s,{modelValue:f.tab,"onUpdate:modelValue":e[0]||(e[0]=E=>f.tab=E),class:"ml-3"},{default:De(()=>[(lt(),Zt(g,{key:0},{default:De(()=>e[7]||(e[7]=[jt(" Variables ")])),_:1})),(lt(),Zt(g,{key:1},{default:De(()=>e[8]||(e[8]=[jt(" plugin.txt ")])),_:1}))]),_:1},8,["modelValue"])]),_:1}),ar("form",{onSubmit:e[4]||(e[4]=ka((...E)=>t.onSubmit&&t.onSubmit(...E),["prevent"]))},[Pe(I,{modelValue:f.tab,"onUpdate:modelValue":e[3]||(e[3]=E=>f.tab=E)},{default:De(()=>[(lt(),Zt(l,{key:0,eager:"true",class:"tab"},{default:De(()=>[ar("div",sI,[Pe(u,{class:"mt-3"},{default:De(()=>[(lt(!0),hn(Li,null,Xi(f.localVariables,(E,H)=>(lt(),hn("div",{key:H},[Pe(c,{style:{width:"220px"}},{default:De(()=>[Pe(a,{clearable:"",type:"text",label:H,modelValue:f.localVariables[H],"onUpdate:modelValue":P=>f.localVariables[H]=P},null,8,["label","modelValue","onUpdate:modelValue"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),n.existingPluginTxt===null?(lt(),Zt(l,{key:"1-new",eager:"true",class:"tab"},{default:De(()=>[Pe(u,{class:"pa-3"},{default:De(()=>[Pe(c,null,{default:De(()=>e[9]||(e[9]=[jt(" This can be edited before installation. ")])),_:1})]),_:1}),ar("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=ka((...E)=>h.showContextMenu&&h.showContextMenu(...E),["prevent"]))},null,544),Pe(x,{modelValue:f.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=E=>f.contextMenu=E),target:[f.menuX,f.menuY]},{default:De(()=>[Pe(w,null,{default:De(()=>[Pe(d,{link:""},{default:De(()=>[Pe(o,{onClick:t.openDocumentation},{default:De(()=>[jt(kn(t.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),Pe(m),Pe(d,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:h.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(lt(),Zt(l,{key:"1-existing",eager:"true",class:"tab"},{default:De(()=>[Pe(u,{class:"pa-3"},{default:De(()=>[Pe(c,null,{default:De(()=>e[10]||(e[10]=[jt(" Existing plugin.txt. This can be edited before installation. ")])),_:1}),Pe(c,{class:"ml-6"},{default:De(()=>e[11]||(e[11]=[jt(" Uneditable plugin.txt from the new plugin. ")])),_:1})]),_:1}),ar("pre",aI,null,512)]),_:1}))]),_:1},8,["modelValue"]),Pe(C,{class:"px-2 mt-2"},{default:De(()=>[n.existingPluginTxt!==null?(lt(),hn("div",lI,[Pe(T,{variant:"text",onClick:h.nextDiff},{default:De(()=>e[12]||(e[12]=[jt(" Next Diff ")])),_:1},8,["onClick"]),Pe(T,{variant:"text",onClick:h.previousDiff},{default:De(()=>e[13]||(e[13]=[jt(" Previous Diff ")])),_:1},8,["onClick"])])):Ur("",!0),Pe(_),Pe(T,{variant:"outlined",onClick:ka(h.close,["prevent"]),"data-test":"edit-cancel"},{default:De(()=>e[14]||(e[14]=[jt(" Cancel ")])),_:1},8,["onClick"]),Pe(T,{variant:"flat",onClick:h.submit,"data-test":"edit-submit"},{default:De(()=>e[15]||(e[15]=[jt(" Install ")])),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const IN=sr("v",Ri(iI,[["render",cI],["__scopeId","data-v-0c2b3caa"]])),uI=ud.find(t=>t.name==="PluginsTab"),Yy=[{path:"/",component:qM,children:[{component:uI.component,path:""},...ud]},{path:"/:pathMatch(.*)*",name:"NotFound",component:RM}];Yy.forEach(Mf);const hI=_f({history:kf(),routes:Yy}),dI={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"}},fI={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:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(t,e,n){this.params=t,this.show=!0,this.resolve=e,this.reject=n},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=""}}},pI=["innerHTML"],gI={key:2},mI={key:3,class:"validate mt-4"};function vI(t,e,n,r,f,h){const p=Ue("v-spacer"),b=Ue("v-toolbar"),u=Ue("v-icon"),g=Ue("v-text-field"),s=Ue("v-card-text"),a=Ue("v-btn"),c=Ue("v-card-actions"),l=Ue("v-card"),o=Ue("v-dialog"),d=Ue("v-app");return lt(),Zt(d,null,{default:De(()=>[Pe(o,{modelValue:t.show,"onUpdate:modelValue":e[1]||(e[1]=m=>t.show=m),width:"600"},{default:De(()=>[Pe(l,null,{default:De(()=>[Pe(b,{height:"24"},{default:De(()=>[Pe(p),ar("span",null,kn(t.params.title),1),Pe(p)]),_:1}),Pe(s,{class:"mt-4 pa-3"},{default:De(()=>[t.params.validateText?(lt(),Zt(u,{key:0,class:"mr-2"},{default:De(()=>e[2]||(e[2]=[jt(" mdi-alert ")])),_:1})):Ur("",!0),t.params.html?(lt(),hn("span",{key:1,innerHTML:t.params.text},null,8,pI)):(lt(),hn("span",gI,kn(t.params.text),1)),t.params.validateText?(lt(),hn("div",mI,[jt(" Enter "+kn(t.params.validateText)+" to confirm! ",1),Pe(g,{variant:"solo",density:"compact","single-line":"",modelValue:t.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>t.validationText=m),rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),Pe(c,{class:"px-2"},{default:De(()=>[Pe(p),t.params.cancelText?(lt(),Zt(a,{key:0,variant:"outlined","data-test":h.dataTestCancel,onClick:h.cancel},{default:De(()=>[jt(kn(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),Pe(a,{variant:"flat",color:t.params.okClass,"data-test":h.dataTestOk,onClick:h.ok},{default:De(()=>[jt(kn(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const yI=Ri(fI,[["render",vI],["__scopeId","data-v-f10fb7f4"]]);class bI{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(yI);e.use(pd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({title:e,text:n,okText:r,okClass:f,validateText:h,cancelText:p,html:b}){return this.mount(),new Promise((u,g)=>{this.$root.dialog({title:e,text:n,okText:r,okClass:f,validateText:h,cancelText:p,html:b},u,g)})}confirm(e,{okText:n="Ok",cancelText:r="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:f,validateText:null,cancelText:r,html:!1})}alert(e,{okText:n="Ok",html:r=!1,okClass:f="primary"}){return this.open({title:"Alert",text:e,okText:n,okClass:f,validateText:null,cancelText:null,html:r})}validate(e,{okText:n="Ok",validateText:r="CONFIRM",cancelText:f="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:h,validateText:r,cancelText:f,html:!1})}}const wI={install(t,e){const n=new bI;t.provide("dialog",n),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=n)}},xI={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`
|
1502
|
+
--toast-bg-color:${cd[this.toastNotification.level]};
|
1503
|
+
--toast-fg-color:${SM(this.toastNotification.level)};
|
1504
|
+
`},contentStyle:function(){return`
|
1505
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1506
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1507
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1508
|
+
`}},methods:{toast:function(t,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=t,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}}},CI={key:0,class:"text-subtitle-1 mr-1 notification-text"},_I={key:1,class:"text-body-2 notification-text"},kI={key:2,class:"text-body-2 notification-text"};function AI(t,e,n,r,f,h){const p=Ue("v-icon"),b=Ue("v-spacer"),u=Ue("v-btn"),g=Ue("v-sheet"),s=Ue("v-slide-y-transition");return lt(),Zt(s,null,{default:De(()=>[xf(Pe(g,{style:rs(h.toastStyle),class:"toast-notification",onClick:h.expand},{default:De(()=>[Pe(p,{class:"mr-1 notification-text"},{default:De(()=>[jt(kn(h.toastNotificationIcon),1)]),_:1}),ar("div",{class:"toast-content",style:rs(h.contentStyle)},[t.toastNotification.title?(lt(),hn("span",CI,kn(t.toastNotification.title)+": ",1)):Ur("",!0),t.toastNotification.body?(lt(),hn("span",_I,kn(t.toastNotification.body),1)):Ur("",!0),t.toastNotification.message?(lt(),hn("span",kI,kn(t.toastNotification.message),1)):Ur("",!0)],4),Pe(b),Pe(u,{variant:"text",onClick:ka(h.hide,["stop"]),class:"notification-text"},{default:De(()=>e[0]||(e[0]=[jt(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Cf,t.showToast]])]),_:1})}const SI=Ri(xI,[["render",AI],["__scopeId","data-v-b0459ba8"]]);class TI{constructor(e={}){var n;this.$store=e.store,this.mounted=!1,this.$root=null,(n=window.$cosmosNotify)!=null&&n.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=Jc(SI);e.use(pd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({method:e,title:n,body:r,message:f,level:h,duration:p,type:b="alert",logToConsole:u=!1,saveToHistory:g=!0}){this.mount(),u&&console.log(f?`${h.toUpperCase()} - ${f}`:`${h.toUpperCase()} - ${n}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:n,body:r,message:f,level:h}),this[e]({title:n,body:r,message:f,level:h,duration:p,type:b})}toast({title:e,body:n,message:r,level:f,duration:h,type:p}){this.$root.toast({title:e,body:n,message:r,level:f,type:p},h)}critical({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}caution({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}off({title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:n,message:r,type:f,duration:h,logToConsole:p,saveToHistory:b})}}const $I={install(t,e){const n=new TI(e);t.provide("notify",n),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=n)}},Xy=100,Qy=Sf({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:t=>e=>t.namedWidgets[e]},mutations:{notifyAddHistory:(t,e)=>{t.notifyHistory.length>=Xy&&(t.notifyHistory.length=Xy-1),t.notifyHistory.unshift(e)},notifyClearHistory:t=>{t.notifyHistory=[]},setNamedWidget:(t,e)=>{Object.assign(t.namedWidgets,e)},clearNamedWidget:(t,e)=>{delete t.namedWidgets[e]}},modules:{}});function Zy(t){let e;return t!==null&&typeof t=="object"&&((e=Object.getPrototypeOf(t))===Object.prototype||e===null)}function MI(t,e){const n={};for(const r of e)Object.hasOwn(t,r)&&(n[r]=t[r]);return n}function Jy(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const f in t)r[f]=t[f];for(const f in e){const h=t[f],p=e[f];if(Zy(h)&&Zy(p)){r[f]=Jy(h,p,n);continue}if(n&&Array.isArray(h)&&Array.isArray(p)){r[f]=n(h,p);continue}r[f]=p}return r}function Ga(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ga.cache.has(t))return Ga.cache.get(t);const e=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ga.cache.set(t,e),e}Ga.cache=new Map;function II(t){gf(`Vuetify: ${t}`)}function e0(t,e){return n=>Object.keys(t).reduce((r,f)=>{const h=typeof t[f]=="object"&&t[f]!=null&&!Array.isArray(t[f])?t[f]:{type:t[f]};return n&&f in n?r[f]={...h,default:n[f]}:r[f]=h,e&&!r[f].source&&(r[f].source=e),r},{})}function t0(t,e){const n=bf();if(!n)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return n}function EI(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t0("injectSelf");const{provides:n}=e;if(n&&t in n)return n[t]}const fd=Symbol.for("vuetify:defaults");function n0(){const t=mf(fd);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function LI(t,e){var n,r;return typeof((n=t.props)==null?void 0:n[e])<"u"||typeof((r=t.props)==null?void 0:r[Ga(e)])<"u"}function RI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n0();const r=t0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const f=Zc(()=>{var u;return(u=n.value)==null?void 0:u[t._as??e]}),h=new Proxy(t,{get(u,g){var s,a,c,l,o,d,m;const w=Reflect.get(u,g);return g==="class"||g==="style"?[(s=f.value)==null?void 0:s[g],w].filter(x=>x!=null):typeof g=="string"&&!LI(r.vnode,g)?((a=f.value)==null?void 0:a[g])!==void 0?(c=f.value)==null?void 0:c[g]:((o=(l=n.value)==null?void 0:l.global)==null?void 0:o[g])!==void 0?(m=(d=n.value)==null?void 0:d.global)==null?void 0:m[g]:w:w}}),p=vf();yf(()=>{if(f.value){const u=Object.entries(f.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});p.value=u.length?Object.fromEntries(u):void 0}else p.value=void 0});function b(){const u=EI(fd,r);wf(fd,Zc(()=>p.value?Jy((u==null?void 0:u.value)??{},p.value):u==null?void 0:u.value))}return{props:h,provideSubDefaults:b}}function gc(t){if(t._setup=t._setup??t.setup,!t.name)return II("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=e0(t.props??{},t.name)();const e=Object.keys(t.props).filter(n=>n!=="class"&&n!=="style");t.filterProps=function(n){return MI(n,e)},t.props._as=String,t.setup=function(n,r){const f=n0();if(!f.value)return t._setup(n,r);const{props:h,provideSubDefaults:p}=RI(n,n._as??t.name,f),b=t._setup(h,r);return p(),b}}return t}function OI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(t?gc:pf)(e)}const DI=[String,Function,Object,Array],mc=e0({icon:{type:DI},tag:{type:String,required:!0}},"icon");OI()({name:"VComponentIcon",props:mc(),setup(t,e){let{slots:n}=e;return()=>{const r=t.icon;return Pe(t.tag,null,{default:()=>{var f;return[t.icon?Pe(r,null,null):(f=n.default)==null?void 0:f.call(n)]}})}}}),gc({name:"VSvgIcon",inheritAttrs:!1,props:mc(),setup(t,e){let{attrs:n}=e;return()=>Pe(t.tag,_a(n,{style:null}),{default:()=>[Pe("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?Pe("path",{d:r[0],"fill-opacity":r[1]},null):Pe("path",{d:r},null)):Pe("path",{d:t.icon},null)])]})}}),gc({name:"VLigatureIcon",props:mc(),setup(t){return()=>Pe(t.tag,null,{default:()=>[t.icon]})}});const NI=gc({name:"VClassIcon",props:mc(),setup(t){return()=>Pe(t.tag,{class:t.icon},null)}}),FI={component:t=>js(NI,{...t,class:"mdi"})},pd=Tf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:dI}},icons:{defaultSet:"mdi",sets:{mdi:FI,...$M,...MM}}}),gd=Xb({createApp:Jc,appOptions:{render(){return js(iw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(hI),t.use(Qy),t.use(pd),t.use(wI),t.use($I,{store:Qy})}}),EN=sr("f",gd.bootstrap),LN=sr("g",gd.mount),RN=sr("u",gd.unmount)}}});
|